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

AWS Fargateでお手軽開発ブランチデプロイ/Easy development branch deployment with AWS Fargate

AWS Fargateでお手軽開発ブランチデプロイ/Easy development branch deployment with AWS Fargate

Yokoyama Tatsuo

April 03, 2021
Tweet

More Decks by Yokoyama Tatsuo

Other Decks in Technology

Transcript

  1. AWS Fargate Ͱ
    ͓खܰ։ൃϒϥϯνσϓϩΠ
    גࣜձࣾΈΜͳͷ΢ΣσΟϯά ٕज़෦
    ԣࢁ ୡஉ

    View full-size slide

  2. ࣗݾ঺հ
    • ԣࢁୡஉ(@tatsuo4848)
    • ୲౰ɿΠϯϑϥɺCI/CDج൫੔උɺσʔλ෼ੳج൫੔උ
    • ձࣾͷΤϯδχΞϦϯάϒϩάΛͪΐͪ͜ΐ͜ॻ͍ͯ·͢
    https://blog.mwed.info

    View full-size slide

  3. αʔϏε
    ΈΜͳͷ΢ΣσΟϯά
    ՖՇɾՖ໇͕࣮ମݧʹج͍ͮͨʮຊԻͷޱίϛʯʮ࣮ࡍͷඅ༻
    ໌ࡉʯͳͲͰࠃ಺ Ҏ্ͷ݁ࠗࣜ৔͔Βࣜ৔Λબ΂Δʮ݁ࠗ
    ࣜ৔બͼͷޱίϛαΠτʯͰ͢

    View full-size slide

  4. ͜Μͳ͜ͱ
    ͋Γ·ͤΜ͔ʁ

    View full-size slide

  5. ։ൃதͷϒϥϯνΛ
    σΟϨΫλʔʹ֬ೝͯ͠΋Β͍͍ͨʂ

    View full-size slide

  6. ։ൃதͷϒϥϯνΛ֬ೝ͠ͳ͍ͱ…
    • ͳΜ͔Πϝʔδͱҧ͏ΜͩΑͶʙ
    • ΋ͬͱ͜͏͍͏ಈ͖ʹͰ͖ͨΓ͠ͳ͍ʁ
    • ͳͲͳͲ

    View full-size slide

  7. ༧ఆΛ߹Θͤͯ
    ࣗ෼ͷϩʔΧϧͷΞϓϦΛ௚઀ݟͤͯ
    ֬ೝͯ͠΋Β͏ͷ͸खؒɻɻ

    View full-size slide

  8. ͔ͱ͍ͬͯ
    ࣗ෼ͷPCͰಈ͔ͯ͠΋Β͏ͨΊʹ
    ٕज़తͳ͜ͱ(git,RailsͳͲ)Λ
    ֮͑ͯ΋Β͏ͷ͸खؒɻɻ

    View full-size slide

  9. ೚ҙͷϒϥϯνΛ
    ৗʹՔಇ͓͚ͤͯ͞Δ
    ؀ڥ࡞Ε͹͍͍ͷͰ͸ʁ

    View full-size slide

  10. FargateͰ࡞Γ·ͨ͠ʂʂ

    View full-size slide

  11. Fargateʹ͍͓ͭͯܰ͘͞Β͍
    • αʔό΍Ϋϥελʔͷ؅ཧ͕͍Βͳ͍ίϯςφ࣮ߦ؀ڥ
    • 2018೥7݄͔Β౦ژϦʔδϣϯͰ΋ར༻Մೳʹʂ
    • ECSʹ͓͍ͯɺࣗલͰEC2Λ༻ҙ͠ͳ͍ͱ͍͏બ୒ࢶ͕͏·Εͨ

    View full-size slide

  12. Ͱ͖͕͋ͬͨ΋ͷ͸͜Μͳײ͡
    1. slackͷεϥογϡίϚϯυͰϒϥϯν໊Λ
    API GatewayʹPOST
    2. ϒϥϯν໊Λ؀ڥม਺ʹ௥Ճͯ͠Fargate
    λεΫΛ࣮ߦ
    3. ίϯςφىಈ࣌ʹ࣮ߦ͞ΕΔεΫϦϓτͷ
    தͰgit cloneΛ࣮ࢪ
    4. ίϯςφىಈ࣌ʹ࣮ߦ͞ΕΔεΫϦϓτͷ
    தͰRoute53ʹίϯςφͷIPΛొ࿥

    View full-size slide

  13. ͍͍ͱ͜Ζ
    • AWSଆ͕༻ҙ͍ͯ͠ΔFargateϦιʔε͕ଓ͘ݶΓɺ͍͘ΒͰ΋σϓ
    ϩΠͰ͖Δɻ
    • ඞཁͳ͘ͳͬͨΒམͱͤ͹ྑ͍ͷͰ໷ؒɺٳ೔͸ίετ0

    View full-size slide

  14. ΨϯΨϯ࢖ͬͯ͘ΕͯΔʂʂ

    View full-size slide