SlideShare a Scribd company logo
Chef Dialects
Noah Kantrowitz
Balanced, Inc
10KM View

• Hooks to load from non-.rb
Improvements to layout
•
Dialect Hooks

• Recipes
Attributes
•
Metadata
•
• Roles
• Data bags
Rules

•
Side effect based
•
Ruby classes
•

File extension, MIME type
Cookbook Dialects

•
• depends 'dialect-js'
attributes/default.yml
•
• recipes/default.js

Distributed as cookbooks
dialect-js
template('/tmp/foo', {
source: 'foo.erb',
owner: 'root',
variables: {msg: node.msg}
})
dialect-py
import chef
chef.template('/tmp/foo',
source='foo.erb',
owner='root',
variables={'msg':'Hello'}
)
Knife Dialects
• Distributed as gems, knife plugins
• gem install knife-dialect-erbyaml
• knife role from file web.yml
• knife data bag from file users jdoe.yml
Current Dialects
• Javascript, based on therubyracer/V8
• Python, incomplete, based on ffi + libpython
• JSON
• YAML and ERB+YAML
• ...
Current Dialects
• Javascript, based on therubyracer/V8
• Python, incomplete, based on ffi + libpython
• JSON
• YAML and ERB+YAML
• Puppet (soon)
Next steps
• chef_fs for knife upload and chef-client -z
• More dialects
• Perl?
• Java?
• TOML?
• Templates?
Layout Shortcuts
• attributes/default.rb ➡ attributes.rb
• recipes/default.js ➡ recipe.js
• libraries/default.rb ➡ library.rb
RIP Specificity

• templates/foo.erb
files/foo.ini
•
Default lookup
• source 'foo.erb'
• host-fqdn/foo.erb
• platform-version/foo.erb
• platform/foo.erb
• default/foo.erb
• foo.erb ☺☺☺
Explicit Lookup
• source ['one.erb', 'two.erb']
• source [

"host-#{node['fqdn']}/name",
"#{node['platform']}-#{node['platform_version']}/name",
"#{node['platform']}/name",
"default/name",
]
Putting It All Together
my-postgresql/
attributes.json
metadata.yml
recipe.py
templates/
postgresql.conf.erb
When?
• github.com/coderanger/chef/tree/dialects
• Chef 12?

More Related Content

Viewers also liked

Chef
ChefChef
Expense Reduction Analysts
Expense Reduction AnalystsExpense Reduction Analysts
Expense Reduction Analysts
Fundación EXECyL
 
Ruu Etika Peny Neg
Ruu Etika Peny NegRuu Etika Peny Neg
Ruu Etika Peny Neg
Surana Ir, MSc, PU-SDA
 
I Fearte
I FearteI Fearte
I Fearte
joaoluis_brasil
 
Jasa Konstruksi & MP3EI
Jasa Konstruksi & MP3EIJasa Konstruksi & MP3EI
Jasa Konstruksi & MP3EI
Surana Ir, MSc, PU-SDA
 
Sql Considered Harmful
Sql Considered HarmfulSql Considered Harmful
Sql Considered Harmful
coderanger
 
Buying Cycle and SEM strategy
Buying Cycle and SEM strategyBuying Cycle and SEM strategy
Buying Cycle and SEM strategy
fabrico
 

Viewers also liked (8)

Chef
ChefChef
Chef
 
G uiseppe arcimboldo
G uiseppe arcimboldoG uiseppe arcimboldo
G uiseppe arcimboldo
 
Expense Reduction Analysts
Expense Reduction AnalystsExpense Reduction Analysts
Expense Reduction Analysts
 
Ruu Etika Peny Neg
Ruu Etika Peny NegRuu Etika Peny Neg
Ruu Etika Peny Neg
 
I Fearte
I FearteI Fearte
I Fearte
 
Jasa Konstruksi & MP3EI
Jasa Konstruksi & MP3EIJasa Konstruksi & MP3EI
Jasa Konstruksi & MP3EI
 
Sql Considered Harmful
Sql Considered HarmfulSql Considered Harmful
Sql Considered Harmful
 
Buying Cycle and SEM strategy
Buying Cycle and SEM strategyBuying Cycle and SEM strategy
Buying Cycle and SEM strategy
 

Similar to Chef Dialects

Chef - managing yours servers with Code
Chef - managing yours servers with CodeChef - managing yours servers with Code
Chef - managing yours servers with Code
m_richardson
 
