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
51
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
検証を通して見えてきたTiDBの性能特性
lycorptech_jp
PRO
6
3.8k
AOAI をきっかけに 社内の Azure 管理を見直した話
recruitengineers
PRO
1
300
FrontDoorとWebAppsを組み合わせた際のリダイレクト処理の注意点
kenichirokimura
1
530
ServiceNow Knowledge Learning Rise up
manarobot
0
210
開発パフォーマンスを最大化するための開発体制
ham0215
2
430
生産性向上チームの紹介
cybozuinsideout
PRO
1
870
LayerXにおけるLLMプロダクト開発の今までとこれから
layerx
PRO
1
360
JAWS-UG Bedrock Claude Night
yamahiro
3
610
Meta Quest 3 で動く桜マシマシ WebXR アプリを IBM Cloud Code Engine と Babylon.js で作った話
1ftseabass
PRO
0
120
リテール金融(キャッシュレス・ネット銀行・ネット証券)の競争環境と経済圏
8maki
0
1.2k
Kernel MemoryでAzure OpenAI Serviceとお手軽データソース連携
mitsuzono
1
260
20240418_Google ColabにLLMが搭載されたようなのでPython x データ分析の勉強方法を考えてみる
doradora09
0
140
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
13
4.6k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
241
1.2M
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
20
1.9k
Building Applications with DynamoDB
mza
88
5.6k
RailsConf 2023
tenderlove
4
540
Reflections from 52 weeks, 52 projects
jeffersonlam
345
19k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
221
21k
Code Review Best Practice
trishagee
55
15k
Git: the NoSQL Database
bkeepers
PRO
422
63k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
357
22k
[RailsConf 2023] Rails as a piece of cake
palkan
23
4k
Side Projects
sachag
451
41k
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.