My cluster has 4 machines:
- Manager 1: 172.16.43.248
- Node 1: 172.16.43.230
- Node 2: 172.16.43.133
- Node 3: 172.16.43.136
- Installing Docker 1.12
- Configuring Swarm Mode
- Setting up Rocket.Chat
Installing Docker 1.12
Install Docker engine on all machines:
Configuring Swarm Mode
On Manager 1:
The containers are using the my-net network to reach each others.
On Node 1,2,3, join the swarm:
On Manager 1, check the node list:
The 4 nodes appear on the list.
Setting up Rocket.Chat
2 services are created: mongo (MongoDB) and chat (Rocket.Chat).
Now Rocket.Chat is available at any public address of the cluster due to routing and load balancing features of swarm mode: - http://172.16.43.248:3000 - http://172.16.43.230:3000 - http://172.16.43.133:3000 - http://172.16.43.136:3000
Docker Swarm has improved a lot with version 1.12. The first thing is how fast it is to setup the cluster and then it is highly available, scalable and has rolling updating. I’m still leaning towards Kubernetes because of its superior, more stable concepts and more fine-grained specifications.