SlideShare a Scribd company logo
1 of 77
Chef Cookbook Workflow
Testing your infrastructure code
Alex Manly - @apmanly
Instructor
• Alex Manly
• Solutions Architect, Chef
• Developer (Java, oh and some Ruby)
• @apmanly
• am@chef.io
What is Chef?
Short Answer: An Automation Framework
for automating infrastructure and applications
Traditional Systems Management
Config 1
Config 2
Config 3
Traditional Systems Management
Config 1
Config 2
Config 3
Automation
Idea of Services
Service
Config 1
Config 2
Config 3
Automation
Abstraction of Services
Service
Config 1
Config 2
Config 3
Automation
Chef is Infrastructure as Code
•Programmatically
provision and configure
components
http://www.flickr.com/photos/louisb/4555295187/
Chef is Infrastructure as Code
•Treat like any other
code base
http://www.flickr.com/photos/louisb/4555295187/
Chef is Infrastructure as Code
•Reconstruct business
from code repository,
data backup, and
compute resources
http://www.flickr.com/photos/louisb/4555295187/
Chef is Infrastructure as Code
•Programmatically provision
and configure components
•Treat like any other code
base
•Reconstruct business from
code repository, data
backup, and compute
resources
http://www.flickr.com/photos/louisb/4555295187/
Building Blocks: What is a Resource?
• A Resource is a system state you define
Example: Package installed, state of a service, configuration file existing
• You declare what state you want the resource in.
Chef automatically determines HOW that state is achieved
On Linux based OSes: On Windows based OSes:
Resource Example
#windows
dsc_resource 'webserver' do
resource :windowsfeature
property :name, 'Web-Server'
property :ensure, 'Present’
end
Resource Example
#linux
package "httpd" do
action :install
end
Building Blocks: What is a Recipe?
• An abstraction of a Service that consists of a set of
Resources to deliver that Service
• Resources are executed in the order they are listed.
Recipe Example
#linux
package "httpd" do
action :install
end
include_recipe "apache::fwrules”
service "httpd" do
action [ :enable, :start ]
end
Recipe Example
#windows
include_recipe "fourthcoffee::dsc”
include_recipe "iis::remove_default_site”
remote_directory node['fourthcoffee']['install_path'] do
source 'fourthcoffee’
action :create
end
iis_pool 'FourthCoffee' do
runtime_version "4.0"
action :add
end
iis_site 'FourthCoffee' do
protocol :http
port 80
path node['fourthcoffee']['install_path']
application_pool 'FourthCoffee'
action [:add,:start]
end
Cookbooks
• A Higher Level Abstraction of a Service
• A set of Recipes and Data Attributes
required to deliver one or multiple
Services
Define cookbook attribute
#attributes.rb
default['fourthcoffee']['port'] = 80
Consume cookbook attribute
iis_site 'FourthCoffee' do
protocol :http
port node['fourthcoffee']['port']
path node['fourthcoffee']['install_path']
application_pool 'FourthCoffee'
action [:add,:start]
end
Yes!
That’s cool but…
• Things break
• Chef is a language (based on Ruby)
• How can you rapidly develop recipes and cookbooks?
Let’s step back…
Testing is Hard - FACT
Manual Tests
Also known as…
You’ll never get to
Continuous Deployment
clicking a GUI
Theory of testing…
Testing builds safety
Feedback loops…
• Tell us we’re doing the right thing
• At the right time
• With the right results
Feedback loops…
Measurements we take to ensure the
“experiment” is behaving as expected
Tests are essentially feedback loops
Remember…
Chef is “Infrastructure as Code”
Remember…
“Infrastructure as Code” should be
treated like ANY other codebase.
Treated Any Other Codebase…
• Stored in SCM
• Testing Coverage
• Part of your CI pipelines
Testing in Chef
• Chef recipes need tested
Linting
Static Analysis
Unit Testing
Functional Testing
DevOps is a Two-Way Street
• It’s great when
developers care about
• Uptime!
• Scaling!
• Deployment!
• Put them on call! etc.
etc. etc.
DevOps is a Two-Way Street
• Operations also has as much or more
to learn from developers as well
Software Development Workflow
• Write some code
• <ad-hoc verification here>
• Go to pre-production
• <ad-hoc verification here>
• Go to production
• Production failure
Software Development Workflow
• Write some code
• Write and run some unit tests
• Go to pre-production
• Run some
integration/acceptance tests
• Go to production
• Lowered chance of
production failure
Old Chef Cookbook Workflow
• Write some cookbook code
• <ad-hoc verification here>
• Go to pre-production
• <ad-hoc verification here
• Go to production
• Whoops, broke production
Chef Testing
• Did chef-client complete successfully?
• Did the recipe put the node in the desired state?
• Are the resources properly defined?
• Does the code following our style guide?
New Chef Cookbook Workflow
• Write some cookbook code
• Check for code correctness
• Write and run some unit tests
• Go to pre-production
• Run some integration tests
• Go to production
ChefDK: TDI In a Box
Code Correctness
Unit Tests
Deploy sample environments
A wrapper to tie it all together
Not just syntactic correctness but quality gates too!
Rubocop
Because Ruby
• Identify potential Ruby errors
• Unclosed strings, etc.
• Identify style/convention that helps write better code
• Single quotes vs. double quotes
• This is useful for new Chefs, and helps make the code more readable
• Exclude rules that do not apply
• Not everyone is the same – some tests won’t work for your organization or for Chef code
• Run against static code, so tests are very fast (<5 seconds to run)
Code Correctness
Rubocop Example
def badName
if something
test
end
end
test.rb:1:5: C: Use snake_case for methods and variables.
def badName
^^^^^^^
test.rb:2:3: C: Favor modifier if/unless usage when you have
a single-line body. Another good alternative is the usage of
control flow &&/||.
if something
^^
test.rb:4:5: W: end at 4, 4 is not aligned with if at 2, 2
end
^^^
1 file inspected, 3 offenses detected
Code Correctness
Food Critic
Test Your “Chef Style”
• Flag problems that might cause your Chef cookbooks to fail
on converge
FC010: Invalid search syntax
• Identify style/convention that has been adopted by the Chef
community
FC004: Use a service resource to start and stop
services
• Create custom rules for your own organization’s
compliance/standards
COMP001: Do not allow recipes to mount disk volumes
• Run against static code, so tests are very fast (<5 seconds to
run)
Code Correctness
FoodCritic Examples
• FC001: Use strings in preference to symbols to access node attributes
• FC002: Avoid string interpolation where not required
• FC003: Check whether you are running with chef server before using server-
specific features
• FC004: Use a service resource to start and stop services
• FC005: Avoid repetition of resource declarations
• FC006: Mode should be quoted or fully specified when setting file
permissions
• FC007: Ensure recipe dependencies are reflected in cookbook metadata
Code Correctness
ChefSpec
Simulate Chef
• Did I send a properly formed piece of code to Chef?
• Especially important if there is mutability in your code
• This can cover things like feature flags, or behavior that changes on a
per-OS basis
• "If on Debian-based Linux I need to install package apache2, but on EL
variants I need to install package httpd.”
• Tests are very fast to run
• Even with simple code, it is useful for new Chefs to find simple errors
quickly
• Useful for regression testing – to make sure new changes
don’t break stuff that worked before.
Unit Tests
ChefSpec Example
require 'chefspec'
describe 'example::default' do
let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) }
let(:cheftest) { chef_run.node['cheftest'] }
it 'installs foo' do
expect(chef_run).to install_package('foo')
end
it 'sets the default attributes correctly' do
expect(cheftest['package_name']).to eq('httpd')
expect(cheftest['service_name']).to eq('httpd')
expect(cheftest['web_root']).to eq('/var/www/html')
end
end
Unit Tests
Test Kitchen
Let’s do this (almost) for real
• “Signal Out” testing for Chef code
• Just because I said something and it was interpreted correctly, doesn't mean that
what I said is what I meant.
• Executes your Chef code on an actual, factual node
• These nodes should be disposable (local virtualization, cloud
instances, etc.)
• Use any number of “signal out” testing products to ensure expected
results
• BATS
• ServerSpec
• Pester
• Can pull in other cookbook dependencies as well, and execute against
a machine that looks the same as your standard image
Deploy sample environments
Test Kitchen
it 'contains the default configuration settings' do
file(File.join(node['chef_client']['conf_dir'], 'client.rb')).must_match('^chef_server_url')
file(File.join(node['chef_client']['conf_dir'], 'client.rb')).must_match('^validation_client_name')
end
it 'should configure the server with a started webserver' do
expect(service('httpd')).to be_running
end
it 'should configure the server with an enabled webserver' do
expect(service('httpd')).to be_enabled
end
it 'should configure the server to listen on TCP port 80' do
expect(port(80)).to be_listening
end
Deploy sample environments
Testing for Compliance
Chef Analytics Ensures Compliance
Separation of concerns is a thing
• If my tests are failing, I can just re-write the tests, right?
• By using the Audit Mode of Chef Analytics in your pipeline, cookbooks have to pass
your custom compliance rules in order to be published.
• These are the same compliance rules that run against existing nodes, so you don’t
need to write separate tests.
• Compliance rules in Chef Analytics can (and should) be stored in a
separate SCM repository than the code itself
• Those who write the code, shouldn’t be able to write the rule check
Process and Workflow Enforces Standards
• Chef enforces appropriate checks are being made and standards are being
enforced using FoodCritic.
• This example will identify any code that tries to mount disk volumes. If code is
identified, it will be audited and then workflow can control the action of this
deviation to standards.
Just because it’s published, doesn’t mean it’s used
• Chef Environments should be constrained to specific cookbook versions
• If my Production environment is constrained to version 1.0.1 of the “MyApp” cookbook, it will
only use that version, even if a newer version is published to the Chef server
• Incrementing the cookbook constraint can be done using your existing change
control mechanisms and separation of duties
• A well-constructed pipeline will never overwrite an existing version of a cookbook
with new code/policy
• BEST PRACTICE – have your pipeline auto-increment versions of cookbooks,
tied to build numbers, to have traceability all the way back to your SCM
Chef Workflow with Jenkins
Infrastructure Change Control Pipeline
Local Development
Local Workstation
master
Clone Push
Commit
<USER>/<COOKBOOK>:master
DevOps/<COOKBOOK>:master
Fork
Pipeline Shape
We want to ensure that our changes
are relevant and well tested before we
deploy.
Verify Review Accept Ship
Verify Phase
During the verify phase, we want to do basic testing
to build confidence that our changes are sane and at
the very least, won’t break the build process
Verify Review Accept Ship
Jenkins
master
<USER>/<COOKBOOK>:master
DevOps/<COOKBOOK>:master
Pull Request
Fail
Fail
Pass
Pass
Pass
Test
Fail
Verify Phase
Review Phase
Two heads are better than one! Ask
your team members to double check
your work.
Verify Review Accept Ship
Accept Phase
We need to test this in a production-like environment
before we ship it.
Verify Review Accept Ship
Accept Job
Jenkins
masterDevOps/<COOKBOOK>:master
Fail
Pass
Pass
Test
Fail
Checkout
Push
Ship Phase
The very last thing we need to do is
start using the cookbook in our
environments.
Verify Review Accept Ship
CHEF DELIVERY
VALIDATED IN OUR ENGAGEMENTS WITH
ENTERPRISE AND BIG WEB CUSTOMERS.
WE'VE IDENTIFIED A PROVEN
PIPELINE
Steps
manual automated
Workstation
Create New
Change1
Test Change
Locally2
Chef Delivery
Approve
Change5
Deliver
Change6
Submit
Change3
Review
Change4
Stable Pipeline
Steps
manual automated
Verify
Lint
Syntax
Unit
Build
Merge
Lint
Syntax
Unit
Quality
Security
Publish
Provision
Deploy
Smoke
Functional
Acceptance Union
Provision
Deploy
Smoke
Functional
Rehearsal
Provision
Deploy
Smoke
Functional
Delivered
Provision
Deploy
Smoke
Functional
Stages
customizable
Verify Build
Acceptance
Union
Rehearsal
Delivered
Submit
Change3
Review
Change4
Approve
Change5
Deliver
Change6
Chef Delivery
Create a new
change1
Test Change
Locally2
Workstation
Common Pipeline
BUILD COOKBOOK
├── recipes
├── default.rb
├── lint.rb
├── syntax.rb
├── unit.rb
├── quality.rb
├── security.rb
├── publish.rb
├── provision.rb
├── deploy.rb
├── smoke.rb
└── functional.rb
PHASE EXEC
log "Running unit"
repo = node['delivery_builder']['repo']
delivery_builder_exec “run my junit tests" do
command "mvn test"
cwd repo
end
MANY ACCEPTANCE PIPELINES
ONE DELIVERY PIPELINE
ONE PIPELINE
One
Pipeline
Delivery Pipeline
union rehearsal delivered
Acceptance Pipelines
review approve deliverChange
Cookbook [A]
review approve deliverChange
Cookbook [B]
review approve deliverChange
Application [A]
review approve deliverChange
Application [B]
Infrastructure & Applications
Cookbook Workflow
Supermarket
Chef Server
review approve deliverChange
Cookbook
Node Node Node
Node Node Node
Node Node Node
Application Workflow
review approve deliverChange
Application
Node Node Node
Node Node Node
Node Node Node
Deploy
1 2 3
2 2 3
3 3 3
Chef Community Summit – London
London, etc. Venues Monument – November 3rd & 4th
Why your participation matters
• Influence the path of the Chef roadmap
• Contribute to the formation of best practices and the avenues to best share them
• Share your experiences transforming your business
• Demonstrate your DevOps Kung Fu
Network with awesome engineers in the Community
• Engage with a community of people actively using Chef to automate their workflow
• Discuss “what keeps you up at night” with a passionate engaged audience
• Meet with CHEF engineers IRL
**Use the code MEETUP and save 20%
http://summit.chef.io
What Questions Can I Answer For
You?
Thank you!
@apmanly
Chef Cookbook Workflow Testing

More Related Content

What's hot

Introduction of MariaDB 2017 09
Introduction of MariaDB 2017 09Introduction of MariaDB 2017 09
Introduction of MariaDB 2017 09GOTO Satoru
 
Simplify your SAP CPI development with Figaf
Simplify your SAP CPI development with FigafSimplify your SAP CPI development with Figaf
Simplify your SAP CPI development with FigafDaniel Graversen
 
Clean Architecture
Clean ArchitectureClean Architecture
Clean ArchitectureQAware GmbH
 
Angular - Chapter 1 - Introduction
 Angular - Chapter 1 - Introduction Angular - Chapter 1 - Introduction
Angular - Chapter 1 - IntroductionWebStackAcademy
 
Jenkins for java world
Jenkins for java worldJenkins for java world
Jenkins for java worldAshok Kumar
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDBNodeXperts
 
Introduction To C#
Introduction To C#Introduction To C#
Introduction To C#rahulsahay19
 
Kubernetes Summit 2021: Multi-Cluster - The Good, the Bad and the Ugly
Kubernetes Summit 2021: Multi-Cluster - The Good, the Bad and the UglyKubernetes Summit 2021: Multi-Cluster - The Good, the Bad and the Ugly
Kubernetes Summit 2021: Multi-Cluster - The Good, the Bad and the Uglysmalltown
 
Event Driven Systems with Spring Boot, Spring Cloud Streams and Kafka
Event Driven Systems with Spring Boot, Spring Cloud Streams and KafkaEvent Driven Systems with Spring Boot, Spring Cloud Streams and Kafka
Event Driven Systems with Spring Boot, Spring Cloud Streams and KafkaVMware Tanzu
 
(APP307) Leverage the Cloud with a Blue/Green Deployment Architecture | AWS r...
(APP307) Leverage the Cloud with a Blue/Green Deployment Architecture | AWS r...(APP307) Leverage the Cloud with a Blue/Green Deployment Architecture | AWS r...
(APP307) Leverage the Cloud with a Blue/Green Deployment Architecture | AWS r...Amazon Web Services
 
Streaming with Oracle Data Integration
Streaming with Oracle Data IntegrationStreaming with Oracle Data Integration
Streaming with Oracle Data IntegrationMichael Rainey
 
Introducing GitLab (September 2018)
Introducing GitLab (September 2018)Introducing GitLab (September 2018)
Introducing GitLab (September 2018)Noa Harel
 
Version control system and Git
Version control system and GitVersion control system and Git
Version control system and Gitramubonkuri
 
Infrastructure as Code - Getting Started, Concepts & Tools
Infrastructure as Code - Getting Started, Concepts & ToolsInfrastructure as Code - Getting Started, Concepts & Tools
Infrastructure as Code - Getting Started, Concepts & ToolsLior Kamrat
 
Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICDKnoldus Inc.
 
Reactjs workshop (1)
Reactjs workshop (1)Reactjs workshop (1)
Reactjs workshop (1)Ahmed rebai
 

What's hot (20)

Introduction of MariaDB 2017 09
Introduction of MariaDB 2017 09Introduction of MariaDB 2017 09
Introduction of MariaDB 2017 09
 
Simplify your SAP CPI development with Figaf
Simplify your SAP CPI development with FigafSimplify your SAP CPI development with Figaf
Simplify your SAP CPI development with Figaf
 
Clean Architecture
Clean ArchitectureClean Architecture
Clean Architecture
 
Angular - Chapter 1 - Introduction
 Angular - Chapter 1 - Introduction Angular - Chapter 1 - Introduction
Angular - Chapter 1 - Introduction
 
Jenkins for java world
Jenkins for java worldJenkins for java world
Jenkins for java world
 
Introduction to MongoDB
Introduction to MongoDBIntroduction to MongoDB
Introduction to MongoDB
 
Integrating Apache Spark and NiFi for Data Lakes
Integrating Apache Spark and NiFi for Data LakesIntegrating Apache Spark and NiFi for Data Lakes
Integrating Apache Spark and NiFi for Data Lakes
 
Memory Analyzer Tool (MAT)
Memory Analyzer Tool (MAT) Memory Analyzer Tool (MAT)
Memory Analyzer Tool (MAT)
 
Introduction To C#
Introduction To C#Introduction To C#
Introduction To C#
 
Kubernetes Summit 2021: Multi-Cluster - The Good, the Bad and the Ugly
Kubernetes Summit 2021: Multi-Cluster - The Good, the Bad and the UglyKubernetes Summit 2021: Multi-Cluster - The Good, the Bad and the Ugly
Kubernetes Summit 2021: Multi-Cluster - The Good, the Bad and the Ugly
 
Event Driven Systems with Spring Boot, Spring Cloud Streams and Kafka
Event Driven Systems with Spring Boot, Spring Cloud Streams and KafkaEvent Driven Systems with Spring Boot, Spring Cloud Streams and Kafka
Event Driven Systems with Spring Boot, Spring Cloud Streams and Kafka
 
(APP307) Leverage the Cloud with a Blue/Green Deployment Architecture | AWS r...
(APP307) Leverage the Cloud with a Blue/Green Deployment Architecture | AWS r...(APP307) Leverage the Cloud with a Blue/Green Deployment Architecture | AWS r...
(APP307) Leverage the Cloud with a Blue/Green Deployment Architecture | AWS r...
 
Git training
Git trainingGit training
Git training
 
Streaming with Oracle Data Integration
Streaming with Oracle Data IntegrationStreaming with Oracle Data Integration
Streaming with Oracle Data Integration
 
Introducing GitLab (September 2018)
Introducing GitLab (September 2018)Introducing GitLab (September 2018)
Introducing GitLab (September 2018)
 
Version control system and Git
Version control system and GitVersion control system and Git
Version control system and Git
 
Infrastructure as Code - Getting Started, Concepts & Tools
Infrastructure as Code - Getting Started, Concepts & ToolsInfrastructure as Code - Getting Started, Concepts & Tools
Infrastructure as Code - Getting Started, Concepts & Tools
 
Typescript ppt
Typescript pptTypescript ppt
Typescript ppt
 
Introduction to CICD
Introduction to CICDIntroduction to CICD
Introduction to CICD
 
Reactjs workshop (1)
Reactjs workshop (1)Reactjs workshop (1)
Reactjs workshop (1)
 

Viewers also liked

Internet of Things (IoT) HackDay
Internet of Things (IoT) HackDayInternet of Things (IoT) HackDay
Internet of Things (IoT) HackDayAmazon Web Services
 
