SlideShare a Scribd company logo
COOKIN’ UP SERVERS WITH CHEF
Chef is an automation platform that streamlines the tasks
of configuring machines. It also helps maintain the state
of those machines.
I am going to talk about the anatomy of Chef, show a
code example, show how code become a configuration
on a machine
CHEF ECOSYSTEM
The Chef Ecosystem has three main components. The
Chef DK, Chef Server and Clients.
The ChefDK is installed on a programmer’s workstation.
The Chef Server is an on premise server or a Chef
Managed instance.
Clients are the machines that you want Chef to configure.
CHEF DK
The Chef DK is used to create "Cookbooks" describing the
desired configuration a machine should be in. A
Cookbook contains “recipes”. Recipes are code files
written in Chef DSL based on Ruby.
CHEF DK
It is also used to create unit and integration tests to
ensure the recipe is functioning properly.
CHEF SERVER
The Chef Server is a hub for configuration data. Chef
server stores:
Cookbooks
Rules on how recipes are applied to clients
Meta data to describe each client configuration..
CHEF CLIENTS
Clients are computers - physical, virtual or cloud that are
managed by Chef. Each computer has the Chef Client
installed.
Chef Client is what does the configuring
It runs in the background periodically.
For each run it asks the Chef Server for recipes to
execute, executes them to bring the configuration of the
machine to its desired state
COOKBOOKS
Let’s take a deeper dive into the ChefDK
Chef DK is used to create cookbooks.
Cookbooks contain recipes related to each other
A cookbook has many parts, recipes, attributes,
environments, data_bags, Tests, libraries and custom
resources.
I am only going show you the most essential parts,
recipes and tests.
RECIPES
A recipe contains a set of resources that describe what
the state the machine should be. A resource is the
“thing” you configure on the machine.
Here is an example of a recipe that installs KanbanSim.
When the chef client runs this recipe, it will run the
resources in order.
RESOURCES
The first resource will create a directory “C:KanbanSim”.
The second resource will create a directory “C:Chef-
temp”.
RESOURCES
The remote_file resource will download the file in the
source attribute and save it as C:Chef-tempKanbanSim-
and-ScrumSim-v2.0.zip.
RESOURCES
The last resource will extract the zip file specified in the
source attribute to the location set in the path attribute.
TESTING COOKBOOKS
Testing Cookbooks – one of the perks of describing your
machine configuration as code is you can easily test it.
Chef offers a couple of ways to do this. ChefSpec and
InSpec.
TEST KITCHEN
You run the Inspec these tests in a tool called Test-
Kitchen
Test-Kitchen is a tool we used to run our cookbooks and
test on our developer workstations. Kitchen uses vagrant
+ VirtualBox to create a VM from a base image. Then runs
cookbooks and Inspec integration tests on the VM.
Kitchen is also used to run ChefSpec unit tests.
CHEFSPEC
ChefSpec
ChefSpec is a unit-testing framework for Chef. These tests
run on the Developer’s workstation. Here is an example:
TODO
INSPEC
InSpec is a compliance-testing framework. However, it
has also been adopted as an Integration Testing
framework for Cookbooks. These tests will run on the
client machine.
CHEF SERVER
Chef Server
The Chef server is a hub for configuration data. With Chef
Server you can:
Manage User Security
Manage Roles, which is a group of recipes. Roles are
assigned to Client “Node
The picture here shows a role called Jenkins_dotnet
with three recipes in the run list
Manage Client “Nodes”
View Reports about Chef client runs
CHEF SERVER
You can also view node run history. If there is a problem
the log is displayed in a nice readable format.
If I were to scroll down it would show me a stack trace
pointing to where in the recipe the run fail
The details will show me step by step what resources
were executed
The Run list will tell what roles and recipes I have in the
run list
CHEF WORKFLOW EXAMPLE
Ok let’s get out of the weeds a second and talk about what the
workflow would look like to get a server with KanbanSim
First I push the KanbanSim cookbook to git
Which kicks off a Jenkins Job
That downloads the code and runs my unit and integration tests
Once those pass then the Jenkins job will call a tool called knife
and upload the cookbooks
Then we can use knife to install chef client on a server and
assign that server a run list
Once Chef Client is installed then it will start to configure the
server.
Then the server will periodically perform a run and check in
with the Chef server
CHEF WORKFLOW EXAMPLE
Then the Jenkins job will call a tool called knife and
upload the cookbooks
Then we can use knife to install chef client on a server
and assign that server a run list
Once Chef Client is installed then it will start to configure
the server.
Then the server will periodically perform a run and check
in with the Chef server
AWESOME TELL ME MORE
• More info on Chef https://learn.chef.io/
• More info in Inspec see https://www.chef.io/inspec/
• Food Fight Show podcast http://foodfightshow.org/
• Slack Chef Community Channel http://community-slack.chef.io/
Chef has a bunch of tutorials online
The main use case for Inspec is compliance testing, which
I can see our FDA regulated customers interested in it
(cough)
Food fight show podcast will give you insights on features
you didn’t know existed and what is planned for the
future
Slack community channel seems pretty active, about
1500 members

