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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
27
Fine Print: Intellectual Property for Engineers (with notes)
coderanger
0
60
I Am Bad At Things
coderanger
0
33
I Am Bad At Things (with notes)
coderanger
0
80
The Long Hello World
coderanger
0
51
The Long Hello World (with notes)
coderanger
0
200
What Python Can Learn From Other Languages
coderanger
0
110
What Python Can Learn From Other Languages (with notes)
coderanger
0
290
Swiss Army Django: Small Footprint ETL (with notes) - DjangoCon US
coderanger
0
440
Other Decks in Programming
See All in Programming
作れるエンジニアから、価値を届けるエンジニアへ
ryunakayama
1
240
AI-Powered Domain-Driven Design
ziobrando
0
400
Spec-Driven Development - Why Vaadin Is the Perfect Fit
simas
PRO
0
230
オーケストレーション記述言語 Katari
yukikurage
0
240
느린 네트워크와 저사양 디바이스 사용자를 위한 웹뷰 로딩 시간 개선기
kmkim
1
210
SFCで実現する病院・医療システムの動的組み立て式UI
koukimiura
1
170
baseline으로 마이그레이션, 리팩토링 안전하게 맡기기
fornewid
1
920
Будущее локальных LLM – Алексей Голобурдин, PythoNN
sobolevn
0
110
学びを記事・スライド・Xへ高速展開する― AI-assisted Learning Loopで回すコンテンツ生成術
ochtum
0
200
クラウドエージェントは、 何がそんなに便利なのか / what makes cloud agents so useful
rkaga
5
790
あなたの await、OS まで届いてる? strace で覗く JavaScript の非同期
hasutosasaki
1
2.2k
AmebaブログはKMPから卒業します
kmars0605
0
330
Featured
See All Featured
16th Malabo Montpellier Forum Presentation
akademiya2063
PRO
0
450
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
590
The Director’s Chair: Orchestrating AI for Truly Effective Learning
tmiket
1
350
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
600
Thoughts on Productivity
jonyablonski
76
5.5k
Exploring the relationship between traditional SERPs and Gen AI search
raygrieselhuber
PRO
4
4.4k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
1
600
Design in an AI World
tapps
1
380
It's Worth the Effort
3n
188
29k
How Fast Is Fast Enough? [PerfNow 2025]
tammyeverts
3
970
[SF Ruby Conf 2025] Rails X
palkan
3
1.5k
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
530
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