You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@mesos.apache.org by Jeremy Jongsma <je...@barchart.com> on 2014/12/02 17:22:28 UTC

Mesos inside Docker

What is the current state of running Mesos inside Docker? I ran across a
thread that indicates it may be working now, but I have not seen any Docker
images for Mesos from authoritative sources.

https://www.mail-archive.com/user@mesos.apache.org/msg01616.html

Is anybody doing this in production? Are there known issues?

We already have a base AMI for deploying and updating Docker containers
across our infrastructure, so adding Mesos inside that would be a simple
way to start using it.

Re: Mesos inside Docker

Posted by Cody Maloney <co...@mesosphere.io>.
So if you are only using the 'docker' containerizer you mainly just need
'--privileged'. If you want to use the mesos containerizer you need to at
least mount cgroups /sys/fs/cgroups (If you're on a systemd host). I'm
still working through various issues though on getting the mesos
containerizer inside docker to fully work.

Note that the mesos containerizer inside docker won't support slave
recovery even after MESOS-2016 is fixed. With MESOS-2016 slave recovery
will work if all the containers are inside docker and you have what the
slave --work_dir mounted in. You will likely also want to make sure that
the slave logging (--log_dir) escapes the docker container.

On Wed, Dec 3, 2014 at 7:19 AM, Jeremy Jongsma <je...@barchart.com> wrote:

> Thanks Cody, exactly the info I was looking for. Do you know which volumes
> need mounting? Just the mesos data directories, or additional system
> directories also?
>
> On Tue, Dec 2, 2014 at 3:02 PM, Cody Maloney <co...@mesosphere.io> wrote:
>
>> Mesos inside docker definitely can work. There are some issues with the
>> slave in some cases (You can't have any containers which start with
>> 'mesos-' on the slave, don't put two slaves on the same host.
>> https://issues.apache.org/jira/browse/MESOS-2016 is one of the issues
>> which you'll likely run into.
>>
>> If slave recovery is important (Being able to upgrade the mesos-slave
>> binary without killing all the running tasks), then be sure to test that.
>> It's really easy for it not to work when inside docker. There are a number
>> of flags you need to pass to docker to make everything work right
>> (privileged, net=host, volume mount a couple directories so they persist
>> docker container restart among others).
>>
>> On Tue, Dec 2, 2014 at 10:07 AM, George Blazer <gb...@gmail.com> wrote:
>>
>>> We are running Mesos inside of Docker.
>>>
>>> It didn't make it into production yet, but I'm not seeing any issues at
>>> this point.
>>>
>>> On Tue, Dec 2, 2014 at 10:01 AM, Steven Schlansker <
>>> sschlansker@opentable.com> wrote:
>>>
>>>>
>>>> On Dec 2, 2014, at 8:22 AM, Jeremy Jongsma <je...@barchart.com> wrote:
>>>>
>>>> > What is the current state of running Mesos inside Docker? I ran
>>>> across a thread that indicates it may be working now, but I have not seen
>>>> any Docker images for Mesos from authoritative sources.
>>>> >
>>>> > https://www.mail-archive.com/user@mesos.apache.org/msg01616.html
>>>> >
>>>> > Is anybody doing this in production? Are there known issues?
>>>> >
>>>> > We already have a base AMI for deploying and updating Docker
>>>> containers across our infrastructure, so adding Mesos inside that would be
>>>> a simple way to start using it.
>>>>
>>>> I'm also interested in this, and can help contribute to an existing
>>>> Mesos packaging if we find one or can collaborate on creating one if
>>>> there's no suitable project already.
>>>>
>>>>
>>>>
>>>
>>
>

Re: Mesos inside Docker

Posted by Jeremy Jongsma <je...@barchart.com>.
Thanks Cody, exactly the info I was looking for. Do you know which volumes
need mounting? Just the mesos data directories, or additional system
directories also?

On Tue, Dec 2, 2014 at 3:02 PM, Cody Maloney <co...@mesosphere.io> wrote:

> Mesos inside docker definitely can work. There are some issues with the
> slave in some cases (You can't have any containers which start with
> 'mesos-' on the slave, don't put two slaves on the same host.
> https://issues.apache.org/jira/browse/MESOS-2016 is one of the issues
> which you'll likely run into.
>
> If slave recovery is important (Being able to upgrade the mesos-slave
> binary without killing all the running tasks), then be sure to test that.
> It's really easy for it not to work when inside docker. There are a number
> of flags you need to pass to docker to make everything work right
> (privileged, net=host, volume mount a couple directories so they persist
> docker container restart among others).
>
> On Tue, Dec 2, 2014 at 10:07 AM, George Blazer <gb...@gmail.com> wrote:
>
>> We are running Mesos inside of Docker.
>>
>> It didn't make it into production yet, but I'm not seeing any issues at
>> this point.
>>
>> On Tue, Dec 2, 2014 at 10:01 AM, Steven Schlansker <
>> sschlansker@opentable.com> wrote:
>>
>>>
>>> On Dec 2, 2014, at 8:22 AM, Jeremy Jongsma <je...@barchart.com> wrote:
>>>
>>> > What is the current state of running Mesos inside Docker? I ran across
>>> a thread that indicates it may be working now, but I have not seen any
>>> Docker images for Mesos from authoritative sources.
>>> >
>>> > https://www.mail-archive.com/user@mesos.apache.org/msg01616.html
>>> >
>>> > Is anybody doing this in production? Are there known issues?
>>> >
>>> > We already have a base AMI for deploying and updating Docker
>>> containers across our infrastructure, so adding Mesos inside that would be
>>> a simple way to start using it.
>>>
>>> I'm also interested in this, and can help contribute to an existing
>>> Mesos packaging if we find one or can collaborate on creating one if
>>> there's no suitable project already.
>>>
>>>
>>>
>>
>

Re: Mesos inside Docker

Posted by Tim St Clair <ts...@redhat.com>.
If you're going to want to exercise the namespaces then you'll need to run as super-privledged containers 

http://developerblog.redhat.com/2014/11/06/introducing-a-super-privileged-container-concept/ 

Cheers, 
Tim 

----- Original Message -----

> From: "Cody Maloney" <co...@mesosphere.io>
> To: user@mesos.apache.org
> Sent: Tuesday, December 2, 2014 3:02:50 PM
> Subject: Re: Mesos inside Docker

> Mesos inside docker definitely can work. There are some issues with the slave
> in some cases (You can't have any containers which start with 'mesos-' on
> the slave, don't put two slaves on the same host.
> https://issues.apache.org/jira/browse/MESOS-2016 is one of the issues which
> you'll likely run into.

> If slave recovery is important (Being able to upgrade the mesos-slave binary
> without killing all the running tasks), then be sure to test that. It's
> really easy for it not to work when inside docker. There are a number of
> flags you need to pass to docker to make everything work right (privileged,
> net=host, volume mount a couple directories so they persist docker container
> restart among others).

> On Tue, Dec 2, 2014 at 10:07 AM, George Blazer < gblazer@gmail.com > wrote:

> > We are running Mesos inside of Docker.
> 

> > It didn't make it into production yet, but I'm not seeing any issues at
> > this
> > point.
> 

> > On Tue, Dec 2, 2014 at 10:01 AM, Steven Schlansker <
> > sschlansker@opentable.com > wrote:
> 

> > > On Dec 2, 2014, at 8:22 AM, Jeremy Jongsma < jeremy@barchart.com > wrote:
> > 
> 

> > > > What is the current state of running Mesos inside Docker? I ran across
> > > > a
> > > > thread that indicates it may be working now, but I have not seen any
> > > > Docker images for Mesos from authoritative sources.
> > 
> 
> > > >
> > 
> 
> > > > https://www.mail-archive.com/user@mesos.apache.org/msg01616.html
> > 
> 
> > > >
> > 
> 
> > > > Is anybody doing this in production? Are there known issues?
> > 
> 
> > > >
> > 
> 
> > > > We already have a base AMI for deploying and updating Docker containers
> > > > across our infrastructure, so adding Mesos inside that would be a
> > > > simple
> > > > way to start using it.
> > 
> 

> > > I'm also interested in this, and can help contribute to an existing Mesos
> > > packaging if we find one or can collaborate on creating one if there's no
> > > suitable project already.
> > 
> 

-- 
Cheers, 
Timothy St. Clair 
Red Hat Inc. 

Re: Mesos inside Docker

Posted by Cody Maloney <co...@mesosphere.io>.
Mesos inside docker definitely can work. There are some issues with the
slave in some cases (You can't have any containers which start with
'mesos-' on the slave, don't put two slaves on the same host.
https://issues.apache.org/jira/browse/MESOS-2016 is one of the issues which
you'll likely run into.

If slave recovery is important (Being able to upgrade the mesos-slave
binary without killing all the running tasks), then be sure to test that.
It's really easy for it not to work when inside docker. There are a number
of flags you need to pass to docker to make everything work right
(privileged, net=host, volume mount a couple directories so they persist
docker container restart among others).

On Tue, Dec 2, 2014 at 10:07 AM, George Blazer <gb...@gmail.com> wrote:

> We are running Mesos inside of Docker.
>
> It didn't make it into production yet, but I'm not seeing any issues at
> this point.
>
> On Tue, Dec 2, 2014 at 10:01 AM, Steven Schlansker <
> sschlansker@opentable.com> wrote:
>
>>
>> On Dec 2, 2014, at 8:22 AM, Jeremy Jongsma <je...@barchart.com> wrote:
>>
>> > What is the current state of running Mesos inside Docker? I ran across
>> a thread that indicates it may be working now, but I have not seen any
>> Docker images for Mesos from authoritative sources.
>> >
>> > https://www.mail-archive.com/user@mesos.apache.org/msg01616.html
>> >
>> > Is anybody doing this in production? Are there known issues?
>> >
>> > We already have a base AMI for deploying and updating Docker containers
>> across our infrastructure, so adding Mesos inside that would be a simple
>> way to start using it.
>>
>> I'm also interested in this, and can help contribute to an existing Mesos
>> packaging if we find one or can collaborate on creating one if there's no
>> suitable project already.
>>
>>
>>
>

Re: Mesos inside Docker

Posted by George Blazer <gb...@gmail.com>.
We are running Mesos inside of Docker.

It didn't make it into production yet, but I'm not seeing any issues at
this point.

On Tue, Dec 2, 2014 at 10:01 AM, Steven Schlansker <
sschlansker@opentable.com> wrote:

>
> On Dec 2, 2014, at 8:22 AM, Jeremy Jongsma <je...@barchart.com> wrote:
>
> > What is the current state of running Mesos inside Docker? I ran across a
> thread that indicates it may be working now, but I have not seen any Docker
> images for Mesos from authoritative sources.
> >
> > https://www.mail-archive.com/user@mesos.apache.org/msg01616.html
> >
> > Is anybody doing this in production? Are there known issues?
> >
> > We already have a base AMI for deploying and updating Docker containers
> across our infrastructure, so adding Mesos inside that would be a simple
> way to start using it.
>
> I'm also interested in this, and can help contribute to an existing Mesos
> packaging if we find one or can collaborate on creating one if there's no
> suitable project already.
>
>
>

Re: Mesos inside Docker

Posted by Steven Schlansker <ss...@opentable.com>.
On Dec 2, 2014, at 8:22 AM, Jeremy Jongsma <je...@barchart.com> wrote:

> What is the current state of running Mesos inside Docker? I ran across a thread that indicates it may be working now, but I have not seen any Docker images for Mesos from authoritative sources.
> 
> https://www.mail-archive.com/user@mesos.apache.org/msg01616.html
> 
> Is anybody doing this in production? Are there known issues?
> 
> We already have a base AMI for deploying and updating Docker containers across our infrastructure, so adding Mesos inside that would be a simple way to start using it.

I'm also interested in this, and can help contribute to an existing Mesos packaging if we find one or can collaborate on creating one if there's no suitable project already.