April 2018
Intermediate to advanced
250 pages
5h 42m
English
First, SSH into a node we would like to be the first manager, install Docker, and run the docker swarm init command on it. The eth0 is the private network interface provided by the cloud provider. Check yours using the ip addr command before proceeding. If you know which interface is the private one, initialize the cluster using the following command:
$ docker swarm init --advertise-addr=eth0
Next, SSH into the other two nodes. Install Docker and join the cluster using the docker swarm join command. Do not forget that we need to use the join token for the manager, not for the worker. The token in the following example is the manager token. Please note that my first manager's IP is 172.31.4.52 during this setup. Replace it with ...
Read now
Unlock full access