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
470
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
66
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
Linux && Docker 研修/Linux && Docker training
forrep
23
4.5k
sappoRo.R #12 初心者セッション
kosugitti
0
230
How mixi2 Uses TiDB for SNS Scalability and Performance
kanmo
29
11k
[JAWS-UG横浜 #79] re:Invent 2024 の DB アップデートは Multi-Region!
maroon1st
1
140
ISUCON14公式反省会LT: 社内ISUCONの話
astj
PRO
0
180
Honoとフロントエンドの 型安全性について
yodaka
4
250
Formの複雑さに立ち向かう
bmthd
1
720
DevinとCursorから学ぶAIエージェントメモリーの設計とMoatの考え方
itarutomy
1
640
Conform を推す - Advocating for Conform
mizoguchicoji
3
680
『GO』アプリ データ基盤のログ収集システムコスト削減
mot_techtalk
0
110
Pulsar2 を雰囲気で使ってみよう
anoken
0
230
自分ひとりから始められる生産性向上の取り組み #でぃーぷらすオオサカ
irof
8
2.6k
Featured
See All Featured
Designing for Performance
lara
604
68k
Agile that works and the tools we love
rasmusluckow
328
21k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
366
25k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
114
50k
A designer walks into a library…
pauljervisheath
205
24k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.1k
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.5k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
29
2.2k
Docker and Python
trallard
44
3.3k
Code Review Best Practice
trishagee
66
17k
How GitHub (no longer) Works
holman
313
140k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
20
2.4k
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