More Related Content

What's hot

Introduction to chef
Introduction to chefIntroduction to chef
Introduction to chef
Damith Kothalawala
 
Server Installation and Configuration with Chef
Server Installation and Configuration with ChefServer Installation and Configuration with Chef
Server Installation and Configuration with Chef
Raimonds Simanovskis
 
Infrastructure as-code-guide-en-v6 299129
Infrastructure as-code-guide-en-v6 299129Infrastructure as-code-guide-en-v6 299129
Infrastructure as-code-guide-en-v6 299129
Ai K
 
Achieving DevOps Success with Chef Automate
Achieving DevOps Success with Chef AutomateAchieving DevOps Success with Chef Automate
Achieving DevOps Success with Chef Automate
Chef
 
Nike popup compliance workshop
Nike popup compliance workshopNike popup compliance workshop
Nike popup compliance workshop
Chef
 
Infrastructure Automation with Chef & Ansible
Infrastructure Automation with Chef & AnsibleInfrastructure Automation with Chef & Ansible
Infrastructure Automation with Chef & Ansible
wajrcs
 
Intermediate/Compliance training Guide
Intermediate/Compliance training GuideIntermediate/Compliance training Guide
Intermediate/Compliance training Guide
Chef
 
Chef for beginners module 1
Chef for beginners   module 1Chef for beginners   module 1
Chef for beginners module 1
Chef
 
Understand Chef
Understand ChefUnderstand Chef
Understand Chef
devopsjourney
 
Compliance Automation with Inspec Part 4
Compliance Automation with Inspec Part 4Compliance Automation with Inspec Part 4
Compliance Automation with Inspec Part 4
Chef
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
Knoldus Inc.
 
AWS November Webinar Series - Get Started with Automated Mobile Application T...
AWS November Webinar Series - Get Started with Automated Mobile Application T...AWS November Webinar Series - Get Started with Automated Mobile Application T...
AWS November Webinar Series - Get Started with Automated Mobile Application T...
Amazon Web Services
 
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
Dan Stine
 
Automating Infrastructure with Chef
Automating Infrastructure with ChefAutomating Infrastructure with Chef
Automating Infrastructure with Chef
Jennifer Davis
 
Compliance Automation with Inspec Part 2
Compliance Automation with Inspec Part 2Compliance Automation with Inspec Part 2
Compliance Automation with Inspec Part 2
Chef
 
Jenkins on Docker
Jenkins on DockerJenkins on Docker
Jenkins on Docker
Craig Trim
 
Chef for beginners module 5
Chef for beginners   module 5Chef for beginners   module 5
Chef for beginners module 5
Chef
 
Cucumber with appium
Cucumber with appiumCucumber with appium
Cucumber with appium
Raman Gowda Hullur
 
Continuous Integration Step by Step
Continuous Integration Step by StepContinuous Integration Step by Step
Continuous Integration Step by Step
Abhay Kumar
 
