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
83
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
460
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
42
Rails Database Migrations - RORLab Season 3-3
seapy
2
97
Other Decks in Programming
See All in Programming
自分ひとりから始められる生産性向上の取り組み #でぃーぷらすオオサカ
irof
8
2k
Alba: Why, How and What's So Interesting
okuramasafumi
0
230
令和7年版 あなたが使ってよいフロントエンド機能とは
mugi_uno
12
5.9k
ゼロからの、レトロゲームエンジンの作り方
tokujiros
3
1.1k
Vue.jsでiOSアプリを作る方法
hal_spidernight
0
110
Linux && Docker 研修/Linux && Docker training
forrep
16
3k
QA環境で誰でも自由自在に現在時刻を操って検証できるようにした話
kalibora
1
150
DevFest - Serverless 101 with Google Cloud Functions
tunmise
0
140
20241217 競争力強化とビジネス価値創出への挑戦:モノタロウのシステムモダナイズ、開発組織の進化と今後の展望
monotaro
PRO
0
340
はてなにおけるfujiwara-wareの活用やecspressoのCI/CD構成 / Fujiwara Tech Conference 2025
cohalz
3
3k
ISUCON14感想戦で85万点まで頑張ってみた
ponyo877
1
770
PHPUnitしか使ってこなかった 一般PHPerがPestに乗り換えた実録
mashirou1234
0
450
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
521
39k
How to train your dragon (web standard)
notwaldorf
89
5.8k
Building Applications with DynamoDB
mza
93
6.2k
Practical Orchestrator
shlominoach
186
10k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
113
50k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
356
29k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
Embracing the Ebb and Flow
colly
84
4.5k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
Rails Girls Zürich Keynote
gr2m
94
13k
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