Created
March 2, 2015 18:09
-
-
Save iffy/2729ee62104fe6712ed8 to your computer and use it in GitHub Desktop.
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
# Create the cluster token | |
docker-machine create -d virtualbox first-machine | |
$(docker-machine env first-machine) | |
export TOKEN=$(docker run swarm create) | |
# Create a master | |
MASTER_NAME="swarm-master" | |
docker-machine create -d virtualbox --swarm --swarm-master --swarm-discovery token://${TOKEN} ${MASTER_NAME} | |
# Create some nodes | |
for i in 0 1; do | |
echo $i | |
docker-machine create -d virtualbox --swarm --swarm-discovery token://${TOKEN} swarm-node-${i} | |
done | |
docker-machine ls | |
NAME ACTIVE DRIVER STATE URL SWARM | |
first-machine virtualbox Running tcp://192.168.99.103:2376 | |
swarm-master virtualbox Running tcp://192.168.99.104:2376 swarm-master (master) | |
swarm-node-0 virtualbox Running tcp://192.168.99.111:2376 | |
swarm-node-1 * virtualbox Running tcp://192.168.99.112:2376 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment