This repository has been archived by the owner on Aug 6, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
730 lines (657 loc) · 18.7 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
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
<!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>Kubernetes in Production</title>
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/black.css">
<!-- Theme used for syntax highlighting of code -->
<link rel="stylesheet" href="lib/css/zenburn.css">
<!-- 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='footer'>
<a href=http://twitter.com/TomLarrow>@TomLarrow</a>
</div>
<div class="slides">
<section>
<h1>Kubernetes</h1>
<h4>in</h4>
<h1>Production</h1>
<br>
Tom Larrow
</section>
<section>
<table>
<tr><td><img src="resources/images/OpenShift-LogoType.svg" alt="OpenShift" align="middle" style="width:256px;height:256px;"></td><td vertical-align="center">≈</td><td><img src="resources/images/k8.png" alt="Kubernetes" align="middle" style="width:256px;height:256px;"></td></tr>
<tr><td><center>oc</center></td><td>≈</td><td><center>kubectl</center></td></tr>
</table>
<aside class="notes">
<ul>
<li>OpenShift is just RedHat's version of Kubernetes</li>
<li>We're a bank, support makes us happy</li>
<li>---extra features---</li>
<li>build</li>
<li>templates</li>
<li>Different GUI</li>
<li>Self Service Portal</li>
</ul>
</aside>
</section>
<section>
<h3>About our Devops Journey</h3>
<table>
<tr>
<td><iframe width="560" height="315" src="https://www.youtube.com/embed/xgSkva_Eq5s" frameborder="0" allowfullscreen></iframe></td>
<td><iframe width="560" height="315" src="https://www.youtube.com/embed/XW5E5E5RUJg" frameborder="0" allowfullscreen></iframe></td>
</tr>
<tr>
<td><center>DOES 2106</center></td>
<td><center>DevOps Days Ohio</center></td>
</tr>
<tr>
<td><a href="https://youtu.be/xgSkva_Eq5s">youtu.be/xgSkva_Eq5s</a></td>
<td><a href="https://youtu.be/XW5E5E5RUJg">youtu.be/XW5E5E5RUJg</a></td>
</tr>
</table>
<aside class="notes">
<ul>
<li>30 second summary</li>
<li>Large outage showed the need for simplfication of our enironment/infrastucture</li>
<li>Major acquisition of another large bank sped up timetables for development of online banking application</li>
<li>Infrastucture Automation</li>
<li>Automated Testing</li>
<li>Continuous Delivery</li>
<li>Why Kubernetes is awesome</li>
<li></li>
</ul>
</aside>
</section>
<section>
<h1>So what has Kubernetes meant for us</h1>
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section data-background-image="resources/images/reliability.gif" data-background-size="contain" data-background-transition="zoom">
<aside class="notes">
<ul>
<li>reliability</li>
<li></li>
</ul>
</aside>
</section>
<section data-background-image="resources/images/scalibility.gif" data-background-size="contain" data-background-transition="zoom">
<aside class="notes">
<ul>
<li>scalibilty</li>
<li></li>
</ul>
</aside>
</section>
<section data-background-image="resources/images/simplicity.gif" data-background-size="contain" data-background-transition="zoom">
<aside class="notes">
<ul>
<li>simplicity</li>
<li></li>
</ul>
</aside>
</section>
<section data-background-image="resources/images/secure.gif" data-background-size="contain" data-background-transition="zoom">
<aside class="notes">
<ul>
<li>security</li>
<li></li>
</ul>
</aside>
</section>
<section data-background-image="resources/images/theNeedForSpeed.gif" data-background-size="contain" data-background-transition="zoom">
<aside class="notes">
<ul>
<li>speed</li>
<li></li>
</ul>
</aside>
</section>
<section>
<h1>So how do we use it?</h1>
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section>
<h3>Build Pipeline</h3>
<img src="resources/images/pipeline1.png" style="width:150%;height:150%;" >
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section>
<img src="resources/images/jenkins-slaves1.png">
<p>Whlie the Jenkins master is on its own server, almost all jobs build run inside docker containers in Kubernetes
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section>
<img src="resources/images/jenkins-slaves2.png" style="width:150%;height:150%;">
<p>The number of build slaves can easily be increased/decreased
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section>
Each step loads in a docker image containing the dependencies for that step
<pre><code class="hljs" data-trim contenteditable>
pipeline {
agent {label 'swarm'}
stage('Gulp'){
agent {
docker {
image "$REGISTRY/openshift/nodejs-olb:latest"
reuseNode true
}
}
steps {
sh "gulp olb"
}
</code></pre>
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section>
<h3>Run Unit Tests</h3>
<img src="resources/images/pipeline2.png" style="width:150%;height:150%;" >
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section>
<h3>Build new docker container</h3>
<img src="resources/images/pipeline3.png" style="width:150%;height:150%;" >
<h3>deploy it to testing environment</h3>
<aside class="notes">
<ul>
<li>Docker builds straight from a dockerfile</li>
<li>Some projects build from Maven and Fabric8</li>
</ul>
</aside>
</section>
<section>
Deploying is as simlpe as pushing<br>a new image into the registry
<pre><code class="hljs" data-trim contenteditable>
stage('Docker Build and Push'){
steps {
sh "docker build -t $DOCKERTAG_UT ."
sh "docker push $DOCKERTAG_UT"
VerifyDeployment("olb")
}
}
</code></pre>
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section data-background-image="resources/images/lucy.gif" data-background-size="contain" data-background-transition="zoom">
<aside class="notes">
<ul>
<li>We just shove images at Kubernetes and let it figure out what to do with them</li>
<li>how does that happen?</li>
</ul>
</aside>
</section>
<section data-background-image="resources/images/magic.gif" data-background-size="contain" data-background-transition="zoom">
<aside class="notes">
<ul>
<li>actually image triggers</li>
<li></li>
</ul>
</aside>
</section>
<section>
Actually, it is image triggers in the deployment config
<pre><code class="hljs" data-trim contenteditable>
triggers:
- type: ConfigChange
- type: ImageChange
imageChangeParams:
automatic: true
containerNames:
- olb
from:
kind: ImageStreamTag
name: 'olb:ut'
</code></pre>
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section>
This causes the image to roll when the image changes
<img src="resources/images/olb1.png" style="width:150%;height:150%;" >
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section>
The roll in action
<img src="resources/images/olb2.png" style="width:150%;height:150%;" >
Kubernetes waits for new pod to pass its readiness check before sending traffice to it and spinning down the old pod
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section>
Readiness probes are defined in<br>the depolyment config
<pre><code class="hljs" data-trim contenteditable>
readinessProbe:
httpGet:
path: ibxolb/olb/index.html
port: 8080
scheme: HTTP
initialDelaySeconds: 10
timeoutSeconds: 1
periodSeconds: 10
successThreshold: 1
failureThreshold: 3
</code></pre>
<aside class="notes">
<ul>
<li>wait 10 seconds </li>
<li>Then check every 10 seconds to see if it is up</li>
<li>failureThreshold means declare the pod dead if after being up for at least 1 check, it is down for 3</li>
</ul>
</aside>
</section>
<section>
New pod now serving requests
<img src="resources/images/olb3.png" style="width:150%;height:150%;" >
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section>
<h3>Run Selenium Tests</h3>
<img src="resources/images/pipeline4.png" style="width:150%;height:150%;" >
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section>
<ul>
<li>Over 5000 tests</li>
<li>Run from a docker container</li>
<li>Selenium Hub and 20 executors in</li>
<li>Directly hitting the service</li>
<li>Roughly 12 minutes to run</li>
<li>All in Kubernetes</li>
</ul>
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section>
20 Pods of automated browsers
<img src="resources/images/seleniumGrid.png" style="width:150%;height:150%;" >
Easily spin up Firefox nodes or scale larger
<aside class="notes">
<ul>
<li>Saucelabs story</li>
<li></li>
</ul>
</aside>
</section>
<section>
Graph out the results
<img src="resources/images/allure.png" style="width:100%;height:100%;" >
Continue only if no failures
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section>
<h3>Push to Dev Environment</h3>
<img src="resources/images/pipeline5.png" style="width:150%;height:150%;" >
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section>
Just shove the image at the next environment
<pre><code class="hljs" data-trim contenteditable>
stage("push to DV"){
steps{
sh "docker pull $DOCKERTAG_UT"
sh "docker tag $DOCKERTAG_UT $DOCKERTAG_DV"
sh "docker push $DOCKERTAG_DV"
VerifyDeployment("olb")
}
}
</code></pre>
<aside class="notes">
<ul>
<li>pull the image in UT</li>
<li>Tag it with the proper name for DV</li>
<li>Shove the image at K8S wait for the maigc to happen</li>
</ul>
</aside>
</section>
<section data-background-image="resources/images/the_first_transport_is_away.gif" data-background-transition="zoom">
<aside class="notes">
<ul>
<li>reliability</li>
<li></li>
</ul>
</aside>
</section>
<section>
<h3>Move Pods to higher environments </h3>
<ul>
<li>Move all containers together</li>
<li>If image hasn't changed, pods don't roll</li>
<li>Done today with separate jobs in Jenkins</li>
<li>Moving to a more formal release/deployment application</li>
</ul>
<aside class="notes">
<ul>
<li>XebxaLabs XL Deploy and XL Release</li>
<li></li>
</ul>
</aside>
</section>
<section>
<h2>Mobile Application</h2>
<ul>
<li>Mobile App is HTML5 using most of same codebase</li>
<li>Deploy to testing environment in Kubernetes</li>
<li>Selenium testing in phone sized browser window</li>
<li>In higher environment package application and test</li>
</ul>
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section>
<h2>Configuration</h2>
<ul>
<li>OpenShift has configuration templates</li>
<li>This allows customization per environment</li>
<br>
<li>Several open source projects exist for templating Kubernetes</li>
<li>ktmpl <a href="https://github.com/InQuicker/ktmpl">https://github.com/InQuicker/ktmpl</a></li>
</ul>
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section>
<h2>Sidecars</h2>
<img src="resources/images/sidecars.png" style="width:100%;height:100%;" >
Multiple containers can make up a pod
<aside class="notes">
<ul>
<li>CTG and the Log Forwarder are additional docker containers inside the pod</li>
<li>they share "localhost" and filestores</li>
</ul>
</aside>
</section>
<section data-background-image="resources/images/monitoring.gif" data-background-size="contain" data-background-transition="zoom">
<aside class="notes">
<ul>
<li>monitoring</li>
<li></li>
</ul>
</aside>
</section>
<section>
<h3>Grafana</h3>
<img src="resources/images/grafana.png" style="width:150%;height:150%;" >
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section>
<h3>Hygieia</h3>
<img src="resources/images/hygieia1.png" style="width:50%;height:50%;" >
<a href="http://mickfeech.github.io/">http://mickfeech.github.io/</a>
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section>
<h3>Hygieia</h3>
<img src="resources/images/hygieia2.png" style="width:100%;height:100%;" >
Developers can click on an environment in their Hygieia dashboard and see exactly the code revision that is in each enironment.
<aside class="notes">
<ul>
<li>Baked into the container as docker metadata</li>
<li>can be viewed by docker inspect</li>
</ul>
</aside>
</section>
<section>
<h3>Hystrix</h3>
<img src="resources/images/hystrix1.png" style="width:100%;height:100%;" >
<aside class="notes">
<ul>
<li>Netflix's Circuit Breaker Pattern</li>
<li></li>
</ul>
</aside>
</section>
<section>
<h3>Hystrix in Grafana</h3>
<img src="resources/images/grafana2.png" style="width:100%;height:100%;" >
Create Exectutive Dashboard from Hystrix data
(10:30pm)
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section data-background-image="resources/images/thumbsUp.gif" data-background-size="contain" data-background-transition="zoom">
<aside class="notes">
<ul>
<li>Things we did right</li>
<li></li>
</ul>
</aside>
</section>
<section>
<h2>Delivery Speed</h2>
<ul>
<li class="fragment">Dramatically Reduced delivery time of major application</li>
<br>
<li class="fragment">Performed 10 deployments during first 4 days of go live, while under record load</li>
<br>
<li class="fragment">Rolling Deployments with no customer impact</li>
</ul>
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section>
<h2>Testing and Quality</h2>
<ul>
<li class="fragment">Over 21 million tests run inside our Selenium grid</li>
<br>
<li class="fragment">Reduced 2 weeks of manual testing to 12 minutes of automated tests</li>
<br>
<li class="fragment">Many automated tests could cover both web and mobile apps</li>
</ul>
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section>
<h2>Improve Incrementially</h2>
<img src="resources/images/snake.png" style="width:100%;height:100%;" >
Not only your code, but also your environment
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section>
<h2>What would we do differently?</h2>
<ul>
<li class="fragment">A least 4 application nodes</li>
<li class="fragment">Maybe not Jenkins</li>
<li class="fragment">Better evangilization and communication about capibilities</li>
</ul>
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section data-background-image="resources/images/startSooner.gif" data-background-size="contain" data-background-transition="zoom">
<aside class="notes">
<ul>
<li>Start Sooner</li>
<li></li>
</ul>
</aside>
</section>
<section>
<h1>What's Next?</h1>
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section data-background-image="resources/images/allTheThings.jpg" data-background-size="contain" data-background-transition="zoom">
<aside class="notes">
<ul>
<li>Start Sooner</li>
<li></li>
</ul>
</aside>
</section>
<section>
<h3>What's Next?</h3>
<ul>
<li>Expand The Cluster</li>
<li class="fragment">Vendor Containers</li>
<li class="fragment">Databases</li>
<li class="fragment">Grid Improvements</li>
<li class="fragment">New Deployment Tool</li>
</ul>
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</section>
<section>
<h1>Questions?</h1>
<aside class="notes">
<ul>
<li></li>
<li></li>
</ul>
</aside>
</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>