Slide 1

Slide 1 text

Automation Automation Automation Michael Heap (@mheap) Developer at DataSift Presented at PHP UK, Feb 2016

Slide 2

Slide 2 text

Me! I’m Michael I’m @mheap Developer at DataSift

Slide 3

Slide 3 text

Automation

Slide 4

Slide 4 text

1. What is automation? 2. A step by step guide to automation 3. Making it institutionalised 4. Thinking outside the box 5. I'm convinced! Let's automate 6. Useful tools

Slide 5

Slide 5 text

0. XKCD 1. What is automation? 2. A step by step guide to automation 3. Making it institutionalised 4. Thinking outside the box 5. I'm convinced! Let's automate 6. Useful tools

Slide 6

Slide 6 text

No content

Slide 7

Slide 7 text

1. What is automation? 2. A step by step guide to automation 3. Making it institutionalised 4. Thinking outside the box 5. I'm convinced! Let's automate 6. Useful tools

Slide 8

Slide 8 text

What is automation?

Slide 9

Slide 9 text

./scr_u -v -S 1024 -t -d /tmp

Slide 10

Slide 10 text

./generate_stock_update.sh

Slide 11

Slide 11 text

What is automation?

Slide 12

Slide 12 text

Why Automate?

Slide 13

Slide 13 text

#1 Reason

Slide 14

Slide 14 text

#1 Reason People...

Slide 15

Slide 15 text

#1 Reason People... Have good intentions, but no time

Slide 16

Slide 16 text

#1 Reason People... Have good intentions, but no time Don't write tests

Slide 17

Slide 17 text

#1 Reason People... Have good intentions, but no time Don't write tests Don't run tests

Slide 18

Slide 18 text

#1 Reason People... Have good intentions, but no time Don't write tests Don't run tests Don't write/read documentation

Slide 19

Slide 19 text

#1 Reason People... Have good intentions, but no time Don't write tests Don't run tests Don't write/read documentation Are not deterministic

Slide 20

Slide 20 text

What other reasons?

Slide 21

Slide 21 text

Make money with less effort

Slide 22

Slide 22 text

Your company wants less overhead

Slide 23

Slide 23 text

Spend more time with partner / kids /

Slide 24

Slide 24 text

Spend more time with partner / kids / League of Legends

Slide 25

Slide 25 text

Automation is about...

Slide 26

Slide 26 text

Fear

Slide 27

Slide 27 text

Fear costs £££

Slide 28

Slide 28 text

Fear makes people reckless

Slide 29

Slide 29 text

Fear leads to bad decisions

Slide 30

Slide 30 text

Fear leads to bad productivity

Slide 31

Slide 31 text

Automation isn't about being lazy

Slide 32

Slide 32 text

Automation is about being efficient

Slide 33

Slide 33 text

So, we should automate everything right?

Slide 34

Slide 34 text

No

Slide 35

Slide 35 text

Feel the pain

Slide 36

Slide 36 text

Security upgrades

Slide 37

Slide 37 text

Anything you need to see

Slide 38

Slide 38 text

What should we automate?

Slide 39

Slide 39 text

Everything else

Slide 40

Slide 40 text

Deployments

Slide 41

Slide 41 text

Reporting

Slide 42

Slide 42 text

CRUD Generation

Slide 43

Slide 43 text

Anything & Everything

Slide 44

Slide 44 text

Arguments against automation

Slide 45

Slide 45 text

“Our system is too complicated to automate”

Slide 46

Slide 46 text

“We don't have time to automate”

Slide 47

Slide 47 text

1. What is automation? 2. A step by step guide to automation 3. Making it institutionalised 4. Thinking outside the box 5. I'm convinced! Let's automate 6. Useful tools

Slide 48

Slide 48 text

When should we automate?

Slide 49

Slide 49 text

A step by step guide

Slide 50

Slide 50 text

Do it by hand (make notes)

Slide 51

Slide 51 text

Automate the first part

Slide 52

Slide 52 text

Automate the second part

Slide 53

Slide 53 text

All automated

Slide 54

Slide 54 text

Run unattended

Slide 55

Slide 55 text

That's all 5 steps

Slide 56

Slide 56 text

What to automate

Slide 57

Slide 57 text

Start small

Slide 58

Slide 58 text

Start with the whining

Slide 59

Slide 59 text

“Deploying is too hard”

Slide 60

Slide 60 text

$ git checkout staging $ git pull origin staging $ git merge feature/new-awesomeness $ git push origin staging $ cap staging deploy:full

Slide 61

Slide 61 text

Ignore it?

Slide 62

Slide 62 text

$ deploy-staging feature/new-awesomeness

Slide 63

Slide 63 text

$ git checkout staging $ git pull origin staging $ git merge feature/new-awesomeness $ git push origin staging $ cap staging deploy:full

Slide 64

Slide 64 text

$ deploy-staging feature/new-awesomeness

Slide 65

Slide 65 text

Start with the whining

Slide 66

Slide 66 text

1. What is automation? 2. A step by step guide to automation 3. Making it institutionalised 4. Thinking outside the box 5. I'm convinced! Let's automate 6. Useful tools

Slide 67

Slide 67 text

Centralised automation

Slide 68

Slide 68 text

Enter CI!

Slide 69

Slide 69 text

Code changes => Run tests

Slide 70

Slide 70 text

New servers

Slide 71

Slide 71 text

Report generation

Slide 72

Slide 72 text

Not just for builds

Slide 73

Slide 73 text

CI == Automation

Slide 74

Slide 74 text

Continuous Integration

Slide 75

Slide 75 text

Centralised Information

Slide 76

Slide 76 text

Public Information

Slide 77

Slide 77 text

1. What is automation? 2. A step by step guide to automation 3. Making it institutionalised 4. Thinking outside the box 5. I'm convinced! Let's automate 6. Useful tools

Slide 78

Slide 78 text

Us

Slide 79

Slide 79 text

Us

Slide 80

Slide 80 text

Docblocks

Slide 81

Slide 81 text

Generators

Slide 82

Slide 82 text

Bootstrapping

Slide 83

Slide 83 text

Composer packages

Slide 84

Slide 84 text

Us The box

Slide 85

Slide 85 text

Crazy ideas

Slide 86

Slide 86 text

DEMO TIME

Slide 87

Slide 87 text

1. What is automation? 2. A step by step guide to automation 3. Making it institutionalised 4. Thinking outside the box 5. I'm convinced! Let's automate 6. Useful tools

Slide 88

Slide 88 text

Business buy in

Slide 89

Slide 89 text

It's hard work

Slide 90

Slide 90 text

Quick wins

Slide 91

Slide 91 text

Keep it quick

Slide 92

Slide 92 text

Developer buy in

Slide 93

Slide 93 text

Automation is debt

Slide 94

Slide 94 text

Error handling

Slide 95

Slide 95 text

Idempotency

Slide 96

Slide 96 text

Build on the shoulders of giants

Slide 97

Slide 97 text

Triggering actions

Slide 98

Slide 98 text

Visibility

Slide 99

Slide 99 text

Slack

Slide 100

Slide 100 text

1. What is automation? 2. A step by step guide to automation 3. Making it institutionalised 4. Thinking outside the box 5. I'm convinced! Let's automate 6. Useful tools

Slide 101

Slide 101 text

Available tools

Slide 102

Slide 102 text

Vagrant/Virtualbox

Slide 103

Slide 103 text

Openstack

Slide 104

Slide 104 text

Puppet Chef Ansible

Slide 105

Slide 105 text

IDEs

Slide 106

Slide 106 text

Liquibase

Slide 107

Slide 107 text

Jenkins / GoCD

Slide 108

Slide 108 text

Amazon AWS

Slide 109

Slide 109 text

Terraform

Slide 110

Slide 110 text

Consul

Slide 111

Slide 111 text

Bash / Python / Other

Slide 112

Slide 112 text

Slack

Slide 113

Slide 113 text

Final considerations

Slide 114

Slide 114 text

Manual tasks

Slide 115

Slide 115 text

Security

Slide 116

Slide 116 text

Pipelines

Slide 117

Slide 117 text

Implementation

Slide 118

Slide 118 text

Recommended starting point

Slide 119

Slide 119 text

In summary

Slide 120

Slide 120 text

Thanks! I’ve been @mheap, you’ve been awesome. Please leave feedback on Joind.in https://joind.in/talk/265d5