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

PDF
4Developers: Michał Papis- Publikowanie gemów
PDF
Vidoop CouchDB Talk
PDF
Front End Development Automation with Grunt
PPTX
Drupal cambs ansible for drupal april 2015
PDF
Ruby on Rails Presentation
PDF
CoffeeScript Design Patterns
PDF
Ruby on Rails Presentation
PDF
eSynergy Andy Hawkins - Enabling DevOps through next generation configuration...
4Developers: Michał Papis- Publikowanie gemów
Vidoop CouchDB Talk
Front End Development Automation with Grunt
Drupal cambs ansible for drupal april 2015
Ruby on Rails Presentation
CoffeeScript Design Patterns
Ruby on Rails Presentation
eSynergy Andy Hawkins - Enabling DevOps through next generation configuration...

Viewers also liked (8)

PDF
ODP
G uiseppe arcimboldo
PDF
Expense Reduction Analysts
PPT
Ruu Etika Peny Neg
PPTX
I Fearte
PDF
Jasa Konstruksi & MP3EI
PPT
Sql Considered Harmful
PPT
Buying Cycle and SEM strategy
G uiseppe arcimboldo
Expense Reduction Analysts
Ruu Etika Peny Neg
I Fearte
Jasa Konstruksi & MP3EI
Sql Considered Harmful
Buying Cycle and SEM strategy
Ad

Similar to Chef Dialects (20)

PPT
Chef - managing yours servers with Code
ODP
Configuration management with Chef
PDF
Chef-Zero & Local Mode
ZIP
Chef - Evolving with Infrastructure Automation
KEY
KeyValue Stores
PDF
Cooking 5 Star Infrastructure with Chef
PDF
Chef Intro @ SF Bay Area LSPE meetup
PDF
CouchDB for Web Applications - Erlang Factory London 2009
PDF
There and Back Again: How We Drank the Chef Kool-Aid, Sobered Up, and Learned...
PPTX
Chef for Openstack
PDF
Chef for openstack
PDF
Introduction to Cooking with Chef
PDF
Chef, Vagrant and Friends
PDF
Chaione Ember.js Training
KEY
Getting started with Rails (1), Season 2
KEY
Week6
PDF
Velocity 2011 Chef OpenStack Workshop
KEY
Full-Stack CakePHP Deployment
PDF
Using Spring with NoSQL databases (SpringOne China 2012)
PDF
The Environment Restaurant
Chef - managing yours servers with Code
Configuration management with Chef
Chef-Zero & Local Mode
Chef - Evolving with Infrastructure Automation
KeyValue Stores
Cooking 5 Star Infrastructure with Chef
Chef Intro @ SF Bay Area LSPE meetup
CouchDB for Web Applications - Erlang Factory London 2009
There and Back Again: How We Drank the Chef Kool-Aid, Sobered Up, and Learned...
Chef for Openstack
Chef for openstack
Introduction to Cooking with Chef
Chef, Vagrant and Friends
Chaione Ember.js Training
Getting started with Rails (1), Season 2
Week6
Velocity 2011 Chef OpenStack Workshop
Full-Stack CakePHP Deployment
Using Spring with NoSQL databases (SpringOne China 2012)
The Environment Restaurant
Ad

Recently uploaded (20)

PDF
gpt5_lecture_notes_comprehensive_20250812015547.pdf
PPTX
Group 1 Presentation -Planning and Decision Making .pptx
PDF
Assigned Numbers - 2025 - Bluetooth® Document
PDF
August Patch Tuesday
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Spectroscopy.pptx food analysis technology
PPTX
cloud_computing_Infrastucture_as_cloud_p
PDF
A comparative analysis of optical character recognition models for extracting...
PDF
A comparative study of natural language inference in Swahili using monolingua...
PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PDF
Unlocking AI with Model Context Protocol (MCP)
PPTX
Tartificialntelligence_presentation.pptx
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
PDF
Mushroom cultivation and it's methods.pdf
PPTX
A Presentation on Artificial Intelligence
PDF
Approach and Philosophy of On baking technology
PPT
Teaching material agriculture food technology
gpt5_lecture_notes_comprehensive_20250812015547.pdf
Group 1 Presentation -Planning and Decision Making .pptx
Assigned Numbers - 2025 - Bluetooth® Document
August Patch Tuesday
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Spectroscopy.pptx food analysis technology
cloud_computing_Infrastucture_as_cloud_p
A comparative analysis of optical character recognition models for extracting...
A comparative study of natural language inference in Swahili using monolingua...
Digital-Transformation-Roadmap-for-Companies.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
Unlocking AI with Model Context Protocol (MCP)
Tartificialntelligence_presentation.pptx
Diabetes mellitus diagnosis method based random forest with bat algorithm
Per capita expenditure prediction using model stacking based on satellite ima...
Video forgery: An extensive analysis of inter-and intra-frame manipulation al...
Mushroom cultivation and it's methods.pdf
A Presentation on Artificial Intelligence
Approach and Philosophy of On baking technology
Teaching material agriculture food technology

Chef Dialects