I have a number of Docker based microservices which all need to talk to each other. They use container names to talk to each other. Thus, when I run this with Docker Swarm or Kubernetes (w Flannel), they rely on the Docker DNS to resolve container names into IP addresses.
Now, I'm trying to run this same set of microservices with Mesos+Marathon, but I've encountered an issue. When I launch all the microservices (using the Marathon app.App API), mesos gives them a name of "mesos-some_long_hash". I can see this name when I type "docker ps" on the machine the containers are launched in. Thus, the microserves cannot find each other due to these mesos assigned container names.
As an experiment, I forced the container names (using 'parameters' under the Marathon app.appContainer.DockerContainer API) to the names I need. The microservices work, but Marathon gets confused because it expects these "mesos-some_long_hash" names. It reports them as stuck at deploying.
I need some way to tell mesos via the Marathon APIs that I don't want a name of "mesos-some_long_hash" and instead to use a name of my choosing (the service name). I don't see anything obvious to do this in the Marathon apps API.
Anyone know how to do this?
EDIT: I just found this about the containerizer in mesos. http://mesos.apache.org/documentation/latest/docker-containerizer/
It's kind of sounding like it's not possible to change the container name? This is terrible! How does anyone do a microservice architecture if they can't name their containers without having mesos/marathon freakout?