There is a point to this story, but it has temporarily escaped my mind...
Contact Me MyFaceBook MyLinkedIn MyGitHub MyTwitter

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
Copyright © 2015 by Julian Easterling. SOME RIGHTS RESERVED.

Creative Commons License
Except where otherwise noted, content on this site is
licensed under a Creative Common Attribution-Share Alike 4.0 International License.


All of the opinions expressed on this website are those of Julian Easterling and
do not represent the views of any of my current and previous clients or employers in any way.

If you notice an error on the site or content that has not been properly attributed, bring
it to my attention using the contact page and I will endeavor to fix it as soon as I can.

I accept no responsibility or liability for any damages incurred by following any of
my advice or by using any of the information on my site or of those sites that I link to.