-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.html
1085 lines (1065 loc) · 47 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>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title>Dr. Upal is In - Healthcheck your site!</title>
<link rel="stylesheet" href="css/reveal.css">
<link rel="stylesheet" href="css/theme/prescription.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="slides">
<section>
<h1>Dr . Upal Is In:</h1>
<h2>Healthcheck your site!</h2>
<p> </p>
<small>use ←↑↓→ or <SPACE></small>
</section>
<section>
<h2>"Where's the links?"</h2>
<p><a href="https://socketwench.github.io/healthcheck-your-site/#/">socketwench.github.io/healthcheck-your-site</a></p>
</section>
<section>
<section data-transition="none" data-background-transition="none" data-background="images/socketwench1.png" data-background-size="contain">
</section>
<section data-transition="none" data-background-transition="none" data-background="images/socketwench2.png" data-background-size="contain">
</section>
<section data-transition="none" data-background-transition="none" data-background="images/socketwench3.png" data-background-size="contain">
</section>
<section data-transition="none" data-background-transition="none" data-background="images/socketwench4.png" data-background-size="contain">
</section>
<section data-transition="none" data-background-transition="none" data-background="images/socketwench5.png" data-background-size="contain">
</section>
<section data-background="images/t7-background.jpg" class="teamten7">
<img src="images/TEN7-logo.png" />
<p class="fragment">We create and care for<br />Drupal-powered websites.</p>
<p class="fragment">Minneapolis, MN <span class="fragment">(Mostly!)</span></p>
</section>
<section data-background="images/t7-background.jpg" class="teamten7">
<h2 class="ten7">Services</h2>
<p class="fragment">Site and hosting migratiton</p>
<p class="fragment">Drupal 8 upgrades</p>
<p class="fragment">Site audits</p>
<p class="fragment">Process consultantcy</p>
</section>
<section data-background="images/t7-background.jpg" class="teamten7">
<img src="images/TEN7-logo.png" />
<p><a href="https://twitter.com/TEN7">@TEN7</a><br /><a href="mailto:[email protected]">[email protected]</a></p>
</section>
</section>
<section>
<section>
<h1>"But my site is fine!"</h1>
</section>
<section>
<h2>Every site is healthy</h2>
<p class="fragment">...until it isn't.</p>
</section>
<section data-transition="none">
<img src="images/butMySiteIsFine1.png" />
</section>
<section data-transition="none">
<img src="images/butMySiteIsFine2.png" />
</section>
<section data-transition="none">
<img src="images/butMySiteIsFine3.png" />
</section>
<section data-transition="none">
<img src="images/butMySiteIsFine4.png" />
</section>
<section data-transition="none">
<img src="images/butMySiteIsFine5.png" />
</section>
<section data-transition="none">
<img src="images/butMySiteIsFine6.png" />
</section>
<section data-transition="none">
<img src="images/butMySiteIsFine7.png" />
</section>
<section data-transition="none">
<img src="images/butMySiteIsFine8.png" />
</section>
<section data-transition="none">
<img src="images/butMySiteIsFine9.png" />
</section>
<section>
<h2>Reasons to healthcheck</h2>
<p class="fragment">Errors, breakage, malicious content</p>
<p class="fragment">Poor performance</p>
<p class="fragment">"It's your site now."</p>
</section>
<section data-transition="none">
<img src="images/iHaveABadFeeling1.png" />
</section>
<section data-transition="none">
<img src="images/iHaveABadFeeling2.png" />
</section>
<section data-transition="none">
<img src="images/iHaveABadFeeling3.png" />
</section>
<section>
<h2>A feeling isn't an healthcheck</h2>
<p class="fragment">...but a feeling is a sign you need one.</p>
</section>
<section data-transition="none" data-background-transition="none" data-background="images/didWeBuildItRight1.png" data-background-size="contain">
</section>
<section data-transition="none" data-background-transition="none" data-background="images/didWeBuildItRight2.png" data-background-size="contain">
</section>
<section data-transition="none" data-background-transition="none" data-background="images/didWeBuildItRight3.png" data-background-size="contain">
<h2>Smoke testing</h2>
<p class="fragment">Check if you're on the right path</p>
<p class="fragment">Can be difficult to check in-house</p>
<p> </p>
</section>
<section>
<h2>It's better to know and plan</h2>
<p class="fragment">...than just hope for the best.</p>
</section>
</section>
<section>
<section data-transition="none">
<img src="images/whatCanWeCheckNow1.png" />
</section>
<section data-transition="none">
<img src="images/whatCanWeCheckNow2.png" />
</section>
<section data-transition="none">
<img src="images/whatCanWeCheckNow3.png" />
</section>
<section data-transition="none">
<img src="images/whatCanWeCheckNow4.png" />
</section>
<section>
<h1>Checking the basics</h1>
</section>
<section>
<h2>Checking for updates</h2>
<p class="fragment">Yes, really.</p>
<p class="fragment">The most basic, important thing you can do!</p>
</section>
<section>
<h2>Using the Update Report</h2>
<p class="fragment">Admin > Reports > Available Updates</p>
</section>
<section>
<h2>I can't find it!</h2>
<p class="fragment">Provided by the <strong>Update Manager</strong> module</p>
<p class="fragment">May be disabled on production sites</p>
</section>
<section>
<h2>Enabling Update Manager</h2>
<p class="fragment">Admin > Extend</p>
</section>
<section data-transition="none">
<img src="images/dontPanic1.png" />
</section>
<section data-transition="none">
<img src="images/dontPanic2.png" />
</section>
<section data-transition="none" data-background-transition="none" data-background="images/redAlert.jpg">
<img src="images/dontPanic3.png" />
</section>
<section data-transition="none" data-background-transition="none" data-background="images/redAlert.jpg">
<img src="images/dontPanic4.png" />
</section>
<section>
<h2>Don't panic!</h2>
<p class="fragment">Your site won't be a "sea of green"</p>
</section>
<section data-transition="none" data-background-transition="none" data-background="images/actionNotUpdate1.png" data-background-size="contain">
<h2>Look for Red</h2>
<p class="fragment">Security updates, unsupported modules</p>
<p class="fragment">Take Action ASAP!</p>
</section>
<section data-transition="none" data-background-transition="none" data-background="images/actionNotUpdate2.png" data-background-size="contain">
<h2>Look for Red</h2>
<p>Security updates, unsupported modules</p>
<p>Take Action ASAP!</p>
</section>
<section>
<h2>Out-of-date Modules</h2>
<p class="fragment">Some sites break if updated!</p>
<p class="fragment"><strong>Always</strong> ask your team first!</p>
</section>
<section data-transition="none" data-background-transition="none" data-background="images/whatElseCanWeCheck.png" data-background-size="contain">
</section>
<section>
<h2>Status Report</h2>
<p class="fragment">Overview of your site</p>
<p class="fragment">Admin > Reports > Status</p>
</section>
<section>
<h2>Look for red</h2>
<p class="fragment">Misconfigurations</p>
<p class="fragment">Updates required</p>
<p class="fragment">Down connections to external services</p>
</section>
<section>
<h2>Caching</h2>
<p class="fragment">Admin > Configuration > Development > Performance</p>
</section>
<section>
<h2>Caching best practices</h2>
<p class="fragment">CSS and JS files Aggregated</p>
<p class="fragment"><strong>Page cache maximum age</strong> set*</p>
<small class="fragment">* Most sites</small>
</section>
<section>
<h2>Check your log</h2>
<p class="fragment">Don't look for specific errors...</p>
<p class="fragment">...look for frequency of severe errors!</p>
</section>
<section>
<h2>Using the DB Log</h2>
<p class="fragment">dblog enabled for most sites</p>
<p class="fragment">Admin > Reports > Recent Log Messages</p>
</section>
<section data-transition="none">
<img src="images/automatingChecks1.png" />
</section>
<section data-transition="none">
<img src="images/automatingChecks2.png" />
</section>
<section data-transition="none">
<img src="images/automatingChecks3.png" />
</section>
<section data-transition="none">
<img src="images/automatingChecks4.png" />
</section>
<section data-transition="none">
<img src="images/automatingChecks5.png" />
</section>
<section data-transition="none">
<img src="images/automatingChecks6.png" />
</section>
<section data-transition="none">
<img src="images/automatingChecks7.png" />
</section>
<section data-transition="none">
<img src="images/automatingChecks8.png" />
</section>
<section data-transition="none">
<img src="images/automatingChecks9.png" />
</section>
</section>
<section>
<section>
<h1>Automating Checks</h1>
</section>
<section>
<h2>Site Audit module</h2>
<p class="fragment">Gathers data, runs best practice checks</p>
<p class="fragment"><a href="https://www.drupal.org/project/site_audit">drupal.org/project/site_audit</a></p>
</section>
<section>
<h2>Requires drush</h2>
<p class="fragment">Command Line tool for Drupal</p>
<p class="fragment"><a href="http://docs.drush.org/en/master/install/">docs.drush.org/en/master/install</a></p>
</section>
<section>
<h2>Installation for D7</h2>
<p class="fragment"><code>drush en -y site_audit</code></p>
<p class="fragment"><code>drush cc drush</code></p>
</section>
<section>
<pre><code class="shell">cd path/to/your/site</code></pre>
<pre class="fragment"><code class="shell">drush aa
--html
--bootstrap
--detail
--skip=insights
> path/to/report.html</code></pre>
</section>
<section>
<img src="images/site_audit_report_header.png" />
</section>
<section data-transition="none">
<img src="images/howMuchNeedsRead1.png" />
</section>
<section data-transition="none">
<img src="images/howMuchNeedsRead2.png" />
</section>
<section data-transition="none">
<img src="images/howMuchNeedsRead3.png" />
</section>
<!-- <section data-transition="none">
<img src="images/howMuchNeedsRead4.png" />
</section>
<section data-transition="none">
<img src="images/howMuchNeedsRead5.png" />
</section>
<section data-transition="none">
<img src="images/howMuchNeedsRead6.png" />
</section>
<section data-transition="none">
<img src="images/howMuchNeedsRead7.png" />
</section>
<section data-transition="none">
<img src="images/howMuchNeedsRead8.png" />
</section>
<section data-transition="none">
<img src="images/howMuchNeedsRead9.png" />
</section>
<section data-transition="none">
<img src="images/howMuchNeedsRead10.png" />
</section> -->
<section>
<h2>Best Practice Checks</h2>
<p class="fragment">Read them all!</p>
<p class="fragment">Highest value checks in the whole report</p>
</section>
<section>
<h2>Caching Settings</h2>
<p class="fragment">Best performance value for small sites</p>
<p class="fragment">Consider <strong>Page cache maximum age</strong> carefully!</p>
</section>
<section>
<h2>Status and Updates</h2>
<p class="fragment">Same as Update Manager and Status Report</p>
<p class="fragment">Replaces manual steps, no login needed!</p>
</section>
<section>
<img src="images/whatElseCanSiteAuditDo.png" />
</section>
<section>
<h2>Content checks</h2>
<p class="fragment">More FYI than problem-finding</p>
<p class="fragment">Does not replace a content audit</p>
</section>
<section>
<h2>Technical stats</h2>
<p class="fragment">File, code, DB sizes</p>
<p class="fragment">Sometimes useful! Depends on your site.</p>
</section>
<section data-transition="none" data-background-transition="none" data-background="images/whatIfICantUseDrush1.png" data-background-size="contain">
</section>
<section data-transition="none" data-background-transition="none" data-background="images/whatIfICantUseDrush2.png" data-background-size="contain">
</section>
<section data-transition="none" data-background-transition="none" data-background="images/whatIfICantUseDrush3.png" data-background-size="contain">
</section>
<section data-transition="none" data-background-transition="none" data-background="images/whatIfICantUseDrush4.png" data-background-size="contain">
</section>
<section data-transition="none" data-background-transition="none" data-background="images/whatIfICantUseDrush5.png" data-background-size="contain">
<h2><a href="https://www.drupal.org/project/healthcheck">Healthcheck module</a></h2>
<p class="fragment">Not a Drush command!</p>
<p class="fragment">Monitors continually, pluggable notifications</p>
<small class="fragment">Currently in beta!</small>
</section>
<section>
<h2>Installing Healthcheck</h2>
<p class="fragment"><code>composer require drupal/healthcheck</code></p>
<p class="fragment">Enable like any module</p>
</section>
<section>
<h2>Running an Ad hoc report</h2>
<p class="fragment">Admin > Reports > Healthcheck</p>
<p class="fragment">Action-oriented, priority ordered report</p>
</section>
<section>
<img src="images/healthcheck.png" />
</section>
<section>
<h2>Email notifications</h2>
<p class="fragment">Send healthchecks to your inbox</p>
<p class="fragment">Customizable messages, full reports or criticals</p>
</section>
<section>
<img src="images/healthcheck-email.png" />
</section>
<section>
<h2>Historical reports</h2>
<p class="fragment">Monitor how your site improves</p>
<p class="fragment">Views-based, customizable</p>
</section>
<section>
<img src="images/healthcheck-historical.png" />
</section>
<section>
<h2>Help us out!</h2>
<p class="fragment"><a href="https://drupal.org/project/healthcheck">drupal.org/project/healthcheck</a></p>
</section>
</section>
<section>
<section data-transition="none">
<img src="images/siteAuditAndDoneRight1.png" />
</section>
<section data-transition="none">
<img src="images/siteAuditAndDoneRight2.png" />
</section>
<section data-transition="none">
<img src="images/siteAuditAndDoneRight3.png" />
</section>
<section data-transition="none">
<img src="images/siteAuditAndDoneRight4.png" />
</section>
<section data-transition="none">
<img src="images/siteAuditAndDoneRight5.png" />
</section>
<section>
<h1>Infrastructure checkups</h1>
</section>
<section>
<h2>Where're you hosted?</h2>
<p class="fragment">Shared hosting</p>
<p class="fragment">Managed hosting (Pantheon, Acquia)</p>
<p class="fragment">Self-managed (VPS, internal)</p>
</section>
<section>
<h2>Still happy with it?</h2>
<p class="fragment">What was your primary motive?</p>
<p class="fragment">Is that still true?</p>
</section>
<section data-transition="none">
<img src="images/notALinuxWizard1.png" />
</section>
<section data-transition="none">
<img src="images/notALinuxWizard2.png" />
</section>
<section data-transition="none">
<img src="images/notALinuxWizard3.png" />
</section>
<section>
<h2>Enough memory?</h2>
<p class="fragment"><code>free</code> utility</p>
<p class="fragment">Shows used, free, and available memory</p>
</section>
<section>
<pre class="shell"><code>$ free -h</code></pre>
<pre class="shell fragment"><code> total used free shared buff/cache available
Mem: 15Gi 3.8Gi 4.1Gi 1.7Gi 7.7Gi 9Gi
Swap: 31Gi 77Mi 31Gi</code></pre>
<small class="fragment">(Scroll right)</small>
</section>
<section>
<h2>What about disk?</h2>
<p class="fragment"><code>df</code> or "disk free" utility</p>
<p class="fragment">Free space, not performance</p>
</section>
<section>
<pre><code class="shell">$ df -h</code></pre>
<pre class="fragment"><code class="shell">Filesystem Size Used Avail Use% Mounted on
dev 7.8G 0 7.8G 0% /dev
run 7.8G 1.9M 7.8G 1% /run
/dev/nvme0n1p3 434G 142G 270G 35% /
/dev/nvme0n1p1 599M 42M 558M 7% /boot</code></pre>
</section>
<section>
<h2>CPU load</h2>
<p class="fragment"><code>top</code> utility</p>
<p class="fragment">Look for <code>idle</code> or <code>id</code> percent</p>
</section>
<section>
<pre><code>Mem: 12541644K used, 3767604K free, 1816292K shrd, 965248K buff, 6908000K cache
CPU: 1% usr 0% sys 0% nic 96% idle 0% io 0% irq 0% sirq
Load average: 0.70 0.87 0.92 4/1173 264
PID PPID USER STAT VSZ %VSZ CPU %CPU COMMAND
29 1 apache S 373m 2% 1 0% /usr/sbin/httpd -D FOREGROUND -f /
30 1 apache S 368m 2% 3 0% /usr/sbin/httpd -D FOREGROUND -f /
33 1 apache S 368m 2% 2 0% /usr/sbin/httpd -D FOREGROUND -f /
32 1 apache S 368m 2% 0 0% /usr/sbin/httpd -D FOREGROUND -f /
139 1 apache S 368m 2% 2 0% /usr/sbin/httpd -D FOREGROUND -f /
1 0 apache S 368m 2% 0 0% /usr/sbin/httpd -D FOREGROUND -f /
42 0 apache S 6244 0% 1 0% /bin/bash
263 42 apache R 1532 0% 0 0% top</code></pre>
<small class="fragment">(Press <code>q</code> to quit)</small>
</section>
<section data-transition="none" data-background-transition="none" data-background="images/sharedSelfHostedNeedsAudit1.png" data-background-size="contain">
<h2>Managed Hosting</h2>
<p class="fragment">Typically do not need auditing</p>
<p class="fragment">Memory, disk, CPU typically auto-scaled</p>
</section>
<section data-transition="none" data-background-transition="none" data-background="images/sharedSelfHostedNeedsAudit2.png" data-background-size="contain">
<h2>Managed Hosting</h2>
<p>Typically do not need auditing</p>
<p>Memory, disk, CPU typically auto-scaled</p>
</section>
<section>
<h2>PHP Version</h2>
<p class="fragment">D8 should always be on PHP 7!</p>
<p class="fragment">For D7, try PHP 7, otherwise PHP 5.6</p>
</section>
<section>
<h2>"Updating" PHP</h2>
<p class="fragment">Actual 5.x to 7.x updates are rare</p>
<p class="fragment">Better to move to new server/hosting</p>
</section>
<section>
<h2>CLI vs. Web PHP</h2>
<p class="fragment">PHP version (x.y) should always match</p>
<p class="fragment">Configuration may differ, but only minor</p>
</section>
<section data-transition="none" data-background-transition="none" data-background="images/whatAboutCliPhp1.png" data-background-size="contain">
<h2>Checking Web PHP</h2>
<p class="fragment">Best done through the web UI</p>
<p class="fragment">Admin > Reports > Status</p>
</section>
<section data-transition="none" data-background-transition="none" data-background="images/whatAboutCliPhp2.png" data-background-size="contain">
<h2>Checking Web PHP</h2>
<p>Best done through the web UI</p>
<p>Admin > Reports > Status</p>
</section>
<section>
<pre><code>$ php --version</code></pre>
<pre class="fragment"><code>PHP 5.6.33 (cli) (built: Feb 7 2018 15:35:50)
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies
with Xdebug v2.5.0, Copyright (c) 2002-2016, by Derick Rethans</code></pre>
</section>
<section>
<h2>As your site grows...</h2>
<p class="fragment">...you can outgrow your hosting.</p>
</section>
</section>
<section>
<section data-transition="none">
<img src="images/dontHackCore1.png" />
</section>
<section data-transition="none">
<img src="images/dontHackCore2.png" />
</section>
<section data-transition="none">
<img src="images/dontHackCore3.png" />
</section>
<section data-transition="none">
<img src="images/dontHackCore4.png" />
</section>
<section>
<h1>Auditing modded code</h1>
</section>
<section>
<h2>Mods aren't "hacks"</h2>
<p class="fragment">Not malicious!</p>
<p class="fragment">Intentional modification of core & contrib code</p>
</section>
<section>
<h2>Why mod?</h2>
<p class="fragment">Expediency, lack of knowledge, bug fixes</p>
<p class="fragment">Unaware of "offical" patching process</p>
</section>
<section data-transition="none">
<img src="images/dontKnowIfModded1.png" />
</section>
<section data-transition="none">
<img src="images/dontKnowIfModded2.png" />
</section>
<section data-transition="none">
<img src="images/dontKnowIfModded3.png" />
</section>
<section data-transition="none">
<img src="images/dontKnowIfModded4.png" />
</section>
<section data-transition="none">
<img src="images/dontKnowIfModded5.png" />
</section>
<section data-transition="none">
<img src="images/dontKnowIfModded6.png" />
</section>
<section>
<h2><a href="https://www.drupal.org/project/hacked">Hacked! module</a></h2>
<p class="fragment">Compares installed core & contrib against D.O</p>
<p class="fragment">Version aware</p>
</section>
<section>
<h2>When to use</h2>
<p class="fragment">You use ftp (not git or CI) to deploy</p>
<p class="fragment">You haven't updated in ages</p>
<p class="fragment">You suspect a breach</p>
</section>
<section>
<h2>Installation</h2>
<p class="fragment"><code class="shell">composer require drupal/hacked</code></p>
<p class="fragment"><code class="shell">drush en -y hacked</code></p>
</section>
<section>
<h2>Run against Live</h2>
<p class="fragment">Not your local!</p>
<p class="fragment">Untracked, "cloaked" files</p>
</section>
<section>
<h2>Running the report</h2>
<p class="fragment">Admin > Reports > Hacked</p>
</section>
<section>
<h2>False Positives</h2>
<p class="fragment">Minor changes can flag a module</p>
<p class="fragment">Missing READMEs, line-endings, best-practice changes</p>
</section>
<section>
<img src="images/docker.test_admin_reports_hacked.png" />
</section>
<section>
<h2>Getting detailed results</h2>
<p class="fragment">Install the <a href="https://www.drupal.org/project/diff">diff</a> module</p>
<p class="fragment">Displays individual line changes</p>
</section>
<section>
<img src="images/docker.test_admin_reports_hacked_flag_diff1.png" />
</section>
<section>
<img src="images/docker.test_admin_reports_hacked_flag_diff2.png" />
</section>
<section>
<img src="images/docker.test_admin_reports_hacked_flag_diff3.png" />
</section>
<section>
<h2>Going Legit</h2>
<p class="fragment">Create patch from changes, add to site repo</p>
<p class="fragment">Post to D.O if broad benefit</p>
</section>
<section>
<h2>Right way to mod</h2>
<p class="fragment">Use <a href="https://github.com/cweagans/composer-patches">cweagans/composer-patches</a></p>
<p class="fragment">Refer to the patch on D.O if posted</p>
</section>
<section>
<h2>Modding isn't wrong</h2>
<p class="fragment">...but it needs to be done right</p>
</section>
</section>
<section>
<section data-transition="none">
<img src="images/haveIBeenHacked1.png" />
</section>
<section data-transition="none">
<img src="images/haveIBeenHacked2.png" />
</section>
<section data-transition="none">
<img src="images/haveIBeenHacked3.png" />
</section>
<section data-transition="none">
<img src="images/haveIBeenHacked4.png" />
</section>
<section data-transition="none">
<img src="images/haveIBeenHacked5.png" />
</section>
<section data-transition="none">
<img src="images/haveIBeenHacked6.png" />
</section>
<section data-transition="none">
<img src="images/haveIBeenHacked7.png" />
</section>
<section data-transition="none">
<img src="images/haveIBeenHacked8.png" />
</section>
<section>
<h1>Hacks and Recovery</h1>
</section>
<section>
<h2>Signatures</h2>
<p class="fragment">Clues that imply a hack</p>
</section>
<section>
<h2>eval() + base64_decode()</h2>
<p class="fragment">Common way to unpack, execute exploit code</p>
</section>
<section>
<h2>Scanning code for Hacks</h2>
<p class="fragment">Hacked! report, <code>grep</code> utility</p>
<p class="fragment">Look for duplicate files & modules</p>
</section>
<section>
<h2>Check the logs?</h2>
<p class="fragment">Use only to corroborate a hack...</p>
<p class="fragment">...<strong>not</strong> to detect one.</p>
</section>
<section>
<h2>"Wildlife"</h2>
<p class="fragment">The 'net isn't a clean place!</p>
<p class="fragment">Frequent drive-by attacks are <strong>common</strong></p>
</section>
<section data-transition="none">
<img src="images/youveBeenHacked1.png" />
</section>
<section data-transition="none">
<img src="images/youveBeenHacked2.png" />
</section>
<section data-transition="none">
<img src="images/youveBeenHacked3.png" />
</section>
<section data-transition="none" data-background-transition="none" data-background="images/fire.gif">
<img src="images/youveBeenHacked4.png" />
</section>
<section data-transition="none" data-background-transition="none" data-background="images/fire.gif">
<img src="images/youveBeenHacked5.png" />
</section>
<section data-transition="none" data-background-transition="none" data-background="images/nowThatWereCalm1.png" data-background-size="contain">
<h2>DON'T PANIC</h2>
<p class="fragment">Breathe.</p>
</section>
<section data-transition="none" data-background-transition="none" data-background="images/nowThatWereCalm2.png" data-background-size="contain">
<h2>DON'T PANIC</h2>
<p>Breathe.</p>
</section>
<section>
<h2>Take the site offline</h2>
<p class="fragment">Better to be offline than compromised</p>
<p class="fragment">User privacy, partner exposure, brand damage</p>
</section>
<section>
<h2>Backup the hacked site</h2>
<p class="fragment">You need a working copy to examine</p>
<p class="fragment">Place it in an air-gapped system</p>
</section>
<section>
<h2>When were you hacked?</h2>
<p class="fragment">Requires some sleuthing</p>
<p class="fragment">Tie to missed module or core security release</p>
</section>
<section>
<h2>Find a clean backup</h2>
<p class="fragment">DB, code, and files from before the hack</p>
<p class="fragment">Be sure it isn't compromised!</p>
</section>
<section>
<h2>Update the clean backup</h2>
<p class="fragment">Apply all security updates and patches</p>
<p class="fragment">Copy content over manually</p>
</section>
<section>
<h2>Back it up again</h2>
<p class="fragment">Avoid rebuilding a second time</p>
<p class="fragment">Site may still be exposed in other ways</p>
</section>
<section>
<h2>No Backup?</h2>
<p class="fragment">Clean up what you can</p>
<p class="fragment">Accept risk of follow-up hacks</p>
</section>
<section data-transition="none">
<img src="images/serverCompromised1.png" />
</section>
<section data-transition="none">
<img src="images/serverCompromised2.png" />
</section>
<section data-transition="none">
<img src="images/serverCompromised3.png" />
</section>
<section data-transition="none" data-background-transition="none" data-background="images/itHurts1.png" data-background-size="contain">
<h2>Throw away and rebuild</h2>
<p class="fragment">Really. <span class="fragment">Assume it's comprimised.</span></p>
<p class="fragment">Invalidate all passwords and start over</p>
<p> </p>
</section>
<section data-transition="none" data-background-transition="none" data-background="images/itHurts2.png" data-background-size="contain">
<h2>Throw away and rebuild</h2>
<p>Really. <span>Assume it's comprimised.</span></p>
<p>Invalidate all passwords and start over</p>
<p> </p>
</section>
<section>
<h2>You will be hacked</h2>
<p class="fragment">...but you can be prepared.</p>
</section>
</section>
<section>
<section data-transition="none">
<img src="images/postHackedNowWhat1.png" />
</section>
<section data-transition="none">
<img src="images/postHackedNowWhat2.png" />
</section>
<section data-transition="none">
<img src="images/postHackedNowWhat3.png" />
</section>
<section data-transition="none">
<img src="images/postHackedNowWhat4.png" />
</section>
<section>
<h1>Remediation</h1>
</section>
<section>
<h2>Recover from hacks first</h2>
<p class="fragment">Restore to a clean state, then...</p>
<p class="fragment">...apply all security updates.</p>
</section>
<section data-transition="none" data-background-transition="none" data-background="images/theyreSmallChanges1.png" data-background-size="contain">
<h2>Then, fix all the easy stuff</h2>
<p class="fragment">Disable bad-practice modules</p>
<p class="fragment">Best practice config changes</p>
</section>
<section data-transition="none" data-background-transition="none" data-background="images/theyreSmallChanges2.png" data-background-size="contain">
<h2>Then, fix all the easy stuff</h2>
<p>Disable bad-practice modules</p>
<p>Best practice config changes</p>
</section>
<section data-transition="none" data-background-transition="none" data-background="images/theyreSmallChanges3.png" data-background-size="contain">
<h2>Then, fix all the easy stuff</h2>
<p>Disable bad-practice modules</p>
<p>Best practice config changes</p>
</section>
<section>
<h2>Statistics module</h2>
<p class="fragment">Does a DB write on each request!</p>
<p class="fragment">Rarely needed, as other analyics are used</p>
</section>
<section>
<h2>PHP Module</h2>
<p class="fragment">Executes PHP code in content</p>
<p class="fragment">Instant security vulnerability!</p>
</section>
<section>
<h2>Uninstalling PHP module</h2>
<p class="fragment">Check text-formats, use of <a href="https://www.drupal.org/project/views_php">Views PHP</a> first!</p>
<p class="fragment">Test for breakage, then uninstall.</p>
</section>
<!-- <section>
<h2>Lots of revisions</h2>
<p class="fragment">Slows down content retrival</p>
<p class="fragment">Revisions past the last 3 are low value</p>
</section>
<section>
<h2><a href="https://www.drupal.org/project/node_revision_delete">Node Revision Delete</a></h2>
<p class="fragment">Limits # of revisions by type</p>
<p class="fragment">Cleans out old revisions</p>
</section> -->
<section>
<h2>Duplicate modules</h2>
<p class="fragment">Confusing, causes missed updates</p>
<p class="fragment">Can be sign of a hack</p>
</section>
<section>
<h2>De-duping modules</h2>
<p class="fragment">Remove, <code>drush cr && drush updb</code></p>
<p class="fragment">Test locally first!</p>
</section>
<!-- <section data-transition="none">
<img src="images/messyDocroot1.png" />
</section>
<section data-transition="none">
<img src="images/messyDocroot2.png" />
</section>
<section data-transition="none">
<img src="images/messyDocroot3.png" />
</section>
<section data-transition="none">
<img src="images/messyDocroot4.png" />
</section>
<section data-transition="none">
<img src="images/messyDocroot5.png" />
</section>
<section>
<h2>Messy docroot</h2>
<p class="fragment">Can create automation, composer problems</p>
<p class="fragment">Move to files directory, use .htaccess redirect</p>
</section> -->
<section data-transition="none">
<img src="images/thatsTheEasyStuff1.png" />
</section>
<section data-transition="none">
<img src="images/thatsTheEasyStuff2.png" />
</section>
<section data-transition="none">
<img src="images/thatsTheEasyStuff3.png" />
</section>
<section data-transition="none">
<img src="images/thatsTheEasyStuff4.png" />
</section>
<section>
<h2>Audit != Performance Analysis</h2>
<p class="fragment">Different tools, approaches</p>
<p class="fragment">Time and brain intensive process</p>
</section>
<section>
<h2>Remediation is a process</h2>
<p class="fragment">Not a fix.</p>
</section>
</section>
<section>
<section data-transition="none">
<img src="images/mistakesWereMade1.png" />
</section>
<section data-transition="none">
<img src="images/mistakesWereMade2.png" />
</section>
<section data-transition="none">
<img src="images/mistakesWereMade3.png" />
</section>
<section data-transition="none">
<img src="images/mistakesWereMade4.png" />
</section>
<section data-transition="none">
<img src="images/mistakesWereMade5.png" />
</section>
<section data-transition="none">
<img src="images/mistakesWereMade6.png" />
</section>
<section data-transition="none">
<img src="images/mistakesWereMade7.png" />
</section>
<section data-transition="none">
<img src="images/mistakesWereMade8.png" />
</section>
<section data-transition="none">
<img src="images/mistakesWereMade9.png" />
</section>
<section>
<h1>Mistakes were made</h1>
</section>
<section>
<h2>It's not broken...</h2>
<p class="fragment">...but it's not working <span class="fragment">(well)</span> either.</p>
</section>
<section data-transition="none" data-background-transition="none" data-background="images/yourSiteNeedsToChange1.png" data-background-size="contain">
<h2>Why does this happen?</h2>
<p class="fragment">Inexperience, bad assumptions, changing priorities</p>
</section>
<section data-transition="none" data-background-transition="none" data-background="images/yourSiteNeedsToChange2.png" data-background-size="contain">
<h2>Why does this happen?</h2>
<p>Inexperience, bad assumptions, changing priorities</p>
</section>
<section data-transition="none" data-background-transition="none" data-background="images/yourSiteNeedsToChange3.png" data-background-size="contain">
</section>
<section>
<h2>Too few content types</h2>
<p class="fragment">Articles and Basic Pages everywhere</p>
<p class="fragment">Tons of fields, not all used</p>
</section>
<section>
<h2>Too many content types</h2>
<p class="fragment">Differentiation only in name, not use or data</p>
<p class="fragment">Press Release vs. Blog Post vs. News</p>
</section>
<section data-transition="none">
<img src="images/contentProblems1.png" />
</section>
<section data-transition="none">
<img src="images/contentProblems2.png" />
</section>
<section>
<h2>Rethink Content Stategy</h2>
<p class="fragment">Do a content audit</p>
<p class="fragment">Use card sorting to rediscover groupings</p>
<p class="fragment">Drop old, irrelvent content</p>
</section>
<section>
<h2>Merge, split types</h2>
<p class="fragment">Can be done manually or using Migrate</p>
<p class="fragment">Per-node tasks via Views Bulk Operations</p>
</section>
<section>
<h2>Reorganize</h2>
<p class="fragment">Update menus, build new sections</p>
<p class="fragment">Use <a href="https://www.drupal.org/project/pathauto">Pathauto</a> and <a href="https://www.drupal.org/project/redirect">Redirect</a> to keep SEO</p>
</section>
<section data-transition="none">
<img src="images/needALayoutManager1.png" />
</section>
<section data-transition="none">
<img src="images/needALayoutManager2.png" />
</section>
<section data-transition="none">
<img src="images/needALayoutManager3.png" />
</section>
<section data-transition="none">
<img src="images/needALayoutManager4.png" />
</section>
<section>
<h2>Layout is not content</h2>
<p class="fragment">Gives site messy, inconsistent feel</p>
</section>
<section>
<h2>Layout managers</h2>
<p class="fragment">Separates content from layout</p>
<p class="fragment">
<a href="https://www.drupal.org/project/paragraphs">Paragraphs</a>,
<a href="https://www.drupal.org/project/panels">Panels</a>,