Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
TDI with ChefDK 0.0.1
Search
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
someara
August 12, 2014
Technology
880
2
Share
TDI with ChefDK 0.0.1
Work in progress. Not done yet!
someara
August 12, 2014
More Decks by someara
See All by someara
Docker Docker Docker Chef
someara
0
510
Hand Crafted Artisinal Chef Resources
someara
0
610
Configuration Management Camp 2015
someara
1
570
Cookbook Reusability
someara
0
810
Configuration Management 101 @ Scale12x
someara
2
910
Configuration Management 101
someara
3
800
Introduction to Chef - Scale 10x
someara
2
460
Introduction to Chef - NYLUG Jan 2012
someara
2
310
Introduction to Chef - LISA11
someara
10
6.2k
Other Decks in Technology
See All in Technology
サンプリングは「作る」のか「使う」のか? 分散トレースのコストと運用を両立する実践的戦略 / Why you need the tail sampling and why you don't want it
ymotongpoo
3
130
AI 時代の Platform Engineering
recruitengineers
PRO
1
120
freeeで運用しているAIQAについて
qatonchan
0
390
20260513_生成AIを専属DSに_AI分析結果の検品テクニック_ハンズオン_交通事故データ
doradora09
PRO
0
210
多角的な視点から見たAGI
terisuke
0
130
AI時代に越境し、 組織を変えるQAスキルの正体 / QA Skills for Transforming an Organization
mii3king
5
4.2k
エンタープライズの厳格な制約を開発者に意識させない:クラウドネイティブ開発基盤設計/cloudnative-kaigi-golden-path
mhrtech
0
370
大学職員のための生成AI最前線 :最前線を、AIガバナンスとして読み直すためのTips
gmoriki
2
3.9k
もっとコンテンツをよく構造化して理解したいので、LLM 時代こそ Taxonomy の設計品質に目を向けたい〜!
morinota
0
220
2026年春のAgentCoreアプデ 細かいやつ全部まとめ
minorun365
3
210
Agent の「自由」と「安全」〜未来に向けて今できること〜
katayan
0
350
世界の中心でApp Runnerを叫ぶ FINAL
tsukuboshi
0
250
Featured
See All Featured
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
AI: The stuff that nobody shows you
jnunemaker
PRO
6
630
Paper Plane (Part 1)
katiecoart
PRO
0
7.2k
How Software Deployment tools have changed in the past 20 years
geshan
0
33k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
540
Being A Developer After 40
akosma
91
590k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
340
How GitHub (no longer) Works
holman
316
150k
Ecommerce SEO: The Keys for Success Now & Beyond - #SERPConf2024
aleyda
1
2k
Skip the Path - Find Your Career Trail
mkilby
1
120
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
1.1k
[SF Ruby Conf 2025] Rails X
palkan
2
1k
Transcript
Testing Cookbooks
Sean OMeara!
[email protected]
! @someara
whoami
Writing Cookbooks
None
None
None
Are we done?
Testing Cookbooks
Slightly more involved.
The Basics http://www.flickr.com/photos/jronaldlee/5295169486/
Run the recipe See what happens
Manual techniques Automated techniques
None
None
CLI IS BETTER
ChefDK
Our toolchain is in Ruby
Standard Ruby dev setups are tricky to install
System Ruby! RVM! chruby
cd project ; bundle install
None
None
Put the code in the can.
OMNIBUS ChefDK! ! Stable toolchain in an Omnibus installer
None
None
Ruby! Chef! Test Kitchen! kitchen-vagrant! Berkshelf! Foodcritic! Rubocop! ChefSpec
None
Converge Testing
None
CaaP! vs! IaaP
Cookbook as a Project! vs! Infrastructure as a Project
no chef-repo
battery not included
kitchen-vagrant! kitchen-docker! kitchen-ec2! kitchen-rackspace! kitchen-gce! kitchen-digitalocean! kitchen-openstack! kitchen-bluebox! kitchen-joyent! kitchen-lxc
also available
None
None
None
None
None
None
None
None
None
None
Integration Testing ttps://www.flickr.com/photos/kitsa_sakurako/439652830
Test that a set of resources have achieved their combined
goal
{ testable intent
None
None
Test Kitchen runs integration tests out of band of Chef
It does this with bussers
Bats! Serverspec! Minitest! Cucumber
None
suite busser
None
None
kitchen test! ! kitchen converge! kitchen verify! kitchen destroy
test tear down
Style Testing
None
Ruby level style enforcement
None
None
None
None
None
None
single quotes space after comma no trailing whitespace
None
None
Chef level style enforcement
None
None
None
None
None
http://www.flickr.com/photos/40389360@N00/2428706650/ Regression Testing
ChefSpec makes assertions about compiled resource collections
None
None
None
None
None
REFERENCE SLIDE
None
None
None
https://github.com/opscode-cookbooks/yum https://github.com/opscode-cookbooks/mysql Reference Cookbooks https://github.com/opscode-cookbooks/jenkins https://github.com/opscode-cookbooks/yum-epel
Cookbook Dependencies
Often, a cookbook will depend on another
include_recipe ‘another_cookbook::recipe’! ! OR! ! consume a resource shipped in
another_cookbook
For example
None
None
not in core Chef
ships in mysql cookbook
None
None
Dependencies suck and you don’t want to manage them manually.
None
Berkshelf is bundler for Chef cookbooks
None
your chef-server here
None
Bundler installs dependencies into your local gem cache
Berkshelf installs dependencies into your local cookbook cache
None
None
None
None
None
None
needs moar ServerSpec
Continuous Integration
This is all driven from the command line
Which makes it super easy to wire into CI systems
CI should watch version control for commits
Polling! vs! Notifications
I ran out of slides!