東 河 教 會 實 習 成 果...教 會 實 習 成 果 實習生: 黃登靖 年級: 宗教系四年級 前言 感謝學校安排學生進入教會作實質的主日學教育訓練,從實習中且分擔
使用 Blox 實現容器任務調度與資源編排
-
Upload
amazon-web-services -
Category
Technology
-
view
176 -
download
0
Transcript of 使用 Blox 實現容器任務調度與資源編排
© 2016, Amazon Web Services, Inc. or its Affiliates. All rights reserved.
Dickson Yue
Senior Solutions Architect
使用 Blox 實現容器任務調度與
資源編排
January 12, 2017
What is Amazon ECS?
Scalable Container
Management
Flexible Container
Placement
AWS Platform
IntegrationExtensible by Design
Amazon ECS: Under the Hood
ALB ALB
AZ 1 AZ 2
user / scheduler
Scheduler
Cluster State Service
Placement Engine
Event Stream
Task Placement Engine
New Placement Constraints & Attributes
Name Example
AMI ID attribute:ecs.ami-id == ami-eca289fb
Availability Zone attribute:ecs.availability-zone == us-east-1a
Instance Type attribute:ecs.instance-type == t2.small
Distinct Instances type=“distinctInstance”
Custom attribute:stack == prod
Anatomy of Task Placement
Cluster Constraints
Custom Constraints
Placement Strategies
Apply Filter
Satisfy CPU, memory, and port requirements
Filter for location, instance-type, AMI, or custom
attribute constraints
Identify instances that meet spread or binpack
placement strategy
Select final container instances for placement
Supported Placement Strategies
Binpacking Spread Affinity Distinct Instance
Placement Strategy Chaining
Spread tasks across Zones
and Binpack within each Zone
New Cluster Query Language
Filtering: Match on Instance Family or Type
Filtering: Match on Availability Zone
Filtering: Match on Multiple Expressions
Filtering: Match on Custom Attributes
Task Placement Examples
g2.2xlarge t2.small g2.2xlarge g2.2xlarge
Placement: Targeting Instance Type
g2.2xlarge t2.small t2.micro t2.medium
t2.medium t2.small g2.2xlarge
t2.small
t2.small t2.medium
us-east-1aus-east-1d
Placement: Targeting Instance Type & Zone
g2.2xlarge t2.small t2.micro t2.medium
t2.medium t2.small g2.2xlarge t2.small
us-east-1aus-east-1d
g2.2xlarge t2.medium
t2.micro t2.small
us-east-1c
Placement: Availability Zone Spread
g2.2xlarge t2.small t2.micro t2.medium
t2.medium t2.small g2.2xlarge t2.small
us-east-1aus-east-1d
g2.2xlarge t2.medium
t2.micro t2.small
us-east-1c
Placement: Spread across Zone and Binpack
g2.2xlarge t2.small t2.micro t2.medium
t2.medium t2.small g2.2xlarge t2.small
us-east-1aus-east-1d
g2.2xlarge t2.medium
t2.micro t2.small
us-east-1c
Placement: Affinity and Anti-Affinity
Running a Service
t2.medium t2.small t2.small
us-east-1aus-east-1d
t2.medium t2.micro t2.small
us-east-1c
Placement: Multiple Services on a Cluster
t2.medium g2.2xlarge t2.micro t2.small
t2.small t2.small g2.2xlarge t2.small
t2.small t2.small
g2.2xlarge t2.small
Placement: Services – Distinct Instances
Console: Getting Started with Placement
Console: Placement Templates to Get Started
Console: Customizing Placement Strategies
Live Demo
Event Stream
Consuming Real-time Events
Three Steps to Getting Started with Events
Step 1: Create CWE Rule Step 2: Create SNS Topic Step 3: Put Events to SNS
Consuming Events for Service Discovery
app1-tst 10.1.0.11
db1-tst 10.1.0.14
app2 10.1.0.16
db2 10.1.0.18
my-app 10.1.0.20
websrv1 10.1.0.1
websrv2 10.1.0.2
websrv3 10.1.0.4
app-dev1 10.1.0.9
app-dev2 10.1.0.5
app-dev3 10.1.0.8
db-dev 10.1.0.19
Introducing Blox
What is Blox?
Choice
Control
Developer Experience
Building with Blox
scheduler cluster state service
Set Up Blox Locally
Step 1: git clone https://github.com/blox/blox.git
Step 3: docker-compose up -d
Step 4: start using Blox locally
Step 2: deploy CloudFormation template to configure ECS event stream and SQS queue
Swagger Spec: Cluster State Service
Swagger Spec: Daemon Scheduler
Daemon Scheduler
t2.small t2.small t2.small
Blox: Daemon Scheduler
t2.small t2.small t2.small
scheduler cluster state service
t2.small t2.small t2.small
Step 1: Create an Environment
Step 2: Create a Deployment
Step 3: Add Container Instances
Step 4: Monitoring and Scaling a Cluster
Live Demo
The Blox Vision
Contributing to Blox
• Blox is licensed under Apache 2.0
• Open an issue or pull request
• Watch our roadmap on GitHub
• Check out our Gitter channel
Summary
Summary
Thank you!
Remember to complete
your evaluations!