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
100
熊でもわかるCI/CD/モダンインフラ Vol3 AWS CDK
srockstyle
0
360
熊でもわかるCI/CDモダンインフラ Github Action編
srockstyle
0
330
熊でもわかるCI/CD/モダンインフラVol1:用語を覚えよう編
srockstyle
0
490
Chefとnginxで作るPHPアプリケーションのReliable Blue Green Deployment
srockstyle
6
24k
Other Decks in Programming
See All in Programming
PHPUnitしか使ってこなかった 一般PHPerがPestに乗り換えた実録
mashirou1234
0
230
CQRS+ES の力を使って効果を感じる / Feel the effects of using the power of CQRS+ES
seike460
PRO
0
140
Mermaid x AST x 生成AI = コードとドキュメントの完全同期への道
shibuyamizuho
0
160
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
270
Spatial Rendering for Apple Vision Pro
warrenm
0
110
競技プログラミングへのお誘い@阪大BOOSTセミナー
kotamanegi
0
360
責務を分離するための例外設計 - PHPカンファレンス 2024
kajitack
6
1.4k
創造的活動から切り拓く新たなキャリア 好きから始めてみる夜勤オペレーターからSREへの転身
yjszk
1
130
「とりあえず動く」コードはよい、「読みやすい」コードはもっとよい / Code that 'just works' is good, but code that is 'readable' is even better.
mkmk884
3
500
見えないメモリを観測する: PHP 8.4 `pg_result_memory_size()` とSQL結果のメモリ管理
kentaroutakeda
0
400
Exploring: Partial and Independent Composables
blackbracken
0
100
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
51
7.3k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Facilitating Awesome Meetings
lara
50
6.1k
Making the Leap to Tech Lead
cromwellryan
133
9k
Art, The Web, and Tiny UX
lynnandtonic
298
20k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
38
1.9k
Visualization
eitanlees
146
15k
Building Better People: How to give real-time feedback that sticks.
wjessup
365
19k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
KATA
mclloyd
29
14k
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
How GitHub (no longer) Works
holman
311
140k
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