Created
February 9, 2016 03:42
-
-
Save jmshal/ca78106a7db26f23afc5 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
docker-machine create -d virtualbox swarm-manager | |
manager_ip=$(docker-machine ip swarm-manager) | |
manager_config=$(docker-machine config swarm-manager) | |
docker-machine create -d virtualbox swarm-agent-1 | |
agent1_ip=$(docker-machine ip swarm-agent-1) | |
agent1_config=$(docker-machine config swarm-agent-1) | |
docker-machine create -d virtualbox swarm-agent-2 | |
agent2_ip=$(docker-machine ip swarm-agent-2) | |
agent2_config=$(docker-machine config swarm-agent-2) | |
cluster_id=$(docker $manager_config run --rm swarm create) | |
docker $manager_config run -d -p 2375:2375 -t swarm manage token://$cluster_id | |
docker $agent1_config run -d swarm join --addr=$agent1_ip:2375 token://$cluster_id | |
docker $agent2_config run -d swarm join --addr=$agent2_ip:2375 token://$cluster_id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment