Slide 1

Slide 1 text

Integrating Infrastructure as Code into a Continuous Delivery Pipeline Considerations, Best Practices & Patterns Adarsh Shah & Matt Kuritz Contino - Enterprise DevOps and Cloud Transformation Consultancy @ShahAdarsh & @_kuritz Deck: http://bit.ly/IaC-CD

Slide 2

Slide 2 text

Who are we? Adarsh Shah Principal Consultant ShahAdarsh _kuritz Matt Kuritz Senior Consultant

Slide 3

Slide 3 text

@ShahAdarsh @_kuritz Infrastructure as Code Infrastructure as Code (IaC) is the approach that takes proven coding techniques used by software systems and extends them to infrastructure.

Slide 4

Slide 4 text

@ShahAdarsh @_kuritz Challenges without IaC • Configuration Issues • Repeatability • Human Error • Time to Complete

Slide 5

Slide 5 text

@ShahAdarsh @_kuritz Continuous Delivery Continuous Delivery is the ability to get changes of all types—including new features, configuration changes, bug fixes and experiments—into production, or into the hands of users, safely and quickly in a sustainable way. - Jez Humble

Slide 6

Slide 6 text

@ShahAdarsh @_kuritz Continuous Delivery

Slide 7

Slide 7 text

@ShahAdarsh @_kuritz Considerations & best practices when integrating IaC to CD pipeline

Slide 8

Slide 8 text

@ShahAdarsh @_kuritz Source Control

Slide 9

Slide 9 text

@ShahAdarsh @_kuritz Source Control • Everything in source control • Code accessibility • Modularize • Collaboration!! • Code/test as documentation

Slide 10

Slide 10 text

@ShahAdarsh @_kuritz Source Control

Slide 11

Slide 11 text

@ShahAdarsh @_kuritz Infra as Code testing Static Analysis terraform validate, TFLint, puppet parser validate Unit bats, chefspec Smoke w/ dummy app Selenium Integration inspec, goss Brittle Cost Maintenance Infra as Code Test Pyramid Duration

Slide 12

Slide 12 text

@ShahAdarsh @_kuritz Security Patterns • CIS benchmark automation • Building hardening policies • Static scanning

Slide 13

Slide 13 text

@ShahAdarsh @_kuritz Security Considerations • Dynamic scanning • Secrets management • Artifact signing & verification

Slide 14

Slide 14 text

@ShahAdarsh @_kuritz Compliance • Finance, Healthcare & other industries • SOX, PII, HIPPA, PCI • Compliance as Code - Code instead of Paperwork • Chef InSpec, HashiCorp Sentinel (Policy as Code)

Slide 15

Slide 15 text

@ShahAdarsh @_kuritz Compliance as Code using HashiCorp Sentinel Ensure that modification of critical data can only be performed by authorized sysops with valid MFA

Slide 16

Slide 16 text

@ShahAdarsh @_kuritz Patterns for Provisioning • Immutable VMs • Containerized Services • Base Image & App Pull

Slide 17

Slide 17 text

@ShahAdarsh @_kuritz Immutable VMs • Infra Module - Multitier App w/ Cache Cluster • Loosely Coupled • App Image consumed by Infrastructure Module

Slide 18

Slide 18 text

@ShahAdarsh @_kuritz Immutable VMs Infrastructure Application pull Ephemeral Environment Testing & Validation Ephemeral Environment Ephemeral Environment AMI Publish & Deploy AMI pull Security Int. Tests Compliance Continuous Integration Unit Tests Static Analysis Security App Tests Int. Tests

Slide 19

Slide 19 text

@ShahAdarsh @_kuritz Containerized Services • Infra Module - Container Management System • Fully Decoupled from Apps • Apps are deployed with Container Management System specific tools

Slide 20

Slide 20 text

@ShahAdarsh @_kuritz Containerized Services Infrastructure Application Publish & Deploy pull Scan Sign App Tests ECR Testing & Validation Ephemeral Environment Security Compliance Int. Tests Continuous Integration Unit Tests Static Analysis

Slide 21

Slide 21 text

@ShahAdarsh @_kuritz Base Image & App Pull • Infra Module - App Servers • VMs pull app on deploy, or app update • Anti-Pattern: Allowing Long-Lived VMs

Slide 22

Slide 22 text

@ShahAdarsh @_kuritz Base Image & App Pull Infrastructure Application pull pull Publish & Deploy AMI Testing & Validation Ephemeral Environment Security Int. Tests Ephemeral Environment Compliance Ephemeral Environment Security App Tests Continuous Integration Unit Tests Static Analysis

Slide 23

Slide 23 text

@ShahAdarsh @_kuritz People & Process • Enables teams to interact • Infra, Security, Compliance, QA etc teams work together • Improvement in processes • Faster feedback

Slide 24

Slide 24 text

@ShahAdarsh @_kuritz Infra Compliance Security Production Inspection

Slide 25

Slide 25 text

@ShahAdarsh @_kuritz Building Quality In Infra Compliance Security Production

Slide 26

Slide 26 text

@ShahAdarsh @_kuritz Summary • Infrastructure as Code • Continuous Delivery • Considerations & best practices when integrating IaC to CD • Source Control • Testing • Security • Compliance • Patterns for Provisioning • Build and Deploy pipelines • People & Process

Slide 27

Slide 27 text

Questions Adarsh Shah & Matt Kuritz Contino - Enterprise DevOps and Cloud Transformation Consultancy @ShahAdarsh & @_kuritz Deck: http://bit.ly/IaC-CD