Docker + swarm Cluster

Source: Internet
Author: User

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 swarm
docker run --rm swarm create  6a2d606bb3155b4428d0dc483cff6800  
Create a Docker VM
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 a swarm Cluster

Create 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 Clusters
export 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 swarm
docker run --rm swarm create  6a2d606bb3155b4428d0dc483cff6800  
Create a Docker VM
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 a swarm Cluster

Create 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 Clusters
export 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


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.