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
Amazon ec2 container service 소개
Search
seapy
February 14, 2015
Programming
0
82
Amazon ec2 container service 소개
Amazon 에서 프리뷰 상태로 공개한 ECS(EC2 Container Service)에 대한 간략한 소개와 실행 예시
도커 코리아 3번째 서울밋업에서 발표
seapy
February 14, 2015
Tweet
Share
More Decks by seapy
See All by seapy
Lambda + S3 썸네일 생성 및 운영 - AWSKRUG 정기 세미나 (2016년 9월)
seapy
1
550
형태소 분석기를 적용한 elasticsearch 운영
seapy
0
450
boot2docker 사용시 컨테이너에서 생성한 데이터를 유지하기
seapy
0
79
Elasticsearch + fluentd for Log analysis
seapy
3
9.9k
ActiveRecord Associations(2) - RORLab Season 3-8
seapy
0
45
ActiveRecord Associations(1) - RORLab Season 3-7
seapy
0
64
ActiveRecord Observers - RORLab Season 3-6
seapy
0
45
ActiveRecord Callbacks - RORLab Season 3-5
seapy
0
41
Rails Database Migrations - RORLab Season 3-3
seapy
2
97
Other Decks in Programming
See All in Programming
Laravel や Symfony で手っ取り早く OpenAPI のドキュメントを作成する
azuki
2
110
Amazon Bedrock Agentsを用いてアプリ開発してみた!
har1101
0
330
카카오페이는 어떻게 수천만 결제를 처리할까? 우아한 결제 분산락 노하우
kakao
PRO
0
110
ピラミッド、アイスクリームコーン、SMURF: 自動テストの最適バランスを求めて / Pyramid Ice-Cream-Cone and SMURF
twada
PRO
10
1.3k
Tauriでネイティブアプリを作りたい
tsucchinoko
0
370
OnlineTestConf: Test Automation Friend or Foe
maaretp
0
110
ActiveSupport::Notifications supporting instrumentation of Rails apps with OpenTelemetry
ymtdzzz
1
230
Flutterを言い訳にしない!アプリの使い心地改善テクニック5選🔥
kno3a87
1
160
詳細解説! ArrayListの仕組みと実装
yujisoftware
0
580
現場で役立つモデリング 超入門
masuda220
PRO
15
3.2k
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
TypeScriptでライブラリとの依存を限定的にする方法
tutinoko
2
660
Featured
See All Featured
Helping Users Find Their Own Way: Creating Modern Search Experiences
danielanewman
29
2.3k
Imperfection Machines: The Place of Print at Facebook
scottboms
265
13k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
6.9k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Agile that works and the tools we love
rasmusluckow
327
21k
GraphQLの誤解/rethinking-graphql
sonatard
67
10k
Navigating Team Friction
lara
183
14k
Six Lessons from altMBA
skipperchong
27
3.5k
No one is an island. Learnings from fostering a developers community.
thoeni
19
3k
Fantastic passwords and where to find them - at NoRuKo
philnash
50
2.9k
Side Projects
sachag
452
42k
A Philosophy of Restraint
colly
203
16k
Transcript
Amazon EC2 Container Service ࣗѐ
Docker Korea Seoul Meetup #3 @seapy
# ࣗѐ Amazon EC2 Container Service(ECS)ח ஶపց ҙܻ ࢲ࠺झ۽ Docker
ஶపցܳ ਗ. ECSী ೠ ୶о ࠺ਊ হਵݴ AWS ܻࣗझ(EC2, EBS ١)ী ೠ ࠺ਊ݅ ࠛ
# ECS ਊয ܻ Amazon ECSח җ э ஹನքٜ۽ ܖযઉ
. Cluster : ۞झఠ ஶపց ੋझఢझٜ ֤ܻ Ӓܛ, Taskܳ ৈӝীࢲ ك. Container Instance : ஶపց ੋझఢझ ۞झఠী ١۾ػ Amazon ECS ীо प೯غח EC2 ੋझఢझ Task Definition : Task ೠѐ ژח Ӓ ࢚ ஶపց ܳ ನೣೠ যܻா࣌ ࢸݺ Task Task ܳ ਊ೧ ࢤࢿػ ੋझఢझ, ஶపց ੋझఢझীࢲ प೯ Container : ஶపց task ੌࠗ۽ ࢤࢿػ ֿܻझ ஶపց
# ࢎ স AWS ҅ IAM ࢎਊ ߂ IAM Role
ࢤࢿ VPC(Vitual Private Cloud) ࢤࢿ ࠁউ Ӓܛ ࢤࢿ AWS CLI ࢸ
# AWS EC2 ੋझఢझ ࢤࢿ AWS ݫפݢ ࣛ ࣘ "US
East (N. Virginia) region" ࢶఖ ܻ࠭ীࢲ ࢎਊоמೠ ਬੌೠ region "Community AMIs" ীࢲ "ami-34ddbe5c" Ѩ࢝റ ࢶఖ ࢸ Auto-assign Public IP => Enable IAM role => ecs policy ୶оػ role ࢶఖ EC2 ੋझఢझ ࣘ(ec2-user) $ ssh -i ~/aws-verginia.pem
[email protected]
# рױೠ স ١۾ ```json [ { "environment": [], "name":
"sleep", "image": "busybox", "cpu": 10, "portMappings": [], "entryPoint": [ "/bin/sh" ], "memory": 10, "command": [ "sleep", "360" ], "essential": true } ] ```
$ aws ecs list-clusters $ aws ecs list-container-instances $ aws
ecs register-task-definition --family sleep360 --container-definitions file://sleep360.json $ aws ecs list-task-definitions $ aws ecs run-task --task-definition sleep360:3 --count 1 $ aws ecs list-tasks $ aws ecs describe-tasks --task xxx $ aws ecs stop-task --task xxxx
# Wordpress ࠶۽Ӓ प೯ೞӝ ``` [ { "image": "wordpress", "name":
"wordpress", "cpu": 10, "memory": 500, "essential": true, "links": [ "mysql" ], "portMappings": [ { "containerPort": 80, "hostPort": 80 } ] }, { "image": "mysql", "name": "mysql", "cpu": 10, "memory": 500, "essential": true, "environment": [ { "name": "MYSQL_ROOT_PASSWORD", "value": "password" } ] } ] ```
$ aws ecs register-task-definition --family wordpress --container-definitions file://wordpress.json $ aws
ecs run-task --task-definition wordpress:1 --count 1 $ aws ecs describe-container-instances --container-instances xxx $ aws ecs register-task-definition --family wordpress --container-definitions file://wordpress.json $ aws ecs run-task --task-definition wordpress:2 --count 1
# ୶о ۄҊ ߋ൦ ӝמ Elastic Load Balancing ా CloudWatch
ా CloudWatch ۽Ӓ ా CloudFormation ਗ కӦ ਗ AWS ݫפݢ ࣛ ց AMI(CoreOS ನೣ)
# ECS ઁডࢎ೦ ECS ࢲ࠺झח അ ܻ࠭ ࢚క۽ ઁҕغݴ ܻ࠭
ӝрزউ ݻо ઁডࢎ೦ ҅ ۞झఠ ࣻ : 2ѐ, default ۞झఠ ઁ৻ ۞झఠ ஶపց ੋझఢझ ࣻ : 100ѐ run-task, start-task ஶపց ੋझఢझ ࣻ : 10ѐ run-task ୡ ஶపց ੋझఢझ ࣻ : ۞झఠ 5ѐ ஶపց ੋझఢझ ١۾ rate : ୡ 1ѐ, ࠙ 60ѐ Task ੌ ӝ : 32 KiB Task ୭ ஶపց ࣻ : 10ѐ Task ١۾ rate : ୡ 1ѐ, ࠙ 60ѐ
# ইए CLI ࢎਊࢿ AWS ݫפݢ ࣛ
# ଵҊܐ Amazon EC2 Container Service ࣗѐ ECS Developer Guide
AWS re:Invent 2014 | (APP313) NEW LAUNCH: Amazon EC2 Container Service in Action AWS CLI ECS Reference