Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Poise: Reusable Cookbook Patterns
Search
Noah Kantrowitz
April 16, 2014
Programming
770
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
Fine Print: Intellectual Property for Engineers
coderanger
0
26
Fine Print: Intellectual Property for Engineers (with notes)
coderanger
0
54
I Am Bad At Things
coderanger
0
30
I Am Bad At Things (with notes)
coderanger
0
70
The Long Hello World
coderanger
0
48
The Long Hello World (with notes)
coderanger
0
180
What Python Can Learn From Other Languages
coderanger
0
110
What Python Can Learn From Other Languages (with notes)
coderanger
0
280
Swiss Army Django: Small Footprint ETL (with notes) - DjangoCon US
coderanger
0
420
Other Decks in Programming
See All in Programming
Event is what happens
moro
2
1.2k
[2026-09-26]空論ジェネリックプロセス~テスト資産とAIで紡ぐ、再現可能なパフォーマンスチューニングの話~
tosite
0
270
全ての永続トークンを、生まれる前に消し去りたい!
sylph01
2
1.1k
When benchmarks go bad - what I learned from measuring performance wrong
hollycummins
0
230
JAWS-UG 東京支部が始める、JAWS-UG支部コラボ / JAWS-UG lunchtime LT Collaboration
y0hgi
0
290
Simple Storage Service(S3) is not simple
iwatsukayura
0
310
JIS keyboard support in Omarchy
lef237
0
150
コーディング自動化の次へ。人の介入をゼロにするファクトリーとサポートAIによる実践
timakin
5
4.2k
Long Living Tokens, Die, Die, Die! (or: The One Ring is Banned in Modern)
sylph01
0
350
IBM Bob でAI駆動開発『QC-Playbook』
ichirokano2
0
120
APNsからLive Activityを開始する話
yumnumm
0
170
作れる、でも消せるか?──安全に「枯らして消す」機能削除術 / Drain, Then Delete
chobishiba
2
880
Featured
See All Featured
コードの90%をAIが書く世界で何が待っているのか / What awaits us in a world where 90% of the code is written by AI
rkaga
63
46k
How Software Deployment tools have changed in the past 20 years
geshan
2
35k
AI: The stuff that nobody shows you
jnunemaker
PRO
10
1.2k
Utilizing Notion as your number one productivity tool
mfonobong
4
620
What does AI have to do with Human Rights?
axbom
PRO
1
2.5k
We Are The Robots
honzajavorek
0
400
Making Projects Easy
brettharned
120
6.8k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
250
1.3M
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3.8k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
GitHub's CSS Performance
jonrohan
1033
470k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.7k
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