.. 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. +++++++++++++++++ tsuru-admin usage +++++++++++++++++ tsuru-admin command supports administrative operations on a tsuru server. Please make sure you have it :doc:`installed ` before continuing on this guide. In order to use ``tsuru-admin`` commands, a user should be an :ref:`admin user `. To be an admin user you should be member of an :ref:`admin team `. Setting a target ================ The target for the tsuru-admin command should point to the `listen` address configured in your tsuru.conf file. .. highlight:: yaml :: listen: ":8080" .. highlight:: bash :: $ tsuru-admin target-add default tsuru.myhost.com:8080 $ tsuru-admin target-set default Commands ======== All the "container*"" commands below only exist when using the docker provisioner. .. _tsuru_admin_container_move_cmd: container-move -------------- .. highlight:: bash :: $ tsuru-admin container-move This command allow you to specify a container id and a destination host, this will create a new container on the destination host and remove the container from its previous host. .. _tsuru_admin_containers_move_cmd: containers-move --------------- .. highlight:: bash :: $ tsuru-admin containers-move It allows you to move all containers from one host to another. This is useful when doing maintenance on hosts. and must be host names of existing docker nodes. This command will go through the following steps: * Enumerate all units at the origin host; * For each unit, create a new unit at the destination host; * Erase each unit from the origin host. .. _tsuru_admin_containers_rebalance_cmd: containers-rebalance -------------------- .. highlight:: bash :: $ tsuru-admin containers-rebalance [--dry] Instead of specifying hosts as in the containers-move command, this command will automatically choose to which host each unit should be moved, trying to distribute the units as evenly as possible. The --dry flag runs the balancing algorithm without doing any real modification. It will only print which units would be moved and where they would be created. All the "platform*"" commands below only exist when using the docker provisioner. .. _tsuru_admin_docker_node_add_cmd: docker-node-add --------------- .. highlight:: bash :: $ tsuru-admin docker-node-add [param_name=param_value]... [--register] This command add a node to your docker cluster. By default, this command will call the configured IaaS to create a new machine. Every param will be sent to the IaaS implementation. You should configure in **tsuru.conf** the protocol and port for IaaS be able to access your node (`you can see it here `_). If you want to just register an docker node, you should use the --register flag with an **address=http://your-docker-node:docker-port** Parameters have special meaning ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * ``iaas=`` Which iaas provider should be used, if not set tsuru will use the default iaas specified in tsuru.conf file. * ``template=