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
Sponsored
·
Ship Features Fearlessly
Turn features on and off without deploys. Used by thousands of Ruby developers.
→
seapy
February 14, 2015
Programming
92
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Amazon ec2 container service 소개
Amazon 에서 프리뷰 상태로 공개한 ECS(EC2 Container Service)에 대한 간략한 소개와 실행 예시
도커 코리아 3번째 서울밋업에서 발표
seapy
February 14, 2015
More Decks by seapy
See All by seapy
Lambda + S3 썸네일 생성 및 운영 - AWSKRUG 정기 세미나 (2016년 9월)
seapy
1
560
형태소 분석기를 적용한 elasticsearch 운영
seapy
0
480
boot2docker 사용시 컨테이너에서 생성한 데이터를 유지하기
seapy
0
86
Elasticsearch + fluentd for Log analysis
seapy
3
10k
ActiveRecord Associations(2) - RORLab Season 3-8
seapy
0
52
ActiveRecord Associations(1) - RORLab Season 3-7
seapy
0
73
ActiveRecord Observers - RORLab Season 3-6
seapy
0
49
ActiveRecord Callbacks - RORLab Season 3-5
seapy
0
50
Rails Database Migrations - RORLab Season 3-3
seapy
2
110
Other Decks in Programming
See All in Programming
Observability in Practice:Grafana 與 Edge Device SRE 的那些事
blueswen
0
170
Strategic Design in the Frontend: Moduliths & Micro Frontends @DDDEurope
manfredsteyer
PRO
0
110
AI時代のUIはどこへ行く?その2!
yusukebe
22
7.4k
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
580
PHPで使える日時の表現と、その知り方 #frontend_phpcon_do
o0h
PRO
0
260
AIだと陥りがちなJakarta EE最新技術への移行時の落とし穴と解決策
tnagao7
0
120
Javaの型とAI時代に型が大事な理由 / java types and type in AI era
kishida
2
150
[2026年度第1回ORセミナー] 計画最適化ベンチャーと競技プログラミング人材
terryu16
0
270
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
280
代数的データ型って何が嬉しいの? #frontend_phpcon_do
kajitack
8
3.7k
Contextとはなにか
chiroruxx
1
350
Oxlintのカスタムルールの現況
syumai
6
1.1k
Featured
See All Featured
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
11k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
140
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
190
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
870
Optimising Largest Contentful Paint
csswizardry
37
3.7k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
2.1k
The untapped power of vector embeddings
frankvandijk
2
1.8k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.7k
The Illustrated Guide to Node.js - THAT Conference 2024
reverentgeek
1
390
Ethics towards AI in product and experience design
skipperchong
2
310
How to Talk to Developers About Accessibility
jct
2
240
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