0

I'm building an Apache mesos cluster with 3 masters and 3 slaves. I installed docker on the slave nodes and it's able to create instances which are vissible in Marathon. Now i tried to install the HAproxy server on top of it but that didn't worked out that well so I deleted it. The problem is, since then i'm only able to scale my application to a maximum of 3 instances, the exact number of nodes When I want to scale to 5, there are 2 instances that are stuck at the 'deploying' stage.

Does anyone know how to fix this issue so i'm back able to create more instances?

Thank you

Gijs
  • 885
  • 2
  • 13
  • 22
  • You're trying to start five docker containers from the same image, correct? Docker usually doesn't prevent you from starting multiple containers from the same image, so the problem should be with Mesos. I am guessing that your JSON file includes the line `"constraints": [["hostname", "UNIQUE"]]` which would prevent multiple instances on the same host. If not: Maybe posting your JSON file would help. – SGer Apr 14 '15 at 10:57
  • It wasn't a constraint issue here, my server ran out of memory to deploy more instances of the container. I didn't thougt of the memory part because first it all worked perfectly but after a couple of days testing, installing and uninstalling without a reboot my memory probably was full of junk. – Gijs Apr 15 '15 at 07:17

1 Answers1

0

To perform that, you trully need to setup Marathon ServiceDiscovery with HAProxy as unknown ports on the same slave machine will be binded to your containers.

First, install HAProxy on every slave. If you need SSL, you will need to make build HAProxy to support SSL.

Then, when HAProxy service is running, you need to follow this very well explain tutorial to enable Marathon service discovery on every Slave HAProxy marathon Service discovery

Pay well attention to the tutorial, it is very well explained and straightforward.

aorfevre
  • 5,034
  • 3
  • 21
  • 51