Configuration management with Chef
Configuration management with ChefConfiguration management with Chef
Configuration management with Chef
Juan Vicente Herrera Ruiz de Alejo
 
Chef-Zero & Local Mode
Chef-Zero & Local ModeChef-Zero & Local Mode
Chef-Zero & Local Mode
Michael Goetz
 
Chef - Evolving with Infrastructure Automation
Chef - Evolving with Infrastructure AutomationChef - Evolving with Infrastructure Automation
Chef - Evolving with Infrastructure Automation
Nathaniel Brown
 
KeyValue Stores
KeyValue StoresKeyValue Stores
KeyValue Stores
Mauro Pompilio
 
Cooking 5 Star Infrastructure with Chef
Cooking 5 Star Infrastructure with ChefCooking 5 Star Infrastructure with Chef
Cooking 5 Star Infrastructure with Chef
G. Ryan Fawcett
 
Chef Intro @ SF Bay Area LSPE meetup
Chef Intro @ SF Bay Area LSPE meetupChef Intro @ SF Bay Area LSPE meetup
Chef Intro @ SF Bay Area LSPE meetup
Promet Source
 
CouchDB for Web Applications - Erlang Factory London 2009
CouchDB for Web Applications - Erlang Factory London 2009CouchDB for Web Applications - Erlang Factory London 2009
CouchDB for Web Applications - Erlang Factory London 2009
Jason Davies
 
There and Back Again: How We Drank the Chef Kool-Aid, Sobered Up, and Learned...
There and Back Again: How We Drank the Chef Kool-Aid, Sobered Up, and Learned...There and Back Again: How We Drank the Chef Kool-Aid, Sobered Up, and Learned...
There and Back Again: How We Drank the Chef Kool-Aid, Sobered Up, and Learned...
Chef
 
Chef for Openstack
Chef for OpenstackChef for Openstack
Chef for Openstack
Mohit Sethi
 
Chef for openstack
Chef for openstackChef for openstack
Chef for openstack
openstackindia
 
Introduction to Cooking with Chef
Introduction to Cooking with ChefIntroduction to Cooking with Chef
Introduction to Cooking with Chef
John Osborne
 
Chef, Vagrant and Friends
Chef, Vagrant and FriendsChef, Vagrant and Friends
Chef, Vagrant and Friends
Ben McRae
 
Chaione Ember.js Training
Chaione Ember.js TrainingChaione Ember.js Training
Chaione Ember.js Training
aortbals
 
Getting started with Rails (1), Season 2
Getting started with Rails (1), Season 2Getting started with Rails (1), Season 2
Getting started with Rails (1), Season 2
RORLAB
 
Week6
Week6Week6
Week6
reneedv
 
Velocity 2011 Chef OpenStack Workshop
Velocity 2011 Chef OpenStack WorkshopVelocity 2011 Chef OpenStack Workshop
Velocity 2011 Chef OpenStack Workshop
Chef Software, Inc.
 
Full-Stack CakePHP Deployment
Full-Stack CakePHP DeploymentFull-Stack CakePHP Deployment
Full-Stack CakePHP Deployment
Jose Diaz-Gonzalez
 
Using Spring with NoSQL databases (SpringOne China 2012)
Using Spring with NoSQL databases (SpringOne China 2012)Using Spring with NoSQL databases (SpringOne China 2012)
Using Spring with NoSQL databases (SpringOne China 2012)
Chris Richardson
 
The Environment Restaurant
The Environment RestaurantThe Environment Restaurant
The Environment Restaurant
Martin de Keijzer
 

Similar to Chef Dialects (20)

Chef - managing yours servers with Code
Chef - managing yours servers with CodeChef - managing yours servers with Code
Chef - managing yours servers with Code
 
Configuration management with Chef
Configuration management with ChefConfiguration management with Chef
Configuration management with Chef
 
Chef-Zero & Local Mode
Chef-Zero & Local ModeChef-Zero & Local Mode
Chef-Zero & Local Mode
 
Chef - Evolving with Infrastructure Automation
Chef - Evolving with Infrastructure AutomationChef - Evolving with Infrastructure Automation
Chef - Evolving with Infrastructure Automation
 
KeyValue Stores
KeyValue StoresKeyValue Stores
KeyValue Stores
 
Cooking 5 Star Infrastructure with Chef
Cooking 5 Star Infrastructure with ChefCooking 5 Star Infrastructure with Chef
Cooking 5 Star Infrastructure with Chef
 
