Mais conteúdo relacionado Semelhante a AWS 微服務中的 Container 選項比較 (Level 400) (20) Mais de Amazon Web Services (20) AWS 微服務中的 Container 選項比較 (Level 400)1. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Pahud Hsieh(謝洪恩)
Solutions Architect, Amazon Web Services
Comparing Container Options For
Microservices On AWS
2. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
3. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Webapp
Greeting Name
Client
A Typical Application With Microservices
Greeting
Greeting
Name
Name
Webapp
Webapp
4. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Microservices And Containers
• Do one thing, really well
• Any app, any language
• Test and deploy same artifact
• Self-contained services
• Isolated execution environment
• Faster startup
• Scaling and upgrading
5. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
EC2 Instance EC2 InstanceEC2 InstanceEC2 InstanceEC2 Instance
Running Containers
6. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Scheduling and Orchestration
Cluster Manager Placement Engine
Running Containers At Scale
Availability Zone #1 Availability Zone #2 Availability Zone #3
7. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Running Containers On AWS
Using Managed Services
8. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Running Containers With ECS
9. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Deploying Microservices
Using
AWS Fargate
10. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
ECS Instance ECS Instance ECS Instance ECS InstanceECS Instance ECS Instance
EC2
FARGATE
Notifications
Amazon ECS CLUSTER
Availability Zone #1 Availability Zone #2 Availability Zone #3
Subnet 2
172.31.2.0/24
Subnet 1
172.31.1.0/24
Subnet 3
172.31.3.0/24
Web
Shopping
Cart
11. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
EKS Core Tenets
• Platform to run production-grade workloads
• Native and upstream Kubernetes experience
• Seamless integration with EKS services
• EKS team actively contributes upstream
12. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
mycluster.eks.amazonaws.com
Availability
Zone 1
Availability
Zone 2
Availability
Zone 3
Kubectl
13. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Application Deployment Using Helm On Kubernetes
• Templating and packaging
tool for k8s apps
• Chart: Bundle to represent
k8s apps
• Analogous to apt, yum,
homebrew for k8s
Mychart
|-- Chart.yaml
|-- charts
|-- templates
| |-- NOTES.txt
| |-- _helpers.tpl
| |-- deployment.yaml
| |-- ingress.yaml
| `-- service.yaml
`-- values.yaml
14. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Deployment Pipeline
For
Microservices Using Kubernetes
15. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
AWS CodePipeline – CI/CD with Kubernetes
AWS CodePipeline
AWS CodeCommit AWS CodeBuild AWS Lambda
Amazon ECR
1 2 4
3 5
6
1
Developers continuously integrate
changes into a main branch hosted
within a repo
2
Triggers an execution of the pipeline
when a new version is found, builds
a new image with build ID
3
Pushes the newly built image
tagged with build ID to ECR repo
4
Invokes a Lambda function to
trigger application deployment
5
Leverages Kubernetes Python SDK
to update a deployment
6
Fetches new container image
and performs a rolling update
of deployment
Developer
16. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Spectrum Of Serverless At AWS
AWS
Lambda
Amazon
Kinesis
Amazon
S3
Amazon API
Gateway
Amazon
SQS
Amazon
DynamoDB
AWS IoT
Amazon
EMR
Amazon
ElastiCache
Amazon
RDS
Amazon
Redshift
Amazon ES
Managed Serverless
Amazon EC2
Microsoft SQL
Server
“On EC2”
Amazon
Cognito
Amazon
CloudWatch
17. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Serverless Application Model
• CloudFormation extension optimised for Serverless
• New serverless resource types: functions, API and tables
• Supports anything CloudFormation supports
• Open specification (Apache 2.0)
• https://github.com/awslabs/serverless-application-model
18. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Deployment Using AWS Lambda
/webapp
/greeting
/names/1
webapp
name
greeting
19. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Microservices Deployment
Using
Serverless Application Model
20. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
X-Ray Service
21. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Monitoring Microservices
Using
AWS X-ray
22. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
github.com/
aws-sample/
aws-microservices-deploy-options
23. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Tap your badge as you leave to
receive an email with additional
resource links from this session.
Your feedback is important to us.
Rate this session via the event app.
After This Session…
24. © 2018, Amazon Web Services, Inc. or its affiliates. All rights reserved.
Thank You