Upgrade to Pro — share decks privately, control downloads, hide ads and more …

宣言型デプロイツールの「正しい」使い方 (考え方編) /20180524-ssmjp-deploy

opelab
May 24, 2018

宣言型デプロイツールの「正しい」使い方 (考え方編) /20180524-ssmjp-deploy

ssmjp 201805での発表資料です。

詳細: https://www.opslab.jp/publish/20180524-ssmjp-deploy.html

(運用設計ラボ合同会社 波田野裕一)

opelab

May 24, 2018
Tweet

More Decks by opelab

Other Decks in Technology

Transcript

  1. ʮӡ༻ࣗಈԽʯ͸ʮӡ༻ඪ४ԽʯͷҰͭ ӡ༻ۀ຿ΛίʔυϨϕϧ·ͰఆܕԽ ඪ४Խ ͠ɺ ࣮૷·Ͱߦ͏͜ͱɻ Operation Lab ӡ༻ઃܭϥϘ 6 ӡ༻ࣗಈԽͱ͸

    ࣾ಺੍खӡ༻ ӡ༻ͷఆܕԽ ӡ༻ࣗಈԽ ඪ४ԽϨϕϧ த ඪ४ԽϨϕϧ ߴ ඪ४ԽϨϕϧ ௿ ίʔυϨϕϧ खॱॻϨϕϧ ݸʑਓ͕ಠࣗ
  2. ඪ४ԽϨϕϧ ௿ Α͋͘Δצҧ͍ 7 ࣾ಺੍खӡ༻ ӡ༻ͷఆܕԽ ӡ༻ࣗಈԽ ඪ४ԽϨϕϧ த ඪ४ԽϨϕϧ

    ௿ खॱॻϨϕϧ ݸʑਓ͕ಠࣗ ʮࣗಈԽ͢Ε͹ఆܕԽ͞ΕΔʯΘ͚Ͱ͸ͳ͍ Ұ଍ඈͼ ઃܭͳ͖࣮૷ʹؕΓɺ࢓༷όάΛੜΈ΍͍͢ º ࢓༷όάͷմ Operation Lab ӡ༻ઃܭϥϘ ֤࣮૷͕ಠࣗ
  3. ʮӡ༻ࣗಈԽʯ͸ʮӡ༻ඪ४ԽʯͷҰͭ Operation Lab ӡ༻ઃܭϥϘ 8 ࣾ಺੍खӡ༻ ӡ༻ͷఆܕԽ ӡ༻ࣗಈԽ ίʔυϨϕϧ खॱॻϨϕϧ

    ݸʑਓ͕ಠࣗ ࡞ۀͷ໨త ࡞ۀͷ޻ఔ ࡞ۀͷ੒Ռ ׂͱᐆດ ׂͱᐆດ ͹Β͖ͭ΍͍͢ ໌֬ ໌֬ ൺֱతۉҰ ϒϥοΫϘοΫεԽ ͠΍͍͢ ΄΅ۉҰ رബԽ͠΍͍͢
  4. ҆ఆͨ͠ʮӡ༻ࣗಈԽʯʹඞཁͳ͜ͱ Operation Lab ӡ༻ઃܭϥϘ 9 ӡ༻ͷఆܕԽ ӡ༻ࣗಈԽ ίʔυϨϕϧ खॱॻϨϕϧ ࡞ۀͷ໨త

    ࡞ۀͷ޻ఔ ࡞ۀͷ੒Ռ ໌֬ ໌֬ ΄΅ۉҰ ൺֱతۉҰ ϒϥοΫϘοΫεԽ ͠΍͍͢ رബԽ͠΍͍͢ खॱॻͱίʔυ͕࿈ಈ͍ͯ͠Δ͜ͱ͕ॏཁ ࣗಈԽπʔϧෆ۩߹࣌ͷ खಈରԠ·Ͱ૝ఆ͢Δͷ͕ ϓϩͷࣗಈԽ
  5. એݴܕσϓϩΠπʔϧͷϝϦοτ 13 Operation Lab ӡ༻ઃܭϥϘ • ϝϦοτ࠶ݱੑ͕ߴ͍ • Ұ౓ಈ࡞֬ೝͰ͖ͨςϯϓϨʔτ Ϩγϐ

    ͸܁Γฦ͠࢖͑Δ • ϝϦοτૢ࡞͕γϯϓϧʹͳΔ Ҡ؅Մೳ  • σϓϩΠϘλϯίϚϯυҰൃͰߏஙͰ͖Δɻ • ϝϦοτ࠶ར༻ੑ͕ߴ͍ ഑෍Մೳ  • ࡞੒ͨ͠ςϯϓϨʔτ Ϩγϐ Λ഑෍͢Δ͜ͱͰɺଞऀ͕ར༻Ͱ͖Δɻ
  6. "84$MPVE'PSNBUJPOͷҹ৅ ೥લ͔Βࠓ Operation Lab ӡ༻ઃܭϥϘ 14 • ίϯηϓτ͸ྑ͛͞ ֬ূʹࢸΒͳ͍·· 

    • "84ΞʔΩςΫνϟηϯλͷ৘ใཧղʹ͸ඞཁ • ࣮ӡ༻ͱίϯηϓτͷΪϟοϓ͕ຒ·Βͳ͍ ίϨδϟφΠײ͕ফ͑ͳ͍ɾɾɾ ݕূϨϕϧͰͷࢼߦࡨޡͷ݁Ռ͕ࠓ೔ͷ಺༰
  7. ͍ͭ΋ͷߏਤ Operation Lab ӡ༻ઃܭϥϘ 16 ؅ཧ৬ ࣮૷ऀ ϝϯόʔ ࣗಈԽ ເ

    ͳΒ͹ ৚݅෇͖ • ָ͍͠ • ࣗݾߠఆײ͍͢͝ • ޻਺࡟ݮ • ϛεͷ௿ݮ Ғ͍ਓʹ๙ΊΒΕΔ Ғ͍ਓʹ๙ΊΒΕΔ
  8. એݴܕσϓϩΠπʔϧͰ͸ɺ͜ͷߏਤʹͳΓ͕ͪ Operation Lab ӡ༻ઃܭϥϘ 17 ࣮૷ऀ ϝϯόʔ ࣗಈԽ ເ ͳΒ͹

    ৚݅෇͖ • ָ͍͠ • ࣗݾߠఆײ͍͢͝ Ғ͍ਓʹ๙ΊΒΕΔ ؅ཧ৬ ݱ৔ʹ೚ͤͨ
  9. ҆ఆͨ͠ʮӡ༻ࣗಈԽʯʹඞཁͳ͜ͱ ࠶ Operation Lab ӡ༻ઃܭϥϘ 23 ӡ༻ͷఆܕԽ ӡ༻ࣗಈԽ ίʔυϨϕϧ खॱॻϨϕϧ

    ࡞ۀͷ໨త ࡞ۀͷ޻ఔ ࡞ۀͷ੒Ռ ໌֬ ໌֬ ΄΅ۉҰ ൺֱతۉҰ ϒϥοΫϘοΫεԽ ͠΍͍͢ رബԽ͠΍͍͢ खॱॻͱίʔυ͕࿈ಈ͍ͯ͠Δ͜ͱ͕ॏཁ
  10. ʮએݴܕσϓϩΠπʔϧʯͰΑ͋͘Δ෩ܠ Operation Lab ӡ༻ઃܭϥϘ 24 ӡ༻ͷఆܕԽ ӡ༻ࣗಈԽ ίʔυϨϕϧ खॱॻϨϕϧ ࡞ۀͷ໨త

    ࡞ۀͷ޻ఔ ࡞ۀͷ੒Ռ ໌֬ ໌֬ ΄΅ۉҰ ϒϥοΫϘοΫεԽ رബԽ ίʔυ͔͠ͳ͍ º º ࢓༷ҙਤ͕ ෆ໌ʹ
  11. ͋ͱ͸ɺҾ͖ܧ͗ࣗମ͕ෆཁͳ৔߹ Operation Lab ӡ༻ઃܭϥϘ 31 ख़࿅ νʔϜ શһ͕೔ৗతʹએݴܕσϓϩΠπʔϧΛར༻͍ͯ͠Δɻ શһ͕΄΅શͯͷςϯϓϨʔτΛ೺Ѳ͍ͯ͠Δɻ ଞͷϝϯόʔͷ޷Έ΍Ϋη΋೺Ѳ͍ͯ͠Δ

    ʮએݴܕσϓϩΠπʔϧʯʹ΋ υΩϡϝϯτ͸ඞཁ Ͱ΋ ϝϯόʔͷҟಈ͕΄ͱΜͲͳ͍ख़࿅νʔϜ ҟಈ͕ແ͍͜ͱલఏ͸ɺҟಈൃੜͱͱ΋ʹ่յ͠΍͍͢
  12. ·ͱΊʮએݴܕσϓϩΠπʔϧʯք۾Ͱؾ෇͍ͨ͜ͱ Operation Lab ӡ༻ઃܭϥϘ 32 ʮએݴܕσϓϩΠπʔϧʯʹ΋ υΩϡϝϯτ͸ඞཁ ճආ͢Δʹ͸ Ҿܧ୲౰ऀ ࣮૷ऀ

    ʮએݴܕσϓϩΠπʔϧʯͷҾ͖ܧ͗͸ ͔ͳΓͷ֬཰Ͱࣦഊ͍ͯ͠ΔͷͰ͸ ʮςϯϓϨʔτ΍Ϩγϐ͕͋Ε͹0,ʯͰ͸ͳ͍ݱ࣮
  13. Operation Lab ӡ༻ઃܭϥϘ σϓϩΠπʔϧ͋Δ͋Δ ݸਓతܦݧ • σϓϩΠπʔϧͰΰϦΰϦࣗಈԽͯ͠΍Δͥ • ͜ͷπʔϧͰͲΜͳσϓϩΠͰ΋Ͱ͖ΔΑ͏ʹ͢Δͥ ࠶ݱੑ

    ൚༻ੑ ʙ೥ޙ ϝϯςͰ͖ͳ͍ඪ४πʔϧɺ޻਺ׂ͔͚ͨʹ൚༻ੑ΋ΠϚΠνɺ ৽نҊ݅Ͱ࢖͏ͷʹͳʹ͔ͱख͕͔͔ؒΔίϨδϟφΠײ 
  14. Operation Lab ӡ༻ઃܭϥϘ ʮએݴܕσϓϩΠπʔϧʯʹԿΛظ଴͢Δͷ͔ 38 ࠶ݱੑ ൚༻ੑ ຊ൪؀ڥ ։ൃ؀ڥ ؀ڥ഑෍

    ݸਓతͳظ଴͸ίί ͋ͳͨ͸σϓϩΠπʔϧʹԿΛٻΊ͍ͨͷ͔ ࣮࣭తͳ ϝϦοτ͸
  15. ൚༻ੑɺෆ౎߹ͳਅ࣮ • ਅ࣮ൣғ͕ෆ໌ͳʮ൚༻ੑʯ͸ະఆٛͱಉٛ • ແݶͳ൚༻ੑ͸ଘࡏ͠ͳ͍ • ʮมԽʹ߹Θͤͯ൚༻ੑΛม͑Δʯ࿦ཧతʹ͢Ͱʹ͓͔͍͠ • ਅ࣮ʮ൚༻ੑͷఆٛʯ͸͏·͍͔͘ͳ͍ •

    ʮ൚༻ੑʯͷج४͕Կͳͷ͔ΛܾΊΔ͜ͱ͕ࠔ೉ɻ ओ؍ʹґଘ  • ج४͕ෆ໌֬Ͱ͋Ε͹ʮ൚༻ੑʯͷൣғΛఆٛ͢Δ͜ͱ΋ࠔ೉ • ਅ࣮ʮ൚༻ੑͷ֬อʯ͸͏·͍͔͘ͳ͍ • ʮ൚༻తͳखॱʯͰߏங࡞ۀ΍ӡ༻࡞ۀ͕͏·͘ߦ͘͜ͱ͸ك • ͪΐͬͱͨ͠ݸผࣄ৘Λٵऩ͢Δ͜ͱ͑͞΋ࠔ೉ʹ Operation Lab ӡ༻ઃܭϥϘ 39 ଟ͘ͷ৔߹ɺ൚༻ੑ͸ݬ
  16. ࠶ݱੑͷҙ֎ ͳਅ࣮ • ਅ࣮൚༻ੑΛࣺͯΔͱ࠶ݱੑ͕ߴ͘ͳΔ • ߟྀ͢΂͖ࣄ߲͕େ෯ʹݮΔͨΊɺ࠶ݱੑ֬อʹ஫ྗ͠΍͘͢ͳΔɻ • ࠶ݱੑ͕ٻΊΒΕΔର৅΍ൣғ΋ݶఆͰ͖ΔͨΊɺҡ࣋͠΍͘͢ͳΔɻ • ਅ࣮ଟػೳΛ͖͋ΒΊΔͱ࠶ݱੑ͕ߴ͘ͳΔ

    • ੍ޚߏจͳͲ͕ݮΔͨΊɺόά΍ޡಈ࡞ͷՄೳੑ͕͔ͳΓ௿͘ͳΔɻ • Մಡੑ΋ߴ͘ͳΔͷͰɺ࢓༷΍ڍಈͷ೺Ѳ΍Ҡ২͕͠΍͘͢ͳΔɻ • ਅ࣮มߋ΍ߋ৽Λ΍Βͳ͍ͱ࠶ݱੑ͕ߴ͘ͳΔ • ࠶ݱੑͷେ͖ͳ્֐ཁҼͱͳΔมߋ΍มԽΛഉআ͢Δͱ࠶ݱੑ͸ߴ·Δɻ • มߋΛੵΈॏͶΔΑΓɺ౎౓࡞੒࢖͍ࣺͯͷํ͕࠶ݱੑΛҡ࣋͠΍͍͢ɻ Operation Lab ӡ༻ઃܭϥϘ 40 Կ͔ΛࣺͯΔ͜ͱͰੜ·ΕΔ΋ͷ
  17. એݴܕσϓϩΠπʔϧͷϝϦοτ ࠶ 42 • ϝϦοτ࠶ݱੑ͕ߴ͍ • Ұ౓ಈ࡞֬ೝͰ͖ͨςϯϓϨʔτ Ϩγϐ ͸܁Γฦ͠࢖͑Δ •

    ϝϦοτૢ࡞͕γϯϓϧʹͳΔ Ҡ؅Մೳ  • σϓϩΠϘλϯίϚϯυҰൃͰߏஙͰ͖Δɻ • ϝϦοτ࠶ར༻ੑ͕ߴ͍ ഑෍Մೳ  • ࡞੒ͨ͠ςϯϓϨʔτ Ϩγϐ Λ഑෍͢Δ͜ͱͰɺଞऀ͕ར༻Ͱ͖Δɻ Operation Lab ӡ༻ઃܭϥϘ ൚༻ੑʹ߆ΔͱɺϝϦοτͱϝϦοτ͸ࣦΘΕΔͷͰ஫ҙ
  18. ·ͱΊ҆ఆͨ͠ʮӡ༻ࣗಈԽʯʹඞཁͳ͜ͱ Operation Lab ӡ༻ઃܭϥϘ 45 ӡ༻ͷఆܕԽ ӡ༻ࣗಈԽ ίʔυϨϕϧ खॱॻϨϕϧ ࡞ۀͷ໨త

    ࡞ۀͷ޻ఔ ࡞ۀͷ੒Ռ ໌֬ ໌֬ ΄΅ۉҰ ൺֱతۉҰ ϒϥοΫϘοΫεԽ ͠΍͍͢ رബԽ͠΍͍͢ खॱॻͱίʔυ͕࿈ಈ͍ͯ͠Δ͜ͱ͕ॏཁ ࣗಈԽπʔϧෆ۩߹࣌ͷ खಈରԠ·Ͱ૝ఆ͢Δͷ͕ ϓϩͷࣗಈԽ
  19. ·ͱΊʮએݴܕσϓϩΠπʔϧʯ΋υΩϡϝϯτඞཁ Operation Lab ӡ༻ઃܭϥϘ 46 ʮએݴܕσϓϩΠπʔϧʯʹ΋ υΩϡϝϯτ͸ඞཁ ճආ͢Δʹ͸ Ҿܧ୲౰ऀ ࣮૷ऀ

    ʮએݴܕσϓϩΠπʔϧʯͷҾ͖ܧ͗͸ ͔ͳΓͷ֬཰Ͱࣦഊ͍ͯ͠ΔͷͰ͸ ʮςϯϓϨʔτ΍Ϩγϐ͕͋Ε͹0,ʯͰ͸ͳ͍ݱ࣮