Top Banner
Nathen Harvey | VP , Community Development | [email protected]
60

Infrastructure as Code with Chef

Apr 13, 2017

Download

Business

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Infrastructure as Code with Chef

Nathen Harvey | VP, Community Development | [email protected]

Page 2: Infrastructure as Code with Chef

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•  [email protected]

Page 3: Infrastructure as Code with Chef
Page 4: Infrastructure as Code with Chef

EVERY business is a software business

We’re going to be a software company with airplanes.

– CIO, Alaska Airlines

Page 5: Infrastructure as Code with Chef

Quality and innovation, historically a tradeoffQ

UALIT

Y/CO

MPL

IAN

CE

RATE OF INNOVATION

Page 6: Infrastructure as Code with Chef

Challenges

Manual processesWeeks to setup new systems or software

Legacy systems and toolsInflexible, hard-to-change hardware and software

Organizational silosUnwieldy divisions of responsibility

Infrequent, large releasesFear of deployment due to risk to SLAs

Regulatory burdensCompliance bottleneck at the end of a project

Page 7: Infrastructure as Code with Chef

Idea Value

æ

S

ƴ

Ä

Nj

Manual processesWeeks to setup new systems or software

Legacy systems and toolsInflexible, hard-to-change hardware and software

Organizational silosUnwieldy divisions of responsibility

Regulatory burdensCompliance bottleneck at the end of a project

Infrequent, large releasesFear of deployment due to risk to SLAs

AutomationNew systems and software updates deployed in minutes

Solutions to the challenges

Page 8: Infrastructure as Code with Chef

Idea Value

æ

S

ƴ

Ä

Nj

Manual processesWeeks to setup new systems or software

Legacy systems and toolsInflexible, hard-to-change hardware and software

Organizational silosUnwieldy divisions of responsibility

Regulatory burdensCompliance bottleneck at the end of a project

Infrequent, large releasesFear of deployment due to risk to SLAs

Dynamic infrastructureEasy migration to on-demand, cloud-based infrastructure and management of heterogeneous networks

AutomationNew systems and software updates deployed in minutes

Solutions to the challenges

Page 9: Infrastructure as Code with Chef

Idea Value

æ

S

ƴ

Ä

Nj

Manual processesWeeks to setup new systems or software

Legacy systems and toolsInflexible, hard-to-change hardware and software

Organizational silosUnwieldy divisions of responsibility

Regulatory burdensCompliance bottleneck at the end of a project

Infrequent, large releasesFear of deployment due to risk to SLAs

Increased cooperation and trustTeams are aligned towards common goals

Dynamic infrastructureEasy migration to on-demand, cloud-based infrastructure and management of heterogeneous networks

AutomationNew systems and software updates deployed in minutes

Solutions to the challenges

Page 10: Infrastructure as Code with Chef

Idea Value

æ

S

ƴ

Ä

Nj

Manual processesWeeks to setup new systems or software

Legacy systems and toolsInflexible, hard-to-change hardware and software

Organizational silosUnwieldy divisions of responsibility

Regulatory burdensCompliance bottleneck at the end of a project

Infrequent, large releasesFear of deployment due to risk to SLAs

Increased cooperation and trustTeams are aligned towards common goals

Dynamic infrastructureEasy migration to on-demand, cloud-based infrastructure and management of heterogeneous networks

AutomationNew systems and software updates deployed in minutes

Solutions to the challenges

Continuous delivery of infrastructure and applicationsSafe, rapid delivery of incremental value

Page 11: Infrastructure as Code with Chef

Idea Value

æ

S

ƴ

Ä

Nj

Manual processesWeeks to setup new systems or software

Legacy systems and toolsInflexible, hard-to-change hardware and software

Organizational silosUnwieldy divisions of responsibility

Regulatory burdensCompliance bottleneck at the end of a project

Infrequent, large releasesFear of deployment due to risk to SLAs

Compliance at velocity Integration of compliance into the workflow using automated tests

Increased cooperation and trustTeams are aligned towards common goals

Dynamic infrastructureEasy migration to on-demand, cloud-based infrastructure and management of heterogeneous networks

AutomationNew systems and software updates deployed in minutes

Continuous delivery of infrastructure and applicationsSafe, rapid delivery of incremental value

Solutions to the challenges

Page 12: Infrastructure as Code with Chef

The game changer: rapid time to value

Innovation

Quality/Compliance

DynamicInfrastructure

Page 13: Infrastructure as Code with Chef

