Docker + swarm cluster
Guide |
Swarm is a new container management tool released by Docker in early December 2014. The Docker management tools released with Swarm are also machine and compose. Swarm is a relatively simple set of tools for managing Docker clusters, making the Docker cluster exposed to users as a virtual whole. Swarm uses the standard Docker API interface as its front-end access portal. |
Token mode set up the cluster training practiced hand by virtual machine mode
Installing Swarm
Docker run--RM swarm create 6a2d606bb3155b4428d0dc483cff6800
Create a Docker virtual machine
Docker-machine.exe create-d VirtualBox swarm-master docker-machine.exe create-d VirtualBox swarm-node1 Docker-machine.exe create-d VirtualBox Swarm-node2
Build Swarm Cluster
Create Swarm-master
Eval $ (Docker-machine.exe env swarm-master) Docker run-d-P 3376:3376-t \ -v/var/lib/boot2docker:/carts:ro SWA RM manage-h 0.0.0.0:3376--tlsverify--TLSCACERT=/CERTS/CA.PEM--tlscert=/certs/server.pem--tlskey=/certs/ SERVER-KEY.PEM token://6a2d606bb3155b4428d0dc483cff6800docker run-d swarm join--addr=$ (docker-machine.exe IP Swarm-master): 2376 token://6a2d606bb3155b4428d0dc483cff6800
Create Swarm-node
Eval $ (Docker-machine.exe env swarm-node1) Docker run-d swarm join--addr=$ (docker-machine.exe IP swarm-node1): 2376 Token://6a2d606bb3155b4428d0dc483cff6800eval $ (Docker-machine.exe env swarm-node2) Docker run-d swarm join--ADDR =$ (docker-machine.exe IP swarm-node2): 2376 token://6a2d606bb3155b4428d0dc483cff6800
managing swarm clusters
Export docker_host=$ (docker-machine IP swarm-master): 3376 DOCKER Info
Free to provide the latest Linux technology tutorials Books, for open-source technology enthusiasts to do more and better: http://www.linuxprobe.com/
Docker + swarm cluster