The lab

In this tutorial, we'll create the infrastructure on AWS. Ideally, for a production environment, you would setup three or five Swarm managers and some workers, and eventually add new worker nodes later depending on the load.

Here we'll setup a Swarm cluster with three Swarm managers, six Swarm workers and one Flocker control node with Machine, and won't add new workers.

Installing Flocker requires several manual steps, which can be automated (as we'll see). So, to make the example as less complex as possible, we'll run all these commands initially, in linear order, without repeating procedures to increase the system capacity.

If you don't like Ansible, you can easily adapt the flow to your favorite tool, be it Puppet, Salt, Chef or others. ...

Get Native Docker Clustering with Swarm now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.