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
84
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
480
boot2docker 사용시 컨테이너에서 생성한 데이터를 유지하기
seapy
0
81
Elasticsearch + fluentd for Log analysis
seapy
3
10k
ActiveRecord Associations(2) - RORLab Season 3-8
seapy
0
47
ActiveRecord Associations(1) - RORLab Season 3-7
seapy
0
68
ActiveRecord Observers - RORLab Season 3-6
seapy
0
47
ActiveRecord Callbacks - RORLab Season 3-5
seapy
0
45
Rails Database Migrations - RORLab Season 3-3
seapy
2
99
Other Decks in Programming
See All in Programming
ペアプロ × 生成AI 現場での実践と課題について / generative-ai-in-pair-programming
codmoninc
1
16k
Result型で“失敗”を型にするPHPコードの書き方
kajitack
5
610
イベントストーミング図からコードへの変換手順 / Procedure for Converting Event Storming Diagrams to Code
nrslib
2
650
PostgreSQLのRow Level SecurityをPHPのORMで扱う Eloquent vs Doctrine #phpcon #track2
77web
2
510
レベル1の開発生産性向上に取り組む − 日々の作業の効率化・自動化を通じた改善活動
kesoji
0
120
Kotlin エンジニアへ送る:Swift 案件に参加させられる日に備えて~似てるけど色々違う Swift の仕様 / from Kotlin to Swift
lovee
1
260
High-Level Programming Languages in AI Era -Human Thought and Mind-
hayat01sh1da
PRO
0
760
Systèmes distribués, pour le meilleur et pour le pire - BreizhCamp 2025 - Conférence
slecache
0
120
5つのアンチパターンから学ぶLT設計
narihara
1
160
#QiitaBash MCPのセキュリティ
ryosukedtomita
1
990
AIと”コードの評価関数”を共有する / Share the "code evaluation function" with AI
euglena1215
1
150
プロダクト志向ってなんなんだろうね
righttouch
PRO
0
180
Featured
See All Featured
Code Review Best Practice
trishagee
69
18k
Speed Design
sergeychernyshev
32
1k
Building a Modern Day E-commerce SEO Strategy
aleyda
42
7.4k
Site-Speed That Sticks
csswizardry
10
680
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
281
13k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.5k
Code Reviewing Like a Champion
maltzj
524
40k
How to train your dragon (web standard)
notwaldorf
94
6.1k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
233
17k
Building Flexible Design Systems
yeseniaperezcruz
328
39k
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
357
30k
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