Chef for the Symfony developer
Chef for the Symfony developerChef for the Symfony developer
Chef for the Symfony developer
Carlos Mafla
 

What's hot (20)

Introduction to chef
Introduction to chefIntroduction to chef
Introduction to chef
 
Server Installation and Configuration with Chef
Server Installation and Configuration with ChefServer Installation and Configuration with Chef
Server Installation and Configuration with Chef
 
Infrastructure as-code-guide-en-v6 299129
Infrastructure as-code-guide-en-v6 299129Infrastructure as-code-guide-en-v6 299129
Infrastructure as-code-guide-en-v6 299129
 
Achieving DevOps Success with Chef Automate
Achieving DevOps Success with Chef AutomateAchieving DevOps Success with Chef Automate
Achieving DevOps Success with Chef Automate
 
Nike popup compliance workshop
Nike popup compliance workshopNike popup compliance workshop
Nike popup compliance workshop
 
Infrastructure Automation with Chef & Ansible
Infrastructure Automation with Chef & AnsibleInfrastructure Automation with Chef & Ansible
Infrastructure Automation with Chef & Ansible
 
Intermediate/Compliance training Guide
Intermediate/Compliance training GuideIntermediate/Compliance training Guide
Intermediate/Compliance training Guide
 
Chef for beginners module 1
Chef for beginners   module 1Chef for beginners   module 1
Chef for beginners module 1
 
Understand Chef
Understand ChefUnderstand Chef
Understand Chef
 
Compliance Automation with Inspec Part 4
Compliance Automation with Inspec Part 4Compliance Automation with Inspec Part 4
Compliance Automation with Inspec Part 4
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
 
AWS November Webinar Series - Get Started with Automated Mobile Application T...
AWS November Webinar Series - Get Started with Automated Mobile Application T...AWS November Webinar Series - Get Started with Automated Mobile Application T...
AWS November Webinar Series - Get Started with Automated Mobile Application T...
 
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
 
Automating Infrastructure with Chef
Automating Infrastructure with ChefAutomating Infrastructure with Chef
Automating Infrastructure with Chef
 
Compliance Automation with Inspec Part 2
Compliance Automation with Inspec Part 2Compliance Automation with Inspec Part 2
Compliance Automation with Inspec Part 2
 
Jenkins on Docker
Jenkins on DockerJenkins on Docker
Jenkins on Docker
 
Chef for beginners module 5
Chef for beginners   module 5Chef for beginners   module 5
Chef for beginners module 5
 
Cucumber with appium
Cucumber with appiumCucumber with appium
Cucumber with appium
 
Continuous Integration Step by Step
Continuous Integration Step by StepContinuous Integration Step by Step
Continuous Integration Step by Step
 
Chef for the Symfony developer
Chef for the Symfony developerChef for the Symfony developer
Chef for the Symfony developer
 

Viewers also liked

dealing with dependencies, taking your architecture to rehab
dealing with dependencies, taking your architecture to rehabdealing with dependencies, taking your architecture to rehab
dealing with dependencies, taking your architecture to rehab
Jon Fuller
 
Bibliografía
BibliografíaBibliografía
Bibliografía
Sérgio' Guillèn
 
Anel viario/Curva ruido atual-ago 2011
Anel viario/Curva ruido atual-ago 2011Anel viario/Curva ruido atual-ago 2011
Anel viario/Curva ruido atual-ago 2011
1962laura
 
BRT/EMDEC-plano operacional agosto 2015
BRT/EMDEC-plano operacional agosto 2015BRT/EMDEC-plano operacional agosto 2015
BRT/EMDEC-plano operacional agosto 2015
Lia Prado
 
Ugly fruits
Ugly fruitsUgly fruits
Anchin Construction & Development Forum Speaker Slides
Anchin Construction & Development Forum Speaker SlidesAnchin Construction & Development Forum Speaker Slides
Anchin Construction & Development Forum Speaker Slides
Ryan Slack
 
Stellar phoenix photo recovery v7.0 communication plan
Stellar phoenix photo recovery v7.0  communication planStellar phoenix photo recovery v7.0  communication plan
Stellar phoenix photo recovery v7.0 communication plan
Suganda Kapur
 
Declaração Brasileira contra a Corrupção
Declaração Brasileira contra a CorrupçãoDeclaração Brasileira contra a Corrupção
Declaração Brasileira contra a Corrupção
Ministério Público de Santa Catarina
 
коргина В.С.
коргина В.С.коргина В.С.
коргина В.С.
peshkova_anastasiya
 
4η σταυροφορια
4η σταυροφορια4η σταυροφορια
4η σταυροφορια
vana papaioannou
 
Técnica del Levantamiento de Pesas
Técnica del Levantamiento de PesasTécnica del Levantamiento de Pesas
Técnica del Levantamiento de Pesas
Luis Fernando Gonzalez Arango
 
презентация акция георгиевская лента
презентация акция георгиевская лентапрезентация акция георгиевская лента
презентация акция георгиевская лента
peshkova_anastasiya
 
Docker slides
Docker slidesDocker slides
Docker slides
Jyotsna Raghuraman
 
Transformación digital orientada a negocio: Vende más y vende mejor
Transformación digital orientada a negocio: Vende más y vende mejor Transformación digital orientada a negocio: Vende más y vende mejor
Transformación digital orientada a negocio: Vende más y vende mejor
Jon Barrena
 
Get Over It...Your Customers Don’t Care About You: Lenovo’s Intent- Driven Di...
Get Over It...Your Customers Don’t Care About You: Lenovo’s Intent- Driven Di...Get Over It...Your Customers Don’t Care About You: Lenovo’s Intent- Driven Di...
Get Over It...Your Customers Don’t Care About You: Lenovo’s Intent- Driven Di...
G3 Communications
 
Employer Branding: The Dennis Approach
Employer Branding: The Dennis ApproachEmployer Branding: The Dennis Approach
Employer Branding: The Dennis Approach
Adrian McDonagh
 
SEP DevOps Ignite Talk - Packer
SEP DevOps Ignite Talk - PackerSEP DevOps Ignite Talk - Packer
SEP DevOps Ignite Talk - Packer
Ryan Sweeney
 
macos installation automation
macos installation automationmacos installation automation
macos installation automation
Jon Fuller
 

Viewers also liked (18)

dealing with dependencies, taking your architecture to rehab
dealing with dependencies, taking your architecture to rehabdealing with dependencies, taking your architecture to rehab
dealing with dependencies, taking your architecture to rehab
 
Bibliografía
BibliografíaBibliografía
Bibliografía
 
Anel viario/Curva ruido atual-ago 2011
Anel viario/Curva ruido atual-ago 2011Anel viario/Curva ruido atual-ago 2011
Anel viario/Curva ruido atual-ago 2011
 
BRT/EMDEC-plano operacional agosto 2015
BRT/EMDEC-plano operacional agosto 2015BRT/EMDEC-plano operacional agosto 2015
BRT/EMDEC-plano operacional agosto 2015
 
Ugly fruits
Ugly fruitsUgly fruits
Ugly fruits
 
Anchin Construction & Development Forum Speaker Slides
Anchin Construction & Development Forum Speaker SlidesAnchin Construction & Development Forum Speaker Slides
Anchin Construction & Development Forum Speaker Slides
 
Stellar phoenix photo recovery v7.0 communication plan
Stellar phoenix photo recovery v7.0  communication planStellar phoenix photo recovery v7.0  communication plan
Stellar phoenix photo recovery v7.0 communication plan
 
Declaração Brasileira contra a Corrupção
Declaração Brasileira contra a CorrupçãoDeclaração Brasileira contra a Corrupção
Declaração Brasileira contra a Corrupção
 
коргина В.С.
коргина В.С.коргина В.С.
коргина В.С.
 
4η σταυροφορια
4η σταυροφορια4η σταυροφορια
4η σταυροφορια
 
Técnica del Levantamiento de Pesas
Técnica del Levantamiento de PesasTécnica del Levantamiento de Pesas
Técnica del Levantamiento de Pesas
 
презентация акция георгиевская лента
презентация акция георгиевская лентапрезентация акция георгиевская лента
презентация акция георгиевская лента
 
Docker slides
Docker slidesDocker slides
Docker slides
 
Transformación digital orientada a negocio: Vende más y vende mejor
Transformación digital orientada a negocio: Vende más y vende mejor Transformación digital orientada a negocio: Vende más y vende mejor
Transformación digital orientada a negocio: Vende más y vende mejor
 
Get Over It...Your Customers Don’t Care About You: Lenovo’s Intent- Driven Di...
Get Over It...Your Customers Don’t Care About You: Lenovo’s Intent- Driven Di...Get Over It...Your Customers Don’t Care About You: Lenovo’s Intent- Driven Di...
Get Over It...Your Customers Don’t Care About You: Lenovo’s Intent- Driven Di...
 
Employer Branding: The Dennis Approach
Employer Branding: The Dennis ApproachEmployer Branding: The Dennis Approach
Employer Branding: The Dennis Approach
 
SEP DevOps Ignite Talk - Packer
SEP DevOps Ignite Talk - PackerSEP DevOps Ignite Talk - Packer
SEP DevOps Ignite Talk - Packer
 
macos installation automation
macos installation automationmacos installation automation
macos installation automation
 

Similar to Ignite Talk on Chef

Cooking chef
Cooking chefCooking chef
Cooking chef
ranjithar92
 
Announcing AWS OpsWorks for Chef Automate - January 2017 AWS Online Tech Talks
Announcing AWS OpsWorks for Chef Automate - January 2017 AWS Online Tech TalksAnnouncing AWS OpsWorks for Chef Automate - January 2017 AWS Online Tech Talks
Announcing AWS OpsWorks for Chef Automate - January 2017 AWS Online Tech Talks
Amazon Web Services
 
AWS OpsWorks for Chef Automate
AWS OpsWorks for Chef AutomateAWS OpsWorks for Chef Automate
AWS OpsWorks for Chef Automate
Amazon Web Services
 
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
ChefChef
Learning chef
Learning chefLearning chef
Learning chef
Jonathan Carrillo
 
What is Test Kitchen
What is Test KitchenWhat is Test Kitchen
What is Test Kitchen
Benoit Caron
 
Introduction to OpsWorks for Chef Automate
Introduction to OpsWorks for Chef AutomateIntroduction to OpsWorks for Chef Automate
Introduction to OpsWorks for Chef Automate
Amazon 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 Code
Josh Padnick
 
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
Amazon Web Services
 
2015 08-11-scdo-meetup
2015 08-11-scdo-meetup2015 08-11-scdo-meetup
2015 08-11-scdo-meetup
Suresh Paulraj
 
Introducing Chef | An IT automation for speed and awesomeness
Introducing Chef | An IT automation for speed and awesomenessIntroducing Chef | An IT automation for speed and awesomeness
Introducing Chef | An IT automation for speed and awesomeness
Ramit Surana
 
Automating your infrastructure with Chef
Automating your infrastructure with ChefAutomating your infrastructure with Chef
Automating your infrastructure with Chef
John Ewart
 
Chef: Smart infrastructure automation
Chef: Smart infrastructure automationChef: Smart infrastructure automation
Chef: Smart infrastructure automation
Johannes H. P. Skov Frandsen
 
AWS OpsWorks Under the Hood (DMG304) | AWS re:Invent 2013
AWS OpsWorks Under the Hood (DMG304) | AWS re:Invent 2013AWS OpsWorks Under the Hood (DMG304) | AWS re:Invent 2013
AWS OpsWorks Under the Hood (DMG304) | AWS re:Invent 2013
Amazon Web Services
 
Understand AWS OpsWorks - A DevOps Tool from AWS
Understand AWS OpsWorks - A DevOps Tool from AWSUnderstand AWS OpsWorks - A DevOps Tool from AWS
Understand AWS OpsWorks - A DevOps Tool from AWS
devopsjourney
 
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
decode2016
 
Introduction to chef
Introduction to chefIntroduction to chef
Introduction to chef
Krishna Kishore
 
Cook Infrastructure with chef -- Justeat.IN
Cook Infrastructure with chef  -- Justeat.INCook Infrastructure with chef  -- Justeat.IN
Cook Infrastructure with chef -- Justeat.IN
Rajesh Hegde
 
Chef advance
Chef advanceChef advance
Chef advance
Ramesh Sencha
 

Similar to Ignite Talk on Chef (20)

Cooking chef
Cooking chefCooking chef
Cooking chef
 
Announcing AWS OpsWorks for Chef Automate - January 2017 AWS Online Tech Talks
Announcing AWS OpsWorks for Chef Automate - January 2017 AWS Online Tech TalksAnnouncing AWS OpsWorks for Chef Automate - January 2017 AWS Online Tech Talks
Announcing AWS OpsWorks for Chef Automate - January 2017 AWS Online Tech Talks
 
AWS OpsWorks for Chef Automate
AWS OpsWorks for Chef AutomateAWS OpsWorks for Chef Automate
AWS OpsWorks for Chef Automate
 
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
ChefChef
Chef
 
Learning chef
Learning chefLearning chef
Learning chef
 
What is Test Kitchen
What is Test KitchenWhat is Test Kitchen
What is Test Kitchen
 
Introduction to OpsWorks for Chef Automate
Introduction to OpsWorks for Chef AutomateIntroduction to OpsWorks for Chef Automate
Introduction to OpsWorks for Chef Automate
 
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
 
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
 
2015 08-11-scdo-meetup
2015 08-11-scdo-meetup2015 08-11-scdo-meetup
2015 08-11-scdo-meetup
 
Introducing Chef | An IT automation for speed and awesomeness
Introducing Chef | An IT automation for speed and awesomenessIntroducing Chef | An IT automation for speed and awesomeness
Introducing Chef | An IT automation for speed and awesomeness
 
Automating your infrastructure with Chef
Automating your infrastructure with ChefAutomating your infrastructure with Chef
Automating your infrastructure with Chef
 
Chef: Smart infrastructure automation
Chef: Smart infrastructure automationChef: Smart infrastructure automation
Chef: Smart infrastructure automation
 
AWS OpsWorks Under the Hood (DMG304) | AWS re:Invent 2013
AWS OpsWorks Under the Hood (DMG304) | AWS re:Invent 2013AWS OpsWorks Under the Hood (DMG304) | AWS re:Invent 2013
AWS OpsWorks Under the Hood (DMG304) | AWS re:Invent 2013
 
Understand AWS OpsWorks - A DevOps Tool from AWS
Understand AWS OpsWorks - A DevOps Tool from AWSUnderstand AWS OpsWorks - A DevOps Tool from AWS
Understand AWS OpsWorks - A DevOps Tool from AWS
 
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
Introduction to chefIntroduction to chef
Introduction to chef
 
Cook Infrastructure with chef -- Justeat.IN
Cook Infrastructure with chef  -- Justeat.INCook Infrastructure with chef  -- Justeat.IN
Cook Infrastructure with chef -- Justeat.IN
 
Chef advance
Chef advanceChef advance
Chef advance
 

Recently uploaded

A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
kalichargn70th171
 
Kubernetes at Scale: Going Multi-Cluster with Istio
Kubernetes at Scale:  Going Multi-Cluster  with IstioKubernetes at Scale:  Going Multi-Cluster  with Istio
Kubernetes at Scale: Going Multi-Cluster with Istio
Severalnines
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
dakas1
 
The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024
Yara Milbes
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
Tier1 app
 
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptxOperational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
sandeepmenon62
 
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
The Third Creative Media
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Julian Hyde
 
Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...
Paul Brebner
 
ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.
Maitrey Patel
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
Grant Fritchey
 
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
kalichargn70th171
 
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
ervikas4
 
Orca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container OrchestrationOrca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container Orchestration
Pedro J. Molina
 
42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert
vaishalijagtap12
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
sjcobrien
 
What’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete RoadmapWhat’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete Roadmap
Envertis Software Solutions
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
safelyiotech
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
brainerhub1
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
Alberto Brandolini
 

Recently uploaded (20)

A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
A Comprehensive Guide on Implementing Real-World Mobile Testing Strategies fo...
 
Kubernetes at Scale: Going Multi-Cluster with Istio
Kubernetes at Scale:  Going Multi-Cluster  with IstioKubernetes at Scale:  Going Multi-Cluster  with Istio
Kubernetes at Scale: Going Multi-Cluster with Istio
 
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
一比一原版(UMN毕业证)明尼苏达大学毕业证如何办理
 
The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024The Rising Future of CPaaS in the Middle East 2024
The Rising Future of CPaaS in the Middle East 2024
 
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSISDECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
DECODING JAVA THREAD DUMPS: MASTER THE ART OF ANALYSIS
 
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptxOperational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
Operational ease MuleSoft and Salesforce Service Cloud Solution v1.0.pptx
 
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
Unlock the Secrets to Effortless Video Creation with Invideo: Your Ultimate G...
 
Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)Measures in SQL (SIGMOD 2024, Santiago, Chile)
Measures in SQL (SIGMOD 2024, Santiago, Chile)
 
Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...Superpower Your Apache Kafka Applications Development with Complementary Open...
Superpower Your Apache Kafka Applications Development with Complementary Open...
 
ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.ACE - Team 24 Wrapup event at ahmedabad.
ACE - Team 24 Wrapup event at ahmedabad.
 
Using Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query PerformanceUsing Query Store in Azure PostgreSQL to Understand Query Performance
Using Query Store in Azure PostgreSQL to Understand Query Performance
 
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
The Power of Visual Regression Testing_ Why It Is Critical for Enterprise App...
 
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptxMigration From CH 1.0 to CH 2.0 and  Mule 4.6 & Java 17 Upgrade.pptx
Migration From CH 1.0 to CH 2.0 and Mule 4.6 & Java 17 Upgrade.pptx
 
Orca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container OrchestrationOrca: Nocode Graphical Editor for Container Orchestration
Orca: Nocode Graphical Editor for Container Orchestration
 
42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert42 Ways to Generate Real Estate Leads - Sellxpert
42 Ways to Generate Real Estate Leads - Sellxpert
 
Malibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed RoundMalibou Pitch Deck For Its €3M Seed Round
Malibou Pitch Deck For Its €3M Seed Round
 
What’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete RoadmapWhat’s New in Odoo 17 – A Complete Roadmap
What’s New in Odoo 17 – A Complete Roadmap
 
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
Safelyio Toolbox Talk Softwate & App (How To Digitize Safety Meetings)
 
Unveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdfUnveiling the Advantages of Agile Software Development.pdf
Unveiling the Advantages of Agile Software Development.pdf
 
Modelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - AmsterdamModelling Up - DDDEurope 2024 - Amsterdam
Modelling Up - DDDEurope 2024 - Amsterdam
 

