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
Puppet & Chef
Search
Shinya Tsunematsu
June 21, 2013
Programming
12
3.6k
Puppet & Chef
新卒研修でやった座学の内容。
既に Puppet & serverspec で研修を進めていたので、まとめと周辺知識の関連付け。
Shinya Tsunematsu
June 21, 2013
Tweet
Share
More Decks by Shinya Tsunematsu
See All by Shinya Tsunematsu
GMOペパボでのSREの実践 / SRE Practices of GMO Pepabo, Inc.
tnmt
3
4.7k
ペパボサービスインフラの今までこれから / pepabo infra past and future
tnmt
3
680
知らなかった、時に困るWebサービスのセキュリティ対策 / Where Do We Start With Information Security?
tnmt
19
9.4k
IaaSをいじっている人が PaaSについて考えたこと / Should We Prepare Own PaaS?
tnmt
5
2.2k
成長を支援する “ふりかえり”の技術 / How to lockback using "furik"
tnmt
7
1.7k
こんにちわ福岡 / hello-fukuoka
tnmt
0
1.3k
Inside Nyah & Future - A case of "Private Cloud" using OpenStack -
tnmt
0
270
OpenStackクラスタ間マイグレーション事例 Havana to Mitaka / OpenStack Migration Case (Shift from Havana to Mitaka)
tnmt
1
1.2k
ペパボのプライベートクラウド "Nyah" その後 / Pepabo's PrivateCloud "Nyah" After That
tnmt
8
13k
Other Decks in Programming
See All in Programming
TDD 実践ミニトーク
contour_gara
0
140
AI時代のドメイン駆動設計-DDD実践におけるAI活用のあり方 / ddd-in-ai-era
minodriven
23
9k
LLMOpsのパフォーマンスを支える技術と現場で実践した改善
po3rin
8
980
🔨 小さなビルドシステムを作る
momeemt
1
480
CSC305 Summer Lecture 05
javiergs
PRO
0
110
Google I/O recap web編 大分Web祭り2025
kponda
0
2.9k
オープンセミナー2025@広島LT技術ブログを続けるには
satoshi256kbyte
0
120
State of CSS 2025
benjaminkott
1
120
decksh - a little language for decks
ajstarks
4
21k
オープンセミナー2025@広島「君はどこで動かすか?」アンケート結果
satoshi256kbyte
0
200
AHC051解法紹介
eijirou
0
620
AIレビュアーをスケールさせるには / Scaling AI Reviewers
technuma
2
230
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
248
1.3M
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
26
3k
Done Done
chrislema
185
16k
Making the Leap to Tech Lead
cromwellryan
134
9.5k
Build The Right Thing And Hit Your Dates
maggiecrowley
37
2.8k
Practical Orchestrator
shlominoach
190
11k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
34
3.1k
Unsuck your backbone
ammeep
671
58k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
358
30k
Transcript
2013/06/21 @tnmt Puppet Chef ͷجૅ ͳΜͰඞཁͳͷͱ͔
ຊͷΞδΣϯμ ✤ Puppet, Chefͱ ✤ Puppet, Chefͷඞཁੑ ✤ Puppet, Chefͷߏ
✤ ΠϯϑϥͷίʔυԽͱͦͷपลࣝ
Puppet, Chefͱ
Puppet, Chef ✤ Provisioning Framework < Configuration Management Framework
Configuration Management ✤ ߏཧͷλεΫྫ ✤ ωοτϫʔΫઃఆ ✤ Ϣʔβ࡞ɾཧ ✤ ιϑτΣΞΠϯετʔϧઃఆ
✤ ͜ΕΒΛ”͋Δ͖ঢ়ଶ”ʹҡ࣋͢Δ͜ͱ͕ߏཧ ✤ ͦΕΛ࣮ݱ͢ΔͨΊͷπʔϧ͕Puppet, Chef
Puppet, Chefͷඞཁੑ
ৄ͘͠ ✤ mizzy͞ΜͷPuppet࿈ࡌॳճ http://gihyo.jp/admin/serial/01/ puppet/0001 ✤ antipop͞Μͷ”ೖPuppet”ୈ1ষ ʮͳͥPuppet͕ඞཁͳͷ͔ʁʯ ✤
Λࢀߟʹ…͍ͬͯ͏ͱ͋ΕͳͷͰ࣮ࡍಡΈ߹Θͤ
ߏཧλεΫͷ࣮ݱํ๏ʢ̍ʣ ✤ खॱॻʹΑΔखಈઃఆ ✤ ख࡞ۀʹΑΔ࣌ؒͷϩε ✤ ΦϖϨʔγϣϯϛεͷՄೳੑ ✤ खॱॻͷߋ৽Εɺܗ֚Խɺ߹ੑҡ͕͍࣋͠
ߏཧλεΫͷ࣮ݱํ๏ʢ̎ʣ ✤ εΫϦϓτʹΑΔࣗಈԽ ✤ εΫϦϓτͷ࣭ҡ͕࣋ݸਓͷεΩϧʹΑΔ ✤ ߏมߋͷै͕͍͠ʢޙड़͢Δႈੑʣ
͜͜Ͱ ✤ खॱॻ͕ͻͲ͍ͱ͜ΖΛݟͤΔʢٽ͖ͳ͕Βʣ
Chef, Puppetେࣄɾخ͍͜͠ͱ ✤ ႈੑ ✤ ίʔυ࣭ͷۉҰԽ ✤ ίϥϘϨʔγϣϯՄೳ
ႈੑ ✤ Կ࣮ߦͯ͠ಉ͡ঢ়ଶʹͳΔ͜ͱ ✤ ৽نɾطଘʹରͯ͠ͷૢ࡞Ͱಉ͡
ίʔυ࣭ͷۉҰԽ ✤ େମ୭͕ॻ͍ͯࣅͨΑ͏ͳײ͡ʹͳΔ ✤ ݚमͰ࡞ͬͯΔ manifest ݟͯͦ͏ͩΑͶʁ ✤ ଞͷਓ͕ॻ͍ͯΔͷΛݟΕେମԿͬͯΔ͔͔Δ ✤
ී௨ʹ͍ͬͯΕݸਓͷεΩϧʹ͋Μ·Γࠨӈ͞Εͳ͍ ✤ ෳࡶͳه๏ॻ͖࢝ΊΔͱ·ͨผ͚ͩͲ…
ίϥϘϨʔγϣϯՄೳ ✤ ΤϯδχΞಉ࢜Ͱ૬ޓʹվળ͕Մೳ ✤ Opsಉ࢜ͰɻDev͕ॻ͍͍͍ͨͬͯ (DevOps) ✤ VCSΛ༻͍ͨվળ (Pull Request,
ϨϏϡʔ) ✤ Մೳͱ͍͏ϝϦοτ
Puppet, Chefͷߏ
Puppet, Chefͷൺֱ ݴޠ σΟϨΫτϦߏ Puppet ֎෦DSL ൺֱతࣗ༝ Chef ෦DSL (Ruby)
ܾ·͍ͬͯΔ
ͱ͍͑ ✤ ઌ΄Ͳͷ֤ϓϩμΫτͷ༷తͳͱ͜ΖͷൺֱͰ ✤ ʢೖ Puppet ʹهࡌͯ͋͠Δʣ ✤ ࣮ࡍʹఏڙ͞ΕΔػೳͱͯ͠େ͖ࠩ͘ͳ͍ ✤
Ҏ߱ڞ௨͍ͯ͠Δӡ༻ʢ͍ํʣͷઆ໌
Master, Agentܕ ✤ Puppetͷmanifest, Chefͷrecipe Λूதཧ͢ΔϚελʔɺద༻͢Δ ΤʔδΣϯτͷܗΛऔΔ͜ͱ͕ग़དྷΔ ✤ طଘͷϖύϘࡐ͜ͷߏΛऔ͍ͬͯΔͱ͜Ζ͕ଟ͍ ✤
nodeใͷཧ͕ඞཁ ✤ PuppetͩͱςΩετʢ࣮ྫʣɺLDAPͳͲऔΕΔ ✤ ‘puppet agent’ ‘chef-client’
Puppetͷྫ
୯ମͰ࣮ߦ ✤ manifest, recipe Λద༻͢Δαʔόʹஔͯ͠୯ମͰ࣮ߦ͢Δ ✤ Master, AgentܕΑΓ͓खܰ ✤ ‘puppet
apply’, ‘chef-solo’ ✤ ࠷ۙͪ͜Β͕ਓؾग़͖ͯͯΔʢޙड़ʣ
ΠϯϑϥͷίʔυԽ
ίϥϘϨʔγϣϯՄೳͱॻ͍ͨ ✤ Manifest, Cookbooks Λόʔδϣϯཧग़དྷͯɺෳਓͰཧ ✤ ϨϏϡʔͨ͠Γվળͨ͠Γग़དྷΔ ✤ ͜Εͬͯී௨ʹϓϩάϥϜͱҰॹ
ϓϩάϥϜͱҰॹ ✤ ͜ΜͳྲྀΕ͕ग़དྷΔΑ͏ʹͳΔ ✤ खݩͷvagrantͰmanifestrecipeΛ࡞ͯ͠ (development) ✤ ࣾͷmaglicaڥͳͲͰ֬ೝͯ͠ (integration) ✤
࣮ࡍͷαʔϏεͷεςʔδϯάͰ֬ೝͯ͠ (staging) ✤ ຊ൪ʹೖ (production)
ϓϩάϥϜͱҰॹ ✤ ͜͏͍͏ͱ͖୯ମ࣮ߦ͕ศརͩͶ ✤ ֤ڥʹpupper-serverchef-serverΛߏங͢Δͷ͠ΜͲ͍ ✤ ͔ͦ͠ΕΒӡ༻ʹͦΕͳΓʹख͕͔͔ؒΔ
Vagrant ✤ ‘vagrant provision’ ίϚϯυ ✤ http://docs-v1.vagrantup.com/v1/docs/provisioners.html ✤ ࡞ͬͯյͯ͠ͱ͍͏ͷ͕؆୯ʹग़དྷΔ
ࠓ·ͰͷδϨϯϚ ✤ manifestrecipeͷ֬ೝ͕େม ✤ ࡞ ✤ ద༻ ✤ ֬ೝ ʢࢹʣ
໘ͳ͜ͱCI ✤ ͜͜࠷͍ۙτϐοΫ ✤ ϓϩάϥϚϒϧʹαʔόߏங͕ग़དྷΔΑ͏ʹͳͬͨ ✤ ֬ೝςετΛCIͰճͤΔΑͱ͍͏ͷͰઌਓ͕ϊϋΛஷΊͯڞ༗ ͖͍ͯͯ͠Δ
ႈੑສࡀ ✤ طଘͷαʔόͷద༻ ✤ ৽نαʔόͷߏங ✤ ͲͪΒʹͰ͑ΔɺͲͪΒ֬ೝग़དྷΔ
CIྫ (Puppet) ✤ “Ukigumo ͱ serverspec Ͱ Puppet ͷܧଓతΠϯςάϨʔγϣϯ” ✤
http://mizzy.org/blog/2013/03/27/2/ ✤ puppet-lxc-box Ͱ࡞ͬͨίϯςφʹରͯ͠ܧଓతʹ puppet apply ͠ ͯ݁ՌΛϨϙʔτ
CIྫ (Chef) ✤ “Vagrant + Chef Solo + serverspec +
Jenkins ͰαʔόʔߏஙΛ CI” ✤ http://d.hatena.ne.jp/naoya/20130520/1369054828 ✤ vagrant ʹΑͬͯ࡞ͨ͠ vm ʹରͯ͠ɺ৽ن࡞→knife-soloద༻ →serverscpec→ഁغ ͱ͍͏ྲྀΕ
ઌ΄ͲͷCIͷλΠτϧΛݟ͢ ✤ “Ukigumo ͱ serverspec Ͱ Puppet ͷܧଓతΠϯςάϨʔγϣϯ” ✤ “Vagrant
+ Chef Solo + serverspec + Jenkins ͰαʔόʔߏஙΛ CI”
serverspecʹ͍ͭͯ ✤ ࠓͷ hbstudy#45 Ͱʂʂ̍
͓·͚ʣ͏̍ͭͷςετ ✤ αʔϏεࢹ (ϞχλϦϯά͡Όͳͯ͘ࢮ׆ࢹͳͲ) ✤ ϖύϘͰNagiosΛ͍ͬͯΔ ✤ NagiosपΓࠇా͞Μ͕ࠓͯ͘͠Ε·͢ ✤ serverspec͕ϗϫΠτϘοΫεςετͳΒ,
αʔϏεࢹϒϥοΫϘ οΫεςετ ✤ ʢهʣ࣮ࡍӡ༻தͷNagiosը໘ΛݟͯΈͨ