MESOS / MARATHON / DOCKER – Docker started is wrong & Port Forwarding
I’m a bit new to Mesos / Marathon and I try to integrate it with my Docker Images.
So far : Mesos 0.21 for slave & master / Marathon 0.7.5 and of course, Zookeeper.
I succeed on adding with curl my docker images but, unfortunately, I have 2 main issues:
- Even if I have build my image locally (in that case a tomcat7 Docker image) and see the Marathon config that it is well taken into account, the docker image started is not the one expected, it is always a
- How to manage docker port forwarding ? Are we forced to use a solution such as HAProxy ? I see that My Mesos slave uses always the same range of Port (31000 – 32000) for started containers.
Thank you everyone for support.
One Solution collect form web for “MESOS / MARATHON / DOCKER – Docker started is wrong & Port Forwarding”
Here is an anwser from ConnerDoyle found on mIRC #mesos :
ConnorDoyle: Mesos comes with a Docker containerizer that always pulls from a docker registry.
You can configure the registry that dockerd pulls from in the usual way (via a .dockercfg file)
* Retrieving #mesos modes…
Alex: So even if for isntance eerything is in local
ConnorDoyle: Yeah. You can use any image up on Dockerhub (the default registry for dockerd) or you can set your own.
AlexFR: I shall define a private registry ?
AlexFR: or push it to Dockerhub
ConnorDoyle: Yes, because it assumes you’re on a big cluster and you want to fetch the image from somewhere when the job starts 🙂
ConnorDoyle: Yeah, pushing to dockerhub is easier probably.
This answers the first Question.
Concerning the second , seems that HAProxy is the “standard approach” https://mesosphere.github.io/marathon/docs/service-discovery-load-balancing.html