Link
Embed
Share
Beginning
This slide
Copy link URL
Copy link URL
Copy iframe embed code
Copy iframe embed code
Copy javascript embed code
Copy javascript embed code
Share
Tweet
Share
Tweet
Slide 1
Slide 1 text
2013/06/21 @tnmt Puppet Chef ͷجૅ ͳΜͰඞཁͳͷͱ͔
Slide 2
Slide 2 text
ຊͷΞδΣϯμ ✤ Puppet, Chefͱ ✤ Puppet, Chefͷඞཁੑ ✤ Puppet, Chefͷߏ ✤ ΠϯϑϥͷίʔυԽͱͦͷपลࣝ
Slide 3
Slide 3 text
Puppet, Chefͱ
Slide 4
Slide 4 text
Puppet, Chef ✤ Provisioning Framework < Configuration Management Framework
Slide 5
Slide 5 text
Configuration Management ✤ ߏཧͷλεΫྫ ✤ ωοτϫʔΫઃఆ ✤ Ϣʔβ࡞ɾཧ ✤ ιϑτΣΞΠϯετʔϧઃఆ ✤ ͜ΕΒΛ”͋Δ͖ঢ়ଶ”ʹҡ࣋͢Δ͜ͱ͕ߏཧ ✤ ͦΕΛ࣮ݱ͢ΔͨΊͷπʔϧ͕Puppet, Chef
Slide 6
Slide 6 text
Puppet, Chefͷඞཁੑ
Slide 7
Slide 7 text
ৄ͘͠ ✤ mizzy͞ΜͷPuppet࿈ࡌॳճ http://gihyo.jp/admin/serial/01/ puppet/0001 ✤ antipop͞Μͷ”ೖPuppet”ୈ1ষ ʮͳͥPuppet͕ඞཁͳͷ͔ʁʯ ✤ Λࢀߟʹ…͍ͬͯ͏ͱ͋ΕͳͷͰ࣮ࡍಡΈ߹Θͤ
Slide 8
Slide 8 text
ߏཧλεΫͷ࣮ݱํ๏ʢ̍ʣ ✤ खॱॻʹΑΔखಈઃఆ ✤ ख࡞ۀʹΑΔ࣌ؒͷϩε ✤ ΦϖϨʔγϣϯϛεͷՄೳੑ ✤ खॱॻͷߋ৽Εɺܗ֚Խɺ߹ੑҡ͕͍࣋͠
Slide 9
Slide 9 text
ߏཧλεΫͷ࣮ݱํ๏ʢ̎ʣ ✤ εΫϦϓτʹΑΔࣗಈԽ ✤ εΫϦϓτͷ࣭ҡ͕࣋ݸਓͷεΩϧʹΑΔ ✤ ߏมߋͷै͕͍͠ʢޙड़͢Δႈੑʣ
Slide 10
Slide 10 text
͜͜Ͱ ✤ खॱॻ͕ͻͲ͍ͱ͜ΖΛݟͤΔʢٽ͖ͳ͕Βʣ
Slide 11
Slide 11 text
Chef, Puppetେࣄɾخ͍͜͠ͱ ✤ ႈੑ ✤ ίʔυ࣭ͷۉҰԽ ✤ ίϥϘϨʔγϣϯՄೳ
Slide 12
Slide 12 text
ႈੑ ✤ Կ࣮ߦͯ͠ಉ͡ঢ়ଶʹͳΔ͜ͱ ✤ ৽نɾطଘʹରͯ͠ͷૢ࡞Ͱಉ͡
Slide 13
Slide 13 text
ίʔυ࣭ͷۉҰԽ ✤ େମ୭͕ॻ͍ͯࣅͨΑ͏ͳײ͡ʹͳΔ ✤ ݚमͰ࡞ͬͯΔ manifest ݟͯͦ͏ͩΑͶʁ ✤ ଞͷਓ͕ॻ͍ͯΔͷΛݟΕେମԿͬͯΔ͔͔Δ ✤ ී௨ʹ͍ͬͯΕݸਓͷεΩϧʹ͋Μ·Γࠨӈ͞Εͳ͍ ✤ ෳࡶͳه๏ॻ͖࢝ΊΔͱ·ͨผ͚ͩͲ…
Slide 14
Slide 14 text
ίϥϘϨʔγϣϯՄೳ ✤ ΤϯδχΞಉ࢜Ͱ૬ޓʹվળ͕Մೳ ✤ Opsಉ࢜ͰɻDev͕ॻ͍͍͍ͨͬͯ (DevOps) ✤ VCSΛ༻͍ͨվળ (Pull Request, ϨϏϡʔ) ✤ Մೳͱ͍͏ϝϦοτ
Slide 15
Slide 15 text
Puppet, Chefͷߏ
Slide 16
Slide 16 text
Puppet, Chefͷൺֱ ݴޠ σΟϨΫτϦߏ Puppet ֎෦DSL ൺֱతࣗ༝ Chef ෦DSL (Ruby) ܾ·͍ͬͯΔ
Slide 17
Slide 17 text
ͱ͍͑ ✤ ઌ΄Ͳͷ֤ϓϩμΫτͷ༷తͳͱ͜ΖͷൺֱͰ ✤ ʢೖ Puppet ʹهࡌͯ͋͠Δʣ ✤ ࣮ࡍʹఏڙ͞ΕΔػೳͱͯ͠େ͖ࠩ͘ͳ͍ ✤ Ҏ߱ڞ௨͍ͯ͠Δӡ༻ʢ͍ํʣͷઆ໌
Slide 18
Slide 18 text
Master, Agentܕ ✤ Puppetͷmanifest, Chefͷrecipe Λूதཧ͢ΔϚελʔɺద༻͢Δ ΤʔδΣϯτͷܗΛऔΔ͜ͱ͕ग़དྷΔ ✤ طଘͷϖύϘࡐ͜ͷߏΛऔ͍ͬͯΔͱ͜Ζ͕ଟ͍ ✤ nodeใͷཧ͕ඞཁ ✤ PuppetͩͱςΩετʢ࣮ྫʣɺLDAPͳͲऔΕΔ ✤ ‘puppet agent’ ‘chef-client’
Slide 19
Slide 19 text
Puppetͷྫ
Slide 20
Slide 20 text
୯ମͰ࣮ߦ ✤ manifest, recipe Λద༻͢Δαʔόʹஔͯ͠୯ମͰ࣮ߦ͢Δ ✤ Master, AgentܕΑΓ͓खܰ ✤ ‘puppet apply’, ‘chef-solo’ ✤ ࠷ۙͪ͜Β͕ਓؾग़͖ͯͯΔʢޙड़ʣ
Slide 21
Slide 21 text
ΠϯϑϥͷίʔυԽ
Slide 22
Slide 22 text
ίϥϘϨʔγϣϯՄೳͱॻ͍ͨ ✤ Manifest, Cookbooks Λόʔδϣϯཧग़དྷͯɺෳਓͰཧ ✤ ϨϏϡʔͨ͠Γվળͨ͠Γग़དྷΔ ✤ ͜Εͬͯී௨ʹϓϩάϥϜͱҰॹ
Slide 23
Slide 23 text
ϓϩάϥϜͱҰॹ ✤ ͜ΜͳྲྀΕ͕ग़དྷΔΑ͏ʹͳΔ ✤ खݩͷvagrantͰmanifestrecipeΛ࡞ͯ͠ (development) ✤ ࣾͷmaglicaڥͳͲͰ֬ೝͯ͠ (integration) ✤ ࣮ࡍͷαʔϏεͷεςʔδϯάͰ֬ೝͯ͠ (staging) ✤ ຊ൪ʹೖ (production)
Slide 24
Slide 24 text
ϓϩάϥϜͱҰॹ ✤ ͜͏͍͏ͱ͖୯ମ࣮ߦ͕ศརͩͶ ✤ ֤ڥʹpupper-serverchef-serverΛߏங͢Δͷ͠ΜͲ͍ ✤ ͔ͦ͠ΕΒӡ༻ʹͦΕͳΓʹख͕͔͔ؒΔ
Slide 25
Slide 25 text
Vagrant ✤ ‘vagrant provision’ ίϚϯυ ✤ http://docs-v1.vagrantup.com/v1/docs/provisioners.html ✤ ࡞ͬͯյͯ͠ͱ͍͏ͷ͕؆୯ʹग़དྷΔ
Slide 26
Slide 26 text
ࠓ·ͰͷδϨϯϚ ✤ manifestrecipeͷ֬ೝ͕େม ✤ ࡞ ✤ ద༻ ✤ ֬ೝ ʢࢹʣ
Slide 27
Slide 27 text
໘ͳ͜ͱCI ✤ ͜͜࠷͍ۙτϐοΫ ✤ ϓϩάϥϚϒϧʹαʔόߏங͕ग़དྷΔΑ͏ʹͳͬͨ ✤ ֬ೝςετΛCIͰճͤΔΑͱ͍͏ͷͰઌਓ͕ϊϋΛஷΊͯڞ༗ ͖͍ͯͯ͠Δ
Slide 28
Slide 28 text
ႈੑສࡀ ✤ طଘͷαʔόͷద༻ ✤ ৽نαʔόͷߏங ✤ ͲͪΒʹͰ͑ΔɺͲͪΒ֬ೝग़དྷΔ
Slide 29
Slide 29 text
CIྫ (Puppet) ✤ “Ukigumo ͱ serverspec Ͱ Puppet ͷܧଓతΠϯςάϨʔγϣϯ” ✤ http://mizzy.org/blog/2013/03/27/2/ ✤ puppet-lxc-box Ͱ࡞ͬͨίϯςφʹରͯ͠ܧଓతʹ puppet apply ͠ ͯ݁ՌΛϨϙʔτ
Slide 30
Slide 30 text
CIྫ (Chef) ✤ “Vagrant + Chef Solo + serverspec + Jenkins ͰαʔόʔߏஙΛ CI” ✤ http://d.hatena.ne.jp/naoya/20130520/1369054828 ✤ vagrant ʹΑͬͯ࡞ͨ͠ vm ʹରͯ͠ɺ৽ن࡞→knife-soloద༻ →serverscpec→ഁغ ͱ͍͏ྲྀΕ
Slide 31
Slide 31 text
ઌ΄ͲͷCIͷλΠτϧΛݟ͢ ✤ “Ukigumo ͱ serverspec Ͱ Puppet ͷܧଓతΠϯςάϨʔγϣϯ” ✤ “Vagrant + Chef Solo + serverspec + Jenkins ͰαʔόʔߏஙΛ CI”
Slide 32
Slide 32 text
serverspecʹ͍ͭͯ ✤ ࠓͷ hbstudy#45 Ͱʂʂ̍
Slide 33
Slide 33 text
͓·͚ʣ͏̍ͭͷςετ ✤ αʔϏεࢹ (ϞχλϦϯά͡Όͳͯ͘ࢮ׆ࢹͳͲ) ✤ ϖύϘͰNagiosΛ͍ͬͯΔ ✤ NagiosपΓࠇా͞Μ͕ࠓͯ͘͠Ε·͢ ✤ serverspec͕ϗϫΠτϘοΫεςετͳΒ, αʔϏεࢹϒϥοΫϘ οΫεςετ ✤ ʢهʣ࣮ࡍӡ༻தͷNagiosը໘ΛݟͯΈͨ