Hi,

Fastest way is to run marathon-lb docker image.
You have to update marathon-lb.json code below with yours (or public)
docker registry, IPs and hostnames.
When you add application to marathon and you want it to be load balanced
via marathon-lb,
you have to add labels section eg.:

 "labels": {
    "HAPROXY_GROUP":"external",
    "HAPROXY_0_VHOST":"service.mesosphere.com"
  }


Reading documentation on github was enough for me, specially "issues" tab ;)
https://github.com/mesosphere/marathon-lb


Below code works for me, but I think you can change "network" mode from
BRIDGE to HOST and remove line : { "key": "net", "value": "host" }.

marathon-lb.json:

{
  "id": "marathon-lb",
  "volumes": [],
  "cpus": 0.5,
  "mem": 256.0,
  "instances": 1,
  "container": {
    "type": "DOCKER",
    "docker": {
    "image": "master-1:5000/marathon-lb",
    "network": "BRIDGE",
    "parameters": [
                { "key": "env", "value": "PORTS=9090" },
                { "key": "net", "value": "host" }
    ],
    "portMappings": [
      {
        "containerPort": 80,
        "hostPort": 80,
        "servicePort": 10004,
        "protocol": "tcp"
      },
      {
        "containerPort": 9090,
        "hostPort": 9090,
        "servicePort": 10005,
        "protocol": "tcp"
      }
    ]},
    "privileged": false
  },
  "args": [
      "sse",
      "--marathon", "http://192.168.33.20:8080";,
      "--group", "external"
  ],
  "forcePullImage": true,
  "constraints": [["hostname", "CLUSTER", "master-1"]]
}

2016-05-02 11:08 GMT+02:00 Stefano Bianchi <jazzist...@gmail.com>:

> Hello all
>
> I'm not using DC/OS, and i would like to know how to install marathon-lb
> on my mesos cluster. Is there any tutorial that does not involve dcos
> instructions?
>
> Thanks for replies.
>

Reply via email to