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
AWS ECS の説明 /aws-ecs-introduction
Search
yutachaos
October 01, 2018
Technology
0
81
AWS ECS の説明 /aws-ecs-introduction
サポーターズ下記勉強会用資料
https://supporterzcolab.com/event/522/
yutachaos
October 01, 2018
Tweet
Share
More Decks by yutachaos
See All by yutachaos
JenkinsのJobを CronJobに移した話 /The story of moving Jenkins Job to CronJob
yutachaos
0
180
History of Infrastructure as a Code testing
yutachaos
2
5.2k
AWS CodePipeline 初めて触って少しハマった話 / A story that challenged AWS CodePipeline for the first time
yutachaos
0
85
gRPC in スタディサプリENGLISH / gRPC in StudySapuri ENGLISH
yutachaos
0
2.7k
AKS,EKS,GKEコマンド比較してみた /compared AKS, EKS, GKE command
yutachaos
2
2.3k
Docker + Jenkinsでバッチ実行 / Using Docker and Jenkins execution batch
yutachaos
0
250
Spring Batchの紹介
yutachaos
0
250
非エンジニア向けMarkdown 勉強会
yutachaos
1
300
Circle CI 入門
yutachaos
0
630
Other Decks in Technology
See All in Technology
Introduction to Works of ML Engineer in LY Corporation
lycorp_recruit_jp
0
140
AGIについてChatGPTに聞いてみた
blueb
0
130
VideoMamba: State Space Model for Efficient Video Understanding
chou500
0
190
RubyのWebアプリケーションを50倍速くする方法 / How to Make a Ruby Web Application 50 Times Faster
hogelog
3
950
Shopifyアプリ開発における Shopifyの機能活用
sonatard
4
250
ExaDB-D dbaascli で出来ること
oracle4engineer
PRO
0
3.9k
Zennのパフォーマンスモニタリングでやっていること
ryosukeigarashi
0
150
Lambda10周年!Lambdaは何をもたらしたか
smt7174
2
110
Flutterによる 効率的なAndroid・iOS・Webアプリケーション開発の事例
recruitengineers
PRO
0
120
OTelCol_TailSampling_and_SpanMetrics
gumamon
1
190
エンジニア人生の拡張性を高める 「探索型キャリア設計」の提案
tenshoku_draft
1
130
Exadata Database Service on Dedicated Infrastructure(ExaDB-D) UI スクリーン・キャプチャ集
oracle4engineer
PRO
2
3.2k
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
50
7.2k
How to Ace a Technical Interview
jacobian
276
23k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
47
2.1k
KATA
mclloyd
29
14k
Into the Great Unknown - MozCon
thekraken
32
1.5k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
Automating Front-end Workflow
addyosmani
1366
200k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Making Projects Easy
brettharned
115
5.9k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Statistics for Hackers
jakevdp
796
220k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
Transcript
AWS ECS
ࣗݾհ • ଜ༐ଠ • SREΤϯδχΞ • ϓϩάϥϛϯάݴޠ • Java, node,
PHP, Ruby, Go • ීஈAWSΛར༻ͨ͠γεςϜͷӡ༻ɺӡ༻վળͱ͔ͬͯ·͢ɻ • ࠷ۙEnvoyΛ͍ͬͯ͡·ͨ͠ɻ • AWS Certificated Solutions Architect • AWS Certificated DepOps Engineer
Agenda • Containerٕज़ʹ͍ͭͯͷ͓͞Β͍ • ECSʹ͍ͭͯ • ECSͷ֓೦ʹ͍ͭͯ
ContainerͬͯԿʁ
• ߓʹ͋ΔΞϨ • Container ʹ DockerͰͳ͍ɻ • DockerίϯςφܕԾԽͷ࣮ͷҰͭ • DockerΧʔωϧͱcgroupsͳͲͷٕज़Λ
Έ߹ΘͤͯɺΞϓϦέʔγϣϯͱϥϯλΠϜ ࣮ߦڥΛ·ͱΊͯ͢Δٕज़ • ίϯςφϓϩηε ͬ͘͟Γͱͨ͠ղઆ
• ΞϓϦέʔγϣϯͱ࣮ߦڥΛҰͭʹ·ͱΊ Δ͜ͱͰ։ൃͱӡ༻νʔϜ͕εϜʔζʹӡ༻ ग़དྷΔ • e.g. ϩʔΧϧͱຊ൪Ͱಉ͡Dockerfile͑ Δ!ɺΠϯϑϥνʔϜ͕Dockerfile࡞ͬͯɺ ։ൃνʔϜʹͤΔʂٯ·ͨવΓ Կ͕ྑ͍ͷʁ
• Elastic Container Serviceͷུ • AWS͕ఏڙ͢ΔίϯςφΦʔέετϨʔ γϣϯπʔϧ • e.g. kubernates,
docker swarmͱ͔ • Docker͚ͩͰग़དྷͳ͍ίϯςφͷ Scaling, ஔ, ཧΛߦ͏αʔϏε ECSʹ͍ͭͯ
ECS overview EC2 Launch type
• ECR • Elastic Container RegistryͷུɺAWS্ͰϚωʔδυʹ ӡ༻͞ΕΔɺDocker imageΛอଘ͢ΔRegistry • Cluster
• Container͕࣮ࡍʹ࣮ߦ͞ΕΔEC2Πϯελϯεͷू߹ ମ • Service • Task definitionΛͱʹͯ͠࡞͞ΕͨTaskΛ͍ͭ͘ى ಈ͢Δ͔ɺͲͷΑ͏ʹஔ͢Δͷ͔ɺͲͷϩʔυόϥϯ αʔܦ༝Ͱ௨৴͢Δ͔ͷઃఆɻTask definitionͱ1:1Ͱ ઃఆ͢Δ ༻ޠ1
• Task definition • Containerͷ࣮ߦ͢Δܗ • Task • Task definitionΛͱʹͯ͠࡞͞Εͨ
Containerͷ࣮ଶ ༻ޠ2
Task Definitionʹ͍ͭͯ • ECS্Ͱ࣮ߦ͢ΔContainerͷઃఆ • EC2ͱFargateλΠϓ͕͋Δ • ࣮ߦͤ͞Δcontainerͷimage,ར༻͢Δ ڥมɺportͷઃఆͳͲΛߦ͏
Serviceʹ͍ͭͯ • ECS্Ͱ࣮ߦ͢ΔTaskʹ͍ͭͯͷ·ͱΊΔઃఆ • Containerͷಈ͔͢ɺInstanceͷTaskஔ ઓུ • Load balancerͷport mappingͳͲΛ୲͏ɻ
ECS agent • EC2্Ͱಈ͘ɺECSͷcontainerͷঢ়ଶΛѲ͢Δ agent • ͜ͷagentࣗମdockerͰEC2ͷதͰಈ͍͍ͯΔ • EC2 typeͷ߹ɺ͜ͷECS
agentΛEC2ىಈ࣌ʹಈ͘ Α͏ʹͯ͠Clusterʹొ͢Δ
Ϣʔεέʔε Rails appΛECSͰಈ͔͢߹ • Rails appͷimageΛઃఆͨ͠Task definitionΛ࡞ • Load balancerΛ͚ͭͨServiceΛ࡞͢Δ
Sample
ղઆ • Route53Λར༻ͯ͠domainΛઃఆ • ௨৴ALBܦ༝ͰContainerʹૹΔ • ApplicationContainerͰ࡞ɺECSͰε έʔϦϯάͷཧ
Fargate launch typeʹ͍ͭͯ • ECSʹ̎ͭͷlaunch type EC2 launch typeͱ Fargate
launch type͕͋Δɻ • EC2 launch typeContainerΛಈ͔ͨ͢ΊͷEC2Λ ཧ͢Δඞཁ͕͋Δ͕ɺFargate launch typeಈ͔ͨ͢ ΊͷEC2ͷresourceΛAWSଆͰཧͯ͘͠ΕΔɻ • ཧίετ͕ݮΔ • ݸਓతʹ·ͩಋೖͨ͜͠ͱͳ͍ɻ
ECS overview Fargate Launch type
͓ΘΓʹ • ECScluster্ͰserviceͰཧ͞Εͨ container͔ΒΔtaskΛtask definitionΛͱ ʹ࡞͠ɺӡ༻͢Δػೳ • ContainerΛຊ൪ӡ༻͢Δ͜ͱ։ൃɺӡ༻త ͳϦϨʔγϣϯʹʹཱͭ
༨ஊ
Modern Web appΛߟ͑Δͱ ͖ʹศརͳϖʔδ
Twelve-factor-app • https://12factor.net/ • ݩherokuͷ Adam Wiggins͕2011ʹॻ͍ ͨmodernͳSaaSΛ࡞ΔͨΊͷํ๏ • ࣮࣭ContainerΛར༻͢ΔappΛ࡞͢Δͱ
͖ͷํ๏ͷstandardͷҰͭ
Cloud Native landscape • https://landscape.cncf.io/ • CNCF(Cloud Native Computing Foundation)
͕ఏ͍ࣔͯ͠ΔɺCloud NativeͳΞϓϦέʔ γϣϯΛનΊ্͍ͯ͘ͰͷϩʔυϚοϓ
AWS ެࣜͷࢿྉ • ެࣜͷdoc • re:InventAWS Summit, Black beltͷεϥΠ υslideshareɺಈըyoutubeʹଟ্͘
͕͍ͬͯ·͢ɻ • ࠔͬͨΒެ͕ࣜҰ൪!
ྑ͍ Container lifeΛ!