Created
January 11, 2016 17:12
-
-
Save megastef/4910395383572c92ca27 to your computer and use it in GitHub Desktop.
Create a Docker Swarm with docker-machine and enable dockerd Unix Sockets
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
export SWARM_TOKEN=$(docker run swarm create) | |
docker-machine create \ | |
-d virtualbox \ | |
--engine-env 'DOCKER_OPTS="-H unix:///var/run/docker.sock"' \ | |
--swarm \ | |
--swarm-master \ | |
--swarm-discovery token://$SWARM_TOKEN \ | |
swarm-master | |
for NODE in {1..3}; | |
do | |
docker-machine create \ | |
--engine-env 'DOCKER_OPTS="-H unix:///var/run/docker.sock"' \ | |
-d virtualbox \ | |
--swarm \ | |
--swarm-discovery token://$SWARM_TOKEN \ | |
"swarm-agent-$NODE" | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related blog post: http://blog.sematext.com/2016/01/12/docker-swarm-collecting-metrics-events-logs/