tsuru Installer provides a way to install tsuru API and its required components
locally or on remote hosts.

Note

tsuru Installer is distributed inside the tsuru client. To use it, you must
first install the client. Check the tsuru client documentation for a full
reference, including how to install it: https://tsuru-client.readthedocs.org.

This command accepts custom configurations, as we’ll see in a later section. Without
parameters, it uses the default configurations, which means creating a new VM
with VirtualBox.
After a couple of minutes you will have a full tsuru installation, inside a local
VirtualBox VM, where you can start deploying your applications and experience the
tsuru workflow.

Docker Machine drivers are responsible for provisioning docker hosts on different
iaas’. The installer comes bundled with all docker machine core drivers
and also supports the 3rd party ones; just make sure they are available in your $PATH.

For a list of 3rd party plugins supported by the community
check here.

tsuru installer provisions docker hosts with docker v1.12 and uses docker swarm mode
to orchestrate its core components in the docker node cluster. This means that it’s
easy to scale up and down every service and swarm is also responsible for recovering
a service if one of its tasks is lost.

The installer needs to issue commands to the tsuru api during the installation and,
to do so, it uses the --<driver-name>-open-port8080/tcp driver flag, configuring the host
to have the 8080/tcp port opened to the internet. This is probably not recommended and should be changed as soon as possible after
the installation. For drivers that do not support this parameter, the port needs to be opened manually or
the corresponding driver flag must be set on the installation configuration file.

It is also recommended to change the root user login and password that the installer
uses to bootstrap the installation.

The install command accepts two configuration files as parameters to customize the
installation. To generate these files with the default values, run this command:

$ tsuru install-config-init

This will generate two files in the current directory: install-config.yml and
install-compose.yml. In the first one you can set the docker-machine driver
and configurations like the machine CPU and memory, and tsuru specific configurations,
like the default provisioner, HTTP/HTTPS ports, users quotas and enable or disable
the dashboard. The second file includes configurations for each tsuru component,
like redis and gandalf. You can change configurations like version, port and mounts
for each one.

After customizing the config files, run this command to start the installer:

$ tsuru install-create -c install-config.yml -e install-compose.yml

For example, to install tsuru on amazon ec2, one could create the following file:

The following configuration will provision 3 virtual machines on AWS to run tsuru
core components and other 3 machines to host tsuru applications. Additionally,
it will use an external mongoDB instead of installing it.

Docker machine provides a generic driver
that can be used to install docker to already provisioned virtual or physical machines using ssh.
The following configuration example will connect to machine-1 and machine-2 using ssh,
install docker, install and start all tsuru core components on those two machines.
Machine 3 will be registered as an application node to be used by tsuru applications,
including the dashboard.

tsuru uses a colon to represent nesting in YAML. So, whenever this document says
something like key1:key2, it refers to the value of the key2 that is
nested in the block that is the value of key1. For example,
database:url means:

This configuration can be used to disable the installation of a core component,
by setting the component address. For example, by setting:

components:mongo:my-mongo.example.com:27017

The installer won’t install the mongo component and instead will check the connection
to my-mongo.example.com:27017 before continuing with the installation.
The following components can be configured to be used as an external resource: mongo,
redis, registry and planb.

Under this namespace every driver parameters can be set. These are going to be
used only for core hosts and each parameter accepts a list or a single value.
If the number of values is less than the number of hosts, some values will be
reused across the core hosts.

Under this namespace every driver parameters can be set. These are going to be
used only for app hosts and each parameter accepts a list or a single value.
If the number of values is less than the number of hosts, some values will be
reused across the apps hosts.

Name of the driver to be used by the installer. This can be any core or 3rd party
driver supported by docker machine. If a 3rd party driver name is used, it’s binary
must be available on the user path. The default is to use virtualbox.

Under this namespace every driver parameters can be set. Refer to the driver
configuration for more information on what parameter are available. For example,
the AWS docker machine driver accepts the --amazonec2-secret-key argument and
this can be set using driver:options:amazonec2-secret-key entry.