$30 off During Our Annual Pro Sale. View Details »

Successful Practices for Continuous Delivery - Philly Meetup

Successful Practices for Continuous Delivery - Philly Meetup

Infrastructure as Code and DevOps practices are necessary pre-requisites for safely adopting Continuous Delivery. This talk will explore some of the practices your team will need to adopt to safely move fast, continuously delivering value to your customers. It will include a demonstration of Chef's proven approach to a DevOps workflow including Chef Compliance, Chef Delivery, and more.

This was presented at a joint meetup for Philly.rb, Philly DevOps, and the Philly Chef Meetup.

Nathen Harvey

May 24, 2016
Tweet

More Decks by Nathen Harvey

Other Decks in Technology

Transcript

  1. Nathen Harvey | VP, Community Development | nharvey@chef.io @nathenharvey

  2. Nathen Harvey VP, Community Development at Chef Co-host of the

    Food Fight Show Podcast Occasional farmer – http://ei.chef.io Love eggs – http://eggs.chef.io Part-time detective - http://bit.ly/detectivedecker @nathenharvey nharvey@chef.io
  3. EVERY business is a software business We’re going to be

    a software company with airplanes. – CIO, Alaska Airlines
  4. Quality and innovation, historically a tradeoff QUALITY/COMPLIANCE RATE OF INNOVATION

  5. The game changer: rapid time to value Innovation Quality/ Compliance

    Dynamic Infrastructure
  6. Dynamic infrastructure Migrate applications to the cloud and support hybrid

    and multi-cloud environments. Automate the management of heterogeneous networks, including legacy systems. •  Provisioning and setting up environments •  Dynamic scaling of compute resources •  Migrating legacy workloads to the cloud •  Multi cloud and hybrid cloud deployment •  Support for heterogeneous environments
  7. The game changer: rapid time to value Innovation Quality/ Compliance

    Dynamic Infrastructure Infrastructure as Code Automate the Stack +
  8. Infrastructure as Code •  Programmatically provision and configure components • 

    Treat like any other code base •  Reconstruct business from code repository, data backup, and compute resources
  9. Automation Turn infrastructure into code—infrastructure as code is versionable, testable

    and repeatable. Manual processes become a thing of the past. •  Automated, full-stack application policies •  Package and service installation •  Versionable, testable, repeatable workflow •  Scalable application policies •  Management of interdependencies across nodes
  10. Describe Infrastructure as Code httpd_service 'customers' do mpm 'prefork' action

    [:create, :start] end httpd_config 'customers' do instance 'customers' source 'customers.conf.erb' notifies :restart, 'httpd_service[customers]' end directory '/var/www/customers/public_html' do recursive true end
  11. Test the Code describe 'apache::default' do context 'When all attributes

    are default, on an unspecified platform' do let(:chef_run) do runner = ChefSpec::ServerRunner.new runner.converge(described_recipe) end it 'converges successfully' do expect { chef_run }.to_not raise_error end it 'installs apache' do expect(chef_run).to install_package 'apache2' end end end
  12. Version the Code & the Artifact name 'cmgw' maintainer 'Chef

    Software, Inc.' maintainer_email 'nharvey@chef.io' license 'apache2' description 'Installs/Configures cmgw' long_description 'Installs/Configures cmgw' version '0.1.0'
  13. The game changer: rapid time to value Innovation Quality/ Compliance

    Dynamic Infrastructure Infrastructure as Code Automate the Stack DevOps + +
  14. DEVOPS A cultural and professional movement, focused on how we

    build and operate high velocity organizations, born from the experiences of its practitioners.
  15. PEOPLE PRODUCTS COMPANIES

  16. WE ARE LEAN •  Eliminate non-value-added action (Waste/Muda) •  Pull

    over Push •  Kaizen (Continuous Improvement) •  Kaikaku (Disruptive Change) •  Small Batch + Experimentation
  17. None
  18. UBIQUITOUS WORKFLOW AUTOMATION

  19. DIVERSITY

  20. DevOps workflow & culture Eliminate silos and lower the overhead

    of IT operations and service management by supporting DevOps culture. Build communities. •  Unified workflow for application and infrastructure •  Integration with version control for dev and ops •  Support for automated testing of infrastructure and applications •  Integration of security and compliance into product development •  Advanced, high-velocity workflow
  21. The rewards?* *source: Dr. Nicole Forsgren research on DevOps More

    deployments Ship faster Faster MTTR after issues More profits, market share, and productivity Market cap goes up
  22. Continuous delivery of infrastructure & apps Implement a high-velocity software

    delivery pipeline that integrates application and infrastructure. Eliminate the risks incurred with large, infrequent releases. •  Rapid provisioning of dev and test environments •  Ensure consistency and repeatability of environments •  Unified pipeline for infrastructure, runtime environments and applications •  Support for large teams with multiple projects •  Advanced, high-velocity workflow
  23. None
  24. MANAGE RISK •  Small batches, near term hypothesis •  Validation

    comes from customers •  Introduce near-term volatility to gain decreased long-term risk
  25. Build a car Incremental Awesome analogy from Henrik Kniberg Build

    features iteratively
  26. Build a car Incremental Awesome analogy from Henrik Kniberg Build

    features iteratively
  27. Build a car Incremental Awesome analogy from Henrik Kniberg Build

    features iteratively
  28. Build a car Incremental Awesome analogy from Henrik Kniberg Build

    features iteratively
  29. Build a car Incremental Transport Iterative Awesome analogy from Henrik

    Kniberg Build features iteratively
  30. Build a car Incremental Transport Iterative Awesome analogy from Henrik

    Kniberg Build features iteratively
  31. Build a car Incremental Transport Iterative Awesome analogy from Henrik

    Kniberg Build features iteratively
  32. Build a car Incremental Transport Iterative Awesome analogy from Henrik

    Kniberg Build features iteratively
  33. Build a car Incremental Transport Iterative Awesome analogy from Henrik

    Kniberg Build features iteratively
  34. Build a car Incremental Transport Iterative Awesome analogy from Henrik

    Kniberg Build features iteratively
  35. CONTINUOUS INTEGRATION •  Always integrate branches to master •  They

    should be short lived, iterative branches •  Fix the build when it goes red
  36. THE FOUR-EYE RULE

  37. WRITE TESTS •  Unit test (a single function) •  Integration

    tests (multiple classes/units) •  Functional tests (user-oriented, high-level, full stack) •  Smoke tests (quickly determine if the system is “working”)
  38. ONE PATH FOR CHANGE •  The way change moves through

    your organization is fixed •  Designed to re-enforce your principles and aid flow •  Flexible at the level of execution
  39. CODE GOES THROUGH THE SAME WORKFLOW Applications are code Infrastructure

    is code
  40. None
  41. None
  42. Unified Pipeline Shape The stages are fixed, and each stage

    has a fixed set of phases! APPROVE DELIVER Submit Change
  43. Unified Pipeline Shape The stages are fixed, and each stage

    has a fixed set of phases! APPROVE DELIVER Lint Syntax Unit Submit Change
  44. Unified Pipeline Shape The stages are fixed, and each stage

    has a fixed set of phases! APPROVE DELIVER Lint Syntax Unit Submit Change Does this code change look good?
  45. Unified Pipeline Shape The stages are fixed, and each stage

    has a fixed set of phases! APPROVE DELIVER Lint Syntax Unit Security Quality Publish Lint Syntax Unit Submit Change Does this code change look good?
  46. Unified Pipeline Shape The stages are fixed, and each stage

    has a fixed set of phases! APPROVE DELIVER Lint Syntax Unit Security Quality Publish Lint Syntax Unit Provision Deploy Smoke Functional Submit Change Does this code change look good?
  47. Unified Pipeline Shape The stages are fixed, and each stage

    has a fixed set of phases! APPROVE DELIVER Lint Syntax Unit Security Quality Publish Lint Syntax Unit Provision Deploy Smoke Functional Submit Change Does this code change look good? Do we want to ship this?
  48. Unified Pipeline Shape The stages are fixed, and each stage

    has a fixed set of phases! APPROVE DELIVER Lint Syntax Unit Security Quality Publish Lint Syntax Unit Provision Deploy Smoke Functional Provision Deploy Smoke Functional Submit Change Does this code change look good? Do we want to ship this?
  49. Unified Pipeline Shape The stages are fixed, and each stage

    has a fixed set of phases! APPROVE DELIVER Lint Syntax Unit Security Quality Publish Lint Syntax Unit Provision Deploy Smoke Functional Provision Deploy Smoke Functional Provision Deploy Smoke Functional Submit Change Does this code change look good? Do we want to ship this?
  50. Unified Pipeline Shape The stages are fixed, and each stage

    has a fixed set of phases! APPROVE DELIVER Lint Syntax Unit Security Quality Publish Lint Syntax Unit Provision Deploy Smoke Functional Provision Deploy Smoke Functional Provision Deploy Smoke Functional Provision Deploy Smoke Functional Submit Change Does this code change look good? Do we want to ship this?
  51. Delivery Phases Verify and Build Build Acceptance, Union, Rehearsal, Delivered

    Provision Deploy Smoke Functional
  52. Delivery Phases – Example Java Application •  JUnit Verify and

    Build Build •  Lint4J •  javac •  Fortify •  FindBugs •  Maven •  Artifactory Acceptance, Union, Rehearsal, Delivered •  EC2 •  Chef Provisioning Provision Deploy •  Load jar in Tomcat •  Curl $URL; check for 200 OK Smoke Functional •  Selenium •  Cucumber •  Chef InSpec
  53. Delivery Phases – Learn Chef •  RSpec Verify and Build

    Build •  skip •  skip •  skip •  skip •  Create tarball Acceptance, Union, Rehearsal, Delivered •  S3 Buckets •  Setup Fastly Provision Deploy •  Upload to S3 •  Flush Fastly •  Curl $URL; check for 200 OK Smoke Functional •  linkchecker •  Notify Slack
  54. Shared Workflow Delivery’s pipeline is shared across projects and teams

  55. None
  56. None
  57. Chef Provides a Proven Approach to DevOps ... ... ...

    Targets/Workloads Collaborative Dev Production Chef Server Chef Server Chef Supermarket Assessment Chef Compliance  Search ^ Audit Ǘ Discover Deploy Chef Delivery! Local Dev ê Model ƨ Build ¿ Test Chef DK Chef Client & Cookbooks
  58. 1500 Attendees! 55+ Speakers! Registration Open! Community Celebration! CHEFCONF 2016

    AT A GLANCE Workshops & Chef Training Community Summit Partner Summit Welcome Reception Keynotes Technical Sessions Happy Hour Keynotes Technical Sessions Awesome Chef Awards Community Celebration DAY 1 // JULY 11 DAY 2 // JULY 12 DAY 3 // JULY 13 THREE DAYS OF OPPORTUNITY TO ENGAGE THE CHEF CUSTOMERS AND PARTNER ECOSYSTEM chefconf.chef.io! DAY 1 // JULY 11 «  Workshops & Chef Training «  Community Summit «  Partner Summit «  Welcome Reception DAY 2 // JULY 12 «  Keynotes «  Technical Sessions «  Happy Hour DAY 3 // JULY 13 «  Keynotes «  Technical Sessions «  Awesome Chef Awards «  Community Celebration THREE DAYS OF OPPORTUNITY TO ENGAGE THE CHEF CUSTOMERS AND PARTNER ECOSYSTEM
  59. What questions can I answer for you?

  60. Nathen Harvey VP, Community Development at Chef Co-host of the

    Food Fight Show Podcast Occasional farmer – http://ei.chef.io Love eggs – http://eggs.chef.io Part-time detective - http://bit.ly/detectivedecker @nathenharvey nharvey@chef.io
  61. Nathen Harvey | VP, Community Development | nharvey@chef.io @nathenharvey