SlideShare ist ein Scribd-Unternehmen logo
1 von 39
Fresh New Chef Stuff
Thom May & Tim Smith - Community Engineering
Chef Year in Review
10 chef client releases
7 chef server releases
13 ohai releases
7,000+ commits across chef
projects!
7,000+ more in chef managed
community cookbooks!
- apt_update
- apt_repository
- yum_repository
- systemd_unit
- chocolatey_package
- cab_package
- launchd
- osx_profile
- ksh
New Chef Resources
- shard
- machineid
- hostnamectl
- shells
- hardware
- time
- fips
- scala
- sessions
- packages
New Ohai Plugins
Do yourself a favour and upgrade!
Let’s jump into some new stuff!
Custom Resources
Custom resources are reusable Chef
resources you define within your
cookbooks that make it easy to automate
repetitive tasks within your organization’s
cookbooks
Custom resources build on the
foundations of Lightweight Resource
Providers (LWRPs) with powerful new
functionality and a simpler DSL
Custom Resources
• Introduced in Chef 12.5
• Compatible with Chef 12.1+ using the compat_resource cookbook
• Build on years of LWRP experience and development
Improvements compared to LWRPs
• Everything is defined in a single file
• Greatly simplified DSL
• New DSL for supporting multiple platforms / platform versions
• “Just works” out of the box
resources/myapp.rb file:
actions :create
default_action :create
attribute :name, kind_of: String, name_attribute: true
attribute :app_name, kind_of: String, default: 'default_app'
providers/myapp.rb file:
use_inline_resources
def whyrun_supported?
true
end
action :create do
template '/some/web/app/config' do
owner 'root'
group 'root'
variables(app_name: new_resource.app_name)
notifies :restart, 'service[apache2]'
end
service 'apache2' do
action :nothing
end
end
resources/myapp.rb file:
property :name, String, name_attribute: true
property :app_name, String, default: 'default_app'
action :create do
template '/some/web/app/config' do
owner 'root'
group 'root'
variables(app_name: new_resource.app_name)
notifies :restart, 'service[apache2]'
end
end
Simplified DSL in Action:
Fresh New Chef Stuff Episode 1:
Custom Resources Youtube Video
http://bit.ly/2dqpMJg
Chef Solo
Chef Solo now uses the same technology
as Chef Client Local Mode
Editing and Deleting Resources
The Chef Rewind extension is no longer
required - Chef 12.10 and later.
Delete
Previously:
chef_gem "chef-rewind"
require 'chef/rewind'
unwind "user[postgres]"
Now:
delete_resource(:user,”postgres")
Edit
Previously:
chef_gem "chef-rewind"
require 'chef/rewind'
rewind “user[postgres]" do
home “/var/lib/postgres”
end
Now:
edit_resource!(:user,”postgres”) do
home “/var/lib/postgres”
end
Built in Apt/Yum resources
name "my_cookbook"
maintainer "Me"
maintainer_email "me@gmail.com"
license "Apache 2.0"
version "1.0.0"
depends "apt"
depends "yum"
Prep Debian / Ubuntu package cache
apt_update "Update Please"
include_recipe "apt::default"
Setup package repositories
apt_repository "OurCo" do
uri "http://artifacts.ourco.org/ubuntu/something"
action :true
components ["main"]
end
yum_repository "OurCo" do
description "OurCo Yum repository"
mirrorlist "http://artifacts.ourco.org/mirrorlist?repo=ourco-6&arch=$basearch
gpgkey "http://artifacts.ourco.org/pub/yum/RPM-GPG-KEY-OURCO-6"
action :create
end
Multi Package
Multiple Packages
Previously:
%w{ httpd jenkins tmux }.each do |pkg|
package pkg
end
Now:
package %w{ httpd jenkins tmux }
macOS Improvements
New Resources for macOS
launchd (Chef 12.8.1)
osx_profile (Chef 12.7.0)
Big thanks to Facebook for their macOS
work
Cookbook Gem Dependencies
Previously
Recipe:
chef_gem "docker" do
compile_time true
end
Library:
begin
require 'docker'
rescue LoadError
puts "waiting to load Docker"
end
Now (in12.9.1)
metadata.rb:
gem "docker"
Library:
require 'docker'
Windows Improvements
New Resources
chocolatey_package (Chef 12.7.0)
cab_package (Chef 12.15.19)
Newly Built in Windows Resources
• reboot
• batch
• registry
• package
name “my_windows_cookbook"
maintainer "Me"
maintainer_email "me@gmail.com"
license "Apache 2.0"
version "1.0.0"
depends "windows"
systemd_unit (since 12.11)
More built-ins
Simpler DSLs
Expanded platform support

Weitere ähnliche Inhalte

Was ist angesagt?

Testing for infra code using test-kitchen,docker,chef
Testing for infra code using  test-kitchen,docker,chefTesting for infra code using  test-kitchen,docker,chef
Testing for infra code using test-kitchen,docker,chef
kamalikamj
 

Was ist angesagt? (20)

London Community Summit - Chef at SkyBet
London Community Summit - Chef at SkyBetLondon Community Summit - Chef at SkyBet
London Community Summit - Chef at SkyBet
 
Application Automation with Habitat
Application Automation with HabitatApplication Automation with Habitat
Application Automation with Habitat
 
Chef Cookbook Workflow
Chef Cookbook WorkflowChef Cookbook Workflow
Chef Cookbook Workflow
 
Azure handsonlab
Azure handsonlabAzure handsonlab
Azure handsonlab
 
Understand Chef
Understand ChefUnderstand Chef
Understand Chef
 
How to Write Chef Cookbook
How to Write Chef CookbookHow to Write Chef Cookbook
How to Write Chef Cookbook
 
Intermediate/Compliance training Guide
Intermediate/Compliance training GuideIntermediate/Compliance training Guide
Intermediate/Compliance training Guide
 
Compliance Automation Workshop
Compliance Automation WorkshopCompliance Automation Workshop
Compliance Automation Workshop
 
Infrastructure Automation with Chef
Infrastructure Automation with ChefInfrastructure Automation with Chef
Infrastructure Automation with Chef
 
Chef introduction
Chef introductionChef introduction
Chef introduction
 
Infrastructure Automation with Chef & Ansible
Infrastructure Automation with Chef & AnsibleInfrastructure Automation with Chef & Ansible
Infrastructure Automation with Chef & Ansible
 
Compliance as Code
Compliance as CodeCompliance as Code
Compliance as Code
 
Server Installation and Configuration with Chef
Server Installation and Configuration with ChefServer Installation and Configuration with Chef
Server Installation and Configuration with Chef
 
Learning chef
Learning chefLearning chef
Learning chef
 
Ansible Introduction
Ansible Introduction Ansible Introduction
Ansible Introduction
 
Chef Hack Day Denver
Chef Hack Day Denver Chef Hack Day Denver
Chef Hack Day Denver
 
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
 
Testing for infra code using test-kitchen,docker,chef
Testing for infra code using  test-kitchen,docker,chefTesting for infra code using  test-kitchen,docker,chef
Testing for infra code using test-kitchen,docker,chef
 
SAP TechEd 2013 session Tec118 managing your-environment
SAP TechEd 2013 session Tec118 managing your-environmentSAP TechEd 2013 session Tec118 managing your-environment
SAP TechEd 2013 session Tec118 managing your-environment
 
Automating Infrastructure with Chef
Automating Infrastructure with ChefAutomating Infrastructure with Chef
Automating Infrastructure with Chef
 

Andere mochten auch

Chef nextdoor final 2012 berkeley
Chef nextdoor final 2012 berkeleyChef nextdoor final 2012 berkeley
Chef nextdoor final 2012 berkeley
Stanford University
 
vBACD - Introduction to Puppet, Configuration Management and IT Automation So...
vBACD - Introduction to Puppet, Configuration Management and IT Automation So...vBACD - Introduction to Puppet, Configuration Management and IT Automation So...
vBACD - Introduction to Puppet, Configuration Management and IT Automation So...
CloudStack - Open Source Cloud Computing Project
 

Andere mochten auch (20)

London Community Summit - From Contribution to Authorship
London Community Summit - From Contribution to AuthorshipLondon Community Summit - From Contribution to Authorship
London Community Summit - From Contribution to Authorship
 
Learning from Configuration Management
Learning from Configuration Management Learning from Configuration Management
Learning from Configuration Management
 
London Community Summit 2016 - Adopting Chef Compliance
London Community Summit 2016 - Adopting Chef ComplianceLondon Community Summit 2016 - Adopting Chef Compliance
London Community Summit 2016 - Adopting Chef Compliance
 
Compliance Automation with Inspec Part 3
Compliance Automation with Inspec Part 3Compliance Automation with Inspec Part 3
Compliance Automation with Inspec Part 3
 
Chef nextdoor final 2012 berkeley
Chef nextdoor final 2012 berkeleyChef nextdoor final 2012 berkeley
Chef nextdoor final 2012 berkeley
 
SOUS CHEF- Android app
SOUS CHEF- Android appSOUS CHEF- Android app
SOUS CHEF- Android app
 
Our DevOps Journey - An Exercise in Cultural Change
Our DevOps Journey - An Exercise in Cultural ChangeOur DevOps Journey - An Exercise in Cultural Change
Our DevOps Journey - An Exercise in Cultural Change
 
Chef compliance - Intermediate Training
Chef compliance - Intermediate TrainingChef compliance - Intermediate Training
Chef compliance - Intermediate Training
 
Compliance Automation with Inspec Part 1
Compliance Automation with Inspec Part 1Compliance Automation with Inspec Part 1
Compliance Automation with Inspec Part 1
 
London Community Summit 2016 - Chef Automate
London Community Summit 2016 - Chef AutomateLondon Community Summit 2016 - Chef Automate
London Community Summit 2016 - Chef Automate
 
The caseforawesome
The caseforawesomeThe caseforawesome
The caseforawesome
 
vBACD - Introduction to Puppet, Configuration Management and IT Automation So...
vBACD - Introduction to Puppet, Configuration Management and IT Automation So...vBACD - Introduction to Puppet, Configuration Management and IT Automation So...
vBACD - Introduction to Puppet, Configuration Management and IT Automation So...
 
London Community Summit 2016 - Habitat
London Community Summit 2016 -  HabitatLondon Community Summit 2016 -  Habitat
London Community Summit 2016 - Habitat
 
London Community Summit 2016 - Community Update
London Community Summit 2016 - Community UpdateLondon Community Summit 2016 - Community Update
London Community Summit 2016 - Community Update
 
Chef for beginners module 1
Chef for beginners   module 1Chef for beginners   module 1
Chef for beginners module 1
 
Netflix's Could Migration
Netflix's Could MigrationNetflix's Could Migration
Netflix's Could Migration
 
PuppetConf 2016: Keynote - Sanjay Mirchandani, Puppet CEO
PuppetConf 2016: Keynote - Sanjay Mirchandani, Puppet CEOPuppetConf 2016: Keynote - Sanjay Mirchandani, Puppet CEO
PuppetConf 2016: Keynote - Sanjay Mirchandani, Puppet CEO
 
11 Ways to Hack Puppet for Fun and Productivity - Luke Kanies - Velocity 2012
11 Ways to Hack Puppet for Fun and Productivity - Luke Kanies - Velocity 201211 Ways to Hack Puppet for Fun and Productivity - Luke Kanies - Velocity 2012
11 Ways to Hack Puppet for Fun and Productivity - Luke Kanies - Velocity 2012
 
Vagrant를 이용한 개발환경 구축과 NetBeans를 이용한 C/C++개발과 리모트 디버깅
Vagrant를 이용한 개발환경 구축과 NetBeans를 이용한 C/C++개발과 리모트 디버깅Vagrant를 이용한 개발환경 구축과 NetBeans를 이용한 C/C++개발과 리모트 디버깅
Vagrant를 이용한 개발환경 구축과 NetBeans를 이용한 C/C++개발과 리모트 디버깅
 
20150113 secret chef ver03
20150113 secret chef ver0320150113 secret chef ver03
20150113 secret chef ver03
 

Ähnlich wie London Community Summit 2016 - Fresh New Chef Stuff

Ähnlich wie London Community Summit 2016 - Fresh New Chef Stuff (20)

DevOps and Chef
DevOps and ChefDevOps and Chef
DevOps and Chef
 
Automating your infrastructure with Chef
Automating your infrastructure with ChefAutomating your infrastructure with Chef
Automating your infrastructure with Chef
 
DevOps Hackathon: Session 3 - Test Driven Infrastructure
DevOps Hackathon: Session 3 - Test Driven InfrastructureDevOps Hackathon: Session 3 - Test Driven Infrastructure
DevOps Hackathon: Session 3 - Test Driven Infrastructure
 
Cloud Automation with Opscode Chef
Cloud Automation with Opscode ChefCloud Automation with Opscode Chef
Cloud Automation with Opscode Chef
 
Docker for developers on mac and windows
Docker for developers on mac and windowsDocker for developers on mac and windows
Docker for developers on mac and windows
 
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 framework
Introduction to chef frameworkIntroduction to chef framework
Introduction to chef framework
 
Environment
EnvironmentEnvironment
Environment
 
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 advance
Chef advanceChef advance
Chef advance
 
Chef advance
Chef advanceChef advance
Chef advance
 
Introduction to Chef
Introduction to ChefIntroduction to Chef
Introduction to Chef
 
Introduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to ChefIntroduction to Infrastructure as Code & Automation / Introduction to Chef
Introduction to Infrastructure as Code & Automation / Introduction to Chef
 
Cloud Automation with Opscode Chef
Cloud Automation with Opscode ChefCloud Automation with Opscode Chef
Cloud Automation with Opscode Chef
 
IT Automation with Chef
IT Automation with ChefIT Automation with Chef
IT Automation with Chef
 
Serve Meals, Not Ingredients (ChefConf 2015)
Serve Meals, Not Ingredients (ChefConf 2015)Serve Meals, Not Ingredients (ChefConf 2015)
Serve Meals, Not Ingredients (ChefConf 2015)
 
Serve Meals, Not Ingredients - ChefConf 2015
Serve Meals, Not Ingredients - ChefConf 2015Serve Meals, Not Ingredients - ChefConf 2015
Serve Meals, Not Ingredients - ChefConf 2015
 
Priming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the CloudPriming Your Teams For Microservice Deployment to the Cloud
Priming Your Teams For Microservice Deployment to the Cloud
 
Ansible new paradigms for orchestration
Ansible new paradigms for orchestrationAnsible new paradigms for orchestration
Ansible new paradigms for orchestration
 
DevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of ChefDevOps hackathon Session 2: Basics of Chef
DevOps hackathon Session 2: Basics of Chef
 

Mehr von Chef

Mehr von Chef (9)

Habitat Managed Chef
Habitat Managed ChefHabitat Managed Chef
Habitat Managed Chef
 
Automation, Audits, and Apps Tour
Automation, Audits, and Apps TourAutomation, Audits, and Apps Tour
Automation, Audits, and Apps Tour
 
Automation, Audits, and Apps Tour
Automation, Audits, and Apps TourAutomation, Audits, and Apps Tour
Automation, Audits, and Apps Tour
 
Alaska Airlines DevOps Journey
Alaska Airlines DevOps JourneyAlaska Airlines DevOps Journey
Alaska Airlines DevOps Journey
 
And The Slow Suffer What They Must
And The Slow Suffer What They MustAnd The Slow Suffer What They Must
And The Slow Suffer What They Must
 
Visualizing your journey with chef
Visualizing your journey with chefVisualizing your journey with chef
Visualizing your journey with chef
 
The New IT Game
The New IT GameThe New IT Game
The New IT Game
 
How to Accelerate Agile, Lean and DevOps Adoption Across Your Organization
How to Accelerate Agile, Lean and DevOps Adoption Across Your OrganizationHow to Accelerate Agile, Lean and DevOps Adoption Across Your Organization
How to Accelerate Agile, Lean and DevOps Adoption Across Your Organization
 
Chef andwindows reactor
Chef andwindows reactorChef andwindows reactor
Chef andwindows reactor
 

Kürzlich hochgeladen

IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
Enterprise Knowledge
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
giselly40
 

Kürzlich hochgeladen (20)

Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Advantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your BusinessAdvantages of Hiring UIUX Design Service Providers for Your Business
Advantages of Hiring UIUX Design Service Providers for Your Business
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
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
 
A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?A Year of the Servo Reboot: Where Are We Now?
A Year of the Servo Reboot: Where Are We Now?
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 

London Community Summit 2016 - Fresh New Chef Stuff