Last active
August 29, 2015 14:14
-
-
Save mbentley/e2d360a469591986e884 to your computer and use it in GitHub Desktop.
docker machine + swarm
This file contains 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
demo-master | |
=========== | |
swarm create | |
docker-machine -D create -d amazonec2 --swarm --swarm-master --swarm-discovery token://<cluster_id> --swarm-host 'tcp://0.0.0.0:3376' demo-master | |
<initialize other docker hosts; demo-docker01 and demo-docker02> | |
$(docker-machine shellinit demo-master) | |
echo $DOCKER_HOST | |
export DOCKER_HOST=tcp://54.152.22.32:3376 | |
demo-docker01 | |
============= | |
docker-machine -D create -d amazonec2 --swarm --swarm-discovery token://<cluster_id> demo-docker01 | |
$(docker-machine shellinit demo-docker01) | |
demo-docker02 | |
============= | |
docker-machine -D create -d amazonec2 --swarm --swarm-discovery token://<cluster_id> demo-docker02 | |
$(docker-machine shellinit demo-docker02) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment