0

I'm just starting off with Mesos, Docker and Marathon but I can't find anywhere where this specific question is answered. I want to set up a Mesos cluster running on Docker - there are a couple of internet resources to do this, but then I want to run Docker containers on top of Mesos itself. This would then mean Docker containers running inside other Docker containers.

Is there a problem with this? It doesn't intuitively seem right somehow but would seem like it would be really handy to do so. Ideally I want to run Mesos cluster (with Marathon, Chronos etc.) and then run Hadoop within Docker containers on top of that. Is this possible or a standard way of doing things? Any other suggestions as to what good practice is would be appreciated.

Thanks

radder5
  • 236
  • 3
  • 14

2 Answers2

2

You should be able to run it, taking care of some issues when running the mesos (with Docker) containers, like running in privileged mode. Take a look to jpetazzo/dind to see how you can install and run docker in docker. Then you can setup mesos in that container to have one container with mesos and docker installed.

There are some references over the Internet similar to what you want to do. Check this article and this project that I think you will find very interesting.

Javier Cortejoso
  • 8,851
  • 3
  • 26
  • 27
  • A most excellent answer thanks. I did see the first article you point to, but failed to see the 'docker in docker' part of it, but inferred from the rest of the article that it was possible, just wanted to verify that this was a 'usual' pattern. – radder5 Feb 15 '15 at 19:51
1

There are definitely people running Mesos in docker containers, but you'll need to use privileged mode and set up some volumes if you want mesos to access the outer docker binary (see this thread).

Current biggest caveat: don't name your mesos-slave containers "mesos-*" or MESOS-2016 will bite you. See epic MESOS-2115 for other remaining issues related to running mesos-slave in docker containers.

Adam
  • 4,322
  • 1
  • 16
  • 22
  • thanks for the tip! An alternative I was thinking of was to use Vagrant (https://github.com/everpeace/vagrant-mesos) to set up the Mesos environment then use Docker containers within that, and possibly Hadoop as a Framework directly within Mesos. I am really overwhelmed by the number of competing (different) possible setups for this stuff. Mesos, Yarn, Ansible, Ambari - all appear to do similar things. I basically really like the Docker way of doing things, but aren't really sure on how to mix this in with a 'Big Data' and 'provisioning' way of doing things (if that makes any sense!) – radder5 Feb 17 '15 at 09:27
  • Everpeace's vagrant setup is good, but you may also be interested in the Mesosphere version: https://github.com/mesosphere/playa-mesos – Adam Feb 18 '15 at 02:57
  • For Hadoop as a Mesos framework, see https://github.com/mesos/hadoop for MR1 (used in production at Airbnb), and https://github.com/mesos/myriad for YARN/MR2 (still in early development) – Adam Feb 18 '15 at 02:59
  • thanks @Adam for the pointers. Just trying out now the [Seqenceiq hadoop cluster on docker](http://blog.sequenceiq.com/blog/2014/06/19/multinode-hadoop-cluster-on-docker/) which uses Ambari which also works well. However, I'm still confused as to what approach finally to go for, they all appear to do similar stuff. – radder5 Feb 18 '15 at 10:17