SlideShare une entreprise Scribd logo
1  sur  16
Télécharger pour lire hors ligne
Chef
In a Nutshell
Chef?

● Thick Clients, Thin Server
● Order Matters
● Ruby
● Chef Solo
● OHAI
● Knife
Chef Server Architecture
Chef Components

● Chef Client
   ○ Public/Private key
   ○ Machines/Humans
● Chef Node
● Chef Indexer
   ○ RabbitMQ
   ○ Chef Expander/SOLR
● Chef Server
   ○ CouchDB
   ○ Web Interface
   ○ REST API
● Chef Solo
   ○ Vagrant - development and tests
Cooking with Chef

● Nodes
  ○ Roles
  ○ Cookbooks
  ○ Recipes
  ○ Resources
● Environment
● Data bags (JSON)
Anatomy of a Chef Run
Anatomy of a Chef Run

● Build, Register, and Authenticate the Node
   ○ OHAI
   ○ chef-validator
   ○ client.pem
● Synchronize Cookbooks
   ○ Libraries
   ○ Attributes
   ○ Definitions
   ○ Recipes
Anatomy of a Chef Run

● Compile Resource Collection
   ○ Load Libraries
   ○ Load Attributes
   ○ Load Definitions
   ○ Load Recipes
● Configure Node
   ○ Converge
   ○ Save Node
   ○ Run Notifications
OHAI

● Gem
● Windows
● Standalone
● Ruby library
● Plugins
Chef Basics
● Node
   ○ Run List
      ■ Recipe
      ■ Role (Ruby/JSON)
   ○ Attributes
   ○ Tags
● Data Bags
   ○ JSON
   ○ Search
   ○ Encrypte
● Search
Chef Basics
 ● Cookbooks
    ○ Recipe
    ○ Resources
       ■ Deploy
       ■ AWS
       ■ Dynect
       ■ Gem, PyPi e PEAR
    ○ Metadata
    ○ Providers
       ■ LWRP
    ○ Search
    ○ Exception and Report Handler
Cookbooks

● Version
● Library
   ○ Ruby code
● Metadata
   ○ name
   ○ version
   ○ depends/conflicts/replaces
   ○ supports
● Templates
   ○ ERB
Cookbooks

 ● Attributes
    ○ override
    ○ normal
    ○ default
 ● Definitions
 ● File Distribution
 ● Recipes
    ○ include
    ○ search
    ○ data bags
    ○ tag
Managing Chef

● Knife
   ○ Bootstrap
   ○ Exec
       ■ SSH
   ○ Plugin
       ■ Windows
          ■ knife-windows
          ■ Windows Remote Management
          ■ PowerShell
       ■ EC2/Rackspace/Slicehost/Terremark
● Shef
   ○ irb
Workflow
 ● Environments
 ● Freeze
 ● Metadata version

Development
 1. Bump the version number as appropriate
 2. Hack
 3. Upload and test
 4. Repeat 2 and 3 as necessary

Production
 1. Upload and freeze your cookbooks
 2. Modify your environment to prefer the new version you uploaded
 3. Upload the updated environment
 4. Deploy
Links

Opscode Platform "The first five nodes are free!"

Opscode Wiki

A Brief Chef Tutorial

Example Cookbooks:

http://github.com/opscode/cookbooks

http://github.com/37signals/37s_cookbooks

http://github.com/engineyard/ey-cloud-recipes

Contenu connexe

Tendances

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
Chef Software, Inc.
 

Tendances (20)

Automating Infrastructure with Chef
Automating Infrastructure with ChefAutomating Infrastructure with Chef
Automating Infrastructure with Chef
 
Infrastructure modeling with chef
Infrastructure modeling with chefInfrastructure modeling with chef
Infrastructure modeling with chef
 
Inside the Chef Push Jobs Service - ChefConf 2015
Inside the Chef Push Jobs Service - ChefConf 2015 Inside the Chef Push Jobs Service - ChefConf 2015
Inside the Chef Push Jobs Service - ChefConf 2015
 
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
 
Opscode Webinar: Managing Your VMware Infrastructure with Chef
Opscode Webinar: Managing Your VMware Infrastructure with ChefOpscode Webinar: Managing Your VMware Infrastructure with Chef
Opscode Webinar: Managing Your VMware Infrastructure with Chef
 
Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015Introduction to Chef - April 22 2015
Introduction to Chef - April 22 2015
 
Introduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen SummitIntroduction to Chef - Techsuperwomen Summit
Introduction to Chef - Techsuperwomen Summit
 
Chef: Smart infrastructure automation
Chef: Smart infrastructure automationChef: Smart infrastructure automation
Chef: Smart infrastructure automation
 
Push jobs: an orchestration building block for private Chef
Push jobs: an orchestration building block for private ChefPush jobs: an orchestration building block for private Chef
Push jobs: an orchestration building block for private Chef
 
How to Write Chef Cookbook
How to Write Chef CookbookHow to Write Chef Cookbook
How to Write Chef Cookbook
 
Infrastructure Automation with Chef
Infrastructure Automation with ChefInfrastructure Automation with Chef
Infrastructure Automation with Chef
 
Test-Driven Infrastructure with Chef
Test-Driven Infrastructure with ChefTest-Driven Infrastructure with Chef
Test-Driven Infrastructure with Chef
 
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
 
Chef Tutorial for DEVOPS Newbies
Chef Tutorial for DEVOPS NewbiesChef Tutorial for DEVOPS Newbies
Chef Tutorial for DEVOPS Newbies
 
Learning chef
Learning chefLearning chef
Learning chef
 
Chef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation SetupChef Fundamentals Training Series Module 2: Workstation Setup
Chef Fundamentals Training Series Module 2: Workstation Setup
 
Understand Chef
Understand ChefUnderstand Chef
Understand Chef
 
Introduction to chef
Introduction to chefIntroduction to chef
Introduction to chef
 
Cooking with Chef
Cooking with ChefCooking with Chef
Cooking with Chef
 
Docker
DockerDocker
Docker
 

Similaire à Chef in a nutshell

NODE JS OC Meetup 1
NODE JS OC Meetup 1NODE JS OC Meetup 1
NODE JS OC Meetup 1
eddify
 
Who needs containers in a serverless world
Who needs containers in a serverless worldWho needs containers in a serverless world
Who needs containers in a serverless world
Matthias Luebken
 

Similaire à Chef in a nutshell (20)

Clusternaut: Orchestrating  Percona XtraDB Cluster with Kubernetes
Clusternaut:  Orchestrating  Percona XtraDB Cluster with KubernetesClusternaut:  Orchestrating  Percona XtraDB Cluster with Kubernetes
Clusternaut: Orchestrating  Percona XtraDB Cluster with Kubernetes
 
Introduction to Docker Compose
Introduction to Docker ComposeIntroduction to Docker Compose
Introduction to Docker Compose
 
2016-01-16 03 Денис Нелюбин. How to test a million
2016-01-16 03 Денис Нелюбин. How to test a million2016-01-16 03 Денис Нелюбин. How to test a million
2016-01-16 03 Денис Нелюбин. How to test a million
 
Chef - Administration for programmers
Chef - Administration for programmersChef - Administration for programmers
Chef - Administration for programmers
 
Dive into Chef
Dive into ChefDive into Chef
Dive into Chef
 
OpenSearch.pdf
OpenSearch.pdfOpenSearch.pdf
OpenSearch.pdf
 
Silverstripe at scale - design & architecture for silverstripe applications
Silverstripe at scale - design & architecture for silverstripe applicationsSilverstripe at scale - design & architecture for silverstripe applications
Silverstripe at scale - design & architecture for silverstripe applications
 
Don't Code, Bake. An introduction to CakePHP ~PHP Hampshire Oct 2014
Don't Code, Bake. An introduction to CakePHP ~PHP Hampshire Oct 2014Don't Code, Bake. An introduction to CakePHP ~PHP Hampshire Oct 2014
Don't Code, Bake. An introduction to CakePHP ~PHP Hampshire Oct 2014
 
Aws Developer Associate Overview
Aws Developer Associate OverviewAws Developer Associate Overview
Aws Developer Associate Overview
 
Real-time analytics with Druid at Appsflyer
Real-time analytics with Druid at AppsflyerReal-time analytics with Druid at Appsflyer
Real-time analytics with Druid at Appsflyer
 
hbaseconasia2017: hbase-2.0.0
hbaseconasia2017: hbase-2.0.0hbaseconasia2017: hbase-2.0.0
hbaseconasia2017: hbase-2.0.0
 
NODE JS OC Meetup 1
NODE JS OC Meetup 1NODE JS OC Meetup 1
NODE JS OC Meetup 1
 
Tools and libraries for common problems (Early Draft)
Tools and libraries for common problems (Early Draft)Tools and libraries for common problems (Early Draft)
Tools and libraries for common problems (Early Draft)
 
OSDC 2017 - Dr. Udo Seidel - VMwares (open source) Way of Container
OSDC 2017 - Dr. Udo Seidel - VMwares (open source) Way of ContainerOSDC 2017 - Dr. Udo Seidel - VMwares (open source) Way of Container
OSDC 2017 - Dr. Udo Seidel - VMwares (open source) Way of Container
 
OSDC 2017 | VMware's (Open Source) way of Container by Dr. Udo Seidel
OSDC 2017 | VMware's (Open Source) way of Container by Dr. Udo SeidelOSDC 2017 | VMware's (Open Source) way of Container by Dr. Udo Seidel
OSDC 2017 | VMware's (Open Source) way of Container by Dr. Udo Seidel
 
Running Containerized Node.js Services on AWS Elastic Beanstalk
Running Containerized Node.js Services on AWS Elastic BeanstalkRunning Containerized Node.js Services on AWS Elastic Beanstalk
Running Containerized Node.js Services on AWS Elastic Beanstalk
 
Who needs containers in a serverless world
Who needs containers in a serverless worldWho needs containers in a serverless world
Who needs containers in a serverless world
 
In a Nutshell: Rancher
In a Nutshell: RancherIn a Nutshell: Rancher
In a Nutshell: Rancher
 
SCALE12X: Chef for OpenStack
SCALE12X: Chef for OpenStackSCALE12X: Chef for OpenStack
SCALE12X: Chef for OpenStack
 
Let's Code our Infrastructure!
Let's Code our Infrastructure!Let's Code our Infrastructure!
Let's Code our Infrastructure!
 

Plus de Roberto Gaiser (7)

Inter Dev Ops Conf 2016 - IaaS behind the scenes
Inter Dev Ops Conf 2016 - IaaS behind the scenesInter Dev Ops Conf 2016 - IaaS behind the scenes
Inter Dev Ops Conf 2016 - IaaS behind the scenes
 
WeOp - The Operations Summit
WeOp - The Operations SummitWeOp - The Operations Summit
WeOp - The Operations Summit
 
AWS RDS Benchmark - Instance comparison
AWS RDS Benchmark - Instance comparisonAWS RDS Benchmark - Instance comparison
AWS RDS Benchmark - Instance comparison
 
R7 no AWS - Qcon SP 2011
R7 no AWS - Qcon SP 2011R7 no AWS - Qcon SP 2011
R7 no AWS - Qcon SP 2011
 
Amazon Web Services - Ignite SP
Amazon Web Services - Ignite SPAmazon Web Services - Ignite SP
Amazon Web Services - Ignite SP
 
Dev vs. Ops
Dev vs. OpsDev vs. Ops
Dev vs. Ops
 
Itil for failers
Itil for failersItil for failers
Itil for failers
 

Dernier

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Victor Rentea
 

Dernier (20)

EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 AmsterdamDEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
DEV meet-up UiPath Document Understanding May 7 2024 Amsterdam
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 

Chef in a nutshell

  • 2. Chef? ● Thick Clients, Thin Server ● Order Matters ● Ruby ● Chef Solo ● OHAI ● Knife
  • 4. Chef Components ● Chef Client ○ Public/Private key ○ Machines/Humans ● Chef Node ● Chef Indexer ○ RabbitMQ ○ Chef Expander/SOLR ● Chef Server ○ CouchDB ○ Web Interface ○ REST API ● Chef Solo ○ Vagrant - development and tests
  • 5. Cooking with Chef ● Nodes ○ Roles ○ Cookbooks ○ Recipes ○ Resources ● Environment ● Data bags (JSON)
  • 6. Anatomy of a Chef Run
  • 7. Anatomy of a Chef Run ● Build, Register, and Authenticate the Node ○ OHAI ○ chef-validator ○ client.pem ● Synchronize Cookbooks ○ Libraries ○ Attributes ○ Definitions ○ Recipes
  • 8. Anatomy of a Chef Run ● Compile Resource Collection ○ Load Libraries ○ Load Attributes ○ Load Definitions ○ Load Recipes ● Configure Node ○ Converge ○ Save Node ○ Run Notifications
  • 9. OHAI ● Gem ● Windows ● Standalone ● Ruby library ● Plugins
  • 10. Chef Basics ● Node ○ Run List ■ Recipe ■ Role (Ruby/JSON) ○ Attributes ○ Tags ● Data Bags ○ JSON ○ Search ○ Encrypte ● Search
  • 11. Chef Basics ● Cookbooks ○ Recipe ○ Resources ■ Deploy ■ AWS ■ Dynect ■ Gem, PyPi e PEAR ○ Metadata ○ Providers ■ LWRP ○ Search ○ Exception and Report Handler
  • 12. Cookbooks ● Version ● Library ○ Ruby code ● Metadata ○ name ○ version ○ depends/conflicts/replaces ○ supports ● Templates ○ ERB
  • 13. Cookbooks ● Attributes ○ override ○ normal ○ default ● Definitions ● File Distribution ● Recipes ○ include ○ search ○ data bags ○ tag
  • 14. Managing Chef ● Knife ○ Bootstrap ○ Exec ■ SSH ○ Plugin ■ Windows ■ knife-windows ■ Windows Remote Management ■ PowerShell ■ EC2/Rackspace/Slicehost/Terremark ● Shef ○ irb
  • 15. Workflow ● Environments ● Freeze ● Metadata version Development 1. Bump the version number as appropriate 2. Hack 3. Upload and test 4. Repeat 2 and 3 as necessary Production 1. Upload and freeze your cookbooks 2. Modify your environment to prefer the new version you uploaded 3. Upload the updated environment 4. Deploy
  • 16. Links Opscode Platform "The first five nodes are free!" Opscode Wiki A Brief Chef Tutorial Example Cookbooks: http://github.com/opscode/cookbooks http://github.com/37signals/37s_cookbooks http://github.com/engineyard/ey-cloud-recipes