Open source and extensible Platform as a Service (PaaS).

tsuru

Build Status Go Report Card

What is tsuru?

tsuru is an extensible and open source Platform as a Service (PaaS) that makes application deployments faster and easier. With tsuru, you don’t need to think about servers at all. As an application developer, you can:

  • Write apps in the programming language of your choice
  • Back apps with add-on resources such as SQL and NoSQL databases, including memcached, Redis, and many others
  • Manage apps using the tsuru command-line tool

Links:

Quick Start

With the purpose of testing tsuru and/or for development, you can use the installer to have tsuru up and running. The installer is an experimental feature.

From Binary

Getting tsuru-client

Download the latest release for your platform at: https://github.com/tsuru/tsuru-client/releases/

Example for release 1.1.1 and OS X:

$ curl -sSL https://github.com/tsuru/tsuru-client/releases/download/1.1.1/tsuru-1.1.1-darwin_amd64.tar.gz | tar xz

Call tsuru installer

$ tsuru install create

From Source

Getting tsuru-client

You need to have Go properly installed on your machine.

$ git clone https://github.com/tsuru/tsuru-client $GOPATH/src/github.com/tsuru/tsuru-client
$ cd $GOPATH/src/github.com/tsuru/tsuru-client
$ make install

Create an installer config

Create the tsuru installer config files with:

$ tsuru install config init

Replace the tsuru API image tag with the latest tag in install-compose.yml:

$ sed -i'' -e 's/api:v1/api:latest/g' install-compose.yml

Call tsuru installer

$ $GOPATH/bin/tsuru install create -c install-config.yml -e install-compose.yml

Testing

If everything's gone well you have the tsuru running in a VirtualBox VM. Call app-list to see tsuru working, this command needs to return one app called tsuru-dashboard.

$ tsuru app-list
Owner
tsuru
Tsuru is an extensible open source Platform as a Service.
tsuru
Comments
  • Architecture

    Architecture

    Just one question: do yoi have any drawings for Tsuru Architecture?

    For example, will be possible to split each components on multiple servers, like one git server, 5 node servers (with docker), 6 mysql servers, and so on?

    AFAIK , the standard installation will place everything on the same server with capability to use external mysql servers. But what If I would like to have redundancy and multiple nodes?

  • cannot start app containers

    cannot start app containers

    I'm using docker provisioner and getting this error with debug set. The images are in the docker registry.

    create container for app abyss, based on image xxxxx.domain.com:8080/tsuru/abyss
    
    error on creating container in docker abyss - No such image
    

    Here is docker image list

    REPOSITORY                                    TAG
     IMAGE ID            CREATED             VIRTUAL SIZE
    xxxxx.domain.com:8080/tsuru/abyss    latest
     515a19752542        10 minutes ago      634 MB
    

    Here is the last of tsuru config

    registry: xxxxx.domain.com:8080
    repository-namespace: tsuru
    

    Docker registry files

    root@p:/var/lib/docker-registry/repositories/tsuru/abyss/tags# ls -la
    total 12
    drwxr-xr-x 2 root root 4096 Mar 22 04:23 .
    drwxr-xr-x 3 root root 4096 Mar 22 04:23 ..
    -rw-r--r-- 1 root root   66 Mar 22 04:23 latest
    
  • app: use pre-receive instead of post-receive for deployment

    app: use pre-receive instead of post-receive for deployment

    Currently, we use post-receive to replicate code across units of the application, we should use pre-receive. This is a large change, but for good. By using pre-receive, Tsuru would reject any push that won't deploy, preserving the state of the bare repository.

    In order to make this change, cloneRepository handler would need to receive the object ID (the commit identifier). The pre-receive hook would look something like this:

    #!/bin/bash -el
    app_dir=${PWD##*/}
    app_name=${app_dir/.git/}
    url="${TSURU_HOST}/apps/${app_name}/repository/clone"
    hash=`read line | awk '{print $2}'`
    curl -H "Authorization: bearer ${TSURU_TOKEN}" -d "version=${hash}" -s -N --max-time 1800 $url
    

    But then we need to decide how provisioners will handle that. Currently, the provisioner is responsible for deployment. We can pass another parameter to the Deploy method, "version":

    type Provisioner interface {
        // other methods
    
       // Deploy updates the code of the app in units to match the given version, logging progress in the given writer.
        Deploy(app provision.App, version string, w io.Writer) error
    }
    

    And the provisioner decides what "version" means and how to handle it. Currently, it would be a git commit identifier, but the name support other things, like a SVN or mercurial commit, or just a binary version. Again, it's up to the provisioner, tsuru does not care.

    This change would automatically fix #442.

  • not able to add mysql-api according to docs

    not able to add mysql-api according to docs

    I followed this howto: http://docs.tsuru.io/en/latest/services/mysql-example.html

    When I want to add instance, I get error: http://pastebin.com/raw.php?i=BB11hZdC

    I tried:

    root@a:~# curl -d 'name=blog' http://mysql-api.example.com:8888/resources
    int() argument must be a string or a number, not 'NoneType'root@a:~#
    

    It's very similar to this issue: https://github.com/globocom/tsuru/issues/667, but I can't find there solution.

    Thanks for help

  • How to upgrade platforms?

    How to upgrade platforms?

    I'm testing PHP platform. Every time that I build a new image and I push it to the central registry (we are using a custom registry), the push will be ok but I'm unable to create a new tsuru app from that image.

    The old image is always used, and I have to create every time a brand new platform. Do you have any image cache somewhere? Any way to force a full rebuild for the platform ignoring cache or something similar ?

    I think that tsusu see a previously known platform name and use the old image instead downloading the new image from the repository

  • installer: can't add node

    installer: can't add node

    On Google Cloud, these are the latest lines when running tsuru install

    Tsuru API successfully installed!
    Bootstrapping Tsuru API...adding target
    New target cloudster-test -> http://1.2.3.4:8080 added to target list and defined as the current target
    log in with default user: [email protected]: 
    Successfully logged in!
    adding pool
    Pool successfully registered.
    creating node 1/3...
    Error: Error bootstrapping tsuru: failed to create node: 404 page not found
    
  • MySQL Service

    MySQL Service

    I'm following this guide: http://docs.tsuru.io/en/latest/services/mysql-example.html

    bot something is not working properly. My app is running, but is not responding to HTTP request

    I think that gunicorn is not running properly. How can I debug gunicorn output?

  • provison/docker:

    provison/docker: "remote: No such container: 0cbe3eba580b"

    I've reinstalled a docker node and created a brand new tsuru/php container Now, when pushing with git, i received this error:

    remote: No such container: 0cbe3eba580b

    I think that samewhere is stored the old image ID. How can I remove this "cache" ?

  • Trouble with sharedfs

    Trouble with sharedfs

    Here's my config for docker: block:

        sharedfs:
            hostdir: /mnt/storage/dockerstor
            mountpoint: /storage
            app-isolation: true
    

    When I try to re-start tsuru-server-api, it crashed without any output.

    Additional information:

    Docker version 1.3.1, Tsuru-server: latest On Ubuntu 14.04 x64

        $ ls -la /mnt/storage/dockerstor
        total 0
        drwxrwxrwx 1 tsuru uulm 0 Nov 25 15:38 .
        drwxrwxr-x 1 root  root 0 Nov 24 14:17 ..
    

    And in fstab :

    192.168.26.190:6789:/   /mnt/storage    ceph    name=foo,secret=secrt_string        0  2
    
  • Error to Work - get hipache page

    Error to Work - get hipache page

    I met Tsuru few days ago, I could have tried to install before and works, but now after the installation of Tsuru-server when I try to create some command by Tsuru-client get this error:

    Mac-Pro-de-jadson:teste jadson$ tsuru login [email protected]
    Password: 
    Error: <html>
      <head>
        <title>No Application Configured</title>
        <style>
          body { background-color: #fff; margin: 0px; padding-top: 280px; text-align: center; }
          h1   { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 24px; font-weight: normal; }
          h2   { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; font-size: 14px; color: #999; font-weight: normal; }
        </style>
      </head>
      <body>
        <div class="message">
          <h1>No Application Configured</h1>
          <h2>This domain is not associated with an application.</h2>
        </div>
      </body>
    </html>
    

    is the same page that is on port 80 when the access IP server directly by the browser.

    Does anyone have any idea how to solve?

    Leveraging the question: Dashboard Tsuru is already present in the normal installation, or is it necessary to create an "app" within the tsuru, with the client or admin?

    PS: I'm following the installation guide that has on the tsuru.io site, using ubuntu 12.04 (but the error also happens with ubuntu 13.10) - I did this in the DigitalOcean and Vagrant, both the same error.

    Thanks!

  • Docker install docs broken

    Docker install docs broken

    The docs at http://docs.tsuru.io/en/latest/docker.html refer to /vagrant in the Gandalf and API server section as well as to an unknown shell variable host_ip.

  • build(deps): bump github.com/aws/aws-sdk-go from 1.28.2 to 1.33.0

    build(deps): bump github.com/aws/aws-sdk-go from 1.28.2 to 1.33.0

    Bumps github.com/aws/aws-sdk-go from 1.28.2 to 1.33.0.

    Changelog

    Sourced from github.com/aws/aws-sdk-go's changelog.

    Release v1.33.0 (2020-07-01)

    Service Client Updates

    • service/appsync: Updates service API and documentation
    • service/chime: Updates service API and documentation
      • This release supports third party emergency call routing configuration for Amazon Chime Voice Connectors.
    • service/codebuild: Updates service API and documentation
      • Support build status config in project source
    • service/imagebuilder: Updates service API and documentation
    • service/rds: Updates service API
      • This release adds the exceptions KMSKeyNotAccessibleFault and InvalidDBClusterStateFault to the Amazon RDS ModifyDBInstance API.
    • service/securityhub: Updates service API and documentation

    SDK Features

    • service/s3/s3crypto: Introduces EncryptionClientV2 and DecryptionClientV2 encryption and decryption clients which support a new key wrapping algorithm kms+context. (#3403)
      • DecryptionClientV2 maintains the ability to decrypt objects encrypted using the EncryptionClient.
      • Please see s3crypto documentation for migration details.

    Release v1.32.13 (2020-06-30)

    Service Client Updates

    • service/codeguru-reviewer: Updates service API and documentation
    • service/comprehendmedical: Updates service API
    • service/ec2: Updates service API and documentation
      • Added support for tag-on-create for CreateVpc, CreateEgressOnlyInternetGateway, CreateSecurityGroup, CreateSubnet, CreateNetworkInterface, CreateNetworkAcl, CreateDhcpOptions and CreateInternetGateway. You can now specify tags when creating any of these resources. For more information about tagging, see AWS Tagging Strategies.
    • service/ecr: Updates service API and documentation
      • Add a new parameter (ImageDigest) and a new exception (ImageDigestDoesNotMatchException) to PutImage API to support pushing image by digest.
    • service/rds: Updates service documentation
      • Documentation updates for rds

    Release v1.32.12 (2020-06-29)

    Service Client Updates

    • service/autoscaling: Updates service documentation and examples
      • Documentation updates for Amazon EC2 Auto Scaling.
    • service/codeguruprofiler: Updates service API, documentation, and paginators
    • service/codestar-connections: Updates service API, documentation, and paginators
    • service/ec2: Updates service API, documentation, and paginators
      • Virtual Private Cloud (VPC) customers can now create and manage their own Prefix Lists to simplify VPC configurations.

    Release v1.32.11 (2020-06-26)

    Service Client Updates

    • service/cloudformation: Updates service API and documentation
      • ListStackInstances and DescribeStackInstance now return a new StackInstanceStatus object that contains DetailedStatus values: a disambiguation of the more generic Status value. ListStackInstances output can now be filtered on DetailedStatus using the new Filters parameter.
    • service/cognito-idp: Updates service API

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

  • JWK Support

    JWK Support

    Tsuru API works well with CLIs and backends for frontends, each oauth2 token must be stored in database and oauth2 provider validate these tokens, but we need to think to do a step further in terms of usage, actually we can't negotiate a token with auth provider using implicit flow and pass through Tsuru API server, the server must know the token previously.

    To achieve a support to use API using a Single Page Applications, let's introduce JWK support.

    JWK is a standard to validate tokens without calling a identity provider, https://www.rfc-editor.org/rfc/rfc7517.

    what will happen:

    The browser will negotiate a JWT token with an identity provider, the token will pass as a Authorization header, tsuru will validate the token based on standard claims, and response directly to the user browser.

    Strong Important Validations:

    • use sub claim as a user email
    • validate expiration of token
    • validate audience field
    • validate by public key of JWK
  • Vulnerability in sphinx version 1.7.4

    Vulnerability in sphinx version 1.7.4

    -> Vulnerability found in sphinx version 1.7.4 Vulnerability ID: 38330 Affected spec: <3.0.4 ADVISORY: Sphinx 3.0.4 updates jQuery version from 3.4.1 to 3.5.1 for security reasons. CVE-2020-11022 For more information, please visit https://pyup.io/vulnerabilities/CVE-2020-11022/38330/

    -> Vulnerability found in sphinx version 1.7.4 Vulnerability ID: 45775 Affected spec: <3.0.4 ADVISORY: Sphinx 3.0.4 updates jQuery version from 3.4.1 to 3.5.1 for security reasons. CVE-2020-11023 For more information, please visit https://pyup.io/vulnerabilities/CVE-2020-11023/45775/

  • Documenting `make local`

    Documenting `make local`

    I have documented the steps required for installing Tsuru using make local in linux. I have tried to account for small obstacles and workarounds encountered while running the makefile.

    It partially fixes #2575, as macOS users may face some different errors while documenting, hope it helps!

  • Enable alias on register command

    Enable alias on register command

    Close #2576

    Enable alias on register new command.

    When register a new command, now you can inform alias field to generate a new alias.

    e.g. tsuru app log and tsuru app logs call the same command run.

  • Tsuru CLI - alias for commands

    Tsuru CLI - alias for commands

    Is your feature request related to a problem? Please describe. N/A

    Describe the solution you'd like

    Be able to run tsuru cli commands with a alias eg. tsuru log same with tsuru logs

    Describe alternatives you've considered.

    Create a alias on bash.

    Additional context

    I'm used to use logs as command for log view, like in docker logs. It would be awesome being able to call with log or logs

An open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developersAn open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developers
An open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developersAn open-source, distributed, cloud-native CD (Continuous Delivery) product designed for developers

Developer-oriented Continuous Delivery Product ⁣ English | 简体中文 Table of Contents Zadig Table of Contents What is Zadig Quick start How to use? How to

Oct 19, 2021
Clutch provides Extensible platform for infrastructure management
Clutch provides Extensible platform for infrastructure management

Clutch provides everything you need to simplify operations and in turn improve your developer experience and operational capabilities. It comes with several out-of-the-box features for managing cloud-native infrastructure, but is designed to be org-agnostic and easily taught how to find or interact with whatever you run, wherever you run it.

Jan 1, 2023
TriggerMesh open source event-driven integration platform powered by Kubernetes and Knative.

TriggerMesh open source event-driven integration platform powered by Kubernetes and Knative. TriggerMesh allows you to declaratively define event flows between sources and targets as well as add even filter, splitting and processing using functions.

Dec 30, 2022
🔥 🔥 Open source cloud native security observability platform. Linux, K8s, AWS Fargate and more. 🔥 🔥
🔥 🔥   Open source cloud native security observability platform. Linux, K8s, AWS Fargate and more. 🔥 🔥

CVE-2021-44228 Log4J Vulnerability can be detected at runtime and attack paths can be visualized by ThreatMapper. Live demo of Log4J Vulnerability her

Jan 1, 2023
go-opa-validate is an open-source lib that evaluates OPA (open policy agent) policy against JSON or YAML data.
go-opa-validate is an open-source lib that evaluates OPA (open policy agent) policy against JSON or YAML data.

go-opa-validate go-opa-validate is an open-source lib that evaluates OPA (open policy agent) policy against JSON or YAML data. Installation Usage Cont

Nov 17, 2022
Bubbly is an open-source platform that gives you confidence in your continuous release process.
Bubbly is an open-source platform that gives you confidence in your continuous release process.

Bubbly Bubbly - Release Readiness in a Bubble Bubbly emerged from a need that many lean software teams practicing Continuous Integration and Delivery

Nov 29, 2022
KubeCube is an open source enterprise-level container platform
KubeCube is an open source enterprise-level container platform

KubeCube English | 中文文档 KubeCube is an open source enterprise-level container platform that provides enterprises with visualized management of Kuberne

Jan 4, 2023
The open source public cloud platform. An AWS alternative for the next generation of developers.
The open source public cloud platform. An AWS alternative for the next generation of developers.

M3O M3O is an open source public cloud platform. We are building an AWS alternative for the next generation of developers. Overview AWS was a first ge

Jan 2, 2023
An extensible tool for creating your own in cluster health endpoints

healthyk8s an extensible tool for creating your own "in cluster" health endpoints Why? allows for creating a health endpoint for anything - external r

Oct 26, 2021
Extensible Provisioning Protocol (EPP) in Go

EPP for Go Extensible Provisioning Protocol (EPP) for Go. EPP is an XML-based protocol for provisioning and managing domain names and other objects at

Jan 18, 2022
Vilicus is an open source tool that orchestrates security scans of container images(docker/oci) and centralizes all results into a database for further analysis and metrics.
Vilicus is an open source tool that orchestrates security scans of container images(docker/oci) and centralizes all results into a database for further analysis and metrics.

Vilicus Table of Contents Overview How does it work? Architecture Development Run deployment manually Usage Example of analysis Overview Vilicus is an

Dec 6, 2022
Open Source runtime tool which help to detect malware code execution and run time mis-configuration change on a kubernetes cluster
Open Source runtime tool which help to detect malware code execution and run time mis-configuration change on a kubernetes cluster

Kube-Knark Project Trace your kubernetes runtime !! Kube-Knark is an open source tracer uses pcap & ebpf technology to perform runtime tracing on a de

Sep 19, 2022
Open Source runtime scanner for OpenShift cluster and perform security audit checks based on CIS RedHat OpenShift Benchmark specification
Open Source runtime scanner for OpenShift cluster and perform security audit checks based on CIS RedHat OpenShift Benchmark specification

OpenShift-Ordeal Scan your Openshift cluster !! OpenShift-Ordeal is an open source audit scanner who perform audit check on OpenShift Cluster and outp

Sep 6, 2022
Moby: an open-source project created by Docker to enable and accelerate software containerization
Moby: an open-source project created by Docker to enable and accelerate software containerization

The Moby Project Moby is an open-source project created by Docker to enable and accelerate software containerization. It provides a "Lego set" of tool

Dec 10, 2021
Hexa is the open-source, standards-based policy orchestration software for multi-cloud and hybrid businesses.

Hexa Policy Orchestrator Hexa is the open-source, standards-based policy orchestration software for multi-cloud and hybrid businesses. The Hexa projec

Dec 22, 2022
Open Source runtime scanner for Linux containers (LXD), It performs security audit checks based on CIS Linux containers Benchmark specification
Open Source runtime scanner for Linux containers (LXD), It performs security audit checks based on CIS Linux containers  Benchmark specification

lxd-probe Scan your Linux container runtime !! Lxd-Probe is an open source audit scanner who perform audit check on a linux container manager and outp

Dec 26, 2022
Devtron is an open source software delivery workflow for kubernetes written in go.
Devtron is an open source software delivery workflow for kubernetes written in go.

Devtron is an open source software delivery workflow for kubernetes written in go.

Jan 8, 2023