JAWS-UG ECS Best Practice

727 views

Published on

これからECSをはじめる人のためのECSベストプラクティス
JAWS-UG コンテナ支部 2017.03.30
https://jawsug-container.connpass.com/event/51776/

Published in: Software
0 Comments
6 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
727
On SlideShare
0
From Embeds
0
Number of Embeds
132
Actions
Shares
0
Downloads
6
Comments
0
Likes
6
Embeds 0
No embeds

No notes for slide

JAWS-UG ECS Best Practice

  1. 1. Container Container Container CentOS 7CentOS 7 Docker Docker Container Container Jenkins Docker Registry cAdvisor InfluxDB Grafana Container MySQL Container Grails App Container Fess ポータル/クローラ Container Nginx Tomcat Solr VMware基盤(自社DC) RDS (PostgreSQL) SpotFleet ECS Admin Service ECS Cluster Admin ALB API ALB User ALB API Service User Service Route53 SES email delivery Docker Image CloudWatch Logs log ECR
  2. 2. development test staging production build app app engineer infra engineer deploy config stack config stack config stack BEFORE
  3. 3. development test staging production build/deploy image with app app engineer infra engineer config stack pull/run AFTER
  4. 4. development test staging production build/deploy image with app app engineer infra engineer config stack on AWS
  5. 5. Service A Service B ECS Cluster Service A Service B Service A Service B New Service New Service Service B Service A
  6. 6. ECS Cluster Service A Service B Service A Service BService B Service A container instance container instance container instance
  7. 7. ECS Cluster Service A Service B Service A Service BService B Service A container instance container instance container instance CloudWatch Logs S3 DynamoDB RDS
  8. 8. パスベースルーティング ECS Cluster Service C Service B Service A /api/* /sub/* /health /health /health example.com/api/health example.com/health example.com/sub/health ALB
  9. 9. ECS Cluster Service B Service A _JAVA_OPTIONS : -DdataSource.url='jdbc:postgresql://rds.example.com:5432/database' Private Hosted Zone Route53 rds.example.com CNAME myrdsinstance.*.*.rds.amazonaws.com RDS Task Definition 環境変数
  10. 10. RI 入札アドバイザーや スポットアドバイザー も参考に
  11. 11. 更新通知は SNS Topicでも 受け取れるよ
  12. 12. ECS Cluster Service AService A Service B ECS Cluster Service BService B Service AService A ALB A ALB B ALB A ALB B
  13. 13. user-data で ECS_CLUSTER を指定 インスタンスロール AmazonEC2ContainerServiceforEC2Role をアタッチ 動的ポートマッピング利用の場合は ホストポートを 指定しない ロググループを awslogs-group に指定
  14. 14. ECS たーのしー!

×