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,900 points
18 views

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
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
• 35,720 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,900 points
39 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,480 points
135 views
0 votes
1 answer

Can you use docker-compose files to start services in Docker 1.12 swarm-mode?

Yess, you can. you must download/install the ...READ MORE

answered Aug 10, 2018 in Docker by Kalgi
• 35,720 points
20 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
• 35,720 points
22 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
• 35,720 points
111 views

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.