Webサービスを1日10回デプロイするための取り組み / SRE NEXT 2020

Webサービスを1日10回デプロイするための取り組み / SRE NEXT 2020

Ca6281fff64797dc419b78f51f25c0a5?s=128

FUJIWARA Shunichiro

January 25, 2020
Tweet

Transcript

  1. 8FC؟٦ؽأ׾傈㔐 رفٗ؎ׅ׷׋׭ך《׶穈׫ 43&/&95 !GVKJXBSB

  2. !GVKJXBSB 43&ث٦ي HJUIVCDPNGVKJXBSB TGVKJXBSBIBUFOBCMPHDPN WEB+DB Press vol.111ʙ SREνʔϜ࿈ࡌ ΈΜͳͷGoݴޠ

  3. (BNF$PNNVOJUZ

  4. "HFOEB • σϓϩΠͷߏ੒ཁૉͱߴ଎Խͷྺ࢙ 1. CI 2. ഑෍ 3. Τϥʔݕ஌ 4.

    ϩʔϧόοΫ • ͩΕͰ΋σϓϩΠͰ͖Δ࢓૊Έͱ؅ཧ • ίϯςφҠߦޙͷσϓϩΠ
  5. ⟗꟦ְָ׷ה؜٦يָ׮׏ה꬗涯ֻז׷ ιʔγϟϧήʔϜϢʔβʔ޲͚ͷίϛϡχςΟαʔϏε άϧʔϓνϟοτɺϘΠενϟοτɺ഑৴ػೳͳͲΛఏڙ

  6. -PCJךءأذيך娖〷 2010೥ ʮφΧϚοϓʯͱͯ͠ϦϦʔε (AWS us-east-1) 2011೥ ΦϯϓϨ؀ڥ΁Ҡߦ 2013೥ ʮLobiʯʹվ໊ɺAWS (ap-northeast-1)

    ʹҠߦ 2019೥ EC2 → ECS Ҡߦ։࢝ (ਐߦத) ΋͏͙͢10೥બख 30ʙ40ਓͷνʔϜɺΤϯδχΞ͕൒਺ఔ౓ SRE 2໊(݉೚)
  7. -PCJךءأذي圓䧭 • APIαʔό Perl on EC2 • ϚΠΫϩαʔϏεతͳ΋ͷ Go (͔ͭͯ͸Nodeɺ࠷ۙશഇʹ੒ޭ)

    • σʔλετΞ MySQL (on EC2... ΋͏͙͢ Aurora ʹͳΔ༧ఆ) Redis (ElastiCache) • ϒϥ΢β޲͚ϑϩϯτΤϯυ Nuxt.js (Vue.js) (͔ͭͯ͸ Angular.JS 1.x ࡢ೥ Nuxt ʹҠߦ) • iOS, Android ޲͚ωΠςΟϒΞϓϦ
  8. 傈ח㔐رفٗ؎׃׋ְ ͜͜Ͱ͍͏σϓϩΠ = ҎԼͷ͢΂ͯ • αʔόΞϓϦέʔγϣϯ (ຊମAPIɺϚΠΫϩαʔϏε) • ϑϩϯτΤϯυ (Nuxt.JS)

    • EC2 ͷϓϩϏδϣχϯά (Chef) • AWSͷߏ੒มߋ (Terraform) मਖ਼΍ػೳ௥Ճɺ࡟আ͸͙͢ʹσϓϩΠ͍ͨ͠ Ұ౓ͷࠩ෼Λখࣦͯ͘͞͠ഊΛڐͤΔΑ͏ʹɾӨڹൣғΛݶఆ ৗʹσϓϩΠ͍ͯ͠Ε͹ɺرفٗ؎ָ䙳ֻזֻז׷
  9. 傈ח⡦儗꟦⢪ִ׷ַ Ӧۀ࣌ؒ 9:29ʙ18:29 (9࣌ؒ) Ӧۀ࣌ؒ֎ɺٳલ೔(ޕޙ)͸جຊతʹσϓϩΠ͠ͳ͍ ٳલ೔ʹσϓϩΠ͢Δͱͦͷ࣌఺Ͱ͸໰୊͕ͳͯ͘΋… → ͦͷ໷ͷϐʔΫλΠϜʹ໰୊͕ൃ֮ → ࣍ͷ໷ؒɾૣேͷόονॲཧʹ໰୊͕ൃੜ

    → Ϣʔβʔͷ໰͍߹Θ͕ͤٳ೔தʹ૿͑Δ ͲΕ΋ٳ೔ରԠ͕ඞཁʹͳΔ սٕ٦ٕվͲ͏ͯ͠΋ٳલ೔ʹσϓϩΠ͍ͨ͠৔߹͸ ରԠͰ͖ΔਓһΛࣄલ֬อ͢Δ(ٳ೔ग़ۈͯ͠΋Β͏)
  10. 儗꟦ד㔐رفٗ؎ׅ׷׋׭חכ 1ճͷσϓϩΠʹ࢖͑Δ࣌ؒ͸30෼ҎԼ ߴස౓ʹσϓϩΠ͢ΔͨΊʹ → 1ճ1ճͷσϓϩΠΛߴ଎Խ͢Δ ୭Ͱ΋σϓϩΠͰ͖ΔΑ͏ʹ → ઐ೚ͷ୲౰ऀΛ࡞Βͳ͍ ͍ͭԿ͕σϓϩΠ͞Ε͔ͨ؅ཧͰ͖ΔΑ͏ʹ →

    ࣗಈͰه࿥ɺՄࢹԽ͢Δ
  11. չرفٗ؎պך銲稆 1. CI → ςετ͕௨͍ͬͯͳ͍΋ͷ͸ϦϦʔεͰ͖ͳ͍ 2. Ϗϧυ/഑෍ (ڱٛͷσϓϩΠ) 3. Τϥʔݕ஌

    → ໰୊͸͙͢ʹݕ஌͍ͨ͠ 4. ϩʔϧόοΫ → ଈ࠲ʹ໭ͯ͠μϝʔδΛ࠷খݶʹ ͜ΕΒׅץגך銲稆׾넝鸞⻉͍ͯ͘͠
  12. رفٗ؎넝鸞⻉ך娖〷$*箟 1. $* 2. ഑෍ 3. Τϥʔݕ஌ 4. ϩʔϧόοΫ

  13. $*넝鸞⻉ך娖〷 ຊମ API = Perl ͷΘΓͱେ͖͍ϞϊϦε ΞϓϦέʔγϣϯ 26ສߦ ʴ ςετ

    26ສߦ (Cookpad ຊମͷRuby͕27ສߦ1 ϥΠϒυΞϒϩάͷίʔυ͕41ສߦ2) ࣮ࡍʹ MySQL ΍ Redis Λىಈͯ͠ςετ͍ͯ͠Δ ςετΛ۪௚ʹ΍Δͱ΋ͷֻ͍͕͔࣌ؒ͢͝Δ ۩ମతʹ͸Կ΋ߟ͑ͣ௚ྻʹ΍Δͱ೔͕฻ΕΔϨϕϧ 2 https://logmi.jp/tech/articles/322235 1 https://employment.en-japan.com/engineerhub/entry/2019/09/17/103000
  14. $*넝鸞⻉ך娖〷 Jenkins master + slave (ڧ͍EC2Πϯελϯε) Perl ͷςετ͸جຊతʹγϯάϧϓϩηε ίΞ͕͍ͭ͋ͬͯ͘΋ͦͷ··Ͱ͸଎͘ͳΒͳ͍ͨΊࣗલͰฒྻԽ MySQL

    / Redis / etc ΋ฒྻͰىಈ͠ͳ͍ͱεέʔϧ͠ͳ͍ (͕ɺίΞ਺෼ىಈ͢Δͷ͸ແཧ) 1ϓϩηεͷ MySQL Λ8ϓϩηεͷ Perl Ͱར༻͢Δ = 1ηοτ ͦΕΛ͞Βʹ8ฒྻͰಈ͔͢ = ߹ܭ64ฒྻ 64ίΞϚγϯͰ10෼͙Β͍ͰऴΘΔঢ়ଶͰ͸͋ͬͨ
  15. $*ָ鹼ְֿהח״׷أزٖأ push ͯ͠΋୭͔͕ςετΛճ͍ͯ͠Δͱ10෼Ҏ্଴ͭ ෳ਺଴͕ͪ͋Δͱ਺े෼ ϩʔΧϧͰͦͷςετ͚ͩճͨ͠Γ͍ͯ྇͠Ͱ͍͕ͨ pushͯ͠ΈͨΒϩʔΧϧͰճ͍ͯ͠ͳ͍ςετ͕ίέͨΓ͢Δ ࠷ऴతʹ͸͢΂ͯ௨͔ͯ͠ΒσϓϩΠ͢Δඞཁ͕͋Δ ۓٸରԠ࣌ʹ΋Ͳ͔͍͠

  16. $JSDMF$*ְְָ׵׃ְ׊ CircleCI Performance Plan (౰࣌) ͷମݧ͕Α͍ͱ͍͏࿩Λฉ͍ͨͷͰಋೖ 2019೥5݄ʙ ࠷େ8ίΞ (౰࣌) ͷίϯςφΛฒྻͰىಈͰ͖Δ

    ىಈ͍ͯ͠Δίϯςφ਺ × ࣌ؒͰར༻ྉ͕ܾ·Δ (+ΞΫςΟϒϢʔβʔ՝ۚ)
  17. $JSDMF$*חذأز׾䭯׏גְֻ 8ίΞίϯςφΛ20ฒྻ × 1ίϯςφ಺Ͱ8ฒྻ = 160ฒྻ 10෼ → 3෼ʹʂ

  18. $*ך넝鸞⻉٥أ؛٦ٓؽٔذ؍ך栻䖤 1. ίʔυͱςετΛॻ͘ 2. commit & push 3. GitHub Ͱ

    PR Λ࡞ͬͯઆ໌Λॻ͍͍ͯΔ͏ͪʹ… 4. CI ͕ऴΘ͍ͬͯΔ ετϨε͕ͳ͍ ࠓޙςετ͕૿͑ͯ΋ฒྻ਺Λ্͛ͯεέʔϧͰ͖Δ
  19. UJQT$JSDMF$*ךذأز؎ً٦آꂁ縧㜥䨽 Lobi ͷαʔό͸͢΂ͯ AWS ౦ژϦʔδϣϯ (ap-northeast-1) ʹ͋Δ Կ΋ߟ͑ͣʹ ECR (ίϯςφϨδετϦ)

    ΋౦ژϦʔδϣϯΛ࢖͍͕ͬͯͨ CircleCI ͷ࣮ߦ؀ڥ͸ us-east-1 ʹ͋Δ (ݱ࣌఺) → CI ࣮ߦ͝ͱʹόʔδχΞ͔Β౦ژͷίϯςφΠϝʔδΛ Pull (×ฒྻ਺)
  20. את׶ֲֿ

  21. $JSDMF$*ךذأز欽؎ً٦آכVTFBTUח縧ֻ ౦ژʹ͋Δͱ͍Ζ͍Ζίετ͕ߴ͍ • ίϯςφͷىಈ࣌ؒ ⏰ • Ϧʔδϣϯؒసૹྉۚ " ͜Ε͚ͩͰίϯςφىಈ͕ߴ଎ʹ

  22. رفٗ؎넝鸞⻉ך娖〷ꂁ䋒箟 1. CI 2. ꂁ䋒 3. Τϥʔݕ஌ 4. ϩʔϧόοΫ

  23. ؿ؋؎ٕꂁ䋒넝鸞⻉ך娖〷 2010೥ʙ σϓϩΠαʔό(EC2) ͔Β֤ϗετ͕ git pull • ୆਺͕૿Ճ͢Δͱ Git ͷෛՙ͕όΧʹͳΒͳ͍

    • όΠφϦͷ੒Ռ෺Λ commit ͨ͘͠ͳ͍ 2013೥ʙ σϓϩΠαʔό͔Β֤ϗετʹฒྻ rsync (push) • AWSʹҠߦͯ͠ϗετ୆਺΋૿Ճɺ਺े୆ʹσϓϩΠ͕ඞཁʹ • 10ฒྻͰ rsync ͯ͠΋ऴΘΔ·Ͱ3ʙ4෼(Ջ)
  24. ؔ٦زأ؛٦ٕפך㼎䘔 2014೥ήʔϜಈը࿥ըαʔϏεΛSDKఏڙ։࢝(ݱࡏ͸ऴྃ) ࠷ॳ͸ Elastic Transcoder Λར༻ ϞϯελʔετϥΠΫʹಋೖ → Elastic Transcoder

    Ͱ͸嫣剢㹺ָ䒉אꆃ겘ח ΠϯελϯεΛେྔʹىಈͯࣗ͠લͰಈըม׵͢Δ࡞ઓʹมߋ → ؔ٦زأ؛٦ٕ׃׋ְ (੾࣮) ͋Δϗετ͔ΒϑΝΠϧΛ഑ΔઓུͰ͸Φʔτεέʔϧ΁ͷରԠ͕ࠔ೉ AMI Λຖճ࡞͍ͬͯͨΒ1೔ʹ10ճσϓϩΠͰ͖ͳ͍
  25. 4USFUDIFS׾Ꟛ涪 HJUIVCDPNGVKJXBSBTUSFUDIFS ഑෍Λ push → pull ʹ σϓϩΠͷ഑෍෺ (tar.gz)Λ͋Β͔͡Ί S3

    ʹஔ͘ ֤ϗετͷ Stretcher(ίϚϯυ) ͕ S3 ͔Β औಘɺ ల։ɺϓϩηε࠶ىಈΛߦ͏ ΦʔτεέʔϧͰىಈͨ͠ϗετ͸࠷৽ͷtarΛS3 ͔Βऔಘͯ͠ΞϓϦέʔγϣϯΛىಈ͢Δ ࢥ૝తʹ͸ίϯςφͷσϓϩΠͱࣅͨΑ͏ͳ΋ͷ ίϯςφ࣮ӡ༻͸·ͩૣ͍(2014೥຤) ͔͠͠Φʔτεέʔϧ΁ͷରԠ͸ࠓ͙͍ͨ͢͠ ં஭Ҋ
  26. 4USFUDIFSח״׷넝鸞⻉⸬卓 • rsync ࣌୅ 3ʙ4෼ • tar࡞੒ / S3 ΁Ξοϓϩʔυ

    30ඵ • શ୆ʹΠϕϯτ௨஌ͯ͠ Stretcher ͕σϓϩΠΛ׬ྃ͢Δ·Ͱ 30ඵ ߹ܭ1෼ఔ౓ʹ୹ॖ 1෼ͳΒͦͷ··଴ͯΔ 3ʙ4෼Ջͩͱͦͷؒʹଞͷ͜ͱΛͨ͘͠ͳΔ
  27. 4USFUDIFSח״׷أ؛٦ٓؽٔذ؍ך栻䖤 rsync: ഑෍ݩͷϗετͷ CPU / ωοτϫʔΫͰ཯଎ ୆਺͕૿͑ΔͱΠϯελϯεΛڧ͘͢Δඞཁ͕͋Δ Stretcher: S3 ͷڧ͞ʹґଘ

    S3 ͕଱͑ͯ͘ΕΔݶΓεέʔϧ͢Δ
  28. رفٗ؎넝鸞⻉ך娖〷ؒٓ٦嗚濼箟 1. CI 2. ഑෍ 3. ؒٓ٦嗚濼 4. ϩʔϧόοΫ

  29. ؒٓ٦嗚濼ךꅾ銲䚍 σϓϩΠޙɺΤϥʔ͕ͳ͍͜ͱΛ֬ೝ͔ͯ͠ΒͰͳ͍ͱ׬ྃͰ͖ͳ͍ ൃ֮લʹผͷσϓϩΠΛߦͬͯ͠·͏ͱϩʔϧόοΫ͕൥ࡶʹͳΔ ϩά͔Β໰୊͕ൃੜͨ͠৔߹ʹߴ଎ʹݕ஌ͯ͠௨஌͢Δ࢓૊ΈΛ੔͑Δ 1෼ఔ౓Ͱݕ஌͍ͨ͠

  30. /PSJLSBח״׷ؚٗפךؙؒٔ norikra.github.io Stream processing with SQL for everybody ετϦʔϛϯάσʔλʹରͯ͠SQLͰΫΤϦΛ࣮ߦͰ͖Δ αʔό

    → Fluentd → Norikra → ௨஌
  31. ،فٔ؛٦ءّٝךַؚٗ׵ז׿׵ַךؒٓ٦׾嗚濼 app_exception count:1 app-i-0ad5e77d [613][667331357105553408] [WARN]error: Can't call method "as_json_for_invitation"

    on an undefined value ... SELECT 'app_exception' AS title, count(*) AS count, last(_hostname) AS _hostname, last(message) AS message FROM app.win:time_batch(1 min) WHERE (message LIKE '%Caught exception%' OR message LIKE '%error:%' OR message LIKE '%limit exceeded:%') AND (message NOT LIKE '%[INFO]%') ͜ͷΫΤϦͰϚον͢Δͱ1෼ʹ1౓௨஌͕དྷΔ
  32. ؚٗ嗚濼׾黝ⴖזXJOEPXד㹋遤ׅ׷ Τϥʔ͕େྔൃੜͯ͠΋1෼ʹ1ճ͚ͩ௨஌͢Δ (௨஌Λരൃͤ͞ͳ͍) • Τϥʔͷൃੜ਺ • ൃੜͨ͠ϗετ • ۩ମతͳϝοηʔδ Λ௨஌ʹࡌͤͯɺৄࡉʹݟΔ͔Ͳ͏͔Λ൑அ͢Δ

    ϩάू໿ͱݕ஌ΛετϦʔϛϯάͰߦ͍ɺΠϕϯτൃੜޙ1෼Ͱ௨஌͕དྷΔΑ͏ʹ
  33. رفٗ؎넝鸞⻉ך娖〷ٗ٦ٕغحؙ箟 1. CI 2. ഑෍ 3. Τϥʔݕ஌ 4. ٗ٦ٕغحؙ

  34. ٗ٦ٕغحؙ σϓϩΠͯ͠໰୊͕ൃ֮ͨ͠Βଈ࠲ʹ໭͍ͨ͠ 稆劰זٗ٦ٕغحؙرفٗ؎׾׮ֲ㔐 1. ϦόʔτPR࡞੒ɺϨϏϡʔ ؒҧͬͨίϛοτΛϦόʔτ͍ͯ͠ͳ͍͔ 2. ϦϦʔεϒϥϯνʹϚʔδ CI΋଴͍ͪͨ 3.

    σϓϩΠ͠௚͠ Ͳ͏ٸ͍Ͱ΋5෼Ҏ্ֻ͔Δ PRΛϦόʔτ͢Δͷ͸ਓؒͳͷͰϛε͕ࠞೖ͢Δ༨஍͕͋Δ
  35. 4USFUDIFSח״׷넝鸞ٗ٦ٕغحؙ pullܕσϓϩΠ = ࠓճͷσϓϩΠ௚લ·ͰσϓϩΠ͞Ε͍ͯͨ੒Ռ෺͸S3ʹ͋Δ σϓϩΠ࣌ʹࣗಈͰ௚લͷ੒Ռ෺ͷURLΛه࿥ ϩʔϧόοΫ = ௚લͷURLΛࢦఆ࣮ͯ͠ߦ͢Δ͚ͩ • tar࡞੒/S3

    upload 30ඵ • શ୆ʹΠϕϯτ௨஌ͯ͠ Stretcher ͕σϓϩΠΛ׬ྃ͢Δ·Ͱ 30ඵ 30ඵͰϩʔϧόοΫ͕׬ྃ ਓ͕ؒհࡏ͠ͳ͍ͷͰϛεΛ͠ͳ͍
  36. رفٗ؎넝鸞⻉תה׭ 1. CI: Jenkins ࣌୅ 10෼ → $JSDMF$*ⴓ 2. ഑෍:

    rsync ࣌୅ 3ʙ4෼ → 4USFUDIFSⴓ 3. Τϥʔݕ஌: /PSJLSBⴓ 4. ϩʔϧόοΫ: ϦόʔτPR 5෼ → 4USFUDIFS猱 ຖճͷσϓϩΠΛ5෼ఔ౓Ͱ׬ྃͰ͖ΔΑ͏ʹͳͬͨ
  37. 铩ד׮رفٗ؎דֹ׷➬穈׫ה盖椚

  38. 铩ד׮رفٗ؎דֹ׷➬穈׫ה盖椚 رفٗ؎ך孖⚺⻉ ❌ ಛఆͷ୲౰ऀ͕σϓϩΠ ⭕ ίʔυΛॻ͍ͨਓ͕ͩΕͰ΋σϓϩΠͰ͖Δ (1೔10ճσϓϩΠͨ͠Β୲౰ऀ͸ͦΕ͔͠Ͱ͖ͳ͘ͳΔ) ୭Ͱ΋㸜ⰋחσϓϩΠͰ͖Δ࢓૊ΈΛ੔͑Δ

  39. 3VOEFDLח״׷رفٗ؎㹋遤

  40. 3VOEFDL www.rundeck.com/open-source Job ఆٛɺ࣮ߦΛߦ͑Δ Automation Software ϦϞʔτϗετ΁ͷ࣮ߦ΍εέδϡʔϧ࣮ߦ΋(LobiͰ͸࢖͍ͬͯͳ͍) σϓϩΠʹඞཁͳίϚϯυΛୟͨ͘Ίͷ Web UI

    ͱͯ͠ར༻ • EC2, ECS, Lambda ͷσϓϩΠ / ϩʔϧόοΫ • Chef ʹΑΔϓϩϏδϣχϯά • Terraform ʹΑΔߏ੒มߋ • ΦʔτεέʔϦϯάͷૢ࡞(୆਺Λ૿΍͢ͳͲ)
  41. رفٗ؎㾶娖׾盖椚ׅ׷ ͍ͭԿ͕σϓϩΠ͞Εͨͷ͔Λه࿥͍ͨ͠ • ໰୊ൃੜ࣌ ԿΛσϓϩΠͨ͠ޙʹൃੜͨ͠ͷ͔ • ͍ͭσϓϩΠ͍ͯ͠Δͷ͔ (ۀ຿࣌ؒ֎/ٳલ೔ɺٳ೔) github.com/Songmu/ghch Git

    ͷཤྺ͔Β ChangeLog Λࣗಈੜ੒͢Δπʔϧ Git TagΛݩʹɺ௚લͷσϓϩΠͱࠓճͷσϓϩΠ·Ͱͷࠩ෼Λ࡞Δ
  42. HIDIדرفٗ؎חろת ׸׷13׾《䖤׃ג鎸ꐮ ghch --from $recent_tag { "pull_requests": [ { "number":

    23013, "state": "closed", "title": "...........", Google ΧϨϯμʔʹه࿥ Mackerel ͷάϥϑΞϊςʔγϣϯʹه࿥
  43. None
  44. 4MBDLCPUח״׷ رفٗ؎ך盖椚 ຊདྷ͸ϨϏϡʔΞαΠϯ/ PR ͷϥϕϧ෇͚Λα ϙʔτ͢Δ Slack App (bot) ςετ͕௨͍ͬͯͳ͔ͬͨΓ

    ࣌ؒ֎ͷσϓϩΠΛߦ͓͏ͱ͢Δͱܯࠂ͢Δ
  45. ؝ٝذش獳遤䖓ךرفٗ؎

  46. ؝ٝذش獳遤䖓ךرفٗ؎ ݱࡏγεςϜશମΛ EC2 ͔Β Amazon ECS ʹҠߦத Կ͕มΘΔ͔ CI: มΘΒͳ͍

    Ϗϧυ: EC2 → CircleCI (image build) ꂁ䋒ծٗ٦ٕغحؙ4USFUDIFS̔&$4 ؒٓ٦嗚濼/PSJLSB̔'JSFIPTF 4 -BNCEB
  47. &$4חֶֽ׷رفٗ؎ 1. ίϯςφΠϝʔδΛ࡞Δ 2. λεΫఆٛΛొ࿥ 3. αʔϏε͕ར༻͢ΔλεΫఆٛΛߋ৽ 4. ECS ͕αʔϏε಺ͷλεΫΛೖΕ׵͑Δ

    2, 3 Λߦ͏σϓϩΠπʔϧΛ։ൃ github.com/kayac/ecspresso
  48. FDTQSFTTP github.com/kayac/ecspresso γϯϓϧ / ϛχϚϧͳ ECS σϓϩΠπʔϧ (Go੡) • λεΫͱαʔϏεఆٛΛ

    JSON ͔Βੜ੒, ొ࿥ • σϓϩΠ = αʔϏεͷλεΫఆٛΛೖΕ׵͑Δ • ϩʔϧόοΫ = ௚લͷλεΫఆٛʹࠩ͠ସ͑Δ AWS SDK Go ͷߏ଄ମΛ࢖͏͜ͱͰ৽ػೳͷΩϟονΞοϓΛ༰қʹ (ྫ: EFSϚ΢ϯτػೳ 1/18ϦϦʔε → 1/20ରԠ൛ ecspresso ϦϦʔε) Blue/Green deployment ͸ CodeDeploy ͱ࿈ܞ͢Δ͜ͱͰαϙʔτ
  49. 傀㶷&$4؟٦ؽأ׾盖椚⻉ח init αϒίϚϯυΛ࣮ߦ͢Δͱ $ ecspresso init --region ap-northeast-1 --cluster default

    --service myservice --config config.yaml 2019/10/12 01:31:48 myservice/default save service definition to ecs-service-def.json 2019/10/12 01:31:48 myservice/default save task definition to ecs-task-def.json 2019/10/12 01:31:48 myservice/default save config to config.yaml config.yaml, ecs-service-def.json, ecs-task-def.json ͕ੜ੒͞ΕΔ λεΫఆٛΛదٓॻ͖׵͑ͯ deploy ͢Δ͚ͩͰҠߦՄೳ $ ecspresso deploy --config config.yaml ଞͷπʔϧ΍ίϯιʔϧͰ࡞ͬͨ ECS λεΫ/αʔϏε΋ ؆୯ʹίʔυ؅ཧʹམͱ͠ࠐΊΔ
  50. أ؛٦ٓـٕזؒٓ٦嗚濼 Norikra ͸εέʔϧ͕೉͍͠ 1. ϩάΛ Firehose ͔Β S3 ʹ1෼͝ͱʹอଘ 2.

    S3 ͷΠϕϯττϦΨͰ Lambda Λىಈ 3. ϩάͷதʹ͋ΔΤϥʔΛݕग़ͯ͠௨஌ 1෼୯ҐͰݕग़ͯ͠௨஌Λൃੜͤ͞Δཁ݅Λ อͪͭͭϚωʔδυʹ ྲྀྔ͕૿͑ͯ΋ Firehose / S3 / Lambda ͸εέʔϧ͢Δ
  51. תה׭ ߏ੒ཁૉΛ͢΂ͯߴ଎Խ͢Δ͜ͱͰσϓϩΠαΠΫϧΛߴ଎Խ͢Δ CI / ഑෍ / Τϥʔݕ஌ / ϩʔϧόοΫ ͩΕͰ΋҆શʹɺଈ࠲ʹσϓϩΠͰ͖Δ࢓૊Έ͸։ൃମݧʹॏཁ

    EC2 ͔Β ECS(ίϯςφ)ʹͳͬͯ΋ߟ͑ํ͸ಉ͡ ΑΓεέʔϧ͠΍͍͢ߏ੒ʹ͍ͯ͘͠