Chef Intro @ SF Bay Area LSPE meetup
Chef Intro @ SF Bay Area LSPE meetupChef Intro @ SF Bay Area LSPE meetup
Chef Intro @ SF Bay Area LSPE meetup
 
CouchDB for Web Applications - Erlang Factory London 2009
CouchDB for Web Applications - Erlang Factory London 2009CouchDB for Web Applications - Erlang Factory London 2009
CouchDB for Web Applications - Erlang Factory London 2009
 
There and Back Again: How We Drank the Chef Kool-Aid, Sobered Up, and Learned...
There and Back Again: How We Drank the Chef Kool-Aid, Sobered Up, and Learned...There and Back Again: How We Drank the Chef Kool-Aid, Sobered Up, and Learned...
There and Back Again: How We Drank the Chef Kool-Aid, Sobered Up, and Learned...
 
Chef for Openstack
Chef for OpenstackChef for Openstack
Chef for Openstack
 
Chef for openstack
Chef for openstackChef for openstack
Chef for openstack
 
Introduction to Cooking with Chef
Introduction to Cooking with ChefIntroduction to Cooking with Chef
Introduction to Cooking with Chef
 
Chef, Vagrant and Friends
Chef, Vagrant and FriendsChef, Vagrant and Friends
Chef, Vagrant and Friends
 
Chaione Ember.js Training
Chaione Ember.js TrainingChaione Ember.js Training
Chaione Ember.js Training
 
Getting started with Rails (1), Season 2
Getting started with Rails (1), Season 2Getting started with Rails (1), Season 2
Getting started with Rails (1), Season 2
 
Week6
Week6Week6
Week6
 
Velocity 2011 Chef OpenStack Workshop
Velocity 2011 Chef OpenStack WorkshopVelocity 2011 Chef OpenStack Workshop
Velocity 2011 Chef OpenStack Workshop
 
Full-Stack CakePHP Deployment
Full-Stack CakePHP DeploymentFull-Stack CakePHP Deployment
Full-Stack CakePHP Deployment
 
Using Spring with NoSQL databases (SpringOne China 2012)
Using Spring with NoSQL databases (SpringOne China 2012)Using Spring with NoSQL databases (SpringOne China 2012)
Using Spring with NoSQL databases (SpringOne China 2012)
 
The Environment Restaurant
The Environment RestaurantThe Environment Restaurant
The Environment Restaurant
 

Recently uploaded

How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
danishmna97
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
Daiki Mogmet Ito
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
名前 です男
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
DianaGray10
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
mikeeftimakis1
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
IndexBug
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
Matthew Sinclair
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
Adtran
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
Zilliz
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
Uni Systems S.M.S.A.
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
Matthew Sinclair
 

Recently uploaded (20)

How to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptxHow to Get CNIC Information System with Paksim Ga.pptx
How to Get CNIC Information System with Paksim Ga.pptx
 
How to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For FlutterHow to use Firebase Data Connect For Flutter
How to use Firebase Data Connect For Flutter
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
みなさんこんにちはこれ何文字まで入るの?40文字以下不可とか本当に意味わからないけどこれ限界文字数書いてないからマジでやばい文字数いけるんじゃないの?えこ...
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5UiPath Test Automation using UiPath Test Suite series, part 5
UiPath Test Automation using UiPath Test Suite series, part 5
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Introduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - CybersecurityIntroduction to CHERI technology - Cybersecurity
Introduction to CHERI technology - Cybersecurity
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial IntelligenceAI 101: An Introduction to the Basics and Impact of Artificial Intelligence
AI 101: An Introduction to the Basics and Impact of Artificial Intelligence
 
20240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 202420240607 QFM018 Elixir Reading List May 2024
20240607 QFM018 Elixir Reading List May 2024
 
Pushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 daysPushing the limits of ePRTC: 100ns holdover for 100 days
Pushing the limits of ePRTC: 100ns holdover for 100 days
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
Infrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI modelsInfrastructure Challenges in Scaling RAG with Custom AI models
Infrastructure Challenges in Scaling RAG with Custom AI models
 
Microsoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdfMicrosoft - Power Platform_G.Aspiotis.pdf
Microsoft - Power Platform_G.Aspiotis.pdf
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
20240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 202420240605 QFM017 Machine Intelligence Reading List May 2024
20240605 QFM017 Machine Intelligence Reading List May 2024
 

Chef Dialects