Slide 1

Slide 1 text

Iterate faster with Immutable Infrastructure Basil Brunner (@myniva) | Extron Electronics, Zurich

Slide 2

Slide 2 text

About me Basil Brunner Software & Operations Engineer with strong DevOps mindset Basil Brunner (@myniva) | Extron Electronics, Zurich

Slide 3

Slide 3 text

State of DevOps Report 20161 In comparison to Low Performers, High Performers do: 1 https:/ /puppet.com/resources/whitepaper/state-of-devops-report Basil Brunner (@myniva) | Extron Electronics, Zurich

Slide 4

Slide 4 text

Compare 2016 to 2017 Do not only optimize for throughput! Basil Brunner (@myniva) | Extron Electronics, Zurich

Slide 5

Slide 5 text

Manual work Basil Brunner (@myniva) | Extron Electronics, Zurich

Slide 6

Slide 6 text

2014 in a small start-up... • Jumped on the DevOps train • Automate deployments with Ansible • Local testing with Vagrant (VM) • Super proud to get it done Basil Brunner (@myniva) | Extron Electronics, Zurich

Slide 7

Slide 7 text

2015: Failed Executions • Connectivity issues • External dependency not available • Version incompatibility (changed packages on system) • Deployments took too long • ... Basil Brunner (@myniva) | Extron Electronics, Zurich

Slide 8

Slide 8 text

... which results in: • Downtime • Unknown system state • !!! Fire drills !!! Basil Brunner (@myniva) | Extron Electronics, Zurich

Slide 9

Slide 9 text

2016 Configuration as Code is not good enough! Basil Brunner (@myniva) | Extron Electronics, Zurich

Slide 10

Slide 10 text

What could be the reason? Basil Brunner (@myniva) | Extron Electronics, Zurich

Slide 11

Slide 11 text

Vision Basil Brunner (@myniva) | Extron Electronics, Zurich

Slide 12

Slide 12 text

Immutable Infrastructure • Apply patterns well known from programming • Do not change once instantiated • Replace to make change • Data centers have got an API, too Stop server hugging! 2 2 Werner Vogels, CTO Amazon Basil Brunner (@myniva) | Extron Electronics, Zurich

Slide 13

Slide 13 text

Virtual Machines are instantiated based on Machine Images OK, but how does my application get in there? Basil Brunner (@myniva) | Extron Electronics, Zurich

Slide 14

Slide 14 text

• Machine Image builder • Open Source • Simple concepts, steep learning curve • Easy to integrate with other tools like Jenkins Basil Brunner (@myniva) | Extron Electronics, Zurich

Slide 15

Slide 15 text

Packer Builder • Amazon Web Services (AMI) • Microsoft Azure (VHD) • Google Cloud Platform • VMware • Hyper-V • VirtualBox • Parallels Basil Brunner (@myniva) | Extron Electronics, Zurich

Slide 16

Slide 16 text

{ "builders": [ { "type": "amazon-ebs", "region": "us-east-1", "source_ami": "ami-788362984", "instance_type": "t2.micro", "ami_name": "packer-demo-{{timestamp}}" } ] } Basil Brunner (@myniva) | Extron Electronics, Zurich

Slide 17

Slide 17 text

Packer Provisioners • Ansible • Chef • Puppet • Shell • PowerShell Basil Brunner (@myniva) | Extron Electronics, Zurich

Slide 18

Slide 18 text

{ "builders": [...], "provisioners": [ { "type": "ansible-local", "playbook_file": "../ansible/site.yml" } ] } Basil Brunner (@myniva) | Extron Electronics, Zurich

Slide 19

Slide 19 text

Build $ packer build example.json ==> amazon-ebs: amazon-ebs output will be in this color. ==> amazon-ebs: Launching a source AWS instance... ==> amazon-ebs: Connecting to the instance via SSH... ==> Provisioning ==> amazon-ebs: Stopping the source instance... ==> amazon-ebs: Creating the AMI: packer-demo-1371856345 --> amazon-ebs: AMIs were created: us-east-1: ami-19601070 Basil Brunner (@myniva) | Extron Electronics, Zurich

Slide 20

Slide 20 text

Benefits of using Packer • Most existing configuration code (Ansible, Puppet, Chef) can be reused • Painless and repeatable Machine Images build • Build failed? Implement fix and run again! Basil Brunner (@myniva) | Extron Electronics, Zurich

Slide 21

Slide 21 text

Pipeline • Do it more often! (we recommend: daily) Basil Brunner (@myniva) | Extron Electronics, Zurich

Slide 22

Slide 22 text

Unit test your infrastructure • Test for expected system state • Find issues before they leak into production • Tools • InSpec3 • Serverspec 4 4 https:/ /serverspec.org 3 https:/ /www.inspec.io Basil Brunner (@myniva) | Extron Electronics, Zurich

Slide 23

Slide 23 text

Replacing instead of Maintaining • Instances always close to target state • Faster lead times, but also shorter MTTR • Reduced error rates and threats • Cloud readiness • automated scaling • replacement of underlaying hardware Basil Brunner (@myniva) | Extron Electronics, Zurich

Slide 24

Slide 24 text

Become High Performers • Automate A-Z, not just parts! • Replacement of servers should be just on click away • Use safe deployment strategies • Blue-Green • Canary Basil Brunner (@myniva) | Extron Electronics, Zurich

Slide 25

Slide 25 text

Who? • US company, software engineering branch in Zurich • Interdisciplinary DevOps team • Looking for like-minded colleagues Basil Brunner (@myniva) | Extron Electronics, Zurich

Slide 26

Slide 26 text

Contact • Twitter: @myniva • LinkedIn: basilbrunner • www.extron.com / @extron Basil Brunner (@myniva) | Extron Electronics, Zurich