Tim,

interesting on the MesosContainerizer's design, what technology to support
it? runC solution?

2015-11-25 19:09 GMT+08:00 Timothy Chen <tnac...@gmail.com>:

> Hi there,
>
> DockerContainerizer doesn't support isolators simply because we
> delegate all container creation to Docker via docker client, and
> therefore we don't have a way to run our isolators that's in
> mesos-slave from docker.
>
> We're working on unified containerizer that brings Docker images to
> Mesos Containerizer, so you can launch containers with docker images
> with it. There is a working initial code that's already in master that
> you can try out, and once you have the isolator you can then launch
> containers with docker images with your new isolator with
> MesosContainerizer.
>
> Tim
>
> On Wed, Nov 25, 2015 at 2:48 AM, Frank Scholten <fr...@frankscholten.nl>
> wrote:
> > Hi all,
> >
> > We (Frank Scholten and Phil Winder) are currently developing the Mesos
> > Flocker framework. As part of this framework we want to develop a
> > custom isolator module which interacts with the Flocker Control
> > Service.
> >
> > After creating a simple stub isolator and installing it on one of the
> > agents we noticed it gets picked up we run a regular task but it does
> > not get picked up when we run a Docker container.
> >
> > To us it seems that this is because isolators can only be used by the
> > MesosContainerizer. The MesosContainerizer configures isolation in its
> > create factory method while the DockerContainerizes does not:
> >
> > MesosContainerizer
> >
> > Try<MesosContainerizer*> MesosContainerizer::create(
> >     const Flags& flags,
> >     bool local,
> >     Fetcher* fetcher)
> > {
> >   string isolation;
> >
> >   if (flags.isolation == "process") {
> >     LOG(WARNING) << "The 'process' isolation flag is deprecated, "
> >                  << "please update your flags to"
> >                  << " '--isolation=posix/cpu,posix/mem'.";
> >
> >     isolation = "posix/cpu,posix/mem";
> >   } else if (flags.isolation == "cgroups") {
> >     LOG(WARNING) << "The 'cgroups' isolation flag is deprecated, "
> >                  << "please update your flags to"
> >                  << " '--isolation=cgroups/cpu,cgroups/mem'.";
> >
> >     isolation = "cgroups/cpu,cgroups/mem";
> >   } else {
> >     isolation = flags.isolation;
> >   }
> >
> > DockerContainerizer
> >
> > Try<DockerContainerizer*> DockerContainerizer::create(
> >     const Flags& flags,
> >     Fetcher* fetcher)
> > {
> >   Try<Docker*> create = Docker::create(flags.docker,
> flags.docker_socket, true);
> >   if (create.isError()) {
> >     return Error("Failed to create docker: " + create.error());
> >   }
> >
> >   Shared<Docker> docker(create.get());
> >
> >   if (flags.docker_mesos_image.isSome()) {
> >     Try<Nothing> validateResult = docker->validateVersion(Version(1, 5,
> 0));
> >     if (validateResult.isError()) {
> >       string message = "Docker with mesos images requires docker 1.5+";
> >       message += validateResult.error();
> >       return Error(message);
> >     }
> >   }
> >
> >   return new DockerContainerizer(flags, fetcher, docker);
> > }
> >
> > The question now is how can we create an isolator to work together
> > with the DockerContainerizer. Should we subclass the
> > DockerContainerizer and create a FlockerContainerizer instead? Any
> > other suggestions?
> >
> > Thanks in advance.
> >
> > Cheers,
> >
> > Frank and Phil
>



-- 
Deshi Xiao
Twitter: xds2000
E-mail: xiaods(AT)gmail.com

Reply via email to