Dcos-marathon-internal Little Dot

Source: Internet
Author: User
Tags json port number haproxy

DCOs as the bottom support platform for running Docker, our workload is reduced a lot, but because of the large number of Docker, even with the overlay network, but IP address AH port number AH so much, we can be good.

Right, this time marathon-lb appeared, the approximate process is as follows:
1. We run Docker, hit a random port A, and tell ZK which Port B we want to have to be accessed by someone else.
2. MARATHON-LB will go to ZK to find this port B, and then as a load balancer device for others to access LB's B port directed to the actual Appdocker B port
3. Then the IP address is which to come, marathon-lb after running, will be in ZK to register, domain name Marathon-lb-internal.marathon.mesos or other domain name, good, of course, the resolution needs to put the local nslookup Server points to DCOs master. configuration json for APP Docker

{"id": "nginx-internal", "container": {"type": "Docker", "Docker": {"image": "nginx:1.9.14", "N
      Etwork ":" BRIDGE "," portmappings ": [{" Hostport ": 0," containerport ": +," Serviceport ": 10001}],  "Forcepullimage": true}, "instances": 1, "CPUs": 0.1, "mem": +, "healthchecks": [{"Protocol": "HTTP", "path": "/", "PortIndex": 0, "timeoutseconds": Ten, "Graceperiodseconds": Ten, "Inter
  Valseconds ": 2," Maxconsecutivefailures ": Ten}]," labels ": {" Haproxy_group ":" Internal "}} # inside the outer-nginx { "id": "nginx-everywhere", "container": {"type": "Docker", "Docker": {"image": "nginx:1.7.7", "NE
      Twork ":" BRIDGE "," portmappings ": [{" Hostport ": 0," containerport ": +," Serviceport ": 10002}], "Forcepullimage": true}, "instances": 1, "CPUs": 0.1, "mem": +, "healthchecks": [{"Protocol": "HTTP", "path": "/"," PortIndex ": 0," timeoutseconds ": Ten," Graceperiodseconds ": Ten," Intervalseconds ": 2," Ma Xconsecutivefailures ": Ten}", "labels": {"Haproxy_group": "External,internal"}}
JSON for Marathon-lb-internal
# do a internal marathon-lb
{"
  marathon-lb": {
    "name": "Marathon-lb-internal",
    "Haproxy-group": " Internal ",
    " Bind-http-https ": false,
    " role ":" "
  }
}

dcos Package install--options=options.json Marathon-lb
Test
Curl http://marathon-lb-internal.marathon.mesos:10001/
Marathon-lb-internal's management address Marathon-lb-internal.marathon.mesos:9090/haproxy?stats

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.