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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Noah Kantrowitz
April 16, 2014
Programming
760
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Poise: Reusable Cookbook Patterns
Noah Kantrowitz
April 16, 2014
More Decks by Noah Kantrowitz
See All by Noah Kantrowitz
I Am Bad At Things
coderanger
0
26
I Am Bad At Things (with notes)
coderanger
0
40
The Long Hello World
coderanger
0
44
The Long Hello World (with notes)
coderanger
0
160
What Python Can Learn From Other Languages
coderanger
0
100
What Python Can Learn From Other Languages (with notes)
coderanger
0
260
Swiss Army Django: Small Footprint ETL (with notes) - DjangoCon US
coderanger
0
400
Swiss Army Django: Small Footprint ETL - DjangoCon US
coderanger
0
100
How to look at space: PyCon AU
coderanger
0
160
Other Decks in Programming
See All in Programming
世界の中心で、AI(App Intents)をさけぶ ー App Intents中心設計の実践ガイド
touyou
0
170
tsc.rip を支える技術 / Kyoto.なんか #8
susisu
0
4.3k
Go × SIMDで高速化するベクトル検索 ~ルーフラインモデルでSIMDが効く境界を探れ! ~
po3rin
1
160
Swift愛好会100回記念 第1回を振り返る
jollyjoester
0
120
Go を使い始めて 2 ヶ月の学び / My first two months with Go
contour_gara
0
420
数年滞っていたダークモード対応をおよそ2週間で完了させる
chigichan24
0
690
Claude Codeを組織的に動かして月400PRを実現した話
happy_ryo
0
260
AIは賢い。でも実行環境は? CLIおじさんがAI時代に伝えたいこと ~ CLIおじさんがAI時代に伝えたいこと ~
curekoshimizu
1
160
思考垂れ流し開発 ~音声入力 × AIエージェント × 開発ハーネスによる試行錯誤~
npostring
0
950
{ Android | Kotlin } Gradle Plugin in 2026
ryunen344
1
290
PyO3 で既存 Python 評価器を Rust core 化する ー wasm-bindgen でブラウザにも配るための設計
kdash
1
560
デプロイ直後のレイテンシスパイクを調べたら、 Railsの仕様にたどり着いた
nhsykym
0
110
Featured
See All Featured
Fireside Chat
paigeccino
42
4k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
1
2.7k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
370
How to Ace a Technical Interview
jacobian
281
24k
[SF Ruby Conf 2025] Rails X
palkan
2
1.4k
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.4k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.2k
We Have a Design System, Now What?
morganepeng
55
8.3k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
770
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
870
We Are The Robots
honzajavorek
0
350
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
4.4k
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