Dynamic infrastructureMigrate 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

Page 14: Infrastructure as Code with Chef

The game changer: rapid time to value

Innovation

Quality/Compliance

DynamicInfrastructure

Infrastructure as CodeAutomate the Stack

+

Page 15: Infrastructure as Code with Chef

Infrastructure as Code

•  Programmatically provision and configure components

Page 16: Infrastructure as Code with Chef

Infrastructure as Code

•  Programmatically provision and configure components

•  Treat like any other code base

Page 17: Infrastructure as Code with Chef

Infrastructure as Code

•  Programmatically provision and configure components

•  Treat like any other code base•  Reconstruct business from code repository, data

backup, and compute resources

Page 18: Infrastructure as Code with Chef

AutomationTurn 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

Page 19: Infrastructure as Code with Chef

Chef Server

Policy

State

State queries

Servers, VMs, cloud instances, etc.

running the Chef client

•  The Chef server stores policy and configuration data•  The Chef client periodically runs on each node in the network•  Chef clients poll the server for the latest policies •  Chef clients notify the server of their states and can query for the states of other nodes

Page 20: Infrastructure as Code with Chef

Describe Infrastructure as Codehttpd_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

Page 21: Infrastructure as Code with Chef

Test the Codedescribe '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

Page 22: Infrastructure as Code with Chef

Version the Code & the Artifact

name 'cmgw' maintainer 'Chef Software, Inc.'

maintainer_email '[email protected]' license 'apache2'

description 'Installs/Configures cmgw' long_description 'Installs/Configures cmgw'

version '0.1.0'

Page 23: Infrastructure as Code with Chef

The game changer: rapid time to value

Innovation

Quality/Compliance

DynamicInfrastructure

Infrastructure as CodeAutomate the Stack

DevOps �

+ +

Page 24: Infrastructure as Code with Chef

DEVOPS

A cultural and professional movement, focused on how we build and operate high velocity organizations, born from the experiences of its practitioners.

Page 25: Infrastructure as Code with Chef

PEOPLE

PRODUCTS

COMPANIES

Page 26: Infrastructure as Code with Chef

WE ARE LEAN

•  Eliminate non-value-added action (Waste/Muda) •  Pull over Push •  Kaizen (Continuous Improvement) •  Kaikaku (Disruptive Change) •  Small Batch + Experimentation

Page 27: Infrastructure as Code with Chef
Page 28: Infrastructure as Code with Chef

UBIQUITOUS WORKFLOW

AUTOMATION

Page 29: Infrastructure as Code with Chef

DIVERSITY

Page 30: Infrastructure as Code with Chef

DevOps workflow & cultureEliminate 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

Page 31: Infrastructure as Code with Chef

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

Page 32: Infrastructure as Code with Chef

Continuous delivery of infrastructure & appsImplement 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

Page 33: Infrastructure as Code with Chef
Page 34: Infrastructure as Code with Chef

MANAGE RISK

•  Small batches, near term hypothesis •  Validation comes from customers •  Introduce near-term volatility to gain decreased

long-term risk

Page 35: Infrastructure as Code with Chef
Page 36: Infrastructure as Code with Chef

CONTINUOUS INTEGRATION

•  Always integrate branches to master •  They should be short lived, iterative branches •  Fix the build when it goes red

Page 37: Infrastructure as Code with Chef

THE FOUR-EYE RULE

Page 38: Infrastructure as Code with Chef

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”)

Page 39: Infrastructure as Code with Chef

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

Page 40: Infrastructure as Code with Chef

CODE GOES THROUGH THE SAME WORKFLOW

Applications are code Infrastructure is code

Page 41: Infrastructure as Code with Chef

Security and compliance at velocityRegulatory compliance and security concerns are facts of life for every enterprise. At the same time, competitive pressures are increasing. Embed requirements into the software delivery pipeline. Code makes compliance at velocity possible.

•  Embed compliance into the software delivery pipeline•  Automated checking of compliance criteria with

analytics•  Structured review process during development•  Discovery and analysis•  Patch management and remediation

Page 42: Infrastructure as Code with Chef

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

Page 43: Infrastructure as Code with Chef

Chef Provides a Proven Approach to DevOps

...

...

...

Targets/Workloads

Assessment

Chef Compliance

� Search

^ Audit

Ǘ Discover

Page 44: Infrastructure as Code with Chef

Chef Provides a Proven Approach to DevOps

...

...

...

Targets/Workloads

Assessment

Chef Compliance

� Search

^ Audit

