Created
June 24, 2016 06:23
-
-
Save ajeetraina/484f506e26d689b48b4dbef1f06943c3 to your computer and use it in GitHub Desktop.
docker-swarm-before-11.2-rc2
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
Docker Swarm before 1.12rc2: | |
1. Setting up Consul for Docker Swarm | |
sudo docker run --restart=unless-stopped -d -p 8500:8500 -h consul1 progrium/consul -server -bootstrap | |
2. Setting up Swarm Manager to work with Consul | |
docker run -d -p 4000:4000 swarm manage -H :4000 --replication --advertise 10.142.0.2:4000 consul://10.142.0.2:8500 | |
3. Setting up secondary Swarm Master-2: | |
docker run -d -p 4000:4000 swarm manage -H :4000 --replication --advertise 10.142.0.5:4000 consul://10.142.0.2:8500 | |
4. Setting up First Swarm Agent (Node-1): | |
root@node1:~# docker run -d swarm join --advertise=10.142.0.3:2375 consul://10.142.0.2:8500 | |
5. Setting up Second Swarm Agent (Node-2) | |
docker run -d swarm join --advertise=10.142.0.4:2375 consul://10.142.0.2:8500 | |
6. Let's check the cluster status running it on first master node: | |
docker -H :4000 info | |
To check the process, | |
5. You can check the process running: | |
docker -H :4000 ps | |
6. You can schedule a container from anyone of them. | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment