[
https://issues.apache.org/jira/browse/MESOS-1524?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14056908#comment-14056908
]
Benjamin Hindman commented on MESOS-1524:
-----------------------------------------
Wanted to provide an update on this. Along with [~tnachen] and [~Yifan] we've
got a good foundation that we've been working on in a feature branch at
github.com/mesos/mesos/tree/docker. We hit the ground running pretty fast, but
this only includes support for running tasks (not executors) and using the
existing ContainerInfo mechanism (embedded inside of CommandInfo), so Marathon
and others that are using Deimos "should just work". We've got some tests but
haven't tried any real integration just yet.
Next (immediate) steps:
(*) Integration testing with frameworks (and fixing bugs that come up because
of this).
(*) Implementing executor support ([~tnachen] is working on this).
(*) Implementing DockerInfo (more on this below).
(*) Sending this all through Review Board.
As discussed in an earlier comment, we'd like to introduce a DockerInfo rather
than continue to use the ContainerInfo. The DockerInfo will make it easier for
us to explicitly support Docker features that might not fall into the generic
"ContainerInfo" abstraction. Eventually this will be a breaking change (at
least, in order to use the DockerContainerizer, not an external containerizer),
thus we wanted to put this out there in two phases.
How can you try this out?
(1) Grab the branch at github.com/mesos/mesos/tree/docker.
(2) make install (or just 'make' if you want to run out of your build directory)
(3) Start the slave:
$ mesos-slave --master=ip:port --containerizers=docker
If you don't have cgroups mounted we should bail early. We'll also bail if you
don't have Docker installed or we couldn't run it (i.e., we're not root). If
it's installed but not on the path (as 'docker'), specify it with the --docker
flag:
$ mesos-slave --master=ip:port --containerizers=docker
--docker=/path/to/docker-x.y.z
When you start the slave with --containerizers=docker you'll only be able to
run tasks that have Docker images (that is, a TaskInfo where the CommandInfo's
ContainerInfo's 'image' field is set to something like "docker://my-image").
Marathon is the only framework I know of out there that runs task with
container images and for this phase of the implementation Marathon "should just
work".
As said above, you can't run an executor with the Docker containerizer right
now, so if you need to run executors you'll need to run multiple
containerizers! To do that, start the slave via:
$ mesos-slave --master=ip:port --containerizers=docker,mesos
This will run both a Docker containerizer and a Mesos containerizer at the same
time. When you to go run a task or an executor Mesos will first try to use the
Docker containerizer and then try and use the Mesos containerizer. This means
you'll be able to run all tasks and executors again, and only the tasks with
Docker images will be launched with the Docker containerizer. Don't forget that
if you want the Mesos containerizer to use cgroups itself you need to set the
--isolation flag:
$ mesos-slave --master=ip:port --containerizers=docker,mesos
--isolation=cgroups/cpu,cgroups/mem
Then you'll be using containers across the board. You can even throw in an
external containerizer too:
$ mesos-slave --master=ip:port --containerizers=docker,external,mesos
--containerizer_path=/path/to/external/containerizer
In this case we'll try first the Docker containerizer, then the external
containerizer, and finally the Mesos containerizer (which should always be able
to launch a task/executor).
While this is not ready for production, please give it a test drive!
> Implement Docker support in Mesos
> ---------------------------------
>
> Key: MESOS-1524
> URL: https://issues.apache.org/jira/browse/MESOS-1524
> Project: Mesos
> Issue Type: Epic
> Reporter: Tobi Knaup
> Assignee: Benjamin Hindman
>
> There have been two projects to add Docker support to Mesos, first via an
> executor, and more recently via an external containerizer written in Python -
> Deimos: https://github.com/mesosphere/deimos
> We've got a lot of feedback from folks who use Docker and Mesos, and the main
> wish was to make Docker a first class citizen in Mesos instead of a plugin
> that needs to be installed separately. Mesos has been using Linux containers
> for a long time, first via LXC, then via cgroups, and now also via the
> external containerizer. For a long time it wasn't clear what the winning
> technology would be, but with Docker becoming the de-facto standard for
> handling containers I think Mesos should make it a first class citizen and
> part of core.
> Let's use this JIRA to track wishes/feedback on the implementation.
--
This message was sent by Atlassian JIRA
(v6.2#6252)