[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mesos-user
Subject:    Re: Mesos Docker Volume Integration
From:       Haessig Michael <michael.haessig () gmail ! com>
Date:       2014-10-21 8:02:33
Message-ID: CAExy9jypyM5svX3UJfxxH0WeWo=hzZK3-59En96H5yjFLzZNtw () mail ! gmail ! com
[Download RAW message or body]

Hi tim,

Thanks for your response.

Yes i'm fully aware that mesos currently doesn't solve the distributions of
volumes with docker.

In my use case i'm running a small cluster with 5-10 nodes, my goal is to
also be able to run long running statefull databases on this cluster. For
this i obviously need some way to persit the data of the containers.
My idea was to create docker data only containers and run a cron job on
each machine to export the docker data only volume containers an back them
up, so i could (manually/with a script) restore a container on another
machine with the same data. To prevent data loss the databases are
replicated on mulitiple nodes. For the data restore i would need the docker
"--volumes-from" option to import a data only container .Backing up
multiple host mapped volumes seems to messy but would probably also work.

For the part with persistent resources that you talked about, how would
this benefit me in my use case ?
And how can i control that a task is relaunched on the same host ? In
marathon there is a feature called Constrains, should i leverage that ?

Again thanks for your help , and great work so far :)



2014-10-20 22:24 GMT+02:00 Tim Chen <tim@mesosphere.io>:

> Hi Haessig,
> 
> We didn't implement linking or volumes-from since any docker feature that
> is requiring from another docker container needs more work than just
> exposing these options since the other container might be in another slave
> that the docker container is going to be launched with.
> 
> The way we're currently thinking about volumes in general in Mesos, is
> that we're not trying to move your volumes to another slave, but instead
> try to launch any tasks that wants to re-use those volumes in the same
> slave. That is one big part of what the persistent resources work that is
> going on.
> 
> Unless you're hoping Mesos can replicate your volumes for you, if you have
> a attached NAS to a set directory you can always mount volumes from a
> shared directory.
> 
> At the current state we don't have a volumes story with docker yet, but
> like to get more use cases and see what's a good feasible option for us.
> 
> About the sandbox, we mount the sandbox as a convenience for the user as
> all the files that are downloaded for that task is stored in the sandbox,
> so if the container wants to access it it can look at the volume that is
> mounted.
> 
> Tim
> 
> 
> 
> On Mon, Oct 20, 2014 at 1:16 PM, Haessig Michael <
> michael.haessig@gmail.com> wrote:
> 
> > I have successfully setup a Mesos Marathon Cluster running in HA mode.
> > 
> > I can start docker instances, i also know how to map a host volume path
> > to docker volumes.
> > 
> > I'm looking for a way to persist some docker volumes in a more portable
> > way. I'm thinking about a Docker Volume Container. But by looking at the
> > sourcecode of the mesos docker integration
> > 
> > 
> > https://github.com/apache/mesos/blob/880c5a362d1c106c4f0758ed88d44db1a3053dda/src/docker/docker.cpp#L328
> >  
> > i can see that the docker parameter --volumes-from is not implemented.
> > 
> > how do you guys use docker volumes trough mesos ? is there a better way ?
> > i want the volumes to be able to be ported to another slave to restart
> > the job there with the same data.
> > 
> > 
> > Another question about the mesos docker code,
> > https://github.com/apache/mesos/blob/880c5a362d1c106c4f0758ed88d44db1a3053dda/src/docker/docker.cpp#L349
> >  
> > here at line 349 mesos mapps the sandbox directory to the container ?
> > what is the purpouse of this ?
> > 
> > any more information or help is more than welcome, thanks in advance :)
> > 
> 
> 