Ignite Talk on Chef

  • 1. COOKIN’ UP SERVERS WITH CHEF Chef is an automation platform that streamlines the tasks of configuring machines. It also helps maintain the state of those machines. I am going to talk about the anatomy of Chef, show a code example, show how code become a configuration on a machine
  • 2. CHEF ECOSYSTEM The Chef Ecosystem has three main components. The Chef DK, Chef Server and Clients. The ChefDK is installed on a programmer’s workstation. The Chef Server is an on premise server or a Chef Managed instance. Clients are the machines that you want Chef to configure.
  • 3. CHEF DK The Chef DK is used to create "Cookbooks" describing the desired configuration a machine should be in. A Cookbook contains “recipes”. Recipes are code files written in Chef DSL based on Ruby.
  • 4. CHEF DK It is also used to create unit and integration tests to ensure the recipe is functioning properly.
  • 5. CHEF SERVER The Chef Server is a hub for configuration data. Chef server stores: Cookbooks Rules on how recipes are applied to clients Meta data to describe each client configuration..
  • 6. CHEF CLIENTS Clients are computers - physical, virtual or cloud that are managed by Chef. Each computer has the Chef Client installed. Chef Client is what does the configuring It runs in the background periodically. For each run it asks the Chef Server for recipes to execute, executes them to bring the configuration of the machine to its desired state
  • 7. COOKBOOKS Let’s take a deeper dive into the ChefDK Chef DK is used to create cookbooks. Cookbooks contain recipes related to each other A cookbook has many parts, recipes, attributes, environments, data_bags, Tests, libraries and custom resources. I am only going show you the most essential parts, recipes and tests.
  • 8. RECIPES A recipe contains a set of resources that describe what the state the machine should be. A resource is the “thing” you configure on the machine. Here is an example of a recipe that installs KanbanSim. When the chef client runs this recipe, it will run the resources in order.
  • 9. RESOURCES The first resource will create a directory “C:KanbanSim”. The second resource will create a directory “C:Chef- temp”.
  • 10. RESOURCES The remote_file resource will download the file in the source attribute and save it as C:Chef-tempKanbanSim- and-ScrumSim-v2.0.zip.
  • 11. RESOURCES The last resource will extract the zip file specified in the source attribute to the location set in the path attribute.
  • 12. TESTING COOKBOOKS Testing Cookbooks – one of the perks of describing your machine configuration as code is you can easily test it. Chef offers a couple of ways to do this. ChefSpec and InSpec.
  • 13. TEST KITCHEN You run the Inspec these tests in a tool called Test- Kitchen Test-Kitchen is a tool we used to run our cookbooks and test on our developer workstations. Kitchen uses vagrant + VirtualBox to create a VM from a base image. Then runs cookbooks and Inspec integration tests on the VM. Kitchen is also used to run ChefSpec unit tests.
  • 14. CHEFSPEC ChefSpec ChefSpec is a unit-testing framework for Chef. These tests run on the Developer’s workstation. Here is an example: TODO
  • 15. INSPEC InSpec is a compliance-testing framework. However, it has also been adopted as an Integration Testing framework for Cookbooks. These tests will run on the client machine.
  • 16. CHEF SERVER Chef Server The Chef server is a hub for configuration data. With Chef Server you can: Manage User Security Manage Roles, which is a group of recipes. Roles are assigned to Client “Node The picture here shows a role called Jenkins_dotnet with three recipes in the run list Manage Client “Nodes” View Reports about Chef client runs
  • 17. CHEF SERVER You can also view node run history. If there is a problem the log is displayed in a nice readable format. If I were to scroll down it would show me a stack trace pointing to where in the recipe the run fail The details will show me step by step what resources were executed The Run list will tell what roles and recipes I have in the run list
  • 18. CHEF WORKFLOW EXAMPLE Ok let’s get out of the weeds a second and talk about what the workflow would look like to get a server with KanbanSim First I push the KanbanSim cookbook to git Which kicks off a Jenkins Job That downloads the code and runs my unit and integration tests Once those pass then the Jenkins job will call a tool called knife and upload the cookbooks Then we can use knife to install chef client on a server and assign that server a run list Once Chef Client is installed then it will start to configure the server. Then the server will periodically perform a run and check in with the Chef server
  • 19. CHEF WORKFLOW EXAMPLE Then the Jenkins job will call a tool called knife and upload the cookbooks Then we can use knife to install chef client on a server and assign that server a run list Once Chef Client is installed then it will start to configure the server. Then the server will periodically perform a run and check in with the Chef server
  • 20. AWESOME TELL ME MORE • More info on Chef https://learn.chef.io/ • More info in Inspec see https://www.chef.io/inspec/ • Food Fight Show podcast http://foodfightshow.org/ • Slack Chef Community Channel http://community-slack.chef.io/ Chef has a bunch of tutorials online The main use case for Inspec is compliance testing, which I can see our FDA regulated customers interested in it (cough) Food fight show podcast will give you insights on features you didn’t know existed and what is planned for the future Slack community channel seems pretty active, about 1500 members