Install Docker Swarm

First, make sure that all of the nodes in the cluster have docker installed.

On the master node:

docker swarm init --advertise-addr $(ip -4 route get 8.8.8.8 | awk {'print $7'} | tr -d '\n')

On each of the worker nodes:

docker swarm join --token <token> <master-ip>:2377

To verify that the cluster is up and ready:

docker node ls

To test:

docker service create --replicas 1 --name helloworld alpine ping docker.com

Add the Docker Swarm Visualizer:

docker service create --name viz --publish 8090:8080 --mount=type=bind,src=/var/run/docker.sock,dst=/var/run/docker.sock --constraint=node.role==manager dockersamples/visualizer

Finally add cadvisor so you can check each node and drill down into each container's statistics:

docker service update --publish-add mode=host,published=80,target=8080 cadvisor