Created
October 22, 2016 19:38
-
-
Save musghost/f2e63d3e561b804bb0290c931c0d1ec3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SWARM_TOKEN=$(docker run swarm create) | |
echo $SWARM_TOKEN | |
docker-machine create -d virtualbox --engine-label datacenter=mex --swarm --swarm-master --swarm-discovery token://$SWARM_TOKEN master | |
docker-machine create -d virtualbox --engine-label datacenter=usa --swarm --swarm-discovery token://$SWARM_TOKEN node1 | |
docker-machine create -d virtualbox --engine-label datacenter=mex --swarm --swarm-discovery token://$SWARM_TOKEN node2 | |
curl https://discovery-stage.hub.docker.com/v1/clusters/$SWARM_TOKEN | |
docker run swarm list token://$SWARM_TOKEN | |
eval $(docker-machine env --swarm master) | |
docker info | |
docker run -d debian sleep 10 | |
docker ps | |
docker run -d -p 80:80 nginx | |
docker run -d -p 80:80 nginx | |
docker ps | |
docker run -d -p 80:80 nginx | |
docker run -d -e constraint:datacenter==usa postgres | |
docker ps | |
docker run -d -e constraint:datacenter==mex postgres | |
docker ps |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://docs.google.com/presentation/d/1pMOD16BTpZFslnQ3zljk1igBxjhzhyvxCHVfg2ZTUos/edit#slide=id.g12e9aa3e0a_2_71