Se ha denunciado esta presentación.

Docker

6

Compartir

1 de 17
1 de 17

Docker

6

Compartir

Descargar para leer sin conexión

Descripción

Docker

Transcripción

  1. 1. Thiago Rondon, thiago@b-datum.com Technical meeting b-datum Monday, December 2, 13
  2. 2. VMs vs Containers VM App A App A’ App B Guest OS Guest OS Guest OS Hypervisor (Type 2) container docker Bin/libs Bin/libs Bin/libs App App App App A A’ B B’ Bin/libs Host OS SERVER Monday, December 2, 13 Host OS SERVER Bin/libs
  3. 3. Containers App A App A’ Bin/libs Original App No OS to take up space, resources, or require restart. Monday, December 2, 13 Copy of App Modified App No OS. Can share /bin/libs Union file system allows us to only save the diffs. Between container A and container A’
  4. 4. LXC “chroot() on steroids” • LXC (LinuX Containers) let you run a Linux system within another Linux system. • a container is a group of processes on a Linux box, put together in an isolated environment. • Inside the box, it look like a VM. • Outside the box, it looks like a normal processes. Monday, December 2, 13
  5. 5. why LXC ? • Speed - Fast boots, create VM, deploy tasks • small footprint • Virtualization - Own [net interface,fs] • Isolation security and resources. Monday, December 2, 13
  6. 6. AUFS • Another Union File System • Copy-on-write at the FS layer. Monday, December 2, 13
  7. 7. Cgroup • ulimit for groups of processes. • limit, account and isolate resources. • not perfect for limit I/O. Monday, December 2, 13
  8. 8. Good example ? • Do everything you do in VM, but fast! • How many VMs do you need ? • Continuous integration !! Monday, December 2, 13
  9. 9. docker is user-friendly interface to LXC. Monday, December 2, 13
  10. 10. docker did all the following... • • • • • • • • Monday, December 2, 13 It downloaded the base image from the docker index it created a new LXC container It allocated a filesystem for it Mounted a read-write layer Allocated a network interface Setup an IP for it, with network address translation And then executed a process in there Captured its output and printed it to you
  11. 11. Let’s rock. • • • • • Monday, December 2, 13 docker  search  ubuntu docker  pull  ubuntu docker  run  ubuntu  echo  “hello  b-­‐datum” docker  run  ubuntu  apt-­‐get  install  -­‐y  memcached docker  run  -­‐t  -­‐i  ubuntu  /bin/bash
  12. 12. Dockfile #  just  for  test FROM  ubuntu RUN  apt-­‐get  install  -­‐y  memcached MAINTAINER  Thiago  Rondon,  thiago@b-­‐datum.com ENTRYPOINT  [“memcached”] USER  daemon EXPOSE  11211 docker build -t mymemcached - < MyDockFile Monday, December 2, 13
  13. 13. docker exposes git-like commands for comminting changes to running containers. Changes can be commited. possible by AUFS. Monday, December 2, 13
  14. 14. Images • • • • • Monday, December 2, 13 docker  ps  -­‐l docker  commit  xxx  mystuff/memcached docker  inspect  mystuff/memcached docker  images docker  push  mystuff/memcached
  15. 15. images & commits Monday, December 2, 13
  16. 16. History • docker history • docker commit • docker images -viz | dot -Tpng -o docker.png • docker images -tree Monday, December 2, 13
  17. 17. Credits • http://docker.io Monday, December 2, 13

Descripción

Docker

Transcripción

  1. 1. Thiago Rondon, thiago@b-datum.com Technical meeting b-datum Monday, December 2, 13
  2. 2. VMs vs Containers VM App A App A’ App B Guest OS Guest OS Guest OS Hypervisor (Type 2) container docker Bin/libs Bin/libs Bin/libs App App App App A A’ B B’ Bin/libs Host OS SERVER Monday, December 2, 13 Host OS SERVER Bin/libs
  3. 3. Containers App A App A’ Bin/libs Original App No OS to take up space, resources, or require restart. Monday, December 2, 13 Copy of App Modified App No OS. Can share /bin/libs Union file system allows us to only save the diffs. Between container A and container A’
  4. 4. LXC “chroot() on steroids” • LXC (LinuX Containers) let you run a Linux system within another Linux system. • a container is a group of processes on a Linux box, put together in an isolated environment. • Inside the box, it look like a VM. • Outside the box, it looks like a normal processes. Monday, December 2, 13
  5. 5. why LXC ? • Speed - Fast boots, create VM, deploy tasks • small footprint • Virtualization - Own [net interface,fs] • Isolation security and resources. Monday, December 2, 13
  6. 6. AUFS • Another Union File System • Copy-on-write at the FS layer. Monday, December 2, 13
  7. 7. Cgroup • ulimit for groups of processes. • limit, account and isolate resources. • not perfect for limit I/O. Monday, December 2, 13
  8. 8. Good example ? • Do everything you do in VM, but fast! • How many VMs do you need ? • Continuous integration !! Monday, December 2, 13
  9. 9. docker is user-friendly interface to LXC. Monday, December 2, 13
  10. 10. docker did all the following... • • • • • • • • Monday, December 2, 13 It downloaded the base image from the docker index it created a new LXC container It allocated a filesystem for it Mounted a read-write layer Allocated a network interface Setup an IP for it, with network address translation And then executed a process in there Captured its output and printed it to you
  11. 11. Let’s rock. • • • • • Monday, December 2, 13 docker  search  ubuntu docker  pull  ubuntu docker  run  ubuntu  echo  “hello  b-­‐datum” docker  run  ubuntu  apt-­‐get  install  -­‐y  memcached docker  run  -­‐t  -­‐i  ubuntu  /bin/bash
  12. 12. Dockfile #  just  for  test FROM  ubuntu RUN  apt-­‐get  install  -­‐y  memcached MAINTAINER  Thiago  Rondon,  thiago@b-­‐datum.com ENTRYPOINT  [“memcached”] USER  daemon EXPOSE  11211 docker build -t mymemcached - < MyDockFile Monday, December 2, 13
  13. 13. docker exposes git-like commands for comminting changes to running containers. Changes can be commited. possible by AUFS. Monday, December 2, 13
  14. 14. Images • • • • • Monday, December 2, 13 docker  ps  -­‐l docker  commit  xxx  mystuff/memcached docker  inspect  mystuff/memcached docker  images docker  push  mystuff/memcached
  15. 15. images & commits Monday, December 2, 13
  16. 16. History • docker history • docker commit • docker images -viz | dot -Tpng -o docker.png • docker images -tree Monday, December 2, 13
  17. 17. Credits • http://docker.io Monday, December 2, 13

Más Contenido Relacionado

Libros relacionados

Gratis con una prueba de 30 días de Scribd

Ver todo

Audiolibros relacionados

Gratis con una prueba de 30 días de Scribd

Ver todo

×