[Attachment #3 (text/html)]

<div dir="ltr">Hi tim,<div><br></div><div>Thanks for your response.  \
</div><div><br></div><div>Yes i&#39;m fully aware that mesos currently doesn&#39;t \
solve the distributions of volumes with docker.  </div><div><br></div><div>In my use \
case i&#39;m running a small cluster with 5-10 nodes, my goal is to also be able to \
run long running statefull databases on this cluster. For this i obviously need some \
way to persit the data of the containers.  </div><div>My idea was to create docker \
data only containers and run a cron job on each machine to export the docker data \
only volume containers an back them up, so i could (manually/with a script) restore a \
container on another machine with the same data. To prevent data loss the databases \
are replicated on mulitiple nodes. For the data restore i would need the docker \
&quot;--volumes-from&quot; option to import a data only container .Backing up \
multiple host mapped volumes seems to messy but would probably also work.  \
</div><div><br></div><div>For the part with persistent resources that you talked \
about, how would this benefit me in my use case ?  </div><div>And how can i control \
that a task is relaunched on the same host ? In marathon there is a feature called \
Constrains, should i leverage that ?</div><div><br></div><div>Again thanks for your \
help , and great work so far :)  </div><div><br></div><div><br></div></div><div \
class="gmail_extra"><br><div class="gmail_quote">2014-10-20 22:24 GMT+02:00 Tim Chen \
<span dir="ltr">&lt;<a href="mailto:tim@mesosphere.io" \
target="_blank">tim@mesosphere.io</a>&gt;</span>:<br><blockquote class="gmail_quote" \
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div \
dir="ltr">Hi Haessig,<div><br></div><div>We didn&#39;t implement linking or \
volumes-from since any docker feature that is requiring from another docker container \
needs more work than just exposing these options since the other container might be \
in another slave that the docker container is going to be launched \
with.</div><div><br></div><div>The way we&#39;re currently thinking about volumes in \
general in Mesos, is that we&#39;re not trying to move your volumes to another slave, \
but instead try to launch any tasks that wants to re-use those volumes in the same \
slave. That is one big part of what the persistent resources work that is going \
on.</div><div><br></div><div>Unless you&#39;re hoping Mesos can replicate your \
volumes for you, if you have a attached NAS to a set directory you can always mount \
volumes from a shared directory.</div><div><br></div><div>At the current state we \
don&#39;t have a volumes story with docker yet, but like to get more use cases and \
see what&#39;s a good feasible option for us.</div><div><br></div><div>About the \
sandbox, we mount the sandbox as a convenience for the user as all the files that are \
downloaded for that task is stored in the sandbox, so if the container wants to \
access it it can look at the volume that is mounted.</div><span class="HOEnZb"><font \
color="#888888"><div><br></div><div>Tim</div><div><br></div><div><br></div></font></span></div><div \
class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div \
class="gmail_quote">On Mon, Oct 20, 2014 at 1:16 PM, Haessig Michael <span \
dir="ltr">&lt;<a href="mailto:michael.haessig@gmail.com" \
target="_blank">michael.haessig@gmail.com</a>&gt;</span> wrote:<br><blockquote \
class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc \
solid;padding-left:1ex"><div dir="ltr"><div \
style="font-family:arial,sans-serif;font-size:13px">I have successfully setup a Mesos \
Marathon Cluster running in HA mode.  </div><div \
style="font-family:arial,sans-serif;font-size:13px"><br></div><div \
style="font-family:arial,sans-serif;font-size:13px">I can start docker instances, i \
also know how to map a host volume path to docker volumes.  </div><div \
style="font-family:arial,sans-serif;font-size:13px">  </div><div \
style="font-family:arial,sans-serif;font-size:13px">I&#39;m looking for a way to \
persist some docker volumes in a more portable way. I&#39;m thinking about a Docker \
Volume Container. But by looking at the sourcecode of the mesos docker integration  \
</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div \
style="font-family:arial,sans-serif;font-size:13px"><a \
href="https://github.com/apache/mesos/blob/880c5a362d1c106c4f0758ed88d44db1a3053dda/src/docker/docker.cpp#L328" \
target="_blank">https://github.com/apache/mesos/blob/880c5a362d1c106c4f0758ed88d44db1a3053dda/src/docker/docker.cpp#L328</a><br></div><div \
style="font-family:arial,sans-serif;font-size:13px"><br></div><div \
style="font-family:arial,sans-serif;font-size:13px">i can see that the docker \
parameter --volumes-from is not implemented.  </div><div \
style="font-family:arial,sans-serif;font-size:13px"><br></div><div \
style="font-family:arial,sans-serif;font-size:13px">how do you guys use docker \
volumes trough mesos ? is there a better way ?</div><div \
style="font-family:arial,sans-serif;font-size:13px">i want the volumes to be able to \
be ported to another slave to restart the job there with the same data.  </div><div \
style="font-family:arial,sans-serif;font-size:13px"><br></div><div \
style="font-family:arial,sans-serif;font-size:13px"><br></div><div \
style="font-family:arial,sans-serif;font-size:13px">Another question about the mesos \
docker code,  <a href="https://github.com/apache/mesos/blob/880c5a362d1c106c4f0758ed88d44db1a3053dda/src/docker/docker.cpp#L349" \
target="_blank">https://github.com/apache/mesos/blob/880c5a362d1c106c4f0758ed88d44db1a3053dda/src/docker/docker.cpp#L349</a> \
</div><div style="font-family:arial,sans-serif;font-size:13px">here at line 349 mesos \
mapps the sandbox directory to the container ? what is the purpouse of this \
?</div><div style="font-family:arial,sans-serif;font-size:13px"><br></div><div \
style="font-family:arial,sans-serif;font-size:13px">any more information or help is \
more than welcome, thanks in advance :)  </div></div> </blockquote></div><br></div>
</div></div></blockquote></div><br></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic