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

Challenges of containers in production

Challenges of containers in production

Held at the code.talks commerce special in Berlin, Germany at Thursday, 27. Apr 2017.
This is the 45 minutes long version.

Andy Grunwald

April 27, 2017
Tweet

More Decks by Andy Grunwald

Other Decks in Technology

Transcript

  1. Challenges of containers in production Thursday, 27. April 2017 @

    code.talks commerce special Andy Grunwald / @andygrunwald
  2. Kurma rkt Jetpack Jails Zones cgroups LXC OCI appc runc

    libcontainer chroot systemd- nspawn libvirt
  3. Kurma rkt Jetpack Jails Zones cgroups LXC OCI appc runc

    libcontainer chroot systemd- nspawn libvirt
  4. Kurma rkt Jetpack Jails Zones cgroups LXC OCI appc runc

    libcontainer chroot systemd- nspawn libvirt Specs / Organisations OS Features Runtimes Tools
  5. “Apache Mesos abstracts CPU, memory, storage, and other compute resources

    away from machines (physical or virtual), enabling fault-tolerant and elastic distributed systems to easily be built and run effectively.” Mesos website mesos.apache.org 13
  6. 25 When we start with a green field project ...

    1. Codebase
 One codebase tracked in revision control, ... 2. Dependencies
 Explicitly declare and isolate dependencies 3. Config
 Store config in the environment 4. Backing services
 Treat backing services as attached resources 5. Build, release, run
 Strictly separate build and run stages 6. Processes
 Execute the app as [...] stateless processes
  7. 25 When we start with a green field project ...

    1. Codebase
 One codebase tracked in revision control, ... 2. Dependencies
 Explicitly declare and isolate dependencies 3. Config
 Store config in the environment 4. Backing services
 Treat backing services as attached resources 5. Build, release, run
 Strictly separate build and run stages 6. Processes
 Execute the app as [...] stateless processes 7. Port binding
 Export services via port binding 8. Concurrency
 Scale out via the process model 9. Disposability
 Robustness with fast startup / graceful shutdown 10.Dev/prod parity
 Keep dev, stage and prod as similar as possible 11.Logs
 Treat logs as event streams 12.Admin processes
 Run management tasks as one-off processes
  8. 28 $ docker ps Error response from daemon: client and


    server don't have same version (client: 1.13, server: 1.12)
  9. 33 $ docker build ... $ docker run -v ./playbooks:files

    ... $ docker diff ... $ docker commit ...
  10. And a lot more things ... Service discovery, load balancing,

    size of an image, 
 security / 0-day issues, fragmented ecosystem, 
 garbage collection, fast changing environment, ...
  11. Challenges of containers in production Thursday, 27. April 2017 @

    code.talks commerce special Andy Grunwald / @andygrunwald