Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
CI/CD/インフラ勉強会Vol4 Amazon ECS編 Part1
Search
Shohei Kobayashi
June 26, 2022
Programming
0
120
CI/CD/インフラ勉強会Vol4 Amazon ECS編 Part1
Amazon ECS回です。あまりにやること多いので二つに分けました。
今回は仮想化のおさらいをしてからECSのはじめだけ。
Shohei Kobayashi
June 26, 2022
Tweet
Share
More Decks by Shohei Kobayashi
See All by Shohei Kobayashi
熊でもわかるFIDO2
srockstyle
0
97
熊でもわかるCI/CD/モダンインフラ Vol3 AWS CDK
srockstyle
0
350
熊でもわかるCI/CDモダンインフラ Github Action編
srockstyle
0
320
熊でもわかるCI/CD/モダンインフラVol1:用語を覚えよう編
srockstyle
0
480
Chefとnginxで作るPHPアプリケーションのReliable Blue Green Deployment
srockstyle
6
24k
Other Decks in Programming
See All in Programming
Go言語でターミナルフレンドリーなAIコマンド、afaを作った/fukuokago20_afa
monochromegane
2
130
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
6
290
Folding Cheat Sheet #8
philipschwarz
PRO
0
160
讓數據說話:用 Python、Prometheus 和 Grafana 講故事
eddie
0
310
知られざるNaNの世界
hole
3
1.2k
Vaporモードを大規模サービスに最速導入して学びを共有する
kazukishimamoto
3
4.2k
Kaigi on Rails 2024 - Rails APIモードのためのシンプルで効果的なCSRF対策 / kaigionrails-2024-csrf
corocn
4
2.2k
Golang と Erlang
taiyow
8
1.8k
リリース8年目のサービスの1800個のERBファイルをViewComponentに移行した方法とその結果
katty0324
2
2.6k
生成 AI を活用した toitta 切片分類機能の裏側 / Inside toitta's AI-Based Factoid Clustering
pokutuna
0
510
Nuxt UI Pro、NuxtHub、Nuxt Scripts、Nuxtエコシステムをふんだんに利用して開発するコーポレートサイト@Vue Fes Japan 2024
shingangan
3
810
PagerDuty を軸にした On-Call 構築と運用課題の解決 / PagerDuty Japan Community Meetup 4
horimislime
1
100
Featured
See All Featured
Bootstrapping a Software Product
garrettdimon
PRO
305
110k
Measuring & Analyzing Core Web Vitals
bluesmoon
0
27
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
191
16k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
31
2.6k
Code Reviewing Like a Champion
maltzj
519
39k
Teambox: Starting and Learning
jrom
132
8.7k
Documentation Writing (for coders)
carmenintech
65
4.4k
Git: the NoSQL Database
bkeepers
PRO
425
64k
Building an army of robots
kneath
302
42k
Side Projects
sachag
452
42k
Automating Front-end Workflow
addyosmani
1365
200k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Transcript
"NB[PO&$4ฤ1BSU &MBTUJD$POUBJOFS4FSWJDFͱ'BSHBUF ۽ͰΘ͔Δ$*$%ϞμϯΠϯϑϥ
զ ΤϯδχΞྺɿ͘Β͍ ۀքɿ8FC͔ͬ ݴޠɿ3VCZͱ3BJMT 1)11ZUIPO1FSM͘Β͍ʢΕ͕ͪʣ Πϯϑϥ͖ͬͯͨྺʹΤϯδχΞྺ %/4αʔόͱ͔ϝʔϧαʔό࡞ͬͯ·ͨ͠ ࠷ۙͬͺΒ3BJMT͍ͷϑϦʔϥϯεɻ ͖ͳ%/4αʔόͷϛυϧΣΞɿEKCEOT ͖ͳϝʔϧαʔόͷϛυϧΣΞɿ2NBJM
͖ͳ.Z42-ͷίϚϯυTIPXTMBWFTUBUVT ͖ͳ"84ϓϩμΫτ&MBTUJD.BQ3FEVDF ͖ͳ($1ϓϩμΫτ$MPVESVO ͖ͳ$*$%πʔϧ(JUIVC"DUJPO &$4ᘳʹཧղͨ͠ কདྷͷເηΩϡϦςΟΤϯδχΞɻ
$JSDMF$*͍͍ͧʂʂʂʂ
લճ·Ͱͷ͓͞Β͍
$*ͰΔιʔείʔυద༻ϑϩʔجຊ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB ։ൃࣗಈɾຊ൪࠷ऴεςοϓͷΈखಈ όοΫΤϯυ ։ൃऀͷϩʔΧϧ ୯ମςετ ݁߹ςετ Ϗϧυ
σϓϩΠ४උ σϓϩΠ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB όοΫΤϯυ %FWFMPQNFOU 1SPEVDUJPO ։ൃڥNBJOʹQVTIͱಉ࣌ʹσϓϩΠ·Ͱߦ͏ ຊ൪ڥखಈͰσϓϩΠͷΈߦ͏ σϓϩΠ ୯ମςετ ݁߹ςετ Ϗϧυ σϓϩΠ४උ
$*ͰΔϑϩʔجຊͦͷ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS σϓϩΠͰߦ͏͜ͱ όοΫΤϯυ ։ൃऀͷϩʔΧϧ ୯ମςετ ݁߹ςετ Ϗϧυ σϓϩΠ४උ
σϓϩΠ "NB[PO&MBTUJD$POUBJOFS3FHJTUPSZ &$44FSWJDF5BTLVQEBUF &$45BTL%F fi OJUJPOVQEBUF NJHSBUJPO &$4ͷઃఆΛมߋ͢ΔͷͰ "84$%,5FSSBGPSNͰ ߦ͏͜ͱ͕ଟ͍Ͱ͢
(JUIVC"DUJPO "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB ͦΕͧΕͷεςοϓΛZBNMϑΝΠϧͰఆ͍ٛͯ͘͠ όοΫΤϯυ ։ൃऀͷϩʔΧϧ ୯ମςετ ݁߹ςετ Ϗϧυ
σϓϩΠ४උ σϓϩΠ UFTUZBNM MJOUZBNM CSBLFNBOZBNM EFQMPZZBNM CVJMEZBNM YAML YAML YAML YAML YAML
"NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB 4ZTUFN.BOBHFS4FDSFU.BOBHFS όοΫΤϯυ ։ൃऀͷϩʔΧϧ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB όοΫΤϯυ
%FWFMPQNFOU 1SPEVDUJPO EFWUT QSPEUT σϓϩΠ४උػີใΛڥ༻ҙ ։ൃ༻ػີใ ຊ൪༻ػີใ
"NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB ΞϓϦέʔγϣϯଆڥมͰಡΈࠐΉΑ͏ʹ͓ͯ͘͠ όοΫΤϯυ ։ൃऀͷϩʔΧϧ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB όοΫΤϯυ
%FWFMPQNFOU 1SPEVDUJPO EFWUT QSPEUT σϓϩΠ४උΞϓϦͷඞཁͳใڥมͰ ։ൃ༻ػີใ ຊ൪༻ػີใ
σϓϩΠ४උ"84$%,ͰجຊϦιʔεΛ࡞ ίʔυͰ"84ϦιʔεΛఆٛɻඞཁͳϦιʔεΛ࡞͓ͬͯ͘ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB "NB[PO$MPVE'SPOU ϑϩϯτΤϯυ όοΫΤϯυ "NB[PO4 ։ൃऀͷϩʔΧϧ
cdk deploy WQDTUBDLUT SETTUBDLUT 5ZQF4DSJQUΛ $MPVE'PSNBUJPOͷελοΫʹม Ϧιʔεఆٛʂ CloudFormation ֤छϦιʔε࡞ AWS Local
σϓϩΠ४උ(JUIVC"DUJPOͰఆٛ EPDLFSίϚϯυҰࣜ·Ͱߦ͍ɺ"84ͷDPOUBJOFS3FHJTUPSZʹQVTI·ͰΛ͓ͬͯ͘ ։ൃऀͷϩʔΧϧ ୯ମςετ ݁߹ςετ Ϗϧυ σϓϩΠ४උ EPDLFSCVJME EPDLFSUBH EPDLFSQVTI
EPDLFSCVJME EPDLFSUBH EPDLFSQVTI "NB[PO&MBTUJD$POUBJOFS3FHJTUPSZ
σϓϩΠ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS DELEFQMPZίϚϯυ όοΫΤϯυ ։ൃऀͷϩʔΧϧ ୯ମςετ ݁߹ςετ Ϗϧυ σϓϩΠ४උ
σϓϩΠ "NB[PO&MBTUJD$POUBJOFS3FHJTUPSZ &$44FSWJDF5BTLVQEBUF &$45BTL%F fi OJUJPOVQEBUF NJHSBUJPO DELEFQMPZ<ελοΫ໊>
ࠓΔ͜ͱ
Amazon ECS "QQMJDBUJPO-PBE#BMBODFS 3%4"VSPSB "NB[PO$MPVE'SPOU ϑϩϯτΤϯυ όοΫΤϯυ "NB[PO4 ։ൃऀͷϩʔΧϧ ୯ମςετ
݁߹ςετ Ϗϧυ σϓϩΠ४උ σϓϩΠ
"NB[PO&$4
&$4ίϯςφ࣮ߦڥ ίϯςφԽ͞ΕͨΞϓϦέʔγϣϯΛಈ͔ͨ͢ΊͷڥҰࣜΛݴ͏ɻ Amazon Elastic Container Registory Amazon Elastic Container Service
ECS Compute Option AWS Fargate AWS LocalZones AWS WaveLength AWS Outposts
༧උࣝɿίϯςφʹ͍ͭͯ
ԾԽͱ Ұͷཧ04্Ͱෳͷ04Λಈ͔͢ख๏ɻ ཧϚγϯ 04 (VFTU04 (VFTU04 (VFTU04 "QQ "QQ "QQ
ཧతʹҰͷཧϚγϯ͕ͩɺ ͦͷ্Ͱࡾͭͷ04͕ىಈ͍ͯ͠Δ
αʔόԾԽͱίϯςφԾԽ ͲͬͪҰͷཧαʔόͷ্ͰࡾͷԾαʔό͕ಈ͍͍ͯΔ ཧϚγϯ 04 (VFTU04 (VFTU04 (VFTU04 #JO-JCT #JO-JCT #JO-JCT
)ZQFSWJTFS ཧϚγϯ 04 #JO-JCT #JO-JCT #JO-JCT %PDLFS&OHJOF "QQ "QQ "QQ "QQ "QQ "QQ ,FSOFM ,FSOFM ,FSOFM ,FSOFM ,FSOFM
ߟ͑ํͷҧ͍ ϦιʔεͦͷͷΛԾԽ͢ΔϋΠύʔόΠβʔܕͱɺΞϓϦέʔγϣϯͷശΛ༻ҙ͢ΔΠϝʔδͷίϯςφܕ ϋΠύʔόΠβʔܕ ίϯςφܕ ཧϚγϯ 04 (VFTU04 (VFTU04 (VFTU04 #JO-JCT
#JO-JCT #JO-JCT )ZQFSWJTFS ཧϚγϯ 04 #JO-JCT #JO-JCT %PDLFS&OHJOF "QQ "QQ "QQ "QQ "QQ ,FSOFM ,FSOFM ,FSOFM ,FSOFM ,FSOFM #JO-JCT "QQ
"NB[PO&$ &$ϋΠύʔόΠβʔܕ ϋΠύʔόΠβʔܕ ίϯςφܕ ཧϚγϯ 04 (VFTU04 (VFTU04 (VFTU04 #JO-JCT
#JO-JCT #JO-JCT )ZQFSWJTFS ཧϚγϯ 04 #JO-JCT #JO-JCT %PDLFS&OHJOF "QQ "QQ "QQ "QQ "QQ ,FSOFM ,FSOFM ,FSOFM ,FSOFM ,FSOFM
"NB[PO&$4 &$4ίϯςφܕ ϋΠύʔόΠβʔܕ ίϯςφܕ ཧϚγϯ 04 (VFTU04 (VFTU04 (VFTU04 #JO-JCT
#JO-JCT #JO-JCT )ZQFSWJTFS ཧϚγϯ 04 #JO-JCT #JO-JCT %PDLFS&OHJOF "QQ "QQ "QQ "QQ "QQ ,FSOFM ,FSOFM ,FSOFM ,FSOFM ,FSOFM
ίϯςφͷҠ২ੑʹ͍ͭͯ ίϯςφԾԽͷ୯Ґ͕খ͘͞ɺΠϝʔδԽͯ͠ผͷ04ͷҠߦෳָ͕ ཧϚγϯ 04 #JO-JCT #JO-JCT #JO-JCT %PDLFS&OHJOF "QQ "QQ
"QQ ཧϚγϯ 04 %PDLFS&OHJOF "QQ"ίϯςφ #JO-JCT "QQ "QQ"ίϯςφ "QQ"Πϝʔδ "QQ#Πϝʔδ "QQ$Πϝʔδ ίϯςφϦϙδτϦ
ίϯςφͷҠ২ੑʹ͍ͭͯ ΠϝʔδΛཧ͢ΔΈΛίϯςφϦϙδτϦͱ͍͏ ཧϚγϯ 04 #JO-JCT #JO-JCT #JO-JCT %PDLFS&OHJOF "QQ "QQ
"QQ ཧϚγϯ 04 %PDLFS&OHJOF "QQ"ίϯςφ "QQ"Πϝʔδ #JO-JCT "QQ "QQ"ίϯςφ "QQ#Πϝʔδ "QQ$Πϝʔδ ίϯςφϦϙδτϦ
ίϯςφͷҠ২ੑʹ͍ͭͯ ίϯςφΠϝʔδͷΓͱΓΛQVTIQVMMͱ͍͏ ཧϚγϯ 04 #JO-JCT #JO-JCT #JO-JCT %PDLFS&OHJOF "QQ "QQ
"QQ ཧϚγϯ 04 %PDLFS&OHJOF "QQ"ίϯςφ #JO-JCT "QQ "QQ"ίϯςφ "QQ"Πϝʔδ "QQ#Πϝʔδ "QQ$Πϝʔδ ίϯςφϦϙδτϦ EPDLFSQVMM EPDLFSQVTI
"NB[PO&$4 ͋ΒͨΊͯ
&$4ίϯςφ࣮ߦڥ ίϯςφΛ࣮ߦ͢ΔͨΊͷػೳ͕Ұࣜἧ͍ͬͯΔ Amazon Elastic Container Registory Amazon Elastic Container Service
ECS Compute Option AWS Fargate AWS LocalZones AWS WaveLength AWS Outposts
&$3ΠϝʔδΛཧ͢ΔίϯςφϦϙδτϦ "84ͷΈʹίϯςφΛΔࡍେମ&$3Λར༻͢Δɻ Amazon Elastic Container Registory Amazon Elastic
&$4ίϯςφ࣮ߦڥɿ1BSU &$4ΛͬͯίϯςφΛىಈ͢Δʹ5BTL%F fi OJUJPOΛॻ͘ඞཁ͕͋Δɻ %PDLFS fi MFͱ·ͨҧ͏ఆٛΛ৭ʑ͢Δඞཁ͕͋Δ Amazon Elastic Container
Registory Amazon Elastic Container Service ECS Compute Option AWS Fargate AWS LocalZones AWS WaveLength AWS Outposts 5BTL%F fi OJUJPO 5BTL%F fi OJUJPO 5BTL%F fi OJUJPO
&$4ίϯςφ࣮ߦڥɿ1BSU &$4ΛͬͯίϯςφΛىಈ͢Δʹ5BTL%F fi OJUJPOΛॻ͘ඞཁ͕͋Δɻ %PDLFS fi MFͱ·ͨҧ͏ఆٛΛ৭ʑ͢Δඞཁ͕͋Δ Amazon Elastic Container
Registory Amazon Elastic Container Service ECS Compute Option AWS Fargate AWS LocalZones AWS WaveLength AWS Outposts 5BTL%F fi OJUJPO 5BTL%F fi OJUJPO 5BTL%F fi OJUJPO
5BTL%F fi OJUJPOʹॻ͘͜ͱ "NB[PO&$4 "QQMJDBUJPO-PBE#BMBODFS "84ͷઃఆͷఆٛΛ৭ʑهड़͢Δඞཁ͕͋Δɻ όοΫΤϯυ "NB[PO&MBTUJD$POUBJOFS3FHJTUPSZ w ىಈλΠϓ
w λεΫఆ໊ٛ w λεΫϩʔϧʢίϯςφΛ࣮ߦ͢Δ*".ϩʔϧ w ωοτϫʔΫϞʔυʢ71$ͱ͔બͿʣ w 04ϑΝϛϦʔʢ8JOEPXT-JOVYʣ w λεΫͷαΠζʢίϯςφͷϦιʔε$16ͱ͔ϝϞϦͱ͔ʣ w ίϯςφ໊ w ίϯςφͷΠϝʔδ໊ w ϙʔτϚοϐϯά w ͦͷଞίϯςφͷઃఆ ଞʹ͍Ζ͍Ζ
&$4ίϯςφىಈλΠϓ &$ܕͱ'BSHBUFܕ͕͋Γɺϓϥεͦͷଞతѻ͍Ͱ͍͔ͭ͋͘Δɻ ECS Compute Option AWS Fargate AWS LocalZones AWS
WaveLength AWS Outposts EC2
&$4ίϯςφىಈλΠϓ1BSU ىಈλΠϓΛܾΊͨΒɺ࣍ͲͪΒͰىಈ͢Δ͔Λܾఆ͢Δɻ ECS Compute Option AWS Fargate AWS LocalZones AWS
WaveLength AWS Outposts EC2 ECS Service ECS Task
ࠓͷ·ͱΊ
·ͱΊ ԾԽʹ͍ͭͯ ཧతͳίϯϐϡʔλϦιʔεͷ্ʹԾతʹෳͷϚγϯΛ࡞͢Δػೳ ϋΠύʔόΠβʔܕཧϦιʔεΛ͚ΔʢΧʔωϧ͝ͱׂʣ ίϯςφܕΞϓϦέʔγϣϯͷശΛͭ͘ΔʢΧʔωϧڞ༗ʣ ίϯςφܕΠϝʔδͱ͍͏୯ҐͰ࣋ͪӡͼͰ͖Δ
ίϯςφΠϝʔδΛཧ͢ΔΈΛϦϙδτϦͱ͍͏ &$4 5BTL%F fi OJUJPOͰ"84ͷઃఆΛ͍Ζ͍Ζ͢Δ ىಈλΠϓ'BSHBUF&$ͦͷଞ͍͔ͭ͋͘Δ ࣮ߦλΠϓ&$44FSWJDFܕͱ&$45BTLܕ͕͋Δɻ
࣍ճ &$4ͷىಈλΠϓͱ࣮ߦܕʹ͍ͭͯઆ໌͢ΔΑ ECS Compute Option AWS Fargate AWS LocalZones AWS
WaveLength AWS Outposts EC2 ECS Service ECS Task