Skip to content

Instantly share code, notes, and snippets.

@pslobo
Forked from etoews/swarm.sh
Created July 25, 2016 10:42
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 pslobo/13ef6dcffc951155a6c389becf0da29a to your computer and use it in GitHub Desktop.
Save pslobo/13ef6dcffc951155a6c389becf0da29a to your computer and use it in GitHub Desktop.
docker-machine create -d virtualbox swarm-keystore
eval "$(docker-machine env swarm-keystore)"
docker run -d \
-p "8500:8500" \
-h "consul" \
progrium/consul -server -bootstrap
docker-machine create \
-d virtualbox \
--swarm --swarm-master \
--swarm-discovery="consul://$(docker-machine ip swarm-keystore):8500" \
--engine-opt="cluster-store=consul://$(docker-machine ip swarm-keystore):8500" \
--engine-opt="cluster-advertise=eth1:2376" \
swarm-master
docker-machine create -d virtualbox \
--swarm \
--swarm-discovery="consul://$(docker-machine ip swarm-keystore):8500" \
--engine-opt="cluster-store=consul://$(docker-machine ip swarm-keystore):8500" \
--engine-opt="cluster-advertise=eth1:2376" \
swarm-agent-n1
docker-machine create -d virtualbox \
--swarm \
--swarm-discovery="consul://$(docker-machine ip swarm-keystore):8500" \
--engine-opt="cluster-store=consul://$(docker-machine ip swarm-keystore):8500" \
--engine-opt="cluster-advertise=eth1:2376" \
swarm-agent-n2
eval $(docker-machine env --swarm swarm-master)
docker info
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment