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

2023-12-01 吉祥寺.pm ベストプラクティスと組織とIaC

2023-12-01 吉祥寺.pm ベストプラクティスと組織とIaC

ベストプラクティスなんてものはない

SUZUKI Masashi

December 01, 2023
Tweet

More Decks by SUZUKI Masashi

Other Decks in Technology

Transcript

  1. ۚ
    ٢঵ࣉQN͖ͣ͢·͞͠
    ϕετϓϥΫςΟεͱ
    *B$ͱ૊৫
    ͋ͳͨΒ͘͠*B$

    View full-size slide

  2. ͓·͑ͩΕΑ
    w ͖ͣ͢·͞͠!NBTBTV[
    w Ϋϥ΢υΠϯϑϥͷͳΜͰ΋԰͞Μ
    w ओʹ"84ɺ(PPHMF$MPVE
    w ߏஙࢧԉɺઃܭࢧԉɺ࠷ۙ͸5FSSBGPSN৬ਓ

    View full-size slide

  3. ࠓ೥ͻͨ͢Β΍͖ͬͯͨ͜ͱ
    ൃද෼લʹςʔϚΛࢥ͍ग़͠·ͨ͠

    w 5FSSBGPSN৬ਓ
    w ͱ͍͏͜ͱͰ*B$ͷ࿩͠·͢

    View full-size slide

  4. ͓͜ͱΘΓ
    w *B$ͱݴͬͯ·͕͢ɺࣗ෼ࣗ਎΄΅5FSSBGPSNΛ࢖ͬͯΔͷͰͦ͜Λલఏʹ࿩
    ͠·͢ɻ
    w ͜͜Ͱݴ͏Πϯϑϥͱ͸"84΍(PPHMF$MPVEͳͲͷΫϥ΢υΠϯϑϥΛࢦ
    ͠·͢ɻ

    View full-size slide

  5. *B$ͷϕετϓϥΫςΟε

    View full-size slide

  6. ͦΜͳ΋ΜͶ͑Α

    View full-size slide

  7. ϕετϓϥΫςΟεͱ͸
    w ϕετϓϥΫςΟε ʲCFTUQSBDUJDFʳ
    w IUUQTFXPSETKQX
    &&#&&&"
    &"'&&"&#IUNM
    w ϕετϓϥΫςΟεͱ͸ɺ࠷ળͷํ๏ɺ࠷ྑͷࣄྫɺͳͲͷҙຯΛ࣋ͭӳޠ
    දݱɻԿ͔Λߦ͏ํ๏΍޻ఔɺͦͷ࣮ફྫͷதͰɺ͋Δج४ʹ͕ͨͬͯ͠
    ࠷΋༏Ε͍ͯΔͱධՁ͞Εͨ΋ͷͷ͜ͱɻ

    View full-size slide

  8. 5FSSBGPSNͷϕετϓϥΫςΟεͱݴΘΕͯΔ΋ͷ
    w 5FSSBGPSNΛ࢖༻͢ΔͨΊͷϕετϓϥΫςΟε c (PPHMF$MPVE
    w IUUQTDMPVEHPPHMFDPNEPDTUFSSBGPSNCFTUQSBDUJDFTGPSUFSSBGPSN
    IMKB
    w ࣗ෼͕ॻ͘ͱ͖͜ΕΛࢀর͢Δ͜ͱ͕ଟ͍
    w 5FSSBGPSN#FTU1SBDUJDFT
    w IUUQTXXXUFSSBGPSNCFTUQSBDUJDFTDPN
    w υϝΠϯతʹެࣜײ͋Δ͕ɺผʹެࣜͰ΋ͳΜͰ΋ͳ͍

    View full-size slide

  9. ૊৫ͷ਺͚ͩϓϥΫςΟε͸͋Δ
    w ࠷΋༏Ε͍ͯΔͱ͸ԿΛج४ʹ༏ΕͯΔͱ୭͕൑அͨ͠ͷ
    w ͲΜͳ૊৫ʹ΋௨͡Δۜͷ஄ؙͳͧͳ͍
    w ͦΕͧΕʹݸผͷࣄ৘͕ͦ͜ʹϚον͢Δ΋ͷ΋ͦΕͧΕ
    w ૊৫ͷ՝୊ʹରͯ͠ϓϥΫςΟε͕ଘࡏ͢Δ
    w *B$͚ͩͰͳ͘ΞϓϦέʔγϣϯʹؔͯ͠΋ಉ༷

    View full-size slide

  10. ϓϥΫςΟεͷબ୒ʹӨڹΛ༩͑Δཁૉ
    w *B$πʔϧ΁ͷशख़౓
    w Πϯϑϥ୲౰ͷϓϩάϥϛϯάݴޠͷशख़౓
    w ΞϓϦέʔγϣϯߏ੒
    w Πϯϑϥߏ੒
    w ϨϙδτϦߏ੒
    w ૊৫ߏ੒
    w ΠϯϑϥΞϓϦέʔγϣϯ୲౰ͷਓ਺ߏ੒΍ݖݶߏ੒

    View full-size slide

  11. *B$πʔϧͷબ୒
    બ୒ࢶ
    w $MPVE'PSNBUJPO :".-+40/
    "84ͷΈ
    w "84$%, ֤छݴޠ
    "84ͷΈ
    w $MPVE'PSNBUJPO΁ͷม׵ͱ࣮ߦ
    w (PPHMF$MPVE%FQMPZNFOU.BOBHFS :".-
    (PPHMF$MPVEͷΈ
    w 5FSSBGPSN )$-+40/

    w $%,GPS5FSSBGPSN ֤छݴޠ

    w 5FSSBGPSN +40/
    ΁ͷม׵ͱ࣮ߦ
    w 1VMVNJ ֤छݴޠ

    w *B$࢖Θͣʹίϯιʔϧ͔Βߦ͏
    w $-* BXTHDMPVEίϚϯυ
    ΍4%,ͷ࢖༻

    View full-size slide

  12. *B$πʔϧͷબ୒
    എܠɺ՝୊ͷ؍఺
    w Ϋϥ΢υԿΛ࢖͍ͬͯΔ͔
    w "84(PPHMF$MPVEϋΠϒϦου
    w ֤πʔϧ΁ͷशख़౓
    w ׳ΕͨπʔϧΛ࢖͍͍ͨΑͶ
    w ϓϩάϥϛϯάݴޠशख़౓
    w ૊৫ߏ੒
    w ઐ೚ͷΠϯϑϥ୲౰ΞϓϦέʔγϣϯ։ൃͱ݉೚
    w ෳࡶੑ
    w ࣍ϖʔδͰ

    View full-size slide

  13. *B$πʔϧͷબ୒
    ෳࡶੑͷ؍఺
    w :".-+40/)$-ϓϩάϥϛϯάݴޠ
    w ্هͷॱ൪Ͱॊೈੑͱෳࡶੑʹର͢ΔରԠྗ্͕͕Δ
    w Ϧιʔε୯ମͰݟΔͱ5FSSBGPSN )$-
    Ͱॻ͚͹୭͕ॻ͍ͯ΋͍͍ͩͨಉ͡هड़ʹͳΔ
    w ͦΕΏ͑ʹॊೈੑ͕গͳ͍ ϓϩάϥϛϯάݴޠʹൺ΂Δͱ

    w ྫ͑͹෼ذ͕ͳ͍ͷͰDPVOUจͱࡾ߲ԋࢉࢠͰٖࣅతʹ෼ذΛදݱ͢Δ
    w ͦΕΏ͑ෳࡶͳ͜ͱΛ͠Α͏ͱ͢ΔͷΛ͋Δఔ౓੍໿Ͱ͖Δ
    w ͋Δఔ౓Ҏ্ෳࡶͳ͜ͱ͢ΔͳΒ೚ҙͷϓϩάϥϛϯάݴޠ͕࢖͑Δ$%,΍1VMVNJ͕બ୒ࢶʹ
    w ୲౰ऀͷϓϩάϥϛϯάݴޠशख़౓Λߟྀ͢Δඞཁ͋Γ

    View full-size slide

  14. 5FSSBGPSN෼ذΛ࣮૷͍ͨ͠৔߹
    5FSSBGPSNͷෳࡶੑ΁ͷରԠݶք
    w $PVOUจͱࡾ߲ԋࢉࢠΛ૊Έ߹Θٖͤͯࣅతʹ෼ذΛදݱ͢Δ

    View full-size slide

  15. ϨϙδτϦߏ੒
    w ΞϓϦͱΠϯϑϥΛಉ͡ϨϙδτϦʹ͢Δ͔͠ͳ͍͔
    w جຊతʹ͸ϨϙδτϦ͸ݖݶͰ෼཭͢Δ
    w ΞϓϦέʔγϣϯ୲౰ऀʹΠϯϑϥมߋΛڐ༰͢Δ͔Ͳ͏͔
    w TUBUF ࣮ߦ୯Ґ
    ͷ෼ׂ୯ҐͲ͏͢Δ͔
    w খن໛Ͱ͋Ε͹શͯͷΠϯϑϥΛแؚͯ͠΋໰୊ͳ͍
    w ෼ׂ͢Δ৔߹ͷґଘؔ܎ͷղܾํ๏Λߟ͑Δඞཁ͕͋Δ

    View full-size slide

  16. ίʔυߏ੒
    5FSSBGPSNͷ৔߹
    w NBJOUGʹϦιʔεఆٛΛॻ͘Ϧιʔεछผ͝ͱʹϑΝΠϧΛ෼ׂ͢Δ
    w ݟΔ΂͖ϑΝΠϧ͕ଟ͘ͳΔͱݟ௨͕͠ѱ͘ͳΔ৔߹΋͋Δ
    w ϞδϡʔϧͰॲཧΛڞ௨Խ͢Δॏෳͯ͠΋΂ͨॻ͖͢Δ
    w ந৅Խ͢Δ͜ͱʹΑΓॳݟͰཧղ͠ʹ͘͘ͳΔ৔߹΋͋Δ
    w शख़౓ʹΑͬͯ͸৑௕ʹॻ͍ͨํ͕ϝϯςφϯε͠΍͍͢৔߹΋͋Δ
    w ύϒϦοΫϞδϡʔϧΛ࢖͏࢖Θͳ͍
    w ࣮૷ͷলུ͕Ͱ͖Δ൓໘ɺඇޓ׵มߋ΁ͷରॲͷ՝୊

    View full-size slide

  17. $*$%
    w *B$࣮ߦΛ$*$%ʹ೚ͤΔ͔
    w ΠϯϑϥมߋΛࣗಈͰ࣮ߦ͢Δͷ͕ා͍ͱ͍͏ҙݟ΋෼͔ΔɻQSE͚ͩखಈʹ͢Δͷ΋͋Γɻ
    w Ͳ͜Ͱߦ͏͔
    w ϨϙδτϦʹ෇ଐ͍ͯ͠Δ΋ͷΛ࢖༻͢Δ͔
    w (JU)VC"DUJPOT(JU-BC$*
    w 1VMM3FRVFTUʹ෇ਵ͢ΔͷͰίʔυͱͷ࿈ܞ͕Ͱ͖ͯศར
    w Ϋϥ΢υͷαʔϏεΛ࢖͏͔
    w $MPVE#VJME$PEF#VJME
    w Ϋϥ΢υͷݖݶͰ࣮ߦͰ͖ΔͷͰݻΊʹ౷੍Ͱ͖Δ
    w ϒϥϯνઓུ
    w 1VMM3FRVFTUͰ$*࣮ߦ
    w Ϛʔδ࣌ʹద༻Λࣗಈ࣮ߦͳͲ

    View full-size slide

  18. ·ͱΊ
    w ৭Μͳ؍఺ཁૉ͕͋ΓɺͦΕʹରԠ͢Δબ୒͕ͨ͘͞Μ͋Δ͜ͱΛݟ͖ͯ·ͨ͠
    w ͲΜͳͱ͖ʹ΋ద༻Ͱ͖ΔϕετϓϥΫςΟεͳΜͯͳ͍
    w ՝୊ͱഎܠ͕࠷ॳʹ͋ΓɺͦΕʹͱ΋ͳͬͯऔΓಘΔϓϥΫςΟε΋มԽ͢Δ
    w ૊৫ͷݱঢ়Λચ͍ग़্ͨ͠Ͱٕज़બఆΛ͢Δඞཁ͕͋Δ
    w ͲΜͳϓϥΫςΟεΛબ୒͢Δʹͯ͠΋ཧ༝෇͚Λ࢒͓ͯ͘͠
    w બ୒͠ͳ͍ཧ༝෇͚΋ՄೳͳΒ͓ͯ͘͠
    w ૊৫΋มԽ͢Δ͠ɺπʔϧ΋ϓϥΫςΟε΋มԽ͢ΔͷͰɺͦͷͱ͖Ͳ͖ʹ߹Θͤͯ࠶ߟ͢Δ
    w มԽ ਐԽ
    ͢ΔͨΊʹͳͥݱঢ়ͷ࢟ͳͷ͔Λ͸͖ͬΓͱ໌ه͓ͯ͘͠

    View full-size slide

  19. ͋ͳͨΒ͘͠*B$
    ͍ΘΏΔ᷿ͰݴΘΕ͍ͯΔ*B$ͷϕετϓϥΫςΟεΛ
    ͦͷ··औΓೖΕΔͷ͕ਅͷΰʔϧͰ͸ͳ͘ɺ
    ϓϥΫςΟεΛࣗ෼ͳΓʹղऍͯ͠
    ૊৫΍αʔϏεͱ޲͖߹͍ଓ͚ͨઌʹ
    ͋ͳͨ ͷ૊৫
    Β͍͠*B$͕ੜ·ΕΔͷͰ͢
    ࢀߟIUUQTTQFBLFSEFDLDPNBCOPVNBSVBOBUBSBTJLVTSFHPOHLBJZPOH

    View full-size slide

  20. ͭ·Γ͸5.5085%*
    ಥવͷ1FSMཁૉ

    View full-size slide

  21. 5IFSF`TNPSFUIBO
    POFXBZUPEPJU

    View full-size slide

  22. ਖ਼ղ͸ͻͱͭ͡Όͳ͍

    View full-size slide

  23. ͋Γ͕ͱ͏͍͟͝·ͨ͠

    View full-size slide