Skip to content

Instantly share code, notes, and snippets.

@mustafaakin
Created October 28, 2016 22:01
Show Gist options
  • Save mustafaakin/27485191db2d1dabb5b28a8fabae4722 to your computer and use it in GitHub Desktop.
Save mustafaakin/27485191db2d1dabb5b28a8fabae4722 to your computer and use it in GitHub Desktop.
# Create Key Store Node
docker-machine create -d virtualbox mh-keystore-vb
docker $(docker-machine config mh-keystore-vb) run -d \
-p "8500:8500" \
-h "consul" \
progrium/consul -server -bootstrap
# Create Primary Node
docker-machine create \
-d virtualbox \
--swarm --swarm-master \
--swarm-discovery="consul://$(docker-machine ip mh-keystore-vb):8500" \
--engine-opt="cluster-store=consul://$(docker-machine ip mh-keystore-vb):8500" \
--engine-opt="cluster-advertise=eth1:2376" \
mhs-demo0-vb
# Create Secondary Node
docker-machine create -d virtualbox \
--swarm \
--swarm-discovery="consul://$(docker-machine ip mh-keystore-vb):8500" \
--engine-opt="cluster-store=consul://$(docker-machine ip mh-keystore-vb):8500" \
--engine-opt="cluster-advertise=eth1:2376" \
mhs-demo1-vb
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment