Slide 1

Slide 1 text

The Container Operator’s Manual @alicegoldfuss

Slide 2

Slide 2 text

I’m Alice SRE @

Slide 3

Slide 3 text

car commercial photo

Slide 4

Slide 4 text

* Laboratory setting

Slide 5

Slide 5 text

vintage car ad, car on pedestal

Slide 6

Slide 6 text

vintage car ad, car on pedestal CONTAINER SAASY ‘18

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

cars stuck in traffic

Slide 10

Slide 10 text

cars stuck in traffic

Slide 11

Slide 11 text

No content

Slide 12

Slide 12 text

My Credentials Running containers at production scale since early 2015 Ran Dockerized Cassandra clusters Kubernetes platform team at GitHub

Slide 13

Slide 13 text

What is a container? ?

Slide 14

Slide 14 text

Host

Slide 15

Slide 15 text

Host OS

Slide 16

Slide 16 text

Host OS Daemon

Slide 17

Slide 17 text

Host OS C C C Daemon

Slide 18

Slide 18 text

Host OS C Daemon C C C

Slide 19

Slide 19 text

$ top
 PID USER %CPU %MEM TIME+ COMMAND 34763 root 49.4 0.2 22:42.70 python 32607 root 42.8 0.2 23:41.14 ruby 32631 root 40.1 0.2 23:10.20 dockerd 34900 root 38.5 0.2 22:47.33 ruby 32720 root 37.5 0.2 23:38.04 kubelet

Slide 20

Slide 20 text

Containers are processes born from tarballs controlled by cgroups anchored to namespaces

Slide 21

Slide 21 text

> Dockerfile FROM golang:1.9.2-alpine3.6 RUN apk add --no-cache git RUN go get github.com/golang/dep/cmd/dep COPY Gopkg.lock Gopkg.toml /go/src/project/ WORKDIR /go/src/project/ RUN dep ensure -vendor-only
 ...

Slide 22

Slide 22 text

PID

Slide 23

Slide 23 text

PID PID PID PID PID /data

Slide 24

Slide 24 text

PID PID PID PID PID /data 2 GB mem 5 CPU

Slide 25

Slide 25 text

No content

Slide 26

Slide 26 text

No content

Slide 27

Slide 27 text

4 Lessons

Slide 28

Slide 28 text

1. Containers have strengths

Slide 29

Slide 29 text

Stateless Applications

Slide 30

Slide 30 text

* data data

Slide 31

Slide 31 text

* * *

Slide 32

Slide 32 text

* * *

Slide 33

Slide 33 text

* * *

Slide 34

Slide 34 text

* * *

Slide 35

Slide 35 text

pile of polaroids Ephemeral

Slide 36

Slide 36 text

* *

Slide 37

Slide 37 text

pile of polaroids Portable

Slide 38

Slide 38 text

old new

Slide 39

Slide 39 text

old new iterate

Slide 40

Slide 40 text

Disaster Recovery

Slide 41

Slide 41 text

* * *

Slide 42

Slide 42 text

* * *

Slide 43

Slide 43 text

Testing Environments

Slide 44

Slide 44 text

1.0 1.1 1.2

Slide 45

Slide 45 text

1.0 1.1 1.2

Slide 46

Slide 46 text

No content

Slide 47

Slide 47 text

2. Containers have weaknesses

Slide 48

Slide 48 text

Apps Stateful

Slide 49

Slide 49 text

Databases

Slide 50

Slide 50 text

Are you Google?

Slide 51

Slide 51 text

Are you routing billions of requests to thousands of databases across dozens of data centers per second?

Slide 52

Slide 52 text

No

Slide 53

Slide 53 text

Reasons to Try Faster provisioning Stability Recovery

Slide 54

Slide 54 text

Reasons to Try Faster provisioning Stability Recovery

Slide 55

Slide 55 text

Reasons to Try Faster provisioning Stability Recovery £££

Slide 56

Slide 56 text

data

Slide 57

Slide 57 text

2 main solutions

Slide 58

Slide 58 text

Storage

Slide 59

Slide 59 text

Storage

Slide 60

Slide 60 text

Storage

Slide 61

Slide 61 text

Storage

Slide 62

Slide 62 text

Network bound

Slide 63

Slide 63 text

/data /data /data

Slide 64

Slide 64 text

/data /data /data

Slide 65

Slide 65 text

/data /data /data

Slide 66

Slide 66 text

/data /data /data

Slide 67

Slide 67 text

My Credentials Running containers at production scale since early 2015 Ran Dockerized Cassandra clusters Kubernetes platform team at GitHub

Slide 68

Slide 68 text

/data /data /data

Slide 69

Slide 69 text

/data /data /data

Slide 70

Slide 70 text

/data /data /data

Slide 71

Slide 71 text

/data /data /data /data

Slide 72

Slide 72 text

Network bound

Slide 73

Slide 73 text

keep it small

Slide 74

Slide 74 text

No content

Slide 75

Slide 75 text

Automatic failover Scalable dbs Read replicas Multi-regions Manual failover Scalable dbs Read replicas Multi-regions

Slide 76

Slide 76 text

3. Containers need friends

Slide 77

Slide 77 text

It’s never “just” containers

Slide 78

Slide 78 text

Dev Setups How will you build your container tarballs?

Slide 79

Slide 79 text

Orchestration How will you schedule container resources?

Slide 80

Slide 80 text

Management How will you manage clusters?

Slide 81

Slide 81 text

Networking How will you handle routing, access control, service discovery?

Slide 82

Slide 82 text

No content

Slide 83

Slide 83 text

No content

Slide 84

Slide 84 text

containers

Slide 85

Slide 85 text

containers deployment

Slide 86

Slide 86 text

containers deployment monitoring

Slide 87

Slide 87 text

containers deployment monitoring provisioning

Slide 88

Slide 88 text

containers deployment monitoring provisioning debugging

Slide 89

Slide 89 text

gradual rollout

Slide 90

Slide 90 text

1 year

Slide 91

Slide 91 text

* * * * * * + hybrid

Slide 92

Slide 92 text

4. Containers need headcount

Slide 93

Slide 93 text

We need containers!

Slide 94

Slide 94 text

Let’s give it to Ops!

Slide 95

Slide 95 text

Ops Owns Inventory & provisioning Configuration management Networking Deployment tooling Monitoring Incident response

Slide 96

Slide 96 text

Ops Owns Inventory & provisioning Configuration management Networking Deployment tooling Monitoring Incident response +containers!!

Slide 97

Slide 97 text

new team!

Slide 98

Slide 98 text

Operations

Slide 99

Slide 99 text

Deployments

Slide 100

Slide 100 text

Tooling

Slide 101

Slide 101 text

Monitoring

Slide 102

Slide 102 text

Kernel engineer

Slide 103

Slide 103 text

Networking

Slide 104

Slide 104 text

InfoSec

Slide 105

Slide 105 text

Internal adoption

Slide 106

Slide 106 text

Project manager

Slide 107

Slide 107 text

No content

Slide 108

Slide 108 text

ideally 6-8 people

Slide 109

Slide 109 text

at least 4 people

Slide 110

Slide 110 text

empower them to succeed

Slide 111

Slide 111 text

No content

Slide 112

Slide 112 text

Stateless Applications

Slide 113

Slide 113 text

Databases

Slide 114

Slide 114 text

It’s never “just” containers

Slide 115

Slide 115 text

No content

Slide 116

Slide 116 text

“Should we use containers in prod?”

Slide 117

Slide 117 text

Do You… Have stateless services? A large, heterogenous platform? Time, money, people, org support?

Slide 118

Slide 118 text

Do You… Have stateless services? A large, heterogenous platform? Time, money, people, org support?

Slide 119

Slide 119 text

Do You… Have a monolith and few services? A small team with no org support? Just want to spite me?

Slide 120

Slide 120 text

Do You… Have a monolith and few services? A small team with no org support? Just want to spite me?

Slide 121

Slide 121 text

Do you want containers or a blog post?

Slide 122

Slide 122 text

Pssst
 it’s ok not to use containers!

Slide 123

Slide 123 text

No content

Slide 124

Slide 124 text

Thanks! @alicegoldfuss

Slide 125

Slide 125 text

Photo Credits by Slide Number 4 http://www.oldcaradvertising.com/Buick/1948/1948%20Buick%20Ad-01.html 6 https://vladimerbotsvadze.wordpress.com/2014/11/09/57-chevrolet-sweet-smooth-and-sassy-advertising-chevrolet/ 8 http://www.tocmp.com/pix/Cadillac/pages/56Cadillac08-or_jpg.htm 10 Circa 1959, Photo by Ralph Crane http://grandmighty.com/2011/11/la-traffic/ 12 https://commons.wikimedia.org/wiki/File:Car_fire_I-90_Massachusetts.jpg 26 http://www.oldcaradvertising.com/Chevrolet%20Corvette/1956/1956%20Corvette%20Ad-03.html 27 http://www.oldcaradvertising.com/Plymouth/1955%20Plymouth/1955%20Plymouth%20Ad-03.html 30 https://www.magazine-advertisements.com/uploads/2/1/8/4/21844100/polaroid-sx-70-land-camera-1_orig.jpg 36 https://www.ebay.com/itm/19-1960s-70s-American-Muscle-Car-Photos-Polaroids-Ford-Mustang-Dodge-Charger/192242851917? _trkparms=aid%3D555017%26algo%3DPL.CASSINI%26ao%3D1%26asc%3D201607 06104836%26meid%3D0934e94015fa43119ec01b0813d56b72%26pid%3D100642%26rk%3D1%26rkt%3D1%26%26itm%3D192242851917&_trksid=p204 5573.c100642.m3226 38 http://tsiarde.tictail.com/product/polaroid-camera-instant-10-with-beautiful-rainbow-colored-handle 41 http://forums.popphoto.com/showthread.php?627010-Original-Polaroid-SX-70-Land-Camera 44 https://www.magazine-advertisements.com/polaroid-230-land-camera.html 47 https://www.ebay.com/itm/Lot-of-91-Vintage-Polaroid-photos-mixed-Lot-3/382437994619?hash=item590b14b07b:g:xiYAAOSwMGha1T9a 49 https://www.pinterest.com/pin/531284087276635567/ 57 https://i.pinimg.com/originals/e7/a6/9c/e7a69c81ffbd9373c722c6f2a52d78ca.jpg 63 http://vintage-magazine-ads.blogspot.com/ 74 http://www.voicesofeastanglia.com/wp-content/uploads/2012/01/Japanese-Make-up-Advert.jpg 78 http://www.goretro.com/2016/01/fond-of-fondue.html 84 http://myminkbetty.blogspot.com/2015/08/of-sewing-machines-and-tomato-soup.html 99 https://www.pinterest.com/pin/269441990180539638/ 100 https://www.archives.gov/files/research/african-americans/ww2-pictures/images/african-americans-wwii-065.jpg 101 http://www.shorpy.com/node/2974 102 https://imgur.com/gallery/2jEv6 103 https://www.cnn.com/style/article/radium-girls-radioactive-paint/index.html 104 https://en.wikipedia.org/wiki/United_States_home_front_during_World_War_II#/media/Fil e:World_War_II_woman_aircraft_worker,_Vega_Aircraft_Corporation,_Burbank,_California_1942.jpg 105 https://www.atomicheritage.org/history/african-americans-and-manhattan-project 106 http://www.zocalopublicsquare.org/2016/01/14/the-japanese-american-flower-growers-who-made-phoenix-bloom/chronicles/who-we-were/ 107 https://www.bet.com/news/fashion-and-beauty/photos/2012/03/black-female-activists/_jcr_content/mainCol/imagegallerycontainer/gal leryimage_4.custom1540fx865fx0xcrop.dimg/__1330980660498/030512-fashion-black-feminist-ruby-dee.jpg 124 http://blog.beforemario.com/2012/04/nintendo-twister-1966.html