Docker Cluster Lab Environment Deployment--swarm "3 Registry Service monitoring and Autodiscover component--consul"

Source: Internet
Author: User

Reference Website cluster configuration methodhttps://hub.docker.com/r/progrium/consul/ The cluster requires the manager and node to communicate consul's discovery service, otherwise, the management node cannot be elected and cannot execute the Docker command. Cluster in the consul work 3 machines, greater than 2 units, the cluster is still working, if, occurs only 1, the cluster fails, unable to select the management node, need to start the data again to reach 3 sets of standards, the cluster can slowly recover.  The test finally came to an astonishing conclusion that after I removed the consul cluster, the meta data was automatically recovered when it was pulled back.   10.40.100.145 docker-consul0.venic.com10.40.100.146 docker-consul1.venic.com10.40.100.147 docker-consul2.venic.com first on the mirror server 148, pull a consul image of the official website, easy to wait for the other three on the fast start# Docker pull Progrium/consul && docker tag Progrium/consul:latest docker-registry.venic.com:5000/ Consul:latest # Docker push docker-registry.venic.com:5000/consul:latest  10.40.100.145 on Docker run-d--name consul0--restart=always-v/mnt:/data \- P 8300:8300 \- P 8301:8301 \- P 8301:8301/udp \- P 8302:8302 \- P 8302:8302/udp \- P 8400:8400 \- P 8500:8500 \docker-registry.venic.com:5000/consul:latest-server-advertise 10.40.100.145-bootstrap-expect 3 10.40.100.146 on Docker run-d--name consul1--restart=always-v/mnt:/data \- P 8300:8300 \- P 8301:8301 \- P 8301:8301/udp \- P 8302:8302 \- P 8302:8302/udp \- P 8400:8400 \- P 8500:8500 \docker-registry.venic.com:5000/consul:latest-server-advertise 10.40.100.146-join 10.40.100.145 10.40.100.147 on Docker run-d--name consul2--restart=always-v/mnt:/data \- P 8300:8300 \- P 8301:8301 \- P 8301:8301/udp \- P 8302:8302 \- P 8302:8302/udp \- P 8400:8400 \- P 8500:8500 \docker-registry.venic.com:5000/consul:latest-server-advertise 10.40.100.147-join 10.40.100.145    TCP proxy forwarding in the Nginx upper proxy configuration Consul10.40.42.10and that's Controller1 and 2 .# VI 8500_consul.venic.com_10.40.100.145-147_8500.conf upstream consul.venic.com {server 10.40.100.145:8500;server 10.40.100.146:8500;server 10.40.100.147:8500; }server {Listen 8500;Proxy_pass consul.venic.com;}  tests can be tested using the following linkshttp://10.40.42.10:8500/

Docker Cluster Lab Environment Deployment--swarm "3 Registry Service monitoring and Autodiscover component--consul"

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.