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
Types, speed and migration
Search
Daniele Sluijters
February 05, 2016
Technology
0
52
Types, speed and migration
An introduction to Puppet 4 and how to upgrade given at Puppet Camp Amsterdam 2016.
Daniele Sluijters
February 05, 2016
Tweet
Share
Other Decks in Technology
See All in Technology
会社紹介資料 / Sansan Company Profile
sansan33
PRO
15
400k
インフラエンジニア必見!Kubernetesを用いたクラウドネイティブ設計ポイント大全
daitak
0
340
データ民主化のための LLM 活用状況と課題紹介(IVRy の場合)
wxyzzz
2
690
usermode linux without MMU - fosdem2026 kernel devroom
thehajime
0
230
Bill One急成長の舞台裏 開発組織が直面した失敗と教訓
sansantech
PRO
2
340
Context Engineeringの取り組み
nutslove
0
320
Embedded SREの終わりを設計する 「なんとなく」から計画的な自立支援へ
sansantech
PRO
3
2.3k
Ruby版 JSXのRuxが気になる
sansantech
PRO
0
140
OCI Database Management サービス詳細
oracle4engineer
PRO
1
7.4k
20260204_Midosuji_Tech
takuyay0ne
1
140
ZOZOにおけるAI活用の現在 ~開発組織全体での取り組みと試行錯誤~
zozotech
PRO
5
5k
Amazon S3 Vectorsを使って資格勉強用AIエージェントを構築してみた
usanchuu
3
440
Featured
See All Featured
A Soul's Torment
seathinner
5
2.2k
Digital Projects Gone Horribly Wrong (And the UX Pros Who Still Save the Day) - Dean Schuster
uxyall
0
320
Bioeconomy Workshop: Dr. Julius Ecuru, Opportunities for a Bioeconomy in West Africa
akademiya2063
PRO
1
54
Amusing Abliteration
ianozsvald
0
97
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
31
9.9k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
196
71k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
92
How to Build an AI Search Optimization Roadmap - Criteria and Steps to Take #SEOIRL
aleyda
1
1.9k
WENDY [Excerpt]
tessaabrams
9
36k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
750
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
160
Transcript
Types, speed and migration An introduction to Puppet 4 and
how to upgrade.
I am that guy ‣Daenney ‣Puppet for ~5 years ‣puppetlabs/apt
‣pypuppetdb & Puppetboard ‣“You broke the tests” ‣Vox Pupuli
Vox Pupuli 60 Modules & tooling 50 Puppeteers Join the
revolution!
Types
Puppet 0.24 - 3.8 It’s whatever I feel like.
notice(md5("240610708") == md5("QNKCDZO")) md5('QNKCDZO'): 0e830400451993494058024219903391 md5('240610708'): 0e462097431906509019562988736854
Puppet 4 It’s exactly what it is supposed to be.
Untyped class parameters Are of type "Any"
class a ( $maven_version = [] ) { notice($maven_version) }
class { 'a': maven_version => '1.0.3', } Notice: Scope(Class[A]): 1.0.3
Typed class parameters
class a ( Array $maven_version = [] ) { notice($maven_version)
} class { 'a': maven_version => '1.0.3', } Error: Expected parameter 'maven_version' of 'Class[A]' to have type Array[Data], got String.
Variables Are typed to their value
class a { $var = {} case $var { Hash:
{ notice('a hash')} default: { notice('not a hash')} } } Notice: Scope(Class[A]): a hash
$array_of_things.each | Integer $index, Variant[String, Hash] $value | { …
}
case $magic_thingy { Undef: { $_magic_thingy = [] } Array:
{ $_magic_thingy = $_magic_thingy } Hash: { $_magic_thingy = [$_magic_thingy] } String: { $_magic_thingy = [$_magic_thingy] } default: { fail('magic_thingy can only be: String, Array, Hash or unset') } }
Complex Types
Struct[{ policy => Enum[changed, always, daily, weekly], timeout => Optional[Integer],
]} $update = { 'policy' => 'changed' }
Splat
$p_opts = { 'ensure' => 'latest', } package { 'fish':
* => $p_opts, require => Apt::Source['fish'], }
Docs https://docs.puppetlabs.com/puppet/ 4.3/reference/lang_data.html
Speed Comes in two forms
Development speed Early, accurate feedback.
Compilation speed 15 - 40% faster since 4.2.0
Staying compatible with 3 and 4 is frustrating.
This is how we did it. With >10k nodes.
Step 1: breathe
Step 2: get to 3.8
Step 2.5: upgrade modules Vox Pupuli and Puppetlabs modules Just
Work™
Step 3: future parser Do not enable this on Puppet
< 3.7.4
http://entroz.deviantart.com/art/You-Shall-Not-Pass-330127651
Step 4: upgrade to 4
Step 5: …
https://flic.kr/p/7h9HWP
Spin up a new master Point agents to the new
master and babysit them.
Pre-compile and compare catalogs Catalog Preview: http://is.gd/mod_catalog_preview Puppet Catalog differ:
http://is.gd/catalog_diff Puppet Catalog diff viewer: http://is.gd/catalog_diff_viewer
We did it in… 1 — 2 weeks of prep
1 week of rollout 2 — 3 days of cleanup 0 production incidents
But… we cheated Migrated to future parser over a year
go :-).
Q? Maybe A.