Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
// replace it with your own token
TOKEN=aaa12a00f2f264727a4c5436c070d58477cd6d5f13a0379955901c4a962e9ee2
# Create Key Store Node
docker-machine create --driver digitalocean \
--digitalocean-access-token=$TOKEN \
--digitalocean-region=ams3 mh-keystore-do
docker $(docker-machine config mh-keystore-do) run -d \
-p "8500:8500" \
-h "consul" \
progrium/consul -server -bootstrap
# Create Primary Node
docker-machine create \
--driver digitalocean \
--digitalocean-access-token=$TOKEN \
--digitalocean-region=ams3 \
--digitalocean-image=debian-8-x64 \
--swarm --swarm-master \
--swarm-discovery="consul://$(docker-machine ip mh-keystore-do):8500" \
--engine-opt="cluster-store=consul://$(docker-machine ip mh-keystore-do):8500" \
--engine-opt="cluster-advertise=eth0:2376" \
mhs-demo0-do
# Create Secondary Node
docker-machine create \
--driver digitalocean \
--digitalocean-access-token=$TOKEN \
--digitalocean-region=ams3 \
--digitalocean-image=debian-8-x64 \
--swarm \
--swarm-discovery="consul://$(docker-machine ip mh-keystore-do):8500" \
--engine-opt="cluster-store=consul://$(docker-machine ip mh-keystore-do):8500" \
--engine-opt="cluster-advertise=eth0:2376" \
mhs-demo1-do
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.