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
750
1
Share
Poise: Reusable Cookbook Patterns
Noah Kantrowitz
April 16, 2014
More Decks by Noah Kantrowitz
See All by Noah Kantrowitz
The Long Hello World
coderanger
0
30
The Long Hello World (with notes)
coderanger
0
100
What Python Can Learn From Other Languages
coderanger
0
89
What Python Can Learn From Other Languages (with notes)
coderanger
0
230
Swiss Army Django: Small Footprint ETL (with notes) - DjangoCon US
coderanger
0
350
Swiss Army Django: Small Footprint ETL - DjangoCon US
coderanger
0
92
How to look at space: PyCon AU
coderanger
0
150
Swiss Army Django: Small Footprint ETL
coderanger
0
130
Swiss Army Django: Small Footprint ETL (with notes)
coderanger
0
110
Other Decks in Programming
See All in Programming
生成AI時代にこそ効くGo | Why Go Works in the Age of Generative AI
mom0tomo
8
3.1k
The NotImplementedError Problem in Ruby
koic
1
600
タクシーアプリ『GO』の バックエンド開発のおける AI利活用と若者のすべて
pyama86
3
1.9k
AIエージェントと協働するCLI開発 — BunとOpenClawで学んだこと
yoshikouki
1
240
AIチームを指揮するOSS「TAKT」活用術 / How to Use “TAKT,” an OSS Tool for Orchestrating AI Teams
nrslib
6
830
今さら聞けないCancellationToken
htkym
0
220
メソッドのジェネリクスでGoの夢は広がるか? / Kyoto.go #65
utgwkk
3
550
Lemonade + Foundry Toolkit でお手軽アプリ開発
seosoft
1
310
Semantic Version 単位で戦略を柔軟に変えて、パッケージアップデートを自動化する
daitasu
0
140
Datadog × OpenTelemetry 入門と実践のあいだ
kn_to_maxpno
1
140
気づいたらRubyで100作品 ー クリエイティブコーディングが生活の一部になるまで / 100 Ruby Sketches Later: How Creative Coding Became Part of My Life
chobishiba
3
540
TSKaigi Night Talks 2026_TypeScriptでサプライチェーンの整合性を型に閉じ込める
geekplus_tech
0
300
Featured
See All Featured
[SF Ruby Conf 2025] Rails X
palkan
2
1.1k
Test your architecture with Archunit
thirion
1
2.3k
Jamie Indigo - Trashchat’s Guide to Black Boxes: Technical SEO Tactics for LLMs
techseoconnect
PRO
0
160
Statistics for Hackers
jakevdp
799
230k
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
190
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
SEO for Brand Visibility & Recognition
aleyda
0
4.6k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
390
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.2k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.7k
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
380
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
320
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