Container orchestration is critical for cloud native applications. In this session, we will introduce the patterns and practice to extend the Docker swarm mode for better support for workloads in cloud. E.g. building distributed machine-learning infrastructure on top of GPU-Accelerated clusters with Docker to streamline the continuous learning; provide diverse delivery model enhancement (i.e. blue-green deployment etc.) to allow users to treat elastic web application delivery more controllable and repeatable. And all of them are supported in declarative way by Docker Compose template
2. Docker Adoption in China
Container Service of Alibaba Cloud
Extensions on Docker Orchestration
Agenda
3. • 83% already using or planning to use Docker
• 23% using Docker in production or Dev/Test
environments
• Large Internet companies are pioneers. Enterprise
adopting is accelerating.
• Oct. 2016, partnership between Docker and Alibaba
Cloud announced.
Docker Adoption in China
Not
familiar
33%
Learning
32%
Experimen
5ng
12%
Dev/Test
Only
13%
Using in
Produc5on
10%
April 2017 by Alibaba Cloud
Survey result from 1400+ feedbacks
4. US West US East Coast
Hong Kong
Singapore
Dubai
Japan
Australia
Germany
Shenzhen
ShanghaiHangzhou
Qingdao
Beijing
Zhangjiakou
Alibaba Cloud Global Footprint
5. Cluster Management
CPU / GPU / memory / …
Public Cloud / Private Cloud
Docker Engine Volume Plugin
Cloud Disk /NAS/OSS
Network Plugin
Overlay/VPC
Scheduling
Topology aware/ Batch / Cron / node or service affinity / …
Service Management
Service discovery / Load balance / Auto-scaling / Upgrade
Applications
Web / Mobile / Machine Learning / Serverless / …
Container Service on Alibaba Cloud
l Compa5ble to Docker
na5ve clustering
l Full managed service
l Hybrid Cloud enabled
hMps://intl.aliyun.com/product/container-service
7. • Docker Swarm
• Docker Compose V1/V2
• Docker Swarm mode
• Docker Compose V3+
• (Beta)
Compatible to Docker Native Clustering
Yaml file
deploy
Service: wordpress
scale=3
Service: mysql
wordpress
mysql
Service
wordpress_1
wordpress_2
wordpress_3
mysql_1
Containers Docker Compose Template
Stack
Clusters of VMs /
bare metal servers
8. version: "3.2"
services:
nginx:
image: nginx:latest
deploy:
mode: replicated
replicas: 3
placement:
preferences:
- spread: node.labels.aliyun.zone
ports:
- target: 80
published: 8080
protocol: tcp
mode: host
labels:
aliyun.lb.port_8080`: tcp://slbtest:8080
volumes:
- 'website:/usr/share/nginx/html'
volumes:
website:
driver: ossfs
driver_opts:
bucket: acs-sample
Infrastructure as Code in Docker Way
Assemble cloud resources in declarative way
Load Balancer
OSSFS OSSFS OSSFS
Bucket from
Object Store Service
AZ-a AZ-b
http://lb:8080
AZ-a
node-1 node-2 node-3
9. • Scaling policy in declarative way
• Plugin for monitoring
- Input: nagios, apache, docker, UDP, ….
- Output: Influxdb, prometheus,
kafka …
Monitoring
Agent
Docker Engine
Monitoring
Agent
Docker Engine
Monitoring
Service
Cloud Monitoring Service
Or InfluxDB + Kapacitor
Cluster
Manager
Alert:Avg CPU > 70%
SLB
aliyun.auto_scaling.max_cpu: 70!
aliyun.auto_scaling.step: 2!
9
Auto Scaling on Swarm
webhook
10. Blue-Green Update
Release your software faster and safer
SLB
Discovery
Service
Docker Engine (Manager)
Agent
Routing
Docker Engine(Worker)
Agent
Routing
Docker Engine(Worker)
Agent
Routing
App App DB
App - Blue
DB
template
AppApp
App - Green
DB
New template
watch
watch and report
14. More Cloud Services Powered by Containers
Elas5c Web
Hos5ng
All controllers for
Apsara Stack (Private Alibaba Cloud)
Internet
Middleware
Func5onCompute
Machine
learning
…
AND