-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
1359 lines (1256 loc) · 53.4 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
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>reveal.js</title>
<link rel="stylesheet" href="dist/reset.css">
<link rel="stylesheet" href="dist/reveal.css">
<link rel="stylesheet" href="dist/theme/si.css">
<!-- Theme used for syntax highlighted code -->
<link rel="stylesheet" href="plugin/highlight/monokai.css">
</head>
<body>
<div class="reveal">
<div class="slides">
<section data-background-image="assets/route1.jpg" data-background-opacity="0.2">
<h1>What if Infrastructure as Code never existed?</h1>
<h2>Adam Jacob, CEO, System Initiative</h2>
<small>([email protected], @adamhjk, @[email protected])</small>
<aside class="notes">
<ul>
<li>Wrote a thing called Chef</li>
<li>CEO of System Initiative</li>
<li>I didn't come up with this talk title</li>
<li>Paul Stack did</li>
<li>But then I had to figure out how to live up to the title</li>
<li>And to explain how I did that, I have to tell you a story</li>
</ul>
</aside>
</section>
<section data-background-image="assets/route1.jpg" data-background-opacity="0.2">
<h1 class="r-fit-text">30 Years</h1>
<aside class="notes">
<ul>
<li>First job in tech was ISP<li>
<li>Dentists office 15</li>
<li>BSDI servers</li>
<li>BBSes since I was 8</li>
<li>Sysadmin was cool</li>
<li>Now 45</li>
<li>Saw web 1, the internet, web 2, dot bomb, started chef, velocity, devops</li>
<li>Saw a lot happen</li>
</ul>
</aside>
</section>
<section data-background-image="assets/route1.jpg" data-background-opacity="0.2">
<h1 class="r-fit-text">22</h1>
<aside class="notes">
<ul>
<li>22 years ago, different internet company</li>
<li>Just moved to Seattle</li>
<li>Just discovered alcohol</li>
<li>Really quite drunk</li>
</ul>
</aside>
</section>
<section data-background-image="assets/pager.jpg" data-background-size="cover">
<aside class="notes">
<ul>
<li>This thing goes off</li>
<li>How many of you had one of these?</li>
<li>Roll myself out of bed</li>
<li>Call my boss back on a land line, because thats what we had then</li>
</ul>
</aside>
</section>
<section data-background-image="assets/john_boyd.jpg" data-background-size="contain">
<aside class="notes">
<ul>
<li>Important note is my boss was a retired marine corps colonel</li>
<li>not this guy, who knows who this is?</li>
<li>the ooda loop guy</li>
<li>he's in a panic</li>
<li>sites down, fix it right now</li>
</ul>
</aside>
</section>
<section data-background-image="assets/drunk.jpg" data-background-size="contain">
<aside class="notes">
<ul>
<li>Full drill sargent</li>
<li>soldier, get out of bed, 15 minutes, fix that server</li>
<li>sober up</li>
</ul>
</aside>
</section>
<section data-background-image="assets/suburban.jpg" data-background-size="contain">
<aside class="notes">
<ul>
<li>Shows up at my apartment in one of these</li>
<li>pops out of the car</li>
<li>hands me a cup of coffee</li>
<li>marine corps pep, piles me into his car</li>
<li>hauls ass to the data center</li>
</ul>
</aside>
</section>
<section data-background-image="assets/datacenter.jpg" data-background-size="contain">
<aside class="notes">
<ul>
<li>grab a crash cart</li>
<li>plug in to the servers</li>
<li>gives me a full on pep talk</li>
<li>going to fix the servers, marches me through it</li>
<li>we're not gonna die here</li>
<li>I fix the servers</li>
<li>great job, nobody died here, lets get breakfast</li>
<li>shakes my hand, says I did a good job, drops me off</li>
</ul>
</aside>
</section>
<section data-background-image="assets/crisis.jpg" data-background-size="contain" data-background-opacity="0.2">
<!-- From Flickr, used by CC: https://flic.kr/p/e3919p -->
<h1 class="r-fit-text">Crisitunities</h1>
<ul>
<li>Internet for everyone!</li>
<li>Content on the Internet!</li>
<li>Build applications on the internet!</li>
<li>Social Media!</li>
<li>Digital Transformation!</li>
</ul>
<aside class="notes">
<ul>
<li>And that, pretty much, is what the last 30 years was like</li>
<li>for everyone!</li>
<li>over and over again for 30 years</li>
<li>some version of that colonel begging us to figure it out<li>
</ul>
</aside>
</section>
<section data-background-image="assets/creative-act.jpg" data-background-size="contain">
<aside class="notes">
<ul>
<li>It was a very creative time</li>
<li>Not just for me, for everyone</li>
<li>Like musicians swept up in a cultural movement, we just made it up as we went along</li>
</ul>
</aside>
</section>
<section data-background-image="assets/rules.jpg" data-background-size="cover" data-background-opacity="0.2">
<!-- from flickr: https://flic.kr/p/2goppRx -->
<h1 class="r-fit-text">Rules</h1>
<aside class="notes">
<ul>
<li>When we started, there were no rules</li>
<li>The few books on sysadmin gave bad advice!</li>
<li>loaded with lies - plug a printer in to the server to print syslog for hard copy in case you get hacked</li>
<li>I did - we came in the next day room full of paper</li>
<li>Rule after Rule, we made them up<li>
</ul>
</aside>
</section>
<section data-background-image="assets/nature.jpg" data-background-size="cover" data-background-opacity="0.2">
<!-- from flickr: https://flic.kr/p/2euif8o -->
<h1 class="r-fit-text">Laws of Nature</h1>
<aside class="notes">
<ul>
<li>30 years in, you accept those rules like laws of nature</li>
<li>Well of course we do it that way, its the only way it could've worked.<li>
<li>I assure you, they are not; at best, guiding priciples</li>
<li>Maybe creative criteria - the box in which you can create</li>
</ul>
</aside>
</section>
<section data-background-image="assets/rules.jpg" data-background-size="cover" data-background-opacity="0.2">
<blockquote><q>Rules direct us to <span class="orange">average behaviors</span>. If we're aiming to create works
that are exceptional, most rules don't apply. <span class="green">Average is nothing to aspire to</span>.</q></blockquote>
<small> -- Rick Rubin, The Creative Act, Page 98</small>
<aside class="notes">
<ul>
<li>And that is why Paul Stack wrote an incredible talk title<li>
</ul>
</aside>
</section>
<section data-background-image="assets/break-rules.jpg" data-background-size="contain">
<!-- From flickr: https://flic.kr/p/2nx7c7Z -->
<aside class="notes">
<ul>
<li>Because it's an invitation to break the rules</li>
<li>An invitation to explore and create</li>
<li>as a movement we're stuck in a rut, playing our own greatest hits</li>
<li>why I left chef</li>
<li>playing myself on tv</li>
<li>small variations on the theme for the same essential outcomes</li>
<li>average; its boring.</li>
<li>so that's what we're going to do - break some rules</li>
</ul>
</aside>
</section>
<section id="choose" data-background-image="assets/judas.jpg" data-background-size="cover" data-background-opacity="0.2">
<h1>Break a rule!</h1>
<table>
<tr>
<td colspan=2>
-----> <a href="#/configuration-as-code">Configuration as Code</a> <-----
</td>
</tr>
<tr>
<td><center><a href="#/source-control">Source Control</a></center></td>
<td><center><a href="#/declarative">Declarative</a></center></td>
</tr>
<tr>
<td><center><a href="#/variables">Variables</a></center></td>
<td><center><a href="#/testing">Testing</a></center></td>
</tr>
<tr>
<td colspan=2><center><a href="#/truth">Single Source of Truth</a></center></td>
</tr>
<tr>
<td colspan=2><center><small><a href="#/wrap-up">Wrap up!</a></small></center></td>
</tr>
</table>
<aside class="notes">
<ul>
<li>You shout out which rule you want me to break</li>
<li>Then I will break it, and we will do it again</li>
<li>Won't be able to break them all before the end</li>
<li>Which rule do you want to break</li>
</ul>
</aside>
</section>
<!-- Begin Configuration As Code -->
<section id="configuration-as-code" data-background-image="assets/config.jpg" data-background-size="cover" data-background-opacity="0.2">
<!-- from flickr: https://flic.kr/p/DqoFyV -->
<h1>Configuration as Code</h1>
<aside class="notes">
<ul>
<li>Very thoughtful of you</li>
<li>Have to break this rule first</li>
<li>Nearly impossible to imagine breaking the others</li>
<li>Everything we do stems from this one historical decision</li>
</ul>
</aside>
</section>
<section data-background-image="assets/config.jpg" data-background-size="cover" data-background-opacity="0.2">
<h1>sendmail.cf</h1>
<pre>
<code>
Mlocal, P=/usr/bin/procmail,
F=lsDFMAw5:/|@ShP, S=10/30,
R=20/40, T=DNS/RFC822/X-Unix,
A=procmail -a $h -d $u
Mprog, P=/bin/sh, F=lsDFMoeu, S=10/30,
R=20/40, D=$z:/,
T=X-Unix, A=sh -c $u
Msmtp, P=[IPC], F=mDFMuX, S=11/31, R=21,
E=\r\n, L=990,
T=DNs/RFC822/SMTP, A=IPC $h
</code>
</pre>
<aside class="notes">
<ul>
<li>Original configuraiton syntax for sendmail</li>
<li>First one was written 41 years ago</li>
<li>Who wrote one of these by hand</li>
<li>Most straightforword I could find; rewrite rules were line noise</li>
<li>So 31 years ago they switched to this</li>
</ul>
</aside>
</section>
<section data-background-image="assets/config.jpg" data-background-size="cover" data-background-opacity="0.2">
<h1>sendmail.mc</h1>
<pre>
<code>
include('../m4/cf.m4')
OSTYPE(unknown)
FEATURE(always_add_domain)
define(`UUCP_RELAY`, `smtp:uunet.uu.net`)
define(`LUSER_RELAY`, `smtp:indiana.edu`)
MAILER(local)
MAILER(smtp)
</code>
</pre>
<aside class="notes">
<ul>
<li>Used the m4 macro pre-processing language</li>
<li>to generate the sendmail.cf file - 31 years ago</li>
<li>Some had sendmail mc - but we had a few years to go</li>
<li>So much easier, so much more dynamic</li>
<li>First time I wrote code for configuation - program that generated the config file</li>
<li>Helm is sendmail.mc for your yaml</li>
</ul>
</aside>
</section>
<section data-background-image="assets/config.jpg" data-background-size="cover" data-background-opacity="0.2">
<h1>Terraform</h1>
<pre>
<code>
resource "aws_instance" "whiskers" {
ami = "ami-0bde60638be9bb870"
instance_type = "t3.micro"
subnet_id = "subnet-07d580fee7a806230"
vpc_security_group_ids =
[aws_security_group.a.id]
key_name = "si_key"
associate_public_ip_address = true
}
</code>
</pre>
<aside class="notes">
<ul>
<li>A direct line from sendmail.mc to terraform</li>
<li>its really complicated to make all the api calls</li>
<li>so we wrote a little language, a macro preprocessor if you will</li>
<li>that took in the high level description and then generated the config</li>
<li>changed the syntax, gained some power, changed the domain</li>
</ul>
</aside>
</section>
<section data-background-image="assets/config-as-code-diagram.jpg" data-background-size="contain">
<aside class="notes">
<ul>
<li>Someone writes code</li>
<li>ships it to an interpreter</li>
<li>interpreter reads it in, does some junk</li>
<li>then does some stuff to the world - AWS for terraform, pulumi, cdk</li>
<li>store some intermediate state somehow - so we can come back to it later</li>
</ul>
</aside>
</section>
<section data-background-image="assets/good.jpg" data-background-size="contain" data-background-opacity="0.2">
<!-- from flickr: https://flic.kr/p/psmEPb -->
<h1>What's Good</h1>
<ul>
<li>Flexible</li>
<li>Less verbose</li>
<li>Sometimes refactorable</li>
<li>Can abstract anything</li>
</ul>
<aside class="notes">
<ul>
<li>flexible - say anything you want</li>
<li>usually less verbose</li>
<li>sometimes you can refactor - refactoring terraform is not fun</li>
<li>didn't like refactoring puppet either - that's why I wrote chef</li>
<li>can abstract whatever it is</li>
</ul>
</aside>
</section>
<section data-background-image="assets/sucks.jpg" data-background-size="contain" data-background-opacity="0.2">
<!-- from flickr: https://flic.kr/p/7zfzWz -->
<h1>What Sucks</h1>
<ul>
<li>Static</li>
<li>Unidirectional</li>
<li>Abstract</li>
<li>No behavior</li>
<li>No relationships</li>
</ul>
<aside class="notes">
<ul>
<li>It's static - you write it, not a lot you can do with it</li>
<li>unidirectional - all the arrows go one way - one way flow</li>
<li>abstract - good and bad. great until you don't have a macro for what you need</li>
<li>no bheavior - you can't ask your code to do things, to change itself</li>
<li>only relationships it understands are code relationships</li>
<li>So what would be better?</li>
</ul>
</aside>
</section>
<section data-background-image="assets/ideas.jpg" data-background-size="contain" data-background-opacity="0.2">
<!-- from flickr: https://flic.kr/p/aqn7Ay -->
<h1>Infrastructure as Model</h1>
<ul>
<li>Actors</li>
<li>State and Mutations</li>
<li>Message Passing</li>
<li>Behaviors</li>
<li>Relationships</li>
</ul>
<aside class="notes">
<ul>
<li>What if they were actors, not code (elixir, erlang)</li>
<li>Store state, take mutations</li>
<li>trigger behaviors - start, stop, update your list of tags</li>
<li>Relationships between actors - this one requires that</li>
<li>Pass a message to another actor when you change</li>
<li>That would change the world like this</li>
</ul>
</aside>
</section>
<section data-background-image="assets/infra-as-model-diagram.jpg" data-background-size="contain">
<aside class="notes">
<ul>
<li>Person can interact with a representation of the model</li>
<li>Code or UI or whatever</li>
<li>Making a call to a persistent runtime<li>
<li>syncs model to your inputs over a message</li>
<li>aware of relationships, different actors</li>
<li>model could be responsible for syncronizing itself</li>
</ul>
</aside>
</section>
<section data-background-image="assets/benefits.jpg" data-background-size="contain" data-background-opacity="0.2">
<!-- from flickr: https://flic.kr/p/an31au -->
<h1>Benefits</h1>
<ul>
<li>Many representations, including code</li>
<li>Relationship aware</li>
<li>Easily encapsulate runtime behavior</li>
<li>No more state management </li>
<li>Bidirectional data flow</li>
<li>Easier to model; it's 1:1 (real world is model)</li>
</ul>
<aside class="notes">
<ul>
<li>Code could be one of many representations</li>
<li>So much of what we do is describe relationships</li>
<li>You can now ask your actor to do things for you</li>
<li>STate management is removed; nobody loves it anyway</li>
<li>Bidirectional data flow - the actor handles transitions, drive it from anywhere</li>
<li>Easier to model, because we aren't modeling an abstraction - no mapping domain to language</li>
<li>Just roll up the behavior of the real world</li>
</ul>
</aside>
</section>
<!-- End Configuration as Code -->
<section data-background-image="assets/again.jpg" data-background-size="contain" data-background-opacity="0.4">
<!-- from flickr: https://flic.kr/p/u5THCv -->
<h1><a href="#/choose">Choose Again</a></h1>
</section>
<!-- Begin Change Sets -->
<section id="source-control" data-background-image="assets/control.jpg" data-background-size="contain" data-background-opacity="0.2">
<!-- from flickr: https://flic.kr/p/79gMin -->
<h1>Source Control</h1>
</section>
<section data-background-image="assets/control.jpg" data-background-size="contain" data-background-opacity="0.2">
<h1>RCS</h1>
<h1>CVS</h1>
<aside class="notes">
<ul>
<li>RCS was my first source control system - 41 years ago</li>
<li>RCS individual files</li>
<li>CVS neworked version of RCS, multiple files in one commit</li>
<li>RCS for config, CVS for app code</li>
</ul>
</aside>
</section>
<section data-background-image="assets/control.jpg" data-background-size="contain" data-background-opacity="0.2">
<h1>Git</h1>
<aside class="notes">
<ul>
<li>Most of you have probably only used Git</li>
<li>Which works quite similarly</li>
<li>Except we distributed it; and then we centralized it again</li>
<li>In many ways the UX took a step backwards</li>
</ul>
</aside>
</section>
<section data-background-image="assets/source-control-diagram.jpg" data-background-size="contain">
<aside class="notes">
<ul>
<li>A person writes some code</li>
<li>Checks it in to source control</li>
<li>Other people can check it out</li>
<li>Essentially unchanged since RCS</li>
</ul>
</aside>
</section>
<section data-background-image="assets/good.jpg" data-background-size="contain" data-background-opacity="0.2">
<h1>What's Good</h1>
<ul>
<li>Save a copy, revert</li>
<li>History of changes</li>
<li>Diff</li>
<li>Share with others; work in parallel</li>
<li>Branches</li>
<li>Complex capabilities for managing conflict</li>
</ul>
<aside class="notes">
<ul>
<li>Source control is "text"</li>
<li>Rebase</li>
</ul>
</aside>
</section>
<section data-background-image="assets/sucks.jpg" data-background-size="contain" data-background-opacity="0.2">
<h1>What Sucks</h1>
<ul>
<li>Only good for text</li>
<li>No context about impact; only text delta</li>
<li>No policy</li>
<li>A real pain to automate</li>
<li>Rebasing</li>
</ul>
<aside class="notes">
<ul>
<li>Only the text delta; can't say what will happen</li>
<li>GitOps and policy; many repositories as splitter for policy</li>
<li>Automating source control sucks</li>
</ul>
</aside>
</section>
<section data-background-image="assets/ideas.jpg" data-background-size="contain" data-background-opacity="0.2">
<h1>Model aware Change Sets</h1>
<ul>
<li>One "HEAD" model</li>
<li>Many hypothetical models</li>
<li>All models aware of the same change set (RCS vs CVS)</li>
<li>Policy embedded in the model</li>
<li>Automatic re-basing</li>
</ul>
<aside class="notes">
<ul>
<li>The model understands it has many hypothetical configurations</li>
<li>Things exist 1:1 in the real world</li>
<li>But we can have lots of them in our head</li>
<li>Embed policy at the model, rather than source</li>
<li>Automatically rebase the model</li>
</ul>
</aside>
</section>
<section data-background-image="assets/change-sets.jpg" data-background-size="contain">
<aside class="notes">
<ul>
<li>Change one part of the model, it might cascade (aware of the context)</li>
<li>Map the relationships; opaque in source code</li>
<li>Lots of change sets is a question of perspective</li>
<li>Like an overlay to the real world</li>
</ul>
</aside>
</section>
<section data-background-image="assets/benefits.jpg" data-background-size="contain" data-background-opacity="0.2">
<h1>Benefits</h1>
<ul>
<li>Easy to collaborate</li>
<li>Contextual diffs!</li>
<li>Automatic rebasing</li>
<li>Policy is easy to add</li>
<li>Extremely light weight</li>
</ul>
</section>
<!-- End Source Control -->
<section data-background-image="assets/again.jpg" data-background-size="contain" data-background-opacity="0.4">
<h1><a href="#/choose">Choose Again</a></h1>
</section>
<!-- Begin Testing -->
<section id="testing" data-background-image="assets/test.jpg" data-background-size="cover" data-background-opacity="0.2">
<!-- from flickr: https://flic.kr/p/aaawpX -->
<h1>Testing</h1>
</section>
<section data-background-image="assets/juran.jpg" data-background-size="contain">
<aside class="notes">
<ul>
<li>Joseph Juran, wrote Jurans Quality Handbook in 1951</li>
<li>Obsessed with quality generally and specifically</li>
<li>Not just software; quality in general</li>
<li>He defines quality in two ways</li>
</ul>
</aside>
</section>
<section id="testing" data-background-image="assets/test.jpg" data-background-size="cover" data-background-opacity="0.2">
<ol>
<li>Quality means those features of products which <span class="green">meet customer needs </span>
and thereby provide customer satisfaction.</li>
<li>Quality means <span class="orange">freedom from deficiencies</span></li>
</ol >
<aside class="notes">
<ul>
<li>Does the product do what its supposed to do</li>
<li>Is it free from deficiencies</li>
</ul>
</aside>
</section>
<section id="testing" data-background-image="assets/test.jpg" data-background-size="cover" data-background-opacity="0.2">
<h2>Pulumi Unit Test</h2>
<pre>
<code>
it("must have a name tag", function(done) {
pulumi.all([
infra.server.urn,
infra.server.tags
]).apply(([urn, tags]) => {
if (!tags || !tags["Name"]) {
done(new Error(`Missing a name tag on server ${urn}`));
} else {
done();
}
});
});
</code>
</pre>
<aside class="notes">
<ul>
<li>Unit test for pulumi, uses jest</li>
<li>lightly modified for space</li>
<li>Typical of infra as code; not picking on pulumi</li>
<li>Obsessed with how pulumi works</li>
<li>Wait for those variables, then apply them to the function, then check</li>
</ul>
</aside>
</section>
<section data-background-image="assets/good.jpg" data-background-size="contain" data-background-opacity="0.2">
<h1>What's Good</h1>
<ul>
<li>Catch regressions!</li>
<li>Flexible across different layers</li>
<li>More context aware</li>
<li>Can enforce policy</li>
</ul>
<aside class="notes">
<ul>
<li>If you didn't have a name tag, it would catch it</li>
<li>Gives us back some of that policy</li>
<li>
</ul>
</aside>
</section>
<section data-background-image="assets/sucks.jpg" data-background-size="contain" data-background-opacity="0.2">
<h1>What Sucks</h1>
<ul>
<li>Slow feedback loops</li>
<li>Mocks and stubs</li>
<li>Not fit for purpose - testing the code, not the world</li>
</ul>
<aside class="notes">
<ul>
<li>Slow feedback loops; takes a while, the more you have, the longer it takes</li>
<li>Mocks and stubs for infra</li>
<li>Testing code makes tons of sense</li>
<li>Testing infrastructure isn't testing the outcomes; impedence mismatch</li>
</ul>
</aside>
</section>
<section data-background-image="assets/ideas.jpg" data-background-size="contain" data-background-opacity="0.2">
<h1>Build tests into the model</h1>
<ul>
<li>Attach functions to lifecycle events</li>
<li>Validations</li>
<li>Qualifications</li>
<li>Confirmations</li>
<li>Reactive to inputs</li>
</ul>
<aside class="notes">
</aside>
</section>
<section data-background-image="assets/ideas.jpg" data-background-size="contain" data-background-opacity="0.2">
<h2>SI Qualification</h2>
<pre>
<code data-trim data-noescape>
async function dockerImageExists(component: Input) {
const c = await siExec.waitUntilEnd("skopeo", [
"inspect",
`docker://${component.domain.image}`,
]);
return {
result: c.exitCode === 0 ? "success" : "failure",
message: c.exitCode === 0 ? c.stdout : c.stderr,
};
}
</code>
</pre>
<aside class="notes">
<ul>
<li>Simplified qualification from System Initiative</li>
<li>Checks that an image exists in a registry</li>
<li>Reruns every time the image name changes, this runs</li>
<li>Focused on its purpose - not with how the program works</li>
</ul>
</aside>
</section>
<section data-background-image="assets/benefits.jpg" data-background-size="contain" data-background-opacity="0.2">
<h1>Benefits</h1>
<ul>
<li>Immediate feedback!</li>
<li>Triggered only when needed</li>
<li>Easier to write, because the 'harness' is defined</li>
<li>No need to mock or stub</li>
</ul>
</section>
<!-- End Testing -->
<section data-background-image="assets/again.jpg" data-background-size="contain" data-background-opacity="0.4">
<h1><a href="#/choose">Choose Again</a></h1>
</section>
<!-- Begin Declarative -->
<section id="declarative" data-background-image="assets/declarative.jpg" data-background-size="cover" data-background-opacity="0.2">
<!-- from flickr: https://flic.kr/p/oQXc2V -->
<h1>Declarative</h1>
</section>
<section data-background-image="assets/mark-burgess.jpg" data-background-size="contain">
<aside class="notes">
<ul>
<li>Mark Burgess; handsomest man in devops, round of applause</li>
<li>author of cfgengine, promise theory; we're all standing on his shoulders</li>
<li>25 years ago, configuration should be declarative</li>
<li>round of applause</li>
</ul>
</aside>
</section>
<section data-background-image="assets/declarative.jpg" data-background-size="cover" data-background-opacity="0.2">
<h2>Shell</h2>
<pre>
<code data-trim data-noescape>
#!/bin/bash
OS=`cat /etc/os-release | grep ^ID | cut -d '=' -f 2`
case $OS in
"arch")
pacman -Syu apache
;;
"redhat")
yum install httpd
;;
*)
echo "Unknown OS: $OS"
;;
esac
</code>
</pre>
<aside class="notes">
<ul>
<li>He moved us from scripts that describe how to do something</li>
</ul>
</aside>
</section>
<section data-background-image="assets/declarative.jpg" data-background-size="cover" data-background-opacity="0.2">
<h2>Cfengine 2</h2>
<pre>
<code data-trim data-noescape>
control:
actionsequence = ( packages )
redhat::
httpd action=install
arch::
apache action=install
</code>
</pre>
<aside class="notes">
<ul>
<li>To a declaration that says what should happen</li>
<li>And lets the system figure out how</li>
</ul>
</aside>
</section>
<section data-background-image="assets/declarative.jpg" data-background-size="cover" data-background-opacity="0.2">
<h2>Kubernetes</h2>
<pre>
<code data-trim data-noescape>
spec:
replicas: 3
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
</code>
</pre>
<aside class="notes">
<ul>
<li>Poster child for being declarative</li>
<li>a snippet of a full k8s deployment manifest</li>
<li>Write our yaml, hand it to k8s, it reconciles</li>
</ul>
</aside>
</section>
<section data-background-image="assets/config-as-code-diagram.jpg" data-background-size="contain">
<aside class="notes">
<ul>
<li>Remember this diagram?</li>
<li>This is kubernetes too</li>
<li>We write out code, ship it to k8s to interpret and reconcile</li>
<li>State gets written to etcd</li>
<li>On and on we go</li>
<li>How much and how often we reconcile is different</li>
</ul>
</aside>
</section>
<section data-background-image="assets/good.jpg" data-background-size="contain" data-background-opacity="0.2">
<h1>What's Good</h1>
<ul>
<li>Declare what you want</li>
<li>Can be significantly less verbose</li>
<li>Easier to deal with failure</li>
<li>Focused on the vocabulary of the domain</li>
</ul>
<aside class="notes">
<ul>
<li>Easier to say you want a chair vs all the steps to build it</li>
<li>Failure happens in the interpreter</li>
</ul>
</aside>
</section>
<section data-background-image="assets/sucks.jpg" data-background-size="contain" data-background-opacity="0.2">
<h1>What Sucks</h1>
<ul>
<li>Generally 1 state</li>
<li>200% Knowledge Problem</li>
<li>Difficult to extend</li>
<li>Sucks at modeling workflow</li>
<li>Takes as long as it takes</li>
</ul>
<aside class="notes">
<ul>
<li>Only say you want it installed; not installed, then something else, then uninstalled</li>
<li>Knowledge of the underlying system + the abstraction ("easier to use")</li>
<li>Hard to extend; do it in a different language</li>
<li>Moving through multiple states sucks for workflow</li>
<li>Takes as long as it takes</li>
</ul>
</aside>
</section>
<section data-background-image="assets/ideas.jpg" data-background-size="contain" data-background-opacity="0.2">
<h1>Infrastructure as Model</h1>
<ul>
<li>Digital twin (Component <-> Resource)</li>
<li>1:1 to the Domain</li>
<li>Real world state as part of the model</li>
<li>Properties</li>
<li>Behavior</li>
</ul>
<aside class="notes">
<ul>
<li>Think of it as a digital twin</li>
<li>Digital (hypothetical) and real world (resource)</li>
<li>Heart lung machine</li>
<li>Avoids the 200% knowledge problem with 1:1 modeling<li>
<li>Describe the full properties and behaviors</li>
</ul>
</aside>
</section>
<section data-background-image="assets/declarative-diagram.jpg" data-background-size="contain">
<aside class="notes">
<ul>
<li>A person sets properties on a component; hypothetical</li>
<li>They could call a behavior; create it</li>
<li>Creates a resource, the "real world" twin</li>
<li>Another person can change the resource directly</li>
<li>Go back the other way; no patching source, not git</li>
<li>Behaviors string into workflows; multi-step processes</li>
</ul>
</aside>
</section>
<section data-background-image="assets/benefits.jpg" data-background-size="contain" data-background-opacity="0.2">
<h1>Benefits</h1>
<ul>
<li>More control, more power</li>
<li>No 200% problem</li>
<li>Re-use configuration for behaviors</li>
<li>Workflows become trivial</li>
<li>Model declarative domains</li>
<li>Faster!</li>
</ul>
</section>
<!-- End of Declarative -->
<section data-background-image="assets/again.jpg" data-background-size="contain" data-background-opacity="0.4">
<h1><a href="#/choose">Choose Again</a></h1>
</section>
<!-- Single source of Truth -->
<section id="truth" data-background-image="assets/truth.jpg" data-background-size="cover" data-background-opacity="0.2">
<h1>Single Source of Truth</h1>
</section>
<section data-background-image="assets/truth.jpg" data-background-size="cover" data-background-opacity="0.2">
<h1>Tom Siebel</h1>
<aside class="notes">
<ul>
<li>Hard to say if Tom Siebel came up with this, or just popularized it</li>
<li>Sometime in the 90s</li>
<li>Driving for a single golden database</li>
<li>All your data accessible to everyone, perfectly related</li>
<li>Great idea for selling databases</li>
<li>Enterprise Service Bus, MDM</li>
</ul>
</aside>
</section>
<section data-background-image="assets/truth.jpg" data-background-size="cover" data-background-opacity="0.2">
<h1>Novell</h1>
<aside class="notes">
<ul>
<li>Novell's Identity Manager product</li>
<li>Single source of truth for all your employee data</li>
<li>Bobo T Clown</li>
</ul>
</aside>
</section>
<section data-background-image="assets/single-source-of-truth.jpg" data-background-size="contain">
<aside class="notes">
<ul>
<li>People interact with services</li>
<li>Different services are "canonical" for thier data</li>
<li>Dump all their data on to an enterprise service bus</li>
<li>Services tap on the bus</li>
<li>We dump all the data into a big database</li>
<li>Now we have a holistic view of the data and a "single source of truth"</li>
</ul>
</aside>
</section>
<section data-background-image="assets/config-as-code-diagram.jpg" data-background-size="contain">
<aside class="notes">
<ul>
<li>Infrastructure as code though</li>
<li>We say the code on the left, your k8s yaml, your pulumui, your terraform, is the truth</li>
<li>and the interpreters job is to manipulate reality</li>
<li>Usually from a declaration</li>
<li>No bidirectionality</li>
<li>This is a terrible design for a single source of truth</li>
</ul>
</aside>
</section>
<section data-background-image="assets/good.jpg" data-background-size="contain" data-background-opacity="0.2">
<h1>What's Good</h1>
<ul>
<li>Simplifies changes</li>
<li>Data flows one way</li>
<li>Easy to reason about</li>
</ul>
</section>
<section data-background-image="assets/sucks.jpg" data-background-size="contain" data-background-opacity="0.2">
<h1>What Sucks</h1>
<ul>
<li>Conflict resolution</li>
<li>Cannot resolve issues at the source</li>
<li>Poor mapping to this domain</li>
<li>It is a <span class="orange">lie</span></li>
</ul>
<aside class="notes">
<ul>
<li>What happens when reality diverges?</li>
<li>What are modeling changes too much outside the system</li>
<li>The truth is not your source code</li>
<li>The truth is obviously the infrastructure</li>
<li>How do we make it less of a lie?</li>
</ul>
</aside>