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. Outline •  Quick Introduction to Docker •  Docker integration in

    Mesos •  Use case example #MesosCon  
  3. What is Docker ? #MesosCon  

  4. The Matrix From Hell #MesosCon  

  5. Another Matrix From Hell #MesosCon  

  6. Solution: the intermodal shipping container #MesosCon  

  7. Solved! #MesosCon  

  8. Solution to the deployment problem: the Linux container #MesosCon  

  9. Solved! #MesosCon  

  10. 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  
  11. 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  
  12. Layers #MesosCon  

  13. Layers #MesosCon  

  14. Layers #MesosCon  

  15. Layers #MesosCon  

  16. Layers #MesosCon  

  17. What’s really docker ? #MesosCon  

  18. 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  
  19. 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  
  20. Docker integration in Mesos #MesosCon  

  21. 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  
  22. Requirements •  Mesos masters & slaves >= 0.20 •  Docker

    >= 1.0.0 on each slave •  Add ‘docker’ to the -–containerizers slaves flag #MesosCon  
  23. Changes in the API 1/2 #MesosCon  

  24. 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  
  25. 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  
  26. Use case example: gocover.io + VoltFramework #MesosCon  

  27. GoCover.io #MesosCon  

  28. VoltFramework #MesosCon  

  29. VoltFramework #MesosCon  

  30. VoltFramework #MesosCon  

  31. •  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  
  32. •  Adding Docker support was super easy VoltFramework #MesosCon  

  33. Thank you! Questions? http://docker.io http://docker.com @docker - @vieux #MesosCon