Introduction to Chef: Automate Your Infrastructure by Modeling It In Code
Introduction to Chef: Automate Your Infrastructure by Modeling It In CodeIntroduction to Chef: Automate Your Infrastructure by Modeling It In Code
Introduction to Chef: Automate Your Infrastructure by Modeling It In CodeJosh Padnick
 
Jenkins and Chef: Infrastructure CI and Automated Deployment
Jenkins and Chef: Infrastructure CI and Automated DeploymentJenkins and Chef: Infrastructure CI and Automated Deployment
Jenkins and Chef: Infrastructure CI and Automated DeploymentDan Stine
 
Infrastructure Automation with Chef
Infrastructure Automation with ChefInfrastructure Automation with Chef
Infrastructure Automation with ChefAdam Jacob
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to ChefKnoldus Inc.
 
What Makes a Good Chef Cookbook? (May 2014 Edition)
What Makes a Good Chef Cookbook? (May 2014 Edition)What Makes a Good Chef Cookbook? (May 2014 Edition)
What Makes a Good Chef Cookbook? (May 2014 Edition)Julian Dunn
 
Infrastructure as Code with Chef
Infrastructure as Code with ChefInfrastructure as Code with Chef
Infrastructure as Code with ChefSarah Hynes Cheney
 
A use case with cloud foundry deployment
A use case with cloud foundry deploymentA use case with cloud foundry deployment
A use case with cloud foundry deploymentKrishna-Kumar
 
Introduction to Docker & CoreOS - Symfony User Group Cologne
Introduction to Docker & CoreOS - Symfony User Group CologneIntroduction to Docker & CoreOS - Symfony User Group Cologne
Introduction to Docker & CoreOS - Symfony User Group CologneD
 
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...Chef Software, Inc.
 
Chef Automate Workflow Demo
Chef Automate Workflow DemoChef Automate Workflow Demo
Chef Automate Workflow DemoChef
 
Overview of chef ( Infrastructure as a Code )
Overview of chef ( Infrastructure as a Code )Overview of chef ( Infrastructure as a Code )
Overview of chef ( Infrastructure as a Code )Pravin Mishra
 
An Introduction to DevOps with Chef
An Introduction to DevOps with ChefAn Introduction to DevOps with Chef
An Introduction to DevOps with ChefJulian Dunn
 
Chef Cookbook Testing and Continuous Integration
Chef Cookbook Testing and Continuous IntegrationChef Cookbook Testing and Continuous Integration
Chef Cookbook Testing and Continuous IntegrationJulian Dunn
 
Powering the Internet of Things with Apache Hadoop
Powering the Internet of Things with Apache HadoopPowering the Internet of Things with Apache Hadoop
Powering the Internet of Things with Apache HadoopCloudera, Inc.
 
How To Develop a Value Proposition That SELLS
How To Develop a Value Proposition That SELLSHow To Develop a Value Proposition That SELLS
How To Develop a Value Proposition That SELLSLeveragePoint Innovations
 
Chatbots in HR: Improving the Employee Experience
Chatbots in HR: Improving the Employee ExperienceChatbots in HR: Improving the Employee Experience
Chatbots in HR: Improving the Employee ExperienceAmy Kong
 
Automated DevOps Workflows with Chef on AWS
Automated DevOps Workflows with Chef on AWSAutomated DevOps Workflows with Chef on AWS
Automated DevOps Workflows with Chef on AWSAmazon Web Services
 
The Career Of A Chef
The Career Of A ChefThe Career Of A Chef
The Career Of A Chefcmslee
 

Viewers also liked (20)

Internet of Things (IoT) HackDay
Internet of Things (IoT) HackDayInternet of Things (IoT) HackDay
Internet of Things (IoT) HackDay
 
Introduction to Chef: Automate Your Infrastructure by Modeling It In Code
Introduction to Chef: Automate Your Infrastructure by Modeling It In CodeIntroduction to Chef: Automate Your Infrastructure by Modeling It In Code
Introduction to Chef: Automate Your Infrastructure by Modeling It In Code
 
Jenkins and Chef: Infrastructure CI and Automated Deployment
Jenkins and Chef: Infrastructure CI and Automated DeploymentJenkins and Chef: Infrastructure CI and Automated Deployment
Jenkins and Chef: Infrastructure CI and Automated Deployment
 
Infrastructure Automation with Chef
Infrastructure Automation with ChefInfrastructure Automation with Chef
Infrastructure Automation with Chef
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
 
What Makes a Good Chef Cookbook? (May 2014 Edition)
What Makes a Good Chef Cookbook? (May 2014 Edition)What Makes a Good Chef Cookbook? (May 2014 Edition)
What Makes a Good Chef Cookbook? (May 2014 Edition)
 
Infrastructure as Code with Chef
Infrastructure as Code with ChefInfrastructure as Code with Chef
Infrastructure as Code with Chef
 
A use case with cloud foundry deployment
A use case with cloud foundry deploymentA use case with cloud foundry deployment
A use case with cloud foundry deployment
 
Introduction to Docker & CoreOS - Symfony User Group Cologne
Introduction to Docker & CoreOS - Symfony User Group CologneIntroduction to Docker & CoreOS - Symfony User Group Cologne
Introduction to Docker & CoreOS - Symfony User Group Cologne
 
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
Chef Fundamentals Training Series Module 3: Setting up Nodes and Cookbook Aut...
 
Chef Automate Workflow Demo
Chef Automate Workflow DemoChef Automate Workflow Demo
Chef Automate Workflow Demo
 
Overview of chef ( Infrastructure as a Code )
Overview of chef ( Infrastructure as a Code )Overview of chef ( Infrastructure as a Code )
Overview of chef ( Infrastructure as a Code )
 
An Introduction to DevOps with Chef
An Introduction to DevOps with ChefAn Introduction to DevOps with Chef
An Introduction to DevOps with Chef
 
Introduction to chef
Introduction to chefIntroduction to chef
Introduction to chef
 
Chef Cookbook Testing and Continuous Integration
Chef Cookbook Testing and Continuous IntegrationChef Cookbook Testing and Continuous Integration
Chef Cookbook Testing and Continuous Integration
 
Powering the Internet of Things with Apache Hadoop
Powering the Internet of Things with Apache HadoopPowering the Internet of Things with Apache Hadoop
Powering the Internet of Things with Apache Hadoop
 
How To Develop a Value Proposition That SELLS
How To Develop a Value Proposition That SELLSHow To Develop a Value Proposition That SELLS
How To Develop a Value Proposition That SELLS
 
Chatbots in HR: Improving the Employee Experience
Chatbots in HR: Improving the Employee ExperienceChatbots in HR: Improving the Employee Experience
Chatbots in HR: Improving the Employee Experience
 
Automated DevOps Workflows with Chef on AWS
Automated DevOps Workflows with Chef on AWSAutomated DevOps Workflows with Chef on AWS
Automated DevOps Workflows with Chef on AWS
 
The Career Of A Chef
The Career Of A ChefThe Career Of A Chef
The Career Of A Chef
 

Similar to Chef Cookbook Workflow Testing

Compliance Automation with InSpec
Compliance Automation with InSpecCompliance Automation with InSpec
Compliance Automation with InSpec Nathen Harvey
 
Testable Infrastructure with Chef, Test Kitchen, and Docker
Testable Infrastructure with Chef, Test Kitchen, and DockerTestable Infrastructure with Chef, Test Kitchen, and Docker
Testable Infrastructure with Chef, Test Kitchen, and DockerMandi Walls
 
AWS re:Invent 2016: Configuration Management in the Cloud (DEV305)
AWS re:Invent 2016: Configuration Management in the Cloud (DEV305)AWS re:Invent 2016: Configuration Management in the Cloud (DEV305)
AWS re:Invent 2016: Configuration Management in the Cloud (DEV305)Amazon Web Services
 
Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Software, Inc.
 
Compliance Automation with InSpec - Chef NYC Meetup - April 2017
Compliance Automation with InSpec - Chef NYC Meetup - April 2017Compliance Automation with InSpec - Chef NYC Meetup - April 2017
Compliance Automation with InSpec - Chef NYC Meetup - April 2017adamleff
 
Chef onlinuxonpower
Chef onlinuxonpowerChef onlinuxonpower
Chef onlinuxonpowerMoya Brannan
 
DOO-009_Powering High Velocity Development for your Infrastructure
DOO-009_Powering High Velocity Development for your InfrastructureDOO-009_Powering High Velocity Development for your Infrastructure
DOO-009_Powering High Velocity Development for your Infrastructuredecode2016
 
Introduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen SummitIntroduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen SummitJennifer Davis
 
Introduction To Continuous Compliance & Remediation
Introduction To Continuous Compliance & RemediationIntroduction To Continuous Compliance & Remediation
Introduction To Continuous Compliance & RemediationNicole Johnson
 
Introduction to Cooking with Chef
Introduction to Cooking with ChefIntroduction to Cooking with Chef
Introduction to Cooking with ChefJohn Osborne
 
Configuration Management with AWS OpsWorks for Chef Automate
Configuration Management with AWS OpsWorks for Chef AutomateConfiguration Management with AWS OpsWorks for Chef Automate
Configuration Management with AWS OpsWorks for Chef AutomateAmazon Web Services
 
Terraform Testing with InSpec Demo
Terraform Testing with InSpec DemoTerraform Testing with InSpec Demo
Terraform Testing with InSpec DemoAnnie Hedgpeth
 
Overview of Chef - Fundamentals Webinar Series Part 1
Overview of Chef - Fundamentals Webinar Series Part 1Overview of Chef - Fundamentals Webinar Series Part 1
Overview of Chef - Fundamentals Webinar Series Part 1Chef
 
Chef for Openstack
Chef for OpenstackChef for Openstack
Chef for OpenstackMohit Sethi
 
Continuous Integration at Mollie
Continuous Integration at MollieContinuous Integration at Mollie
Continuous Integration at Molliewillemstuursma
 
Configuration Management in the Cloud - AWS Online Tech Talks
Configuration Management in the Cloud - AWS Online Tech TalksConfiguration Management in the Cloud - AWS Online Tech Talks
Configuration Management in the Cloud - AWS Online Tech TalksAmazon Web Services
 

Similar to Chef Cookbook Workflow Testing (20)

Compliance Automation with InSpec
Compliance Automation with InSpecCompliance Automation with InSpec
Compliance Automation with InSpec
 
Zero to Test Driven Infrastructure
Zero to Test Driven Infrastructure Zero to Test Driven Infrastructure
Zero to Test Driven Infrastructure
 
Testable Infrastructure with Chef, Test Kitchen, and Docker
Testable Infrastructure with Chef, Test Kitchen, and DockerTestable Infrastructure with Chef, Test Kitchen, and Docker
Testable Infrastructure with Chef, Test Kitchen, and Docker
 
AWS re:Invent 2016: Configuration Management in the Cloud (DEV305)
AWS re:Invent 2016: Configuration Management in the Cloud (DEV305)AWS re:Invent 2016: Configuration Management in the Cloud (DEV305)
AWS re:Invent 2016: Configuration Management in the Cloud (DEV305)
 
Chef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of ChefChef Fundamentals Training Series Module 1: Overview of Chef
Chef Fundamentals Training Series Module 1: Overview of Chef
 
Compliance Automation with InSpec - Chef NYC Meetup - April 2017
Compliance Automation with InSpec - Chef NYC Meetup - April 2017Compliance Automation with InSpec - Chef NYC Meetup - April 2017
Compliance Automation with InSpec - Chef NYC Meetup - April 2017
 
Chef onlinuxonpower
Chef onlinuxonpowerChef onlinuxonpower
Chef onlinuxonpower
 
DOO-009_Powering High Velocity Development for your Infrastructure
DOO-009_Powering High Velocity Development for your InfrastructureDOO-009_Powering High Velocity Development for your Infrastructure
DOO-009_Powering High Velocity Development for your Infrastructure
 
Introduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen SummitIntroduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen Summit
 
Introduction To Continuous Compliance & Remediation
Introduction To Continuous Compliance & RemediationIntroduction To Continuous Compliance & Remediation
Introduction To Continuous Compliance & Remediation
 
AWS OpsWorks for Chef Automate
AWS OpsWorks for Chef AutomateAWS OpsWorks for Chef Automate
AWS OpsWorks for Chef Automate
 
Chef Jumpstart
Chef JumpstartChef Jumpstart
Chef Jumpstart
 
Introduction to Cooking with Chef
Introduction to Cooking with ChefIntroduction to Cooking with Chef
Introduction to Cooking with Chef
 
Configuration Management with AWS OpsWorks for Chef Automate
Configuration Management with AWS OpsWorks for Chef AutomateConfiguration Management with AWS OpsWorks for Chef Automate
Configuration Management with AWS OpsWorks for Chef Automate
 
Terraform Testing with InSpec Demo
Terraform Testing with InSpec DemoTerraform Testing with InSpec Demo
Terraform Testing with InSpec Demo
 
Chef for openstack
Chef for openstackChef for openstack
Chef for openstack
 
Overview of Chef - Fundamentals Webinar Series Part 1
Overview of Chef - Fundamentals Webinar Series Part 1Overview of Chef - Fundamentals Webinar Series Part 1
Overview of Chef - Fundamentals Webinar Series Part 1
 
Chef for Openstack
Chef for OpenstackChef for Openstack
Chef for Openstack
 
Continuous Integration at Mollie
Continuous Integration at MollieContinuous Integration at Mollie
Continuous Integration at Mollie
 
Configuration Management in the Cloud - AWS Online Tech Talks
Configuration Management in the Cloud - AWS Online Tech TalksConfiguration Management in the Cloud - AWS Online Tech Talks
Configuration Management in the Cloud - AWS Online Tech Talks
 

More from Amazon Web Services

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Amazon Web Services
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Amazon Web Services
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateAmazon Web Services
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSAmazon Web Services
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Amazon Web Services
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Amazon Web Services
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...Amazon Web Services
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsAmazon Web Services
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareAmazon Web Services
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSAmazon Web Services
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAmazon Web Services
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareAmazon Web Services
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWSAmazon Web Services
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckAmazon Web Services
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without serversAmazon Web Services
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...Amazon Web Services
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceAmazon Web Services
 

More from Amazon Web Services (20)

Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
Come costruire servizi di Forecasting sfruttando algoritmi di ML e deep learn...
 
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
Big Data per le Startup: come creare applicazioni Big Data in modalità Server...
 
Esegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS FargateEsegui pod serverless con Amazon EKS e AWS Fargate
Esegui pod serverless con Amazon EKS e AWS Fargate
 
Costruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWSCostruire Applicazioni Moderne con AWS
Costruire Applicazioni Moderne con AWS
 
Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot Come spendere fino al 90% in meno con i container e le istanze spot
Come spendere fino al 90% in meno con i container e le istanze spot
 
Open banking as a service
Open banking as a serviceOpen banking as a service
Open banking as a service
 
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
Rendi unica l’offerta della tua startup sul mercato con i servizi Machine Lea...
 
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...OpsWorks Configuration Management: automatizza la gestione e i deployment del...
OpsWorks Configuration Management: automatizza la gestione e i deployment del...
 
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows WorkloadsMicrosoft Active Directory su AWS per supportare i tuoi Windows Workloads
Microsoft Active Directory su AWS per supportare i tuoi Windows Workloads
 
Computer Vision con AWS
Computer Vision con AWSComputer Vision con AWS
Computer Vision con AWS
 
Database Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatareDatabase Oracle e VMware Cloud on AWS i miti da sfatare
Database Oracle e VMware Cloud on AWS i miti da sfatare
 
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJSCrea la tua prima serverless ledger-based app con QLDB e NodeJS
Crea la tua prima serverless ledger-based app con QLDB e NodeJS
 
API moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e webAPI moderne real-time per applicazioni mobili e web
API moderne real-time per applicazioni mobili e web
 
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatareDatabase Oracle e VMware Cloud™ on AWS: i miti da sfatare
Database Oracle e VMware Cloud™ on AWS: i miti da sfatare
 
Tools for building your MVP on AWS
Tools for building your MVP on AWSTools for building your MVP on AWS
Tools for building your MVP on AWS
 
How to Build a Winning Pitch Deck
How to Build a Winning Pitch DeckHow to Build a Winning Pitch Deck
How to Build a Winning Pitch Deck
 
Building a web application without servers
Building a web application without serversBuilding a web application without servers
Building a web application without servers
 
Fundraising Essentials
Fundraising EssentialsFundraising Essentials
Fundraising Essentials
 
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
AWS_HK_StartupDay_Building Interactive websites while automating for efficien...
 
Introduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container ServiceIntroduzione a Amazon Elastic Container Service
Introduzione a Amazon Elastic Container Service
 

Recently uploaded

Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...lizamodels9
 
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deckPitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deckHajeJanKamps
 
Ten Organizational Design Models to align structure and operations to busines...
Ten Organizational Design Models to align structure and operations to busines...Ten Organizational Design Models to align structure and operations to busines...
Ten Organizational Design Models to align structure and operations to busines...Seta Wicaksana
 
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfIntro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfpollardmorgan
 
Market Sizes Sample Report - 2024 Edition
Market Sizes Sample Report - 2024 EditionMarket Sizes Sample Report - 2024 Edition
Market Sizes Sample Report - 2024 EditionMintel Group
 
APRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdfAPRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdfRbc Rbcua
 
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCRashishs7044
 
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdfNewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdfKhaled Al Awadi
 
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...lizamodels9
 
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCRashishs7044
 
8447779800, Low rate Call girls in Uttam Nagar Delhi NCR
8447779800, Low rate Call girls in Uttam Nagar Delhi NCR8447779800, Low rate Call girls in Uttam Nagar Delhi NCR
8447779800, Low rate Call girls in Uttam Nagar Delhi NCRashishs7044
 
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCRashishs7044
 
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...lizamodels9
 
Innovation Conference 5th March 2024.pdf
Innovation Conference 5th March 2024.pdfInnovation Conference 5th March 2024.pdf
Innovation Conference 5th March 2024.pdfrichard876048
 
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort ServiceCall US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Servicecallgirls2057
 
FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607dollysharma2066
 
Annual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesAnnual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesKeppelCorporation
 
Kenya Coconut Production Presentation by Dr. Lalith Perera
Kenya Coconut Production Presentation by Dr. Lalith PereraKenya Coconut Production Presentation by Dr. Lalith Perera
Kenya Coconut Production Presentation by Dr. Lalith Pereraictsugar
 
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City GurgaonCall Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaoncallgirls2057
 

Recently uploaded (20)

Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...
Call Girls In Connaught Place Delhi ❤️88604**77959_Russian 100% Genuine Escor...
 
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deckPitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
Pitch Deck Teardown: Geodesic.Life's $500k Pre-seed deck
 
Ten Organizational Design Models to align structure and operations to busines...
Ten Organizational Design Models to align structure and operations to busines...Ten Organizational Design Models to align structure and operations to busines...
Ten Organizational Design Models to align structure and operations to busines...
 
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfIntro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
 
Market Sizes Sample Report - 2024 Edition
Market Sizes Sample Report - 2024 EditionMarket Sizes Sample Report - 2024 Edition
Market Sizes Sample Report - 2024 Edition
 
APRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdfAPRIL2024_UKRAINE_xml_0000000000000 .pdf
APRIL2024_UKRAINE_xml_0000000000000 .pdf
 
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR
8447779800, Low rate Call girls in New Ashok Nagar Delhi NCR
 
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdfNewBase  19 April  2024  Energy News issue - 1717 by Khaled Al Awadi.pdf
NewBase 19 April 2024 Energy News issue - 1717 by Khaled Al Awadi.pdf
 
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
 
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR8447779800, Low rate Call girls in Tughlakabad Delhi NCR
8447779800, Low rate Call girls in Tughlakabad Delhi NCR
 
8447779800, Low rate Call girls in Uttam Nagar Delhi NCR
8447779800, Low rate Call girls in Uttam Nagar Delhi NCR8447779800, Low rate Call girls in Uttam Nagar Delhi NCR
8447779800, Low rate Call girls in Uttam Nagar Delhi NCR
 
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
8447779800, Low rate Call girls in Kotla Mubarakpur Delhi NCR
 
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
 
Innovation Conference 5th March 2024.pdf
Innovation Conference 5th March 2024.pdfInnovation Conference 5th March 2024.pdf
Innovation Conference 5th March 2024.pdf
 
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort ServiceCall US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
Call US-88OO1O2216 Call Girls In Mahipalpur Female Escort Service
 
FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607FULL ENJOY Call girls in Paharganj Delhi | 8377087607
FULL ENJOY Call girls in Paharganj Delhi | 8377087607
 
Annual General Meeting Presentation Slides
Annual General Meeting Presentation SlidesAnnual General Meeting Presentation Slides
Annual General Meeting Presentation Slides
 
Japan IT Week 2024 Brochure by 47Billion (English)
Japan IT Week 2024 Brochure by 47Billion (English)Japan IT Week 2024 Brochure by 47Billion (English)
Japan IT Week 2024 Brochure by 47Billion (English)
 
Kenya Coconut Production Presentation by Dr. Lalith Perera
Kenya Coconut Production Presentation by Dr. Lalith PereraKenya Coconut Production Presentation by Dr. Lalith Perera
Kenya Coconut Production Presentation by Dr. Lalith Perera
 
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City GurgaonCall Us 📲8800102216📞 Call Girls In DLF City Gurgaon
Call Us 📲8800102216📞 Call Girls In DLF City Gurgaon
 

Chef Cookbook Workflow Testing

  • 1. Chef Cookbook Workflow Testing your infrastructure code Alex Manly - @apmanly
  • 2. Instructor • Alex Manly • Solutions Architect, Chef • Developer (Java, oh and some Ruby) • @apmanly • am@chef.io
  • 3. What is Chef? Short Answer: An Automation Framework for automating infrastructure and applications
  • 5. Traditional Systems Management Config 1 Config 2 Config 3 Automation
  • 6. Idea of Services Service Config 1 Config 2 Config 3 Automation
  • 7. Abstraction of Services Service Config 1 Config 2 Config 3 Automation
  • 8. Chef is Infrastructure as Code •Programmatically provision and configure components http://www.flickr.com/photos/louisb/4555295187/
  • 9. Chef is Infrastructure as Code •Treat like any other code base http://www.flickr.com/photos/louisb/4555295187/
  • 10. Chef is Infrastructure as Code •Reconstruct business from code repository, data backup, and compute resources http://www.flickr.com/photos/louisb/4555295187/
  • 11. Chef is Infrastructure as Code •Programmatically provision and configure components •Treat like any other code base •Reconstruct business from code repository, data backup, and compute resources http://www.flickr.com/photos/louisb/4555295187/
  • 12.
  • 13. Building Blocks: What is a Resource? • A Resource is a system state you define Example: Package installed, state of a service, configuration file existing • You declare what state you want the resource in. Chef automatically determines HOW that state is achieved On Linux based OSes: On Windows based OSes:
  • 14. Resource Example #windows dsc_resource 'webserver' do resource :windowsfeature property :name, 'Web-Server' property :ensure, 'Present’ end
  • 15. Resource Example #linux package "httpd" do action :install end
  • 16. Building Blocks: What is a Recipe? • An abstraction of a Service that consists of a set of Resources to deliver that Service • Resources are executed in the order they are listed.
  • 17. Recipe Example #linux package "httpd" do action :install end include_recipe "apache::fwrules” service "httpd" do action [ :enable, :start ] end
  • 18. Recipe Example #windows include_recipe "fourthcoffee::dsc” include_recipe "iis::remove_default_site” remote_directory node['fourthcoffee']['install_path'] do source 'fourthcoffee’ action :create end iis_pool 'FourthCoffee' do runtime_version "4.0" action :add end iis_site 'FourthCoffee' do protocol :http port 80 path node['fourthcoffee']['install_path'] application_pool 'FourthCoffee' action [:add,:start] end
  • 19. Cookbooks • A Higher Level Abstraction of a Service • A set of Recipes and Data Attributes required to deliver one or multiple Services
  • 21. Consume cookbook attribute iis_site 'FourthCoffee' do protocol :http port node['fourthcoffee']['port'] path node['fourthcoffee']['install_path'] application_pool 'FourthCoffee' action [:add,:start] end
  • 22. Yes!
  • 23. That’s cool but… • Things break • Chef is a language (based on Ruby) • How can you rapidly develop recipes and cookbooks?
  • 25. Testing is Hard - FACT Manual Tests
  • 26. Also known as… You’ll never get to Continuous Deployment clicking a GUI
  • 28. Feedback loops… • Tell us we’re doing the right thing • At the right time • With the right results
  • 29. Feedback loops… Measurements we take to ensure the “experiment” is behaving as expected
  • 30. Tests are essentially feedback loops
  • 32. Remember… “Infrastructure as Code” should be treated like ANY other codebase.
  • 33. Treated Any Other Codebase… • Stored in SCM • Testing Coverage • Part of your CI pipelines
  • 34. Testing in Chef • Chef recipes need tested Linting Static Analysis Unit Testing Functional Testing
  • 35. DevOps is a Two-Way Street • It’s great when developers care about • Uptime! • Scaling! • Deployment! • Put them on call! etc. etc. etc.
  • 36. DevOps is a Two-Way Street • Operations also has as much or more to learn from developers as well
  • 37. Software Development Workflow • Write some code • <ad-hoc verification here> • Go to pre-production • <ad-hoc verification here> • Go to production • Production failure
  • 38. Software Development Workflow • Write some code • Write and run some unit tests • Go to pre-production • Run some integration/acceptance tests • Go to production • Lowered chance of production failure
  • 39. Old Chef Cookbook Workflow • Write some cookbook code • <ad-hoc verification here> • Go to pre-production • <ad-hoc verification here • Go to production • Whoops, broke production
  • 40. Chef Testing • Did chef-client complete successfully? • Did the recipe put the node in the desired state? • Are the resources properly defined? • Does the code following our style guide?
  • 41. New Chef Cookbook Workflow • Write some cookbook code • Check for code correctness • Write and run some unit tests • Go to pre-production • Run some integration tests • Go to production
  • 42. ChefDK: TDI In a Box Code Correctness Unit Tests Deploy sample environments A wrapper to tie it all together Not just syntactic correctness but quality gates too!
  • 43. Rubocop Because Ruby • Identify potential Ruby errors • Unclosed strings, etc. • Identify style/convention that helps write better code • Single quotes vs. double quotes • This is useful for new Chefs, and helps make the code more readable • Exclude rules that do not apply • Not everyone is the same – some tests won’t work for your organization or for Chef code • Run against static code, so tests are very fast (<5 seconds to run) Code Correctness
  • 44. Rubocop Example def badName if something test end end test.rb:1:5: C: Use snake_case for methods and variables. def badName ^^^^^^^ test.rb:2:3: C: Favor modifier if/unless usage when you have a single-line body. Another good alternative is the usage of control flow &&/||. if something ^^ test.rb:4:5: W: end at 4, 4 is not aligned with if at 2, 2 end ^^^ 1 file inspected, 3 offenses detected Code Correctness
  • 45. Food Critic Test Your “Chef Style” • Flag problems that might cause your Chef cookbooks to fail on converge FC010: Invalid search syntax • Identify style/convention that has been adopted by the Chef community FC004: Use a service resource to start and stop services • Create custom rules for your own organization’s compliance/standards COMP001: Do not allow recipes to mount disk volumes • Run against static code, so tests are very fast (<5 seconds to run) Code Correctness
  • 46. FoodCritic Examples • FC001: Use strings in preference to symbols to access node attributes • FC002: Avoid string interpolation where not required • FC003: Check whether you are running with chef server before using server- specific features • FC004: Use a service resource to start and stop services • FC005: Avoid repetition of resource declarations • FC006: Mode should be quoted or fully specified when setting file permissions • FC007: Ensure recipe dependencies are reflected in cookbook metadata Code Correctness
  • 47. ChefSpec Simulate Chef • Did I send a properly formed piece of code to Chef? • Especially important if there is mutability in your code • This can cover things like feature flags, or behavior that changes on a per-OS basis • "If on Debian-based Linux I need to install package apache2, but on EL variants I need to install package httpd.” • Tests are very fast to run • Even with simple code, it is useful for new Chefs to find simple errors quickly • Useful for regression testing – to make sure new changes don’t break stuff that worked before. Unit Tests
  • 48. ChefSpec Example require 'chefspec' describe 'example::default' do let(:chef_run) { ChefSpec::SoloRunner.converge(described_recipe) } let(:cheftest) { chef_run.node['cheftest'] } it 'installs foo' do expect(chef_run).to install_package('foo') end it 'sets the default attributes correctly' do expect(cheftest['package_name']).to eq('httpd') expect(cheftest['service_name']).to eq('httpd') expect(cheftest['web_root']).to eq('/var/www/html') end end Unit Tests
  • 49. Test Kitchen Let’s do this (almost) for real • “Signal Out” testing for Chef code • Just because I said something and it was interpreted correctly, doesn't mean that what I said is what I meant. • Executes your Chef code on an actual, factual node • These nodes should be disposable (local virtualization, cloud instances, etc.) • Use any number of “signal out” testing products to ensure expected results • BATS • ServerSpec • Pester • Can pull in other cookbook dependencies as well, and execute against a machine that looks the same as your standard image Deploy sample environments
  • 50. Test Kitchen it 'contains the default configuration settings' do file(File.join(node['chef_client']['conf_dir'], 'client.rb')).must_match('^chef_server_url') file(File.join(node['chef_client']['conf_dir'], 'client.rb')).must_match('^validation_client_name') end it 'should configure the server with a started webserver' do expect(service('httpd')).to be_running end it 'should configure the server with an enabled webserver' do expect(service('httpd')).to be_enabled end it 'should configure the server to listen on TCP port 80' do expect(port(80)).to be_listening end Deploy sample environments
  • 52. Chef Analytics Ensures Compliance Separation of concerns is a thing • If my tests are failing, I can just re-write the tests, right? • By using the Audit Mode of Chef Analytics in your pipeline, cookbooks have to pass your custom compliance rules in order to be published. • These are the same compliance rules that run against existing nodes, so you don’t need to write separate tests. • Compliance rules in Chef Analytics can (and should) be stored in a separate SCM repository than the code itself • Those who write the code, shouldn’t be able to write the rule check
  • 53. Process and Workflow Enforces Standards • Chef enforces appropriate checks are being made and standards are being enforced using FoodCritic. • This example will identify any code that tries to mount disk volumes. If code is identified, it will be audited and then workflow can control the action of this deviation to standards.
  • 54. Just because it’s published, doesn’t mean it’s used • Chef Environments should be constrained to specific cookbook versions • If my Production environment is constrained to version 1.0.1 of the “MyApp” cookbook, it will only use that version, even if a newer version is published to the Chef server • Incrementing the cookbook constraint can be done using your existing change control mechanisms and separation of duties • A well-constructed pipeline will never overwrite an existing version of a cookbook with new code/policy • BEST PRACTICE – have your pipeline auto-increment versions of cookbooks, tied to build numbers, to have traceability all the way back to your SCM
  • 57. Local Development Local Workstation master Clone Push Commit <USER>/<COOKBOOK>:master DevOps/<COOKBOOK>:master Fork
  • 58. Pipeline Shape We want to ensure that our changes are relevant and well tested before we deploy. Verify Review Accept Ship
  • 59. Verify Phase During the verify phase, we want to do basic testing to build confidence that our changes are sane and at the very least, won’t break the build process Verify Review Accept Ship
  • 61. Review Phase Two heads are better than one! Ask your team members to double check your work. Verify Review Accept Ship
  • 62. Accept Phase We need to test this in a production-like environment before we ship it. Verify Review Accept Ship
  • 64. Ship Phase The very last thing we need to do is start using the cookbook in our environments. Verify Review Accept Ship
  • 66. VALIDATED IN OUR ENGAGEMENTS WITH ENTERPRISE AND BIG WEB CUSTOMERS. WE'VE IDENTIFIED A PROVEN PIPELINE
  • 67. Steps manual automated Workstation Create New Change1 Test Change Locally2 Chef Delivery Approve Change5 Deliver Change6 Submit Change3 Review Change4 Stable Pipeline
  • 69. BUILD COOKBOOK ├── recipes ├── default.rb ├── lint.rb ├── syntax.rb ├── unit.rb ├── quality.rb ├── security.rb ├── publish.rb ├── provision.rb ├── deploy.rb ├── smoke.rb └── functional.rb
  • 70. PHASE EXEC log "Running unit" repo = node['delivery_builder']['repo'] delivery_builder_exec “run my junit tests" do command "mvn test" cwd repo end
  • 71. MANY ACCEPTANCE PIPELINES ONE DELIVERY PIPELINE
  • 72. ONE PIPELINE One Pipeline Delivery Pipeline union rehearsal delivered Acceptance Pipelines review approve deliverChange Cookbook [A] review approve deliverChange Cookbook [B] review approve deliverChange Application [A] review approve deliverChange Application [B] Infrastructure & Applications
  • 73. Cookbook Workflow Supermarket Chef Server review approve deliverChange Cookbook Node Node Node Node Node Node Node Node Node
  • 74. Application Workflow review approve deliverChange Application Node Node Node Node Node Node Node Node Node Deploy 1 2 3 2 2 3 3 3 3
  • 75. Chef Community Summit – London London, etc. Venues Monument – November 3rd & 4th Why your participation matters • Influence the path of the Chef roadmap • Contribute to the formation of best practices and the avenues to best share them • Share your experiences transforming your business • Demonstrate your DevOps Kung Fu Network with awesome engineers in the Community • Engage with a community of people actively using Chef to automate their workflow • Discuss “what keeps you up at night” with a passionate engaged audience • Meet with CHEF engineers IRL **Use the code MEETUP and save 20% http://summit.chef.io
  • 76. What Questions Can I Answer For You? Thank you! @apmanly