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

GunosyのMicroServicesとOpsWorks / よくわかる AWS OpsWorks

F4ab9a845cd932f7aa97bdb634d74d77?s=47 koid
March 26, 2015
5.1k

GunosyのMicroServicesとOpsWorks / よくわかる AWS OpsWorks

2015/03/26 よくわかるAWS OpsWorks

F4ab9a845cd932f7aa97bdb634d74d77?s=128

koid

March 26, 2015
Tweet

Transcript

  1. (VOPTZͷ.JDSP4FSWJDFTͱ0QT8PSLT גࣜձࣾ(VOPTZ খग़޾య

  2. ࣗݾ঺հ •  ໊લ –  খग़޾యʢ͍͜ͰΏ͖ͷΓʣ •  ॴଐ –  גࣜձࣾ(VOPTZ։ൃຊ෦ • 

    "84Πϯϑϥ୲౰ •  ෼ࢄόονʢ"84ͷ"1*ୟ͖·͘Δܥͷʣ •  ޷͖ͳ"84αʔϏε –  0QT8PSLT 5SVTUFE"EWJTPS
  3. ຊ೔͓࿩͍ͤͯͨͩ͘͞಺༰ •  (VOPTZͱ0QT8PSLT •  αʔόߏஙσϓϩΠ –  Ͳ͏΍͍ͬͯΔ͔ –  Ͳ͏มΘͬͨͷ͔ • 

    Πϯϑϥӡ༻ –  Ͳ͏มΘͬͨͷ͔
  4. ͜Μʹͪ͸(VOPTZͰ͢

  5. ओͳࣄۀͱΞϓϦέʔγϣϯ "E /FXT 1MBUGPSN ഑৴ "1* 8FC ਪન Ϋϩʔϥʔ ϝʔϧ

    ϓογϡ ௨஌ ഑৴ "1* ഑৴ "1* ύʔτφʔ༷ ޲͚ ؅ཧը໘ ͦͷଞશൠͱͯ͠ ؅ཧπʔϧɺϩάऩूɺ ,1*ूܭμογϡϘʔυ౳ʑɺɺɺ ͦͷଞ اը ίϯςϯπ ޿ࠂओ༷ ޲͚ ؅ཧը໘ ఏܞ֤༷ࣾ ޲͚ ؅ཧը໘
  6. (VOPTZͷ։ൃ.JDSP4FSWJDFT •  ૿͑Δ૿͑ΔΞϓϦ –  ϚΠΫϩαʔϏεʢബ͍ΞϓϦͷू߹ʣ •  ͻͱͭͷΞϓϦʹͳΜͰ΋͔ΜͰ΋ػೳΛ৐ͤͳ͍ •  "1*ͷཪଆͰผͷ"1*ݺͼग़͠ – 

    ύʔτφʔاۀ༷޲͚ͷ؅ཧπʔϧ΍*' –  اըίϯςϯπظؒݶఆίϯςϯπ •  ഭΔഭΔϦϦʔε –  ؀ڥߏஙʹ͔͚Δ࣌ؒ͸ແ͍ •  ʮ໌೔εςʔδϯά؀ڥͰ͖Δ͔ͳʁʯ •  ʮདྷिϦϦʔεͳΜ͚ͩͲʯ –  σϓϩΠʹ͔͚Δ࣌ؒ΋ແ͍ •  αʔϏεΠϯ·Ͱ͸τϥΠΤϥʔ •  ෳࡶͳσϓϩΠํ๏ͩͱͦ͜ʹ͕࣌ؒऔΒΕΔ •  ͱ͸͍͑ʮσϓϩΠ୲౰ʯΈ͍ͨͳਓ͕ډΔͱ͕ͦ͜ϘτϧωοΫʹ
  7. (VOPTZͱ0QT8PSLT •  4UBDL –  ݱࡏͷਁಁ཰͸dׂఔ౓ –  ৽نΞϓϦ͸جຊతʹ0QT8PSLT –  طଘΞϓϦ΋ઈࢍҠߦத • 

    ϛοΫεΠϯʹΑΔαʔόߏங –  ࣮͸$PPLCPPLϦϙδτϦ͸ͻͱ͚ͭͩ •  ͻͨ͢Βڞ௨Խڞ௨Խڞ௨Խ •  ΞϓϦ໊γεςϜ໊ͷೖͬͨϨγϐ͸ઈର࡞Βͳ͍ –  Ϩγϐͷ૊Έ߹Θ͚ͤͩͰ୹ظؒͰαʔόߏங •  σϓϩΠ͸ՄೳͳݶΓࣗಈԽ –  $JSDMF$*Λى఺ʹϏϧυσϓϩΠ ઌ೔ɺҰ൪ϝΠϯͷ χϡʔε഑৴"1*͕ 0QT8PSLTʹ৐Γ·ͨ͠
  8. αʔόߏஙͱσϓϩΠ Ͳ͏΍͍ͬͯΔ͔

  9. αʔόߏஙΑ͋͘Δύλʔϯ &-# 8FC 3%4 8PSLFS $BDIF 424 ৔߹ʹΑͬͯ &MBTUJ$BDIF΍ 3FEJTPO&$

    ৔߹ʹΑͬͯෳ਺ʹ ͳͬͨΓ .POHP%#PO&$ ৔߹ʹΑͬͯ 3FEJTPO&$ MySQL
  10. αʔόߏஙϛοΫεΠϯͷྫᶃ ࠓճͷΞϓϦ͸HPͰ ϩάΛϩʔΧϧͷ UEBHFOUʹྲྀ͍ͨ͠ Ϧόϓϩ͸/HJOY ιέϚ͸FJOIPSOͰ ؂ࢹ͸Α͠ͳʹ

  11. αʔόߏஙϛοΫεΠϯͷྫᶄ ࠓճͷΞϓϦ͸ %KBOHPͰ ϫʔΧʔىಈ͸ TVQFSWJTPSͰ Ϧόϓϩ͸/HJOY ιέϚ͸HVOJDPSOͰ ؂ࢹ͸Α͠ͳʹ

  12. %PDLFS࢖͍͍ͨ αʔόߏஙͦͷଞΑ͋͘Δཁ๬ %#ʹ.POHP%#࢖͍͍ͨ 3FEJTɺCHTBWFແ͠Ͱ /HJOYͷSMJNJUOPpMF UEBHFOUͷGPSXBSEઌ JGͷNUV஋͕ʜ .FTTBHF2VFVFʹ /42Λ

  13. αʔόߏஙͦͷଞΑ͋͘Δཁ๬ %PDLFS࢖͍͍ͨ %#ʹ.POHP%#࢖͍͍ͨ 3FEJTɺCHTBWFແ͠Ͱ /HJOYͷSMJNJUOPpMF UEBHFOUͷGPSXBSEઌ JGͷNUV஋͕ʜ .FTTBHF2VFVFʹ /42Λ ॊೈʹઃఆΛೖΕΒΕΔϨγϐ

     ޙ͸DVTUPNKTPOͰ͕Μ͹Δ
  14. αʔόߏங؂ࢹ΋ϛοΫεΠϯ •  ;BCCJYͰ֤.JEEMF8BSFຖʹ؂ࢹ߲໨Λઃఆ –  ϨΠϠʔʹରͯ͠.JEEMF8BSFͷςϯϓϨʔτΛϦϯΫ ༨Γ͓ݟͤͰ͖·ͤΜ͕ʜ

  15. σϓϩΠΑ͋͘Δύλʔϯ master develop feature upload deploy upload deploy merge merge

    release copy staging produc2on semi-­‐prod •  0QT8PSLTΛར༻͞Ε͍ͯΔଞ༷ࣾͱେମಉ͡ –  $JSDMF$*ͰϏϧυΞοϓϩʔυσϓϩΠ
  16. σϓϩΠ$VTUPN"QQMJDBUJPOͷσϓϩΠ リバプロ ソケマ nginx unicorn Rails nginx gunicorn Django nginx

    einhorn Golang ⾮非同期ワーカ sidekiq celery -‐‑‒ 場合によって   Varnishとか 場合によって   Supervisorとか •  ૊Έ߹ΘͤύλʔϯΛ෼ੳ͠ɺϨγϐԽ –  جຊతʹBXTPQTXPSLTDPPLCPPLTͷSBJMTΛ౿ऻ
  17. σϓϩΠڞ௨ϨγϐͱΞϓϦݻ༗Ϩγϐ •  ΞϓϦέʔγϣϯ໊αʔό໊ͷೖͬͨSFDJQF͸࡞Βͳ͍ –  ΞϓϦݻ༗ͱͳΔ෦෼͸$BMMCBDLΛར༻ •  CFGPSF@NJHSBUF CFGPSF@TZNMJOL CFGPSF@SFTUBSU BGUFS@SFTUBSU

    –  BTTFUTQSFDPNQJMF΍DPMMFDUTUBUJD –  DSPOͷొ࿥ɺTVQFSWJTPS΁ͷQHNొ࿥ •  ϨΠϠ XFC XPSLFS ຖʹৼΔ෣͍Λม͑Δ͜ͱ΋Մೳ –  JGOPEF<PQTXPSLT><JOTUBODF><MBZFST>pSTUdXFC –  JGOPEF<PQTXPSLT><JOTUBODF><IPTUOBNF>dXFC
  18. αʔόߏஙͱσϓϩΠ Ͳ͏มΘͬͨͷ͔

  19. Ͳ͏มΘͬͨͷ͔CFGPSF •  ൿ఻ͷΰʔϧσϯҋ".* –  Կ͕ೖ͍ͬͯͯͲ͏͍͏ઃఆͨ͠ͷ͔Θ͔Βͳ͍ –  ͱΓ͋͑ͣίϐʔͯ͠࢖͍·Θͦ͏ •  ΞϓϦຖʹཚཱ͢ΔσϓϩΠεΫϦϓτ – 

    GBCͩͬͨΓDBQͩͬͨΓ –  ΞϓϦຖʹҟͳΔσϓϩΠαʔό –  ಉ͡ΞϓϦͳͷʹҰ෦αʔό͚ͩϩάΠϯͯ͠HJUQVMMͩͬͨΓ •  ఆ࣌ʹΠϯελϯεΛىಈɾऴྃͤ͞Δ಺੡πʔϧ –  FD4UBSU*OTUBODFɺ্هͷσϓϩΠεΫϦϓτɺ FMC3FHJTUFS*OTUBODFT8JUI-PBE#BMBODFS
  20. Ͳ͏มΘͬͨͷ͔BGUFS •  αʔόઃఆͷݟ͑ΔԽ –  ඞͣਅͬ͞Βͳ".*͔Βߏங –  44)ϩάΠϯͯ͠ͷมߋ࡞ۀ͸ېࢭ •  શͯͷΞϓϦͰ౷Ұ͞ΕͨσϓϩΠͷ࢓૊Έ – 

    σϓϩΠαʔόɾϏϧυαʔόΛ࣋ͨͳ͍࡞Βͳ͍ –  ΞϓϦݻ༗ͷσϓϩΠॲཧ͸$BMMCBDLʹهࡌ –  44)ϩάΠϯͯ͠ίϚϯυଧͭͷ͸ېࢭ •  ࡞Βͳͯ͘ྑ͍಺੡πʔϧ͔Βͷ୤٫ –  ͋Δఔ౓ͷ͜ͱ͸0QT8PSLT͕উखʹ΍ͬͯ͘ΕΔ –  ຊ౰ʹඞཁͳ΋ͷͳΒଞͷελοΫͰ΋࢖͑ΔΑ͏ʹ࡞੒ •  αʔόߏங͕ѹ౗తʹૣ͘ͳͬͨ –  ΄΅*".ͱηΩϡϦςΟάϧʔϓΛ੾Δ࡞ۀ͚ͩ
  21. Πϯϑϥӡ༻ Ͳ͏มΘͬͨͷ͔

  22. ΠϯελϯεͷϢʔβ؅ཧ •  FDVTFS͔Βͷ୤٫ –  GBCSJD౳ͷϓογϡܕπʔϧ͸44)ݤ͕ࢃ͔Ε͍ͯΔ͜ͱ͕લఏ –  ͜ͷݤͷ؅ཧ͕൥ࡶˠߟ͑ͳͯ͘Α͘ͳͬͨ •  ݸਓͷ44)ݤ – 

    ελοΫຖʹΞΫηεݖݶΛॊೈʹࢦఆͰ͖Δ –  ݤͷมߋ΋ɺը໘Ͱొ࿥͢Ε͹উखʹࢃ͍ͯ͘ΕΔ
  23. ো֐ൃੜ࣌ͷௐࠪ΍Ұ࣍ରԠ •  Τϥʔϩά͸FSSCJU BJSCSBLF ΁ू໿ –  جຊతʹαʔό΁ͷϩάΠϯ͸ෆཁ –  ͱ͸͍͑ɺͦΜͳ͜ͱݴͬͯΔ৔߹Ͱ͸ͳ͍࣌΋͋Δ • 

    ͲΜͳΞϓϦέʔγϣϯαʔόʹೖͬͯ΋ɺ –  σϓϩΠͷ࢓૊Έ͕౷Ұ͞Ε͍ͯΔͱ •  ඞͣಉ͡৔ॴʹΞϓϦέʔγϣϯϩά͕͋Δ •  ඞͣಉ͡৔ॴʹ࠶ىಈεΫϦϓτ͕͋Δ –  ʮ͜͜ʹߦ͚͹99͕͋ΔΑͶʯͱ͍͏҆৺ײ
  24. ύονɾΞοϓσʔτ •  ೥ɺͨ͘͞Μͷ੬ऑੑ͕ݟ͔ͭΓ·ͨ͠ –  ೥΋ͨ͘͞Μͷ੬ऑੑ͕ݟ͔ͭΔͱࢥ͍·͢ –  ͨ͘͞Μͷύον͕ެ։͞ΕΔͱࢥ͍·͢ •  0QT8PSLTͳΒ – 

    VQEBUF@EFQFOEFODJFTͷ࣮ߦ –  ·ͨ͸৽͘͠Πϯελϯε௥Ճͯ͠ݹ͍ΠϯελϯεΛ࡟আ
  25. ·ͱΊ •  0QT8PSLTΛಋೖͯ͠ –  αʔόߏஙɾσϓϩΠͷ݈શԽ –  αʔόߏஙͷߴ଎Խ –  ݪଇ44)ϩάΠϯͤ͞ͳ͍ – 

    Πϯϑϥӡ༻ͷޮ཰Խ