Slide 1

Slide 1 text

Challenges of containers in production Thursday, 27. April 2017 @ code.talks commerce special Andy Grunwald / @andygrunwald

Slide 2

Slide 2 text

Andy Grunwald

Slide 3

Slide 3 text

Andy Grunwald

Slide 4

Slide 4 text

Andy Grunwald Site Reliability- and Platform Engineering @andygrunwald andygrunwald

Slide 5

Slide 5 text

A few basics ...

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

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

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

Kurma rkt Jetpack Jails Zones cgroups LXC OCI appc runc libcontainer chroot systemd- nspawn libvirt Specs / Organisations OS Features Runtimes Tools

Slide 13

Slide 13 text

No content

Slide 14

Slide 14 text

10 And what about the future ?

Slide 15

Slide 15 text

10 And what about the future ?

Slide 16

Slide 16 text

10 And what about the future ?

Slide 17

Slide 17 text

10 And what about the future ?

Slide 18

Slide 18 text

No content

Slide 19

Slide 19 text

12 Our ship is our datacenter / cloud

Slide 20

Slide 20 text

12 Our ship is our datacenter / cloud

Slide 21

Slide 21 text

12 Our ship is our datacenter / cloud

Slide 22

Slide 22 text

12 Our ship is our datacenter / cloud

Slide 23

Slide 23 text

“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

Slide 24

Slide 24 text

Program against your datacenter like it’s a single pool of resources.

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

This is awesome, because ...

Slide 28

Slide 28 text

Things in production ...

Slide 29

Slide 29 text

No content

Slide 30

Slide 30 text

J.A.R.V.I.S. Just A Rather Very Intelligent Scheduler

Slide 31

Slide 31 text

No content

Slide 32

Slide 32 text

No content

Slide 33

Slide 33 text

Does it compile? Ship it! We can do this, but ...

Slide 34

Slide 34 text

Your application Logs in stdout and stderr, Configuration by env vars, ...

Slide 35

Slide 35 text

Your application Logs in stdout and stderr, Configuration by env vars, ... https://12factor.net/

Slide 36

Slide 36 text

25 When we start with a green field project ...

Slide 37

Slide 37 text

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

Slide 38

Slide 38 text

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

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

Docker API Backwards Compatibility is hard

Slide 41

Slide 41 text

28 $ docker ps Error response from daemon: client and
 server don't have same version (client: 1.13, server: 1.12)

Slide 42

Slide 42 text

Docker Registry Layers over layers and maintenance is necessary ...

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

Configuration Management What was your $$$ investment?

Slide 45

Slide 45 text

No content

Slide 46

Slide 46 text

33 $ docker build ... $ docker run -v ./playbooks:files ... $ docker diff ... $ docker commit ...

Slide 47

Slide 47 text

Operating System Support Docker + Kubernetes (Golang), Mesos (C++, Java, Scala)

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

No content

Slide 50

Slide 50 text

State or no State Rely on data on the same node?

Slide 51

Slide 51 text

No content

Slide 52

Slide 52 text

Distributed Systems ... Leader election, Communication between nodes, ...

Slide 53

Slide 53 text

Distributed Systems ... Leader election, Communication between nodes, ... https://aphyr.com/

Slide 54

Slide 54 text

No content

Slide 55

Slide 55 text

No content

Slide 56

Slide 56 text

No content

Slide 57

Slide 57 text

Networking / Linking Between containers and different machines / racks / datacenter

Slide 58

Slide 58 text

No content

Slide 59

Slide 59 text

Monitoring Internal and external metrics ... Everything in your container?

Slide 60

Slide 60 text

The cloud solves everything AWS Elastic Container Service to the rescue

Slide 61

Slide 61 text

And a lot more things ... Service discovery, load balancing, size of an image, 
 security / 0-day issues, fragmented ecosystem, 
 garbage collection, fast changing environment, ...

Slide 62

Slide 62 text

Challenges of containers in production Thursday, 27. April 2017 @ code.talks commerce special Andy Grunwald / @andygrunwald