Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Run Any App on Mesos on Any Infrastructure Using Docker

Run Any App on Mesos on Any Infrastructure Using Docker

* Quick intro to Docker
* Docker integration in Mesos 0.20
* Use case example

Victor Vieux

August 21, 2014
Tweet

More Decks by Victor Vieux

Other Decks in Technology

Transcript

  1. #MesosCon 2014, Chicago Run Any App on Mesos on Any

    infrastructure Using Docker Victor Vieux, Docker Inc. @vieux #MesosCon  
  2. High level approach: lightweight VM •  own process space • 

    own network interface •  can run stuff as root •  can have it’s own /sbin/init (different from the host) “Machine Container” #MesosCon  
  3. Low level approach: chroot on steroids •  can also not

    have it’s own /sbin/init •  container = isolated process(es) •  share kernel with the host “Application Container” #MesosCon  
  4. user@dockerhost:~$ docker run –it ubuntu bash root@1b55513ade2e:/# ps aux USER

    PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND root 1 0.0 0.0 18048 1960 ? Ss 08:35 0:00 bash root 13 0.0 0.0 15276 1140 ? R+ 08:35 0:00 ps aux user@dockerhost:~$ docker run –d crosbymichael/redis 699eb403b54b user@dockerhost:~$ docker inspect 699eb403b54b "IPAddress": "172.17.0.2", "Ports": { ”6379/tcp": [{ "HostIp": "0.0.0.0", "HostPort": "49153" }] } Runtime for Linux containers #MesosCon  
  5. Standard format for containers and a place to share them

    •  Fetch an image from the public registry with “docker pull” •  Enter an image with “docker run“ and do some changes •  Record those changes with “docker commit”, repeat as many times as needed •  And then share the result with “docker push” on the public registry, or a private one #MesosCon  
  6. Docker integration in Mesos timeline •  2011 : LXC • 

    2012 : cgroups •  2013 : Docker (preliminary) •  Early 2014 : External containerizer for Docker •  Last week : Docker as 1st class citizen #MesosCon  
  7. Requirements •  Mesos masters & slaves >= 0.20 •  Docker

    >= 1.0.0 on each slave •  Add ‘docker’ to the -–containerizers slaves flag #MesosCon  
  8. Changes in the API 2/2 •  Command is now optional

    so you can use the docker image default one. •  Shell boolean added to wrap your command with sh –c “…” to handle symbols like | > & #MesosCon  
  9. Small Note Mesos do a docker pull before each run,

    to make sure you are running the last version. •  From the docker index – You need internet access •  Local images – You need to run a private registry to host them #MesosCon  
  10. •  Open-Source https://github.com/VoltFramework/volt •  Golang •  Static binary, easy installation

    wget chmod +x ./volt ./volt –-master=… --ip=… h*ps://github.com/VoltFramework/volt/releases/download/v1.0.0-­‐alpha/volt   VoltFramework #MesosCon