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
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
The Long Hello World
coderanger
0
37
The Long Hello World (with notes)
coderanger
0
130
What Python Can Learn From Other Languages
coderanger
0
100
What Python Can Learn From Other Languages (with notes)
coderanger
0
240
Swiss Army Django: Small Footprint ETL (with notes) - DjangoCon US
coderanger
0
390
Swiss Army Django: Small Footprint ETL - DjangoCon US
coderanger
0
97
How to look at space: PyCon AU
coderanger
0
160
Swiss Army Django: Small Footprint ETL
coderanger
0
130
Swiss Army Django: Small Footprint ETL (with notes)
coderanger
0
120
Other Decks in Programming
See All in Programming
夏だ!祭りだ!祭りとはドメインモデリングでは?
ryugen04
0
230
Augmenting AI with the Power of Jakarta EE
ivargrimstad
0
550
運用ダッシュボードの設計を誰も教えてくれないのだけどみなさんどうしてるんですか? - チームに監視するという文化を根付かせるための第一歩を踏みたい -
satoshi256kbyte
1
110
変わらないものが、変わるものを決める — 意図駆動開発 × イベントソーシング × イミュータブル | What Doesn't Change Decides What Can — IDD × Event Sourcing × Immutability
tomohisa
0
1.5k
関東Kaggler会_NVIDIA_Nemotron_コンペ_振り返り
rick_ds
0
530
【やさしく解説 設計編・中級 #6】良いアーキテクチャとは ~ 一本の登り道の、行き先 ~
panda728
PRO
0
210
自動化したのに回らない テスト運用の壁―AI時代の品質責任と生産性
mfunaki
0
140
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
0
1.7k
Laravel Boostに学ぶ、AIにPHPを書かせる技術 〜OSSの実装から蒸留するエージェント制御の王道〜
kentaroutakeda
3
680
Cloudflare is Agents
chimame
0
160
Claude CodeとAgentCore Gatewayを繋ぐ際の認証認可 / Authentication and authorization when connecting Claude Code with AgentCore Gateway
har1101
2
270
わからない話を追いかけたら、プログラミング言語を作る側にいた
ydah
3
490
Featured
See All Featured
The innovator’s Mindset - Leading Through an Era of Exponential Change - McGill University 2025
jdejongh
PRO
1
240
Discover your Explorer Soul
emna__ayadi
2
1.3k
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.7k
Rebuilding a faster, lazier Slack
samanthasiow
85
9.6k
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
790
エンジニアに許された特別な時間の終わり
watany
108
250k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
640
Believing is Seeing
oripsolob
1
190
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
How STYLIGHT went responsive
nonsquared
100
6.2k
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
Claude Code のすすめ
schroneko
67
230k
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