Two scripts are provided, to create a cluster of 3 nodes either locally, with virtual machines, or on AWS. The scripts require either VirtualBox to be installed (VMs), or to have an account on Amazon (AWS).
See
- https://www.virtualbox.org/wiki/Downloads for VirtualBox installation
- https://aws.amazon.com/getting-started/ to get started with AWS.
The scripts mostly follow instructions given on the [https://docs.docker.com/engine/swarm/swarm-tutorial/](Docker Swarm tutorial), to create a manager node and two worker nodes, and from this blog post for creating an AWS docker cluster
The master node is first created, and its swarm token tag retrieved. Worker nodes are then created and connected to the master node through the token tag.
Use
start-cluster-local.sh
to start the cluster. It takes about 5 minutes.
Note: Your account on Amazon must be created, your credentials stored in ~/.aws/credentials. See for example there for details.
Use
start-cluster-aws.sh
to start the cluster. It takes about 15 minutes.