-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
328 lines (306 loc) · 12.3 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Docker in Production - Are we there yet?</title>
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/white.css">
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<style>
.hero {
background: white;
padding: 0.1em 0.3em;
font-weight: 800;
}
.reveal h2 {
color: #c01b00;
}
ul.logos {
list-style: none;
}
.reveal .logo {
width: 25%;
height: 100%;
float: left;
margin: 0 calc(12.5% / 3);
background-size: contain;
background-repeat: no-repeat;
background-position: center;
}
.reveal .logos .top {
height: 200px;
}
.reveal .logos .mid {
height: 150px;
}
.reveal .logos .bot {
height: 200px;
}
.reveal .logos .bot .logo:first-child{
margin: 0 calc(12.5% + 12.5% / 3);
}
.logos > div {
clear: both;
}
.reveal section img {
border: 0;
box-shadow: none;
}
.reveal .author {
margin: 0;
}
</style>
<!-- Printing and PDF exports -->
<script>
var link = document.createElement( 'link' );
link.rel = 'stylesheet';
link.type = 'text/css';
link.href = window.location.search.match( /print-pdf/gi ) ? 'css/print/pdf.css' : 'css/print/paper.css';
document.getElementsByTagName( 'head' )[0].appendChild( link );
</script>
</head>
<body>
<div class="reveal">
<div class="slides">
<section>
<h2 class="hero">Docker in Production<br/>Are we there yet?</h2>
<video width="50%" height="50%" autoplay loop>
<source src="videos/are-we-there-yet.mp4" type="video/mp4">
</video>
<div>
<div style="float:left; width:50%;">
<p class="author">Rolo Mawlabaux <a href="https://twitter.com/kingrolo">@kingrolo</a></p>
<a href="https://wildfish.com"><img src="images/wildfish_logo_white.png" width="160"></a>
</div>
<div>
<p>London Django Meetup<br/>March 2017</p>
</div>
</div>
</section>
<section>
<img src="images/wildfish_logo_white.png" width="320">
<ul>
<li>Running for 16 years.</li>
<li>Working exclusively in Django since 2009 (since version 1.0).</li>
<li>Look after around 30 production sites.</li>
</ul>
</section>
<section>
<img src="images/its-complicated.png" width="90%">
</section>
<section>
<h2>The Promise</h2>
<ul>
<li>Dockerfiles are so simple!</li>
<li>Serverless world.</li>
<li>Dev/CI/Prod parity.</li>
</ul>
</section>
<section data-markdown>
<script type="text/template">
## Example Dockerfile
```
FROM wildfish/django-starter
COPY requirements.txt /usr/src/app/
RUN pip install --no-cache-dir -r /usr/src/app/requirements.txt
COPY package.json /usr/src/app/
RUN npm install --unsafe-perm=true
COPY . /usr/src/app
RUN npm run build
RUN python manage.py collectstatic --noinput
CMD ["scripts/entrypoint.sh"]
EXPOSE 8000
```
</script>
</section>
<section>
<h2>The Reality</h2>
<p><quote>@tomm: "all I can see is people trying to solve the problems they caused by using docker"</quote></p>
<p>Demos show you how to build containers but not how to run them in prod.</p>
<ul>
<li>Multi container services?</li>
<li>Logging?</li>
<li>Persistent data?</li>
<li>Zero downtime deployment?</li>
</ul>
</section>
<section>
<img class="stretch" src="images/superhans.jpg" />
</section>
<section>
<h2>Orchestration Options</h2>
<div class="logos">
<div class="top">
<div class="logo" style="background-image: url(images/ecs-logo.png)"></div>
<div class="logo" style="background-image: url(images/kubernetes-logo.png)"></div>
<div class="logo" style="background-image: url(images/dokku-logo.png)"></div>
</div>
<div class="mid">
<div class="logo" style="background-image: url(images/kontena-logo.jpg)"></div>
<div class="logo" style="background-image: url(images/deis-logo.png)"></div>
<div class="logo" style="background-image: url(images/rancher-logo.png)"></div>
</div>
<div class="bot">
<div class="logo" style="background-image: url(images/docker-swarm-logo.png)"></div>
<div class="logo" style="background-image: url(images/docker-cloud-logo.png)"></div>
</div>
</div>
</section>
<section>
<div class="logo" style="background-image: url(images/ecs-logo.png); height: 150px; margin: -30px -350px 0 150px;"></div><h2>AWS ECS</h2>
<ul>
<li>Fine...</li>
<li>Fairly weighty terraform config.</li>
<li>RDS is convenient (and probably some other AWS services are).</li>
<li>AWS specific / non portable concepts (Task, Service, Agent).</li>
<li>Some stuff held together with shell scripts.</li>
</ul>
</section>
<section>
<h2>Google Container Engine</h2>
<img src="images/container-engine-diagram.png">
<ul>
<li>Managed Kubernetes cluster.</li>
<li>Free master under 5 nodes.</li>
</ul>
</section>
<section>
<h2>Google Container Engine</h2>
<ul>
<li>Container registry.</li>
<li>Google for auth.</li>
<li>Google Cloud Storage for CDN.</li>
<li>40% cheaper than AWS.</li>
<li>Just opinionated enough.</li>
<li>Portability if you outgrow it.</li>
</ul>
</section>
<section>
<h2>Kubernetes in 1 slide</h2>
<p>"Open source platform for automating deployment, scaling and operations of application containers."</p>
<p class="fragment">Or, "a thing that looks after your containers."</p>
<p>YAML manifests describe cluster objects.</p>
<ul>
<li>Service</li>
<li>Deployment</li>
<li>Pod</li>
<li>Ingress</li>
<li>Secrets</li>
</ul>
</section>
<section data-markdown>
<script type="text/template">
## Deployment Manifest
```
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: django
spec:
replicas: 3
template:
metadata:
labels:
service: django
spec:
containers:
- name: django
image: wildfish/django-starter-sample
env:
- name: DJANGO_CONFIGURATION
value: Prod
- name: POSTGRES_USER
valueFrom:
secretKeyRef:
name: credentials
key: postgres-user
- name: POSTGRES_PASSWORD
valueFrom:
secretKeyRef:
name: credentials
key: postgres-password
- name: GCS_BUCKET
value: media.someexample.com
- name: GCS_KEY
valueFrom:
secretKeyRef:
name: credentials
key: gcs-key
ports:
- containerPort: 8000
```
</script>
</section>
<section>
<h3>Multi container services?</h3>
<p class="fragment">Manifests</p>
<h3>Logging?</h3>
<p class="fragment">StackDriver</p>
<h3>Persistent data?</h3>
<p class="fragment">PersistentVolumes</p>
<h3>Deployment?</h3>
<p class="fragment">Rolling Updates</p>
</section>
<section>
<h2>Google Cloud SQL Postgres</h2>
<ul>
<li>Managed Postgres service.</li>
</ul>
<h2>Google Cloud Container Builder</h2>
<ul>
<li>Run image builds inside GCP.</li>
<li>Each build step runs inside a container.</li>
<li>120 free builds per month.</li>
</ul>
</section>
<section>
<h2>Come back when someone else has figured it out?</h2>
<ul>
<li>Demo Project: <a href="https://github.com/wildfish/kubernetes-django-starter">https://github.com/wildfish/kubernetes-django-starter</a></li>
<li>Blog Walkthrough: <a href="https://wildfish.com/blog/2017/03/14/django-google-container-engine-gke/">https://wildfish.com/blog/2017/03/14/django-google-container-engine-gke/</a></li>
</ul>
</section>
<section>
<h2>So. Docker in Production - Are we there yet?</h2>
<h2 class="fragment">Yes!</h2>
<p class="fragment">Particularly if this sounds interesting to you or you want to learn something new or you aren't happy with how you currently do DevOps.</p>
</section>
<section>
<h2>The (possible) future.</h2>
<ul>
<li>k8s cluster across different providers.</li>
<li>k8s ecosystem (eg, kube-lego).</li>
<li>Helm - k8s package manager.</li>
</ul>
</section>
<section>
<h2>Thanks :)</h2>
<div style="float:left; width:50%;">
<p class="author">Rolo Mawlabaux <a href="https://twitter.com/kingrolo">@kingrolo</a></p>
<a href="https://wildfish.com"><img src="images/wildfish_logo_white.png" width="160"></a>
</div>
<div>
<p>London Django Meetup<br/>March 2017</p>
</div>
</section>
</div>
</div>
<script src="lib/js/head.min.js"></script>
<script src="js/reveal.js"></script>
<script>
// More info https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
history: true,
// More info https://github.com/hakimel/reveal.js#dependencies
dependencies: [
{ src: 'plugin/markdown/marked.js' },
{ src: 'plugin/markdown/markdown.js' },
{ src: 'plugin/notes/notes.js', async: true },
{ src: 'plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } }
]
});
</script>
</body>
</html>