Lock in $30 Savings on PRO—Offer Ends Soon! ⏳
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
9
The Long Hello World (with notes)
coderanger
0
40
What Python Can Learn From Other Languages
coderanger
0
73
What Python Can Learn From Other Languages (with notes)
coderanger
0
190
Swiss Army Django: Small Footprint ETL (with notes) - DjangoCon US
coderanger
0
280
Swiss Army Django: Small Footprint ETL - DjangoCon US
coderanger
0
72
How to look at space: PyCon AU
coderanger
0
120
Swiss Army Django: Small Footprint ETL
coderanger
0
110
Swiss Army Django: Small Footprint ETL (with notes)
coderanger
0
92
Other Decks in Programming
See All in Programming
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
180
WebRTC と Rust と8K 60fps
tnoho
2
1.9k
ID管理機能開発の裏側 高速にSaaS連携を実現したチームのAI活用編
atzzcokek
0
190
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
150
Rediscover the Console - SymfonyCon Amsterdam 2025
chalasr
2
140
20 years of Symfony, what's next?
fabpot
2
310
TypeScriptで設計する 堅牢さとUXを両立した非同期ワークフローの実現
moeka__c
6
2.9k
Evolving NEWT’s TypeScript Backend for the AI-Driven Era
xpromx
0
270
connect-python: convenient protobuf RPC for Python
anuraaga
0
360
Integrating WordPress and Symfony
alexandresalome
0
120
堅牢なフロントエンドテスト基盤を構築するために行った取り組み
shogo4131
6
2k
MAP, Jigsaw, Code Golf 振り返り会 by 関東Kaggler会|Jigsaw 15th Solution
hasibirok0
0
210
Featured
See All Featured
Navigating Team Friction
lara
191
16k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.3k
Music & Morning Musume
bryan
46
7k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.2k
Designing Experiences People Love
moore
142
24k
Become a Pro
speakerdeck
PRO
30
5.7k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
359
30k
Documentation Writing (for coders)
carmenintech
76
5.2k
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
333
22k
Site-Speed That Sticks
csswizardry
13
990
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