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
Poise: Reusable Cookbook Patterns
Search
Noah Kantrowitz
April 16, 2014
Programming
1
730
Poise: Reusable Cookbook Patterns
Noah Kantrowitz
April 16, 2014
Tweet
Share
More Decks by Noah Kantrowitz
See All by Noah Kantrowitz
The Long Hello World
coderanger
0
14
The Long Hello World (with notes)
coderanger
0
51
What Python Can Learn From Other Languages
coderanger
0
76
What Python Can Learn From Other Languages (with notes)
coderanger
0
190
Swiss Army Django: Small Footprint ETL (with notes) - DjangoCon US
coderanger
0
300
Swiss Army Django: Small Footprint ETL - DjangoCon US
coderanger
0
76
How to look at space: PyCon AU
coderanger
0
130
Swiss Army Django: Small Footprint ETL
coderanger
0
110
Swiss Army Django: Small Footprint ETL (with notes)
coderanger
0
98
Other Decks in Programming
See All in Programming
ELYZA_Findy AI Engineering Summit登壇資料_AIコーディング時代に「ちゃんと」やること_toB LLMプロダクト開発舞台裏_20251216
elyza
2
710
Basic Architectures
denyspoltorak
0
140
Cap'n Webについて
yusukebe
0
150
GoLab2025 Recap
kuro_kurorrr
0
780
TestingOsaka6_Ozono
o3
0
180
複雑なUI設計への銀の弾丸 「オブジェクト指向UIデザイン」
teamlab
PRO
2
110
re:Invent 2025 トレンドからみる製品開発への AI Agent 活用
yoskoh
0
530
AI前提で考えるiOSアプリのモダナイズ設計
yuukiw00w
0
200
tsgolintはいかにしてtypescript-goの非公開APIを呼び出しているのか
syumai
7
2.4k
Implementation Patterns
denyspoltorak
0
140
PC-6001でPSG曲を鳴らすまでを全部NetBSD上の Makefile に押し込んでみた / osc2025hiroshima
tsutsui
0
200
The Art of Re-Architecture - Droidcon India 2025
siddroid
0
140
Featured
See All Featured
First, design no harm
axbom
PRO
1
1.1k
The Curse of the Amulet
leimatthew05
0
5.9k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
34
The agentic SEO stack - context over prompts
schlessera
0
570
HU Berlin: Industrial-Strength Natural Language Processing with spaCy and Prodigy
inesmontani
PRO
0
120
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
286
14k
We Are The Robots
honzajavorek
0
120
A Soul's Torment
seathinner
1
2k
Building Flexible Design Systems
yeseniaperezcruz
330
39k
Claude Code どこまでも/ Claude Code Everywhere
nwiizo
61
51k
Transcript
Cookbook Patterns Poise Noah Kantrowitz
Me •PSF + PyCon •Balanced •Chef •Making things
•What? •Why? •How?
None
None
None
cook·book A description of a piece of infrastructure
Role Cookbook Recipe Resource
None
leak·y ab·strac·tion Incomplete hiding of internal details
None
•Fork (and patch) •Wrapper •Rewind
Inheritance
None
10x
Poise
•Helpers •DSL extensions •Patterns
None
•jenkins •jenkins_job •jenkins_credential •jenkins_plugin
•ci_job •ci_pipeline •name_ci_pipeline
Using Poise
class Chef class ... ... end end
Resource::Foo < Resource Provider::Foo < Provider
•Foo => foo •FooBar => foo_bar •FOO => f_o_o
class ... include Poise ... end
action(:one, :two) attribute(:name, kind_of: String)
attribute(:opts, option_collector: true ) opts do foo 'bar' end
attribute(:path, default: lazy { ... })
attribute(:config, template: true) attribute('', template: true)
foo ... do source 'cfg.erb' end foo ... do content
'x=1' end
file ... do content nr.content end
class Provider... def action_one ... end end
notifying_block do ... end
include_recipe ...
Putting It Together
class Res::Foo < Res include Poise action(:one) attribute(:pkg) attribute(:ver) end
def action_one notifying_block do install_pkg write_config end end
def install_pkg package nr.pkg do version nr.ver end end
def install_pkg r = super r.package_name( 'my-thing') r end
Next Steps
Subresources
Cookbook Tiers
•poise-proxy •poise-appenv •poise-service?
•attribute(node: ...) •group do ... end •after(:one)
None
Thank You