Ǘ Discover

Local Dev

ê Model

ƨ Build

¿ Test

Chef DK

Chef Client & Cookbooks

Page 45: Infrastructure as Code with Chef

Chef Provides a Proven Approach to DevOps

...

...

...

Targets/Workloads

Collaborative DevAssessment

Chef Compliance

� Search

^ Audit

Ǘ Discover

Deploy

Chef Delivery!

Local Dev

ê Model

ƨ Build

¿ Test

Chef DK

Chef Client & Cookbooks

Page 46: Infrastructure as Code with Chef

Unified Pipeline Shape

The stages are fixed, and each stage has a fixed set of phases!

APPROVE DELIVER

SubmitChange

Page 47: Infrastructure as Code with Chef

Unified Pipeline Shape

The stages are fixed, and each stage has a fixed set of phases!

APPROVE DELIVER

LintSyntaxUnit

SubmitChange

Page 48: Infrastructure as Code with Chef

Unified Pipeline Shape

The stages are fixed, and each stage has a fixed set of phases!

APPROVE DELIVER

LintSyntaxUnit

SubmitChange

Does thiscode changelook good?

Page 49: Infrastructure as Code with Chef

Unified Pipeline Shape

The stages are fixed, and each stage has a fixed set of phases!

APPROVE DELIVER

LintSyntaxUnit

SecurityQualityPublish

LintSyntaxUnit

SubmitChange

Does thiscode changelook good?

Page 50: Infrastructure as Code with Chef

Unified Pipeline Shape

The stages are fixed, and each stage has a fixed set of phases!

APPROVE DELIVER

LintSyntaxUnit

SecurityQualityPublish

LintSyntaxUnit

ProvisionDeploySmoke

Functional

SubmitChange

Does thiscode changelook good?

Page 51: Infrastructure as Code with Chef

Unified Pipeline Shape

The stages are fixed, and each stage has a fixed set of phases!

APPROVE DELIVER

LintSyntaxUnit

SecurityQualityPublish

LintSyntaxUnit

ProvisionDeploySmoke

Functional

SubmitChange

Does thiscode changelook good?

Do we wantto ship this?

Page 52: Infrastructure as Code with Chef

Unified Pipeline Shape

The stages are fixed, and each stage has a fixed set of phases!

APPROVE DELIVER

LintSyntaxUnit

SecurityQualityPublish

LintSyntaxUnit

ProvisionDeploySmoke

Functional

ProvisionDeploySmoke

Functional

SubmitChange

Does thiscode changelook good?

Do we wantto ship this?

Page 53: Infrastructure as Code with Chef

Unified Pipeline Shape

The stages are fixed, and each stage has a fixed set of phases!

APPROVE DELIVER

LintSyntaxUnit

SecurityQualityPublish

LintSyntaxUnit

ProvisionDeploySmoke

Functional

ProvisionDeploySmoke

Functional

ProvisionDeploySmoke

Functional

SubmitChange

Does thiscode changelook good?

Do we wantto ship this?

Page 54: Infrastructure as Code with Chef

Unified Pipeline Shape

The stages are fixed, and each stage has a fixed set of phases!

APPROVE DELIVER

LintSyntaxUnit

SecurityQualityPublish

LintSyntaxUnit

ProvisionDeploySmoke

Functional

ProvisionDeploySmoke

Functional

ProvisionDeploySmoke

Functional

ProvisionDeploySmoke

Functional

SubmitChange

Does thiscode changelook good?

Do we wantto ship this?

Page 55: Infrastructure as Code with Chef

Shared Workflow

Delivery’s pipeline is shared across projects and teams

Page 56: Infrastructure as Code with Chef

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

Page 57: Infrastructure as Code with Chef

Austin, TX | July 11-13

Early Bird Pricing Through April 17th

«  Workshops & Chef Training !

«  Community Summit !

«  Chef Partner Summit !

«  Welcome Reception!

«  Keynotes!

«  Technical Sessions!

«  Happy Hour!

«  Keynotes!

«  Technical Sessions!

«  Awesome Chef Awards!

«  Community Celebration!

ChefConf.com

Page 58: Infrastructure as Code with Chef

ChefConf.com | Closes Feb 29

Suggested Topics

  Compliant Chefs  Let’s Get Technical  Grab Bag

  Welcome to Chef  Transformation  Continuously Chef

Page 59: Infrastructure as Code with Chef

What questions can I answer for you?

Page 60: Infrastructure as Code with Chef

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•  [email protected]