Docker + swarm Cluster
Docker + swarm ClusterGuide
Swarm is a new container management tool released by Docker in early December 2014. Docker management tools released with Swarm include Machine and Compose. Swarm is a simple tool used to manage Docker clusters. It is equivalent to a virtual whole when a Docker cluster is exposed to users. Swarm uses the standard Docker API interface as its front-end access portal.
Build a cluster trainer using a virtual machine using tokenInstall swarmdocker run --rm swarm create 6a2d606bb3155b4428d0dc483cff6800
Create a Docker VMdocker-machine.exe create -d virtualbox swarm-master docker-machine.exe create -d virtualbox swarm-node1 docker-machine.exe create -d virtualbox swarm-node2
Build a swarm ClusterCreate a swarm-master
eval $(docker-machine.exe env swarm-master) docker run -d -p 3376:3376 -t \ -v /var/lib/boot2docker:/carts:ro swarm 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 a 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
Manage Swarm Clustersexport DOCKER_HOST=$(docker-machine ip swarm-master):3376 docker info
Address: http://www.lxy520.net/2016/03/18/docker-swarm-ji-qun/
Address: http://www.linuxprobe.com/docker-swarm.html ghost
Guide
Swarm is a new container management tool released by Docker in early December 2014. Docker management tools released with Swarm include Machine and Compose. Swarm is a simple tool used to manage Docker clusters. It is equivalent to a virtual whole when a Docker cluster is exposed to users. Swarm uses the standard Docker API interface as its front-end access portal.Build a cluster trainer using a virtual machine using tokenInstall swarmdocker run --rm swarm create 6a2d606bb3155b4428d0dc483cff6800
Create a Docker VMdocker-machine.exe create -d virtualbox swarm-master docker-machine.exe create -d virtualbox swarm-node1 docker-machine.exe create -d virtualbox swarm-node2
Build a swarm ClusterCreate a swarm-master
eval $(docker-machine.exe env swarm-master) docker run -d -p 3376:3376 -t \ -v /var/lib/boot2docker:/carts:ro swarm 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 a 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
Manage Swarm Clustersexport DOCKER_HOST=$(docker-machine ip swarm-master):3376 docker info
Address: http://www.lxy520.net/2016/03/18/docker-swarm-ji-qun/
Reprinted address: http://www.linuxprobe.com/docker-swarm.html ghost