Automation Automation Automation
Michael Heap (@mheap)
Presented at PHPScotland, Oct 2016
Slide 2
Slide 2 text
Me!
I’m Michael
I’m @mheap
Infrastructure at digi.me
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 /
Civilization 6
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
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 68
Slide 68 text
Centralised
automation
Slide 69
Slide 69 text
Enter CI!
Slide 70
Slide 70 text
Code changes
=> Run tests
Slide 71
Slide 71 text
Code changes
=> Compile Assets
Slide 72
Slide 72 text
Assets Change
=> Publish to CDN
Slide 73
Slide 73 text
New servers
Slide 74
Slide 74 text
Report generation
Slide 75
Slide 75 text
Not just for builds
Slide 76
Slide 76 text
CI == Automation
Slide 77
Slide 77 text
Continuous
Integration
Slide 78
Slide 78 text
Centralised
Information
Slide 79
Slide 79 text
Public
Information
Slide 80
Slide 80 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 81
Slide 81 text
Us
Slide 82
Slide 82 text
Us
Slide 83
Slide 83 text
Docblocks
Slide 84
Slide 84 text
Generators
Slide 85
Slide 85 text
Bootstrapping
Slide 86
Slide 86 text
Composer
packages
Slide 87
Slide 87 text
Us
The box
Slide 88
Slide 88 text
Crazy ideas
Slide 89
Slide 89 text
DEMO TIME
Slide 90
Slide 90 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 91
Slide 91 text
Business buy in
Slide 92
Slide 92 text
It's hard work
Slide 93
Slide 93 text
Quick wins
Slide 94
Slide 94 text
Keep it quick
Slide 95
Slide 95 text
Developer buy in
Slide 96
Slide 96 text
Automation is debt
Slide 97
Slide 97 text
Error handling
Slide 98
Slide 98 text
Idempotency
Slide 99
Slide 99 text
Build on the
shoulders of giants
Slide 100
Slide 100 text
Triggering actions
Slide 101
Slide 101 text
Visibility
Slide 102
Slide 102 text
Slack
Slide 103
Slide 103 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 104
Slide 104 text
Available tools
Slide 105
Slide 105 text
Vagrant/Virtualbox
Slide 106
Slide 106 text
Openstack
Slide 107
Slide 107 text
Puppet
Chef
Ansible
Slide 108
Slide 108 text
IDEs
Slide 109
Slide 109 text
Doctrine Migrations
Slide 110
Slide 110 text
Jenkins / GoCD
Slide 111
Slide 111 text
Amazon AWS
Slide 112
Slide 112 text
Terraform
Slide 113
Slide 113 text
Consul
Slide 114
Slide 114 text
Bash / Python / Other
Slide 115
Slide 115 text
Slack
Slide 116
Slide 116 text
Final considerations
Slide 117
Slide 117 text
Manual tasks
Slide 118
Slide 118 text
Security
Slide 119
Slide 119 text
Pipelines
Slide 120
Slide 120 text
Implementation
Slide 121
Slide 121 text
Recommended
starting point
Slide 122
Slide 122 text
In summary
Slide 123
Slide 123 text
Non-programmers don’t trust computers
to do something they can do
Programmers don’t trust themselves to do
something that a computer can do
- @djcoreynolan
Slide 124
Slide 124 text
Thanks!
I’ve been @mheap, you’ve been awesome.
Please leave feedback on Joind.in
https://joind.in/talk/53d7d