Iterate Faster With Immutable Infrastructure – Basil Brunner

Iterate Faster With Immutable Infrastructure – Basil Brunner

What are the advantages of the Immutable Infrastructure concept compared to the proven system maintenance with configuration management tools such as Ansilbe, Chef or Puppet? After this presentation you will know why Immutable Infrastructure leads to a significantly increased release speed, faster feedback and more stability in your infrastructure. You will also have noticed that your previous investments in automation will continue to pay off.

A particular focus will be on the benefits of Immutable Infrastructure in emergencies such as system failures, faulty deployments or hacking attacks. Last but not least, it also shows how Immutable Infrastructure can be used profitably during the development phase.

The presented practical example will demonstrate how a pipeline for Immutable Infrastructure based on open source tools can be implemented. It also shows how concepts known from software development, such as unit & integration testing, can be applied to the management of infrastructure.

027edc76bf9f9c030820807f87c5dbdc?s=128

DevOpsDays Zurich

May 03, 2018
Tweet

Transcript

  1. 2.

    About me Basil Brunner Software & Operations Engineer with strong

    DevOps mindset Basil Brunner (@myniva) | Extron Electronics, Zurich
  2. 3.

    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
  3. 4.

    Compare 2016 to 2017 Do not only optimize for throughput!

    Basil Brunner (@myniva) | Extron Electronics, Zurich
  4. 6.

    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
  5. 7.

    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
  6. 8.

    ... which results in: • Downtime • Unknown system state

    • !!! Fire drills !!! Basil Brunner (@myniva) | Extron Electronics, Zurich
  7. 9.

    2016 Configuration as Code is not good enough! Basil Brunner

    (@myniva) | Extron Electronics, Zurich
  8. 12.

    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
  9. 13.

    Virtual Machines are instantiated based on Machine Images OK, but

    how does my application get in there? Basil Brunner (@myniva) | Extron Electronics, Zurich
  10. 14.

    • Machine Image builder • Open Source • Simple concepts,

    steep learning curve • Easy to integrate with other tools like Jenkins Basil Brunner (@myniva) | Extron Electronics, Zurich
  11. 15.

    Packer Builder • Amazon Web Services (AMI) • Microsoft Azure

    (VHD) • Google Cloud Platform • VMware • Hyper-V • VirtualBox • Parallels Basil Brunner (@myniva) | Extron Electronics, Zurich
  12. 16.

    { "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
  13. 17.

    Packer Provisioners • Ansible • Chef • Puppet • Shell

    • PowerShell Basil Brunner (@myniva) | Extron Electronics, Zurich
  14. 19.

    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
  15. 20.

    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
  16. 21.

    Pipeline • Do it more often! (we recommend: daily) Basil

    Brunner (@myniva) | Extron Electronics, Zurich
  17. 22.

    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
  18. 23.

    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
  19. 24.

    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
  20. 25.

    Who? • US company, software engineering branch in Zurich •

    Interdisciplinary DevOps team • Looking for like-minded colleagues Basil Brunner (@myniva) | Extron Electronics, Zurich
  21. 26.

    Contact • Twitter: @myniva • LinkedIn: basilbrunner • www.extron.com /

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