Giter Club home page Giter Club logo

tsuru's Introduction

#Tsuru

Build Status

##What is Tsuru?

Tsuru is an open Platform-as-a-Service (PaaS).

##Installation

Please check the INSTALL file for installation instructions.

##Server configuration

TODO!

##Usage

After installing the server, build the cmd/main.go file with the name you wish, and add it to your $PATH. Here we'll call it tsuru. Then you must set the target with your server url (tsuru target), like:

% tsuru target tsuru.myhost.com
% tsuru target localhost:8080

After that, all you need is create a user and authenticate to start creating apps and pushing code to them:

% tsuru user-create [email protected]
% tsuru login [email protected]

Every command has a help, to access it, try:

% tsuru help command

Then, create a team:

% tsuru team-create myteam

Your user will be automatically added to this team.

To create an app:

% tsuru app-create myapp gunicorn

The available frameworks are listed at https://github.com/globocom/charms.

The command output will return your the git remote url for your app, you should add it to your git repository:

% git remote add tsuru [email protected]:myapp.git

When your app is ready, you can push to it. To check whether it is ready or not, you can use:

% tsuru app-list

This will return something like:

+-------------+---------+--------------+
| Application | State   | Ip           |
+-------------+---------+--------------+
| myapp       | STARTED | 10.10.10.10  |
+-------------+---------+--------------+

You can try to push now, but you'll get a permission error, because you haven't pushed your key yet.

% tsuru key-add

This will search for a id_rsa.pub file in ~/.ssh/, if you don't have a generated key yet, you should generate one before running this command. If your public key is in some other format, you can pass it as argument to key-add command:

% tsuru key-add $HOME/.ssh/id_dsa.pub

Now you can push you application to your cloud:

% git push tsuru master

After that, you can check your app's url in the browser and see your app there. You'll probably need run migrations or other deploy related commands.

To run a single command, you should use the command line:

% tsuru run myapp env/bin/python manage.py syncdb
% tsuru run myapp env/bin/python manage.py migrate

By default, the commands are run from inside the app root directory, which is /home/application/current. If you have more complicated deploy related commands, you should use the app.conf pre-restart and pos-restart scripts, those are run before and after the restart of your app, which is triggered everytime you push code.

Below is a app.conf sample::

pre-restart: deploy/pre.sh
pos-restart: deploy/pos.sh

The app.conf file is located in your app's root directory, and the scripts path in the yaml are relative to it.

tsuru's People

Contributors

fsouza avatar flavianmissi avatar andrewsmedina avatar towerz avatar gauperes avatar evandroflores avatar msinhore avatar

Watchers

fanqinghui avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.