Docker Swarm Playground
Requirements
Vagrant installed
Instructions
-
Create cluster
vagrant up
-
Login to manager node
vagrant ssh manager1
-
Initialise docker swarm
docker swarm init --advertise-addr 192.168.99.100
-
Copy the output commande
docker swarm join ...
and run it at each worker -
vagrant ssh worker1
-
docker swarm join
-
Go back to manager1 node and make sure 3 nodes appear connected in the cluster
docker node ls
-
To install Portainer
vagrant ssh manager1
cd /vagrant
docker stack deploy -c portainer-agent-stack.yml portainer
then you can access the UI from http://192.168.99.100:9000
- To install Netdata
vagrant ssh manager1
cd /vagrant
docker stack deploy -c netdata.yml netdata
then you can access the UI from http://192.168.99.100 for the overview of cluster monitoring or visit one of http://192.168.99.100:19999, http://192.168.99.101:19999, http://192.168.99.102:19999 to visit the Netdata dashboard for each node (with more details)