Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

初探 AWS 平台上的 Docker 服務

1,002 views

Published on

AWS 是一種極富彈性、安全、靈活並以開發者為本的生態系統,是 Docker 部署作業的理想平台。AWS 提供可擴充的基礎架構、API 及 SDK,可緊密融入開發生命週期,另外更可讓 Docker 使用者獲得輕量化及可攜式容器的效益。本場專題演講將讓您了解容器的效益、介紹 Amazon EC2 Container Service,並且示範如何在生產中使用 Amazon ECS 以大規模執行容器化應用。

Published in: Technology

初探 AWS 平台上的 Docker 服務

  1. 1. © 2015, Amazon Web Services, Inc. or its Affiliates. All rights reserved. Jowana JO Technical Account manager, AWS Enterprise Support June 7th, 2017 Getting Started with Docker on AWS
  2. 2. Agenda Why Containers? Cluster Management Benefits Running Services Demo
  3. 3. Why Containers?
  4. 4. What are Containers? OS virtualization Process isolation Images AutomationServer Guest OS Bins/Libs Bins/Libs App2App1
  5. 5. Container advantages Portable Flexible Fast EfficientServer Guest OS Bins/Libs Bins/Libs App2App1
  6. 6. Services evolve to microservices Monolithic Application Order UI User UI Shipping UI Order Service User Service Shipping Service Data Access OrderUI Inventory Service Order Service Shipping Service
  7. 7. Containers are natural for microservices Simple to model Any app, any language Image is the version Test & deploy same artifact Stateless servers decrease change risk
  8. 8. Server Guest OS Bins/Libs Bins/Libs App2App1 Scheduling one resource is straightforward Going from this…
  9. 9. Scheduling a cluster is hard Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS Server Guest OS .. to this - is hard!
  10. 10. Amazon ECS
  11. 11. Amazon EC2 Container Service (ECS) is a highly scalable, high performance container management service that supports Docker containers and allows you to easily run applications on a managed cluster of Amazon EC2 instances.
  12. 12. Amazon ECS EC2 INSTANCES LOAD BALANCER Internet ECS AGENT TASK Container TASK Container ECS AGENT TASK Container TASK Container Agent Communication Service Amazon ECS ECS AGENT TASK Container TASK Container LOAD BALANCER API Cluster Management Engine Key / Value Store
  13. 13. Amazon ECS - Cluster EC2 INSTANCES LOAD BALANCER Internet ECS AGENT TASK Container TASK Container ECS AGENT TASK Container TASK Container ECS AGENT TASK Container TASK Container LOAD BALANCER Agent Communication Service Amazon ECS API Cluster Management Engine Key / Value Store
  14. 14. Amazon ECS - Task EC2 INSTANCES LOAD BALANCER Internet ECS AGENT TASK Container TASK Container ECS AGENT TASK Container TASK Container ECS AGENT TASK Container TASK Container LOAD BALANCER Agent Communication Service Amazon ECS API Cluster Management Engine Key / Value Store
  15. 15. Amazon ECS - Service EC2 INSTANCES LOAD BALANCER Internet ECS AGENT TASK Container TASK Container ECS AGENT TASK Container TASK Container ECS AGENT TASK Container TASK Container LOAD BALANCER Agent Communication Service Amazon ECS API Cluster Management Engine Key / Value Store
  16. 16. Amazon ECS - Resource Management EC2 INSTANCES LOAD BALANCER Internet ECS AGENT TASK Container TASK Container ECS AGENT TASK Container TASK Container Agent Communication Service Amazon ECS ECS AGENT TASK Container TASK Container LOAD BALANCER API Cluster Management Engine Key / Value Store
  17. 17. Amazon ECS - Agent Communication EC2 INSTANCES LOAD BALANCER Internet ECS AGENT TASK Container TASK Container ECS AGENT TASK Container TASK Container Agent Communication Service Amazon ECS ECS AGENT TASK Container TASK Container LOAD BALANCER API Cluster Management Engine Key / Value Store
  18. 18. Amazon ECS - Key / Value Store EC2 INSTANCES LOAD BALANCER Internet ECS AGENT TASK Container TASK Container ECS AGENT TASK Container TASK Container Agent Communication Service Amazon ECS ECS AGENT TASK Container TASK Container LOAD BALANCER API Cluster Management Engine Key / Value Store
  19. 19. Amazon ECS - API EC2 INSTANCES LOAD BALANCER Internet ECS AGENT TASK Container TASK Container ECS AGENT TASK Container TASK Container Agent Communication Service Amazon ECS ECS AGENT TASK Container TASK Container LOAD BALANCER API Cluster Management Engine Key / Value Store
  20. 20. Amazon ECS: Scheduling
  21. 21. Amazon ECS: Scheduling
  22. 22. Amazon ECS: Scheduling
  23. 23. Amazon ECS: Scheduling
  24. 24. Benefits
  25. 25. Amazon ECS benefits • Fully managed elastic service – You don’t need to run anything, and the service scales as your microservices architecture grows • Shared state optimistic scheduling • Deep Integration With Other AWS Services • Application Load Balancing • Amazon Elastic Block Store • Amazon Virtual Private Cloud • Amazon CloudWatch • AWS Identify and Access Management • AWS CloudTrail
  26. 26. Running services
  27. 27. Task Definitions Volume Definitions Container Definitions
  28. 28. Key Components: Task Definitions
  29. 29. Key Components: Task Definitions
  30. 30. Tasks Shared Data Volume Containers schedule Container Instance Volume Definitions Container Definitions
  31. 31. Unit of work Grouping of related Containers Run on Container Instances Tasks
  32. 32. Create a Service Good for long-running applications and services
  33. 33. Create Service Load Balance traffic across containers Automatically recover unhealthy containers Discover services Elastic Load Balancing Shared Data Volume Containers Shared Data Volume Containers Shared Data Volume Containers
  34. 34. Scale Service Scale up Scale down Elastic Load Balancing Shared Data Volume Containers Shared Data Volume Containers Shared Data Volume Containers Shared Data Volume Containers
  35. 35. Update Service Deploy new version Drain connections new new new Elastic Load Balancing Shared Data Volume Containers old old old Shared Data Volume Containers Shared Data Volume Containers Shared Data Volume Containers Shared Data Volume Containers Shared Data Volume Containers
  36. 36. Update Service (cont.) Deploy new version Drain connections new new new Elastic Load Balancing Shared Data Volume Containers old old old Shared Data Volume Containers Shared Data Volume Containers Shared Data Volume Containers Shared Data Volume Containers Shared Data Volume Containers
  37. 37. Update Service (cont.) Deploy new version Drain connections Elastic Load Balancing Shared Data Volume Containers Shared Data Volume Containers Shared Data Volume Containers new new new
  38. 38. Update Service (cont.) Specify a deployment configuration for your service: • minimumHealthyPercent: lower limit (as a percentage of the service's desiredCount) of the number of running tasks that must remain running in a service during a deployment. • maximumPercent: upper limit (as a percentage of the service's desiredCount) of the number of running tasks that can be running in a service during a deployment.
  39. 39. Update Service (cont.) Deploy using the least space: minimumHealthyPercent = 50%, maximumPercent = 100%
  40. 40. Update Service (cont.) Deploy quickly without reducing service capacity: minimumHealthyPercent = 100%, maximumPercent = 200%
  41. 41. Demo
  42. 42. Thank You!

×