replicate docker swarm cluster

0 votes

I have the Docker Swarm cluster setup in my servers. I have 3 manager nodes and 9 working nodes. 

I would like to replicate the same in the in my production server but using scripts instead of commands.

Any help would be appreciated.

Aug 23, 2018 in Docker by Nilesh
• 6,880 points
34 views

1 answer to this question.

0 votes

There is nothing like in-built utilities for that you can use the command like this :

You can create your custom script like this :

for i in `cat app_server.txt` ; do echo $i ; ssh -i /path/to/your_key.pem  $i "sudo docker swarm join --token your-token-here ip-address-of-manager:port" ; done

Here app_server.txt is the ip address of your worker node that you want to add in your swarm.

--token : your token generated by manager on docker swarm init

answered Aug 23, 2018 by Kalgi
• 42,330 points

Related Questions In Docker

0 votes
1 answer
0 votes
1 answer

Access IP address of Couchbase container on Docker Swarm cluster

The property .NetworkSettings.Ports is a map, not a struct. ...READ MORE

answered Aug 24, 2018 in Docker by Nilesh
• 6,880 points
100 views
0 votes
1 answer

How do I scale in Docker Swarm Mode W/Terraform Digital Ocean Load Balancing

The solution you could build for Digital ...READ MORE

answered Jun 19, 2018 in Docker by shubham
• 6,890 points
236 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

Docker Swarm Cluster: daemonize

Make sure you run the deamon as ...READ MORE

answered Aug 27, 2018 in Docker by Kalgi
• 42,330 points
47 views
+2 votes
1 answer

Nodes not able to join docker swarm cluster

You need to provide more information like ...READ MORE

answered Sep 26, 2018 in Docker by Kalgi
• 42,330 points
254 views