Skip to content

Instantly share code, notes, and snippets.

@Jammink2
Created June 23, 2016 06:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Jammink2/be5b2c7adcc6d699fa0aee8e591964e6 to your computer and use it in GitHub Desktop.
Save Jammink2/be5b2c7adcc6d699fa0aee8e591964e6 to your computer and use it in GitHub Desktop.
while read NODENAME IPADDR; do
docker-machine create --driver generic \
--engine-opt cluster-store=consul://localhost:8500 \
--engine-opt cluster-advertise=eth0:2376 \
--swarm --swarm-master \
--swarm-discovery consul://localhost:8500 \
--swarm-opt replication --swarm-opt advertise=$IPADDR:3376 \
--generic-ssh-user ec2-user --generic-ip-address $IPADDR $NODENAME
done
node1 11.2.3.4
node2 11.6.2.8
node3 11.9.2.6
node4 11.5.0.2
node5 11.0.3.6
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment