Docker “getting started with swarm mode” tutorial on the Catalyst Cloud¶

The Docker Engine 1.12 includes a new feature known as swarm mode which
allows the native management of a cluster of Docker Engines. This cluster of
Docker Engines or nodes is known as a swarm. Swarm Mode allows you to
orchestrate services across all the nodes in a swarm. This is useful for the
scaling, load balancing, distribution and availability of your services.

This tutorial will use Ansible to create three swarm nodes that correspond to
the examples used in the Docker tutorial. After running the playbook, you will
have access to three hosts exactly as described in the tutorial. A cleanup
playbook is provided to remove all resources when you have completed the
tutorial.

Start the tutorial with the Create a swarm section. For example the first
two commands are:

$ ssh manager1
$ docker swarm init --advertise-addr 192.168.99.100
Swarm initialized: current node (dxn1zf6l61qsb1josjja83ngz) is now a manager.
To add a worker to this swarm, run the following command:
docker swarm join \
--token SWMTKN-1-49nj1cmql0jkz5s954yi3oex3nedyz0fb0xx14ie39trti4wxv-8vxv8rssmk743ojnwacrr2e7c \192.168.99.100:2377
To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.

Note

The tutorial uses docker-machinessh, you should omit docker-machine from the command as we did not create these nodes using Docker machine. If you would prefer to use Docker machine to set up the nodes you can follow the tutorial at Using Docker Machine on the Catalyst Cloud.