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

Copilotによるお手軽3分ECSクッキング / The Cooking of AWS Co...

Avatar for iselegant iselegant
September 13, 2020

Copilotによるお手軽3分ECSクッキング / The Cooking of AWS Copilot

2020-09-13 JAWS SONICでオンライン登壇させていただいたAWS Copilotの登壇資料です。

Avatar for iselegant

iselegant

September 13, 2020
Tweet

More Decks by iselegant

Other Decks in Technology

Transcript

  1. ৽Ҫ խ໵ ᖛా ޹࣏ .BTBZB"SBJ ,PKJ)BNBEB ϑϧελοΫσΟϕϩούʔ ."%νʔϜϚωʔδϟʔ "1/"845PQ&OHJOFFST +BQBO"1/"NCBTTBEPS

    本⽇のウェイター 本⽇のシェフ $PQJMPUͷઆ໌୲౰ $PQJMPUͷσϞ୲౰ !NTZ !IBNBLP
  2. 71$ͷ ࡞੒ 4VCOFUͷ ࡞੒ *(8ͱϧʔτ ςʔϒϧ࡞੒ "-#ͷ ࡞੒ &$3ͷ ࡞੒

    $8-PHTͷ ࡞੒ &$4ͷ ࡞੒ ΞϓϦ σϓϩΠ Step.1 Step.2 Step.3 Step.4 Step.5 Step.6 Step.7 Step.8 ࢓ࠐΈͷߦఔΛ͓͞Β͍ͯ͠Έ·͢ɻ
  3. 71$ͷ ࡞੒ 4VCOFUͷ ࡞੒ *(8ͱϧʔτ ςʔϒϧ࡞੒ "-#ͷ ࡞੒ &$3ͷ ࡞੒

    $8-PHTͷ ࡞੒ &$4ͷ ࡞੒ ΞϓϦ σϓϩΠ Step.1 Step.2 Step.3 Step.4 Step.5 Step.6 Step.7 Step.8 શߦఔΛ͓͞Β͍ͯ͠Έ·͢ɻ ख਺͕ଟ͘ɺॳΊͯར༻͢Δ৔߹ɺ ϋʔυϧ͕ߴ͍ͱײ͡·ͤΜ͔ʁ
  4. ૣ͘ΞϓϦΛσϓϩΠ͍ͨ͠ ࢓ࠐΈΛͬ͢ඈ͹ͯ͠ ECS & Fargate ্ʹ ͱ͍͏χʔζ΋͋Δ͸ͣɻ ECS&FargateΛ ࢖͏ͷͰɺ ײ৮Λ௫Έ͍ͨɻ

    ؆୯ͳ"1*Λ ͬ͞͞ͱ ఏڙ͍ͨ͠ɻ ΞϓϦ։ൃʹ ஫ྗ͍ͨ͠ɻ ΞϓϦσϓϩΠ Մೳͳຊ൪؀ڥΛ αοͱ೺Ѳ͍ͨ͠ɻ
  5. Service ΞϓϦ୯ҐͰ͋ΔECS Service ΍ ECS Task ఆٛɺECR ͳͲ͕ Service ͷ؅׋ɻ

    ˞ࠨਤ͸ Load Balanced Web Service Λ બ୒ͨ͠৔߹ͷྫɻ
  6. > copilot init What would you like to name your

    application? [? for help] ͭΊͷ޻ఔ ΞϓϦ໊ͷೖྗ app ├ Dockerfile └ src ├ hoge.js :
  7. > copilot init Application name: copilot-app Which service type best

    represents your service's architecture? [Use arrows to move, type to filter, ? for more help] > Load Balanced Web Service Backend Service ͭΊͷ޻ఔ ΞʔΩςΫνϟͷλΠϓΛબ୒ app ├ Dockerfile └ src ├ hoge.js :
  8. > copilot init Application name: copilot-app Service type: Load Balanced

    Web Service What do you want to name this Load Balanced Web Service? [? for help] ͭΊͷ޻ఔ બ୒ͨ͠αʔϏεͷ໊લΛೖྗ app ├ Dockerfile └ src ├ hoge.js :
  9. > copilot init Application name: copilot-app Service type: Load Balanced

    Web Service Service name: front-end Which Dockerfile would you like to use for front-end? [Use arrows to move, type to filter, ? for more help] > ./Dockerfile ͭΊͷ޻ఔ σϓϩΠ͢Δ%PDLFSGJMFΛબ୒ app ├ Dockerfile └ src ├ hoge.js :
  10. > copilot init Application name: copilot-app Service type: Load Balanced

    Web Service Service name: front-end Dockerfile: ./Dockerfile Ok great, we'll set up ... app ├ Dockerfile └ src ├ hoge.js :
  11. > copilot init Application name: copilot-app Service type: Load Balanced

    Web Service Service name: front-end Dockerfile: ./Dockerfile Ok great, we'll set up ... 4FSWJDFຖͷϚχϑΣετ͕ࣗಈͰ࡞੒ ˞λεΫ਺ɺ$16ɺϝϞϦɺ"-#ͷϙʔτ൪߸ͳͲ͕ࢦఆՄೳ ࣮ߦ༻ͷϩʔϧ͕࡞੒ app ├ copilot │ └ front-end │ └ manifest.yml ├ Dockerfile └ src ├ hoge.js : Cloud Formation Stack
  12. > copilot init Application name: copilot-app Service type: Load Balanced

    Web Service Service name: front-end Dockerfile: ./Dockerfile Ok great, we'll set up ... Would you like to deploy a test environment? [? for help] (y/N) app ├ copilot │ └ front-end │ └ manifest.yml ├ Dockerfile └ src ├ hoge.js : ͭΊͷ޻ఔ ςετ؀ڥʹΞϓϦΛσϓϩΠ͢Δ͔Ͳ͏͔ɻ Cloud Formation Stack
  13. > copilot init Application name: copilot-app Service type: Load Balanced

    Web Service Service name: front-end Dockerfile: ./Dockerfile Ok great, we'll set up ... Deploy: Yes ⠙ Creating the infrastructure ... app ├ copilot │ └ front-end │ └ manifest.yml ├ Dockerfile └ src ├ hoge.js : Cloud Formation Stack
  14. Cloud Formation app ├ copilot │ └ front-end │ └

    manifest.yml ├ Dockerfile └ src ├ hoge.js : Environment ʹ֘౰͢Δ CFn Stack ͕࡞੒ ల։ > copilot init Application name: copilot-app Service type: Load Balanced Web Service Service name: front-end Dockerfile: ./Dockerfile Ok great, we'll set up ... Deploy: Yes ⠙ Creating the infrastructure ... Stack Stack (env)
  15. Cloud Formation app ├ copilot │ └ front-end │ └

    manifest.yml ├ Dockerfile └ src ├ hoge.js : &$3ͱ QJQFMJOF༻ 4༻ͷ CFn Stack ͕࡞੒ ల։ > copilot init Application name: copilot-app Service type: Load Balanced Web Service Service name: front-end Dockerfile: ./Dockerfile Ok great, we'll set up ... Deploy: Yes ⠙ Creating the infrastructure ... Stack Stack (env) Stack (app)
  16. Cloud Formation app ├ copilot │ └ front-end │ └

    manifest.yml ├ Dockerfile └ src ├ hoge.js : %PDLFSΠϝʔδ͕ Ϗϧυ͞Εͯ &$3ʹ QVTI > copilot init Application name: copilot-app Service type: Load Balanced Web Service Service name: front-end Dockerfile: ./Dockerfile Ok great, we'll set up ... Deploy: Yes ⠙ Creating the infrastructure ... Stack Stack (env) Stack (app)
  17. Cloud Formation Stack app ├ copilot │ └ front-end │

    └ manifest.yml ├ Dockerfile └ src ├ hoge.js : > copilot init Application name: copilot-app Service type: Load Balanced Web Service Service name: front-end Dockerfile: ./Dockerfile Ok great, we'll set up ... Deploy: Yes ⠙ Creating the infrastructure ... ✓Deployed front-end, you can access it at http://xxxxxx.ap-northeast-1.elb.amazonaws.com. Stack (svc) Service ʹ֘౰͢ΔCFn Stack ͕࡞੒ ల։ ˞Ϗϧυ͞Εͨίϯςφ΋σϓϩΠ͞ΕΔ αʔϏεͷΤϯυϙΠϯτ͕දࣔ Stack (env) Stack (app)
  18. Cloud Formation Stack app ├ copilot │ └ front-end │

    └ manifest.yml ├ Dockerfile └ src ├ hoge.js : > copilot init Application name: copilot-app Service type: Load Balanced Web Service Service name: front-end Dockerfile: ./Dockerfile Ok great, we'll set up ... Deploy: Yes ⠙ Creating the infrastructure ... ✓Deployed front-end, you can access it at http://xxxxxx.ap-northeast-1.elb.amazonaws.com. Stack (svc) Stack (env) Stack (app) ͍ͬͨΜ·ͱΊ ͭͷ޻ఔͰϓϩμΫγϣϯϨσΟͳίϯςφΞʔΩςΫνϟ͕࡞੒Մೳ