.. Copyright 2014 tsuru authors. All rights reserved. Use of this source code is governed by a BSD-style license that can be found in the LICENSE file. ++++++++++++ Client 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, like: Setting a target ================ .. highlight:: bash :: $ tsuru target-add default tsuru.myhost.com:8080 $ tsuru target-set default Authentication ============== After that, all you need is to create a user and authenticate to start creating apps and pushing code to them. Use `create-user `_ and `login `_: .. highlight:: bash :: $ tsuru user-create youremail@gmail.com $ tsuru login youremail@gmail.com Apps ==== Associating your user to a team ------------------------------- You need to be member of a team to create an app. To create a new team, use `create-team `_: .. highlight:: bash :: $ tsuru team-create teamname Creating an app --------------- To create an app, use `app-create `_: .. highlight:: bash :: $ tsuru app-create myblog This will return your app's remote url, you should add it to your git repository: .. highlight:: bash :: $ git remote add tsuru git@tsuru.myhost.com:myblog.git Listing your apps ----------------- When your app is ready, you can push to it. To check whether it is ready or not, you can use `app-list `_: .. highlight:: bash :: $ tsuru app-list This will return something like: .. highlight:: bash :: +-------------+-------------------------+-------------------------------------------+ | Application | Units State Summary | Ip | +-------------+-------------------------+-------------------------------------------+ | myblog | 1 of 1 units in-service | myblog-838381.us-east-1-elb.amazonaws.com | +-------------+-------------------------+-------------------------------------------+ Showing app info ---------------- You can also use the `app-info `_ command to view information of an app. Including the status of the app: .. highlight:: bash :: $ tsuru app-info This will return something like: .. highlight:: bash :: Application: myblog Platform: gunicorn Repository: git@githost.com:myblog.git Teams: team1, team2 Units: +----------+---------+ | Unit | State | +----------+---------+ | myblog/0 | started | | myblog/1 | started | +----------+---------+ tsuru uses information from git configuration to guess the name of the app, for more details, see `"Guessing app names" `_ section of tsuru command documentation. Public Keys =========== You can try to push now, but you'll get a permission error, because you haven't pushed your key yet. .. highlight:: bash :: $ 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 you have a public key in other format (for example, DSA), you can also give the public key file to `key-add `_: .. highlight:: bash :: $ tsuru key-add $HOME/.ssh/id_dsa.pub After your key is added, you can push your application to your cloud: .. highlight:: bash :: $ git push tsuru master Running commands ================ After that, you can check your app's url in the browser and see your app there. You'll probably need to run migrations or other deploy related commands. To run a single command, you should use the command `run `_: .. highlight:: bash :: $ tsuru run "python manage.py syncdb && python manage.py migrate" Further instructions ==================== For a complete reference, check the documentation for tsuru command: ``_.