By Sreenivas Makam
Containers provide portability for applications across private and public clouds. Since there are many options to deploy Docker Containers in public cloud, customers get confused in the decision making process. I will compare Docker machine, Docker Cloud, Docker datacenter, Docker for AWS, Azure and Google cloud, AWS ECS, Google Container engine, Azure Container service. A sample multi-container application will be deployed using the different options. The deployment differences including technical internals for each option will be covered. At the end of the session, the user will be able to choose the right Docker deployment option for their use-case.
1. Compare Docker Deployment
Options in Public Cloud
Presenter Name: Sreenivas Makam
Presented at: Container conference, Bangalore
Presentation Date: April 7, 2017
2. About me
• Senior Engineering Manager at Cisco Systems Data Center
group
• Author of “Mastering CoreOS”
https://www.packtpub.com/networking-and-servers/mastering-
coreos/ )
• Docker Captain(https://www.docker.com/community/docker-
captains )
• Blog: https://sreeninet.wordpress.com/
• Code hacks: https://github.com/smakam
• LinkedIn: https://in.linkedin.com/in/sreenivasmakam
• Twitter: @srmakam
3. Agenda
•Deployment options – Overview
•Methodology used to compare
•Comparison of Deployment options
•Pick the right option for your use
case
4. Considerations for Container solution
Which Orchestration solution to choose?
Should it be deployed in VM or bare-metal?
How to run stateful applications?
How to achieve Service discovery and DNS?
Should it be deployed on premise or public cloud?
Is central logging required?
How to monitor and troubleshoot container platform?
Is the solution secure?
How to inject secrets and dynamic configuration?
5. Docker deployment in public cloud
Docker Machine
(for AWS, Azure, GCE)
Cloud provider’s CaaS
(AWS ECS, Google GKE,
Microsoft ACS)
Docker’s custom cloud
(Docker for AWS, Azure, GCE)
Docker’s CaaS (Docker cloud,
Docker datacenter)
Docker
deployment
6. Docker Machine
• Tool from Docker to create and manage Docker nodes.
• Supported for majority of cloud providers including AWS, Azure
and Google cloud.
• Creates Docker node on the cloud with 1 command.
• Latest Docker version is pre-installed in the node.
• Both old and new Swarm modes can be used to create clusters.
• Provides automatic secure access to Docker node.
• Minimal integration to native cloud provider features.
• Targeted as a developer tool.
7. Docker custom cloud
• This is Docker’s solution to get Containers integrate well with the
cloud infrastructure.
• Docker for AWS and Azure is available for general use. Docker for
GCE is available as beta currently.
• Swarm mode cluster gets automatically created using a cloud
provider template and with few simple inputs from the user.
• Solution integrated with Cloud networking, storage, logging,
security group, load balancer.
• Targeted for hybrid cloud or multi-cloud deployments.
8. Docker CaaS
• Container service offered by Docker.
• Docker Datacenter(DDC) - Docker’s enterprise grade container platform
• Docker cloud - Hosted service from Docker to manage Containers
• DDC can be run on-premise or in any of the major public cloud. Official support is
present now for AWS and Azure. GCE would be added soon.
• UCP and DTR are main components of DDC and they can be deployed in a highly
available manner.
• DDC provides enterprise grade features like high availability, RBAC and LDAP
integration.
• DDC and Docker cloud provides nice user interface for management and is also
compatible with regular Docker API.
• Docker cloud is targeted as a simple hosted solution for relatively small deployments.
• DDC is targeted as a complete Container platform since it includes all associated
services like service discovery, logging, networking, storage with a decent cloud
integration.
10. Docker datacenter for AWS - Architecture
https://docs.docker.com/datacenter/install/aws/
11. Docker datacenter for Azure - Architecture
https://blog.docker.com/2016/06/docker-datacenter-aws-azure-cloud/
12. Cloud provider CaaS
• Container service offered by Cloud providers.
• ECS – From Amazon(Docker with Amazon’s proprietary orchestrator)
• GKE – From Google(Docker with Kubernetes orchestrator)
• ACS – From Microsoft(Docker with either Swarm, Kubernetes, Mesos)
• Provides very tight cloud integration.
• In some cases, there seems to be a lag with latest Docker version
and features available with this option.
• Targeted for folks who want to manage VMs and Containers
together. This solution suits companies which have a big cloud
presence and already using public cloud.
13. Amazon ECS - Architecture
Uses proprietary orchestrator currently. There is a plan to make
orchestrator as pluggable module in the future.
http://www.allthingsdistributed.com/2015/07/under-the-hood-of-the-amazon-ec2-container-service.html http://docs.aws.amazon.com/AmazonECS/latest/developerguide/Welcome.html
14. Azure Container service- Architecture
• Supports major orchestrators like Docker Swarm, Kubernetes, Mesos.
• ACS only takes care of installing and deploying the cluster. Management of
containers and services is done by orchestrator itself.
https://docs.microsoft.com/en-in/azure/container-service/container-service-intro
15. GKE Architecture
Kubernetes Architecture
GKE Architecture – Built on Docker
and Kubernetes
• GKE makes Kubernetes easier to manage and integrates well with
Google compute’s other cloud services.
https://www.cloudbees.com/blog/demand-jenkins-slaves-kubernetes-and-google-container-engine
https://www.slideshare.net/wattsteve/kubernetes-48013640
16. Methodology used to compare
• Built multi-node cluster in all cases. Tried to use Swarm mode in most of
the cases where it is supported. In some cases, used custom
orchestrator, old Swarm mode or Kubernetes where Swarm mode is not
supported.
• Deployed multi-container voting application using Docker containers in
the multi-node cluster.
• Accessed the externally exposed services using load balancer where it is
available.
• Tried scaling up/down services as well as scaling up/down the cluster.
• Checked features like logging capability, service discovery, high
availability, networking and storage.
• Evaluated ease of management, upgradability and the cloud integration.
• Details are captured here(https://github.com/smakam/dockerdeploy)
18. Comparison parameter - Orchestration
• Both old and new Swarm modes can be used.Docker Machine
• Swarm mode
Docker’s
custom cloud
• ECS – Amazon’s proprietary scheduler
• GKE – Kubernetes
• ACS – Supports Docker Swarm, Kubernetes,
Mesos
Cloud provider’s
CaaS
• DDC – Swarm mode
• Docker cloud – proprietary orchestration and
Swarm mode, Swarm mode available as beta
Docker’s CaaS
19. Comparison parameter - Management
• Docker-machine interface for managing cluster.
Container management using Docker tools.Docker Machine
• Cluster creation using cloud provider template,
Cluster management using Cloud provider tools,
Container management using Docker tools.
Docker’s
custom cloud
• ECS – ECS GUI and CLI
• GKE – Cluster management using Google cloud,
Kubernetes dashboard to manage Containers
• ACS – Cluster management using Azure cloud,
Container management using Docker tools.
Cloud provider’s CaaS
• DDC – UCP and DTR has GUI to manage,
Supports Docker API.
• Docker cloud – GUI to manage. Supports Docker
API.
Docker’s CaaS
20. Comparison parameter – Networking & Storage
• Libnetwork with overlay for networking. Docker volume
plugin supported by cloud provider can be used.Docker Machine
• Libnetwork with overlay for networking. Cloudstor volume
plugin is supported currently.
Docker’s
custom cloud
• ECS – Overlay network not supported. Docker volume is
supported with limited drivers
• GKE – Kubernetes based networking. Storage through
Kubernetes persistent disk and google cloud storage
• ACS – Libnetwork with overlay for networking. Docker
volume driver using Azure file storage is supported.
Cloud provider’s
CaaS
• Libnetwork with overlay for networking. Docker volume
plugin supported by cloud provider can be usedDocker’s CaaS
21. Comparison parameter – Registry
• Docker hub is default. Can be used with any Docker
registry.
Docker
Machine
• Can be used with any Docker registry.
Docker’s
custom cloud
• ECS –Docker registry and Amazon’s ECR
• GKE – Docker registry and Google’s container
registry
• ACS – Docker registry and Microsoft’s ACR
Cloud
provider’s CaaS
• DDC – DTR
• Docker cloud – Docker cloud registry and any other
Docker registry
Docker’s CaaS
22. Comparison parameter – Cloud integration
• Minimal cloud integration.
Docker
Machine
• Integrated with cloud networking, firewall, load
balancer, logging. This can be improved further.
Docker’s
custom cloud
• Provides native integration of Containers to other
cloud offerings from provider.
Cloud
provider’s CaaS
• DDC – Good integration with cloud services.
• Docker cloud – Swarm mode has minimal integration
now. Non-swarm mode has better integration.
Docker’s CaaS
23. Comparison parameter – Application file format
• Compose formatDocker Machine
• Compose format
Docker’s
custom cloud
• ECS – Proprietary task definition format, limited
compose support
• GKE – Kubernetes task definition format
• ACS – Compose can be used with Docker Swarm
Cloud provider’s
CaaS
• DDC – Compose format
• Docker cloud – Compose format, supported stackfile
format earlier which is similar to compose
Docker’s CaaS
24. Comparison parameter – Docker version & upgrade
• Uses CE latest version 17.03. No easy way to use older
versions.
• Docker upgrade has to be done manually.
Docker Machine
• Uses CE latest version 17.03. No easy way to use older
versions.
• Rolling upgrade is supported.
Docker’s
custom cloud
• ECS – Docker version 1.12.6. No flexibility with Docker
version. Container agent upgrade will also upgrade Docker
version. Upgrade is manual.
• GKE – Docker 1.11.2, Kubernetes 1.5.4. Rolling upgrade is
supported.
• ACS – CE version 17.03. No option to upgrade the cluster,
suggestion is to create new cluster.
Cloud provider’s
CaaS
• DDC – Uses EE 17.03 version. Need to upgrade UCP, DTR
and Docker engine separately. No rolling upgrade yet.
• Docker cloud – Uses CE latest version 17.03. Provides
integrated upgrade option.
Docker’s CaaS
25. Comparison parameter – Enterprise features
• Enterprise features has to be manually setup.Docker Machine
• Enterprise features has to be manually setup
Docker’s
custom cloud
• Integrated with cloud provider’s enterprise features like
user management, high availability.
Cloud provider’s
CaaS
• DDC – Highly available. Provides RBAC and LDAP
integration.
• Docker cloud – Supports organizations and teams.
Docker’s CaaS
26. Comparison parameter - Cost
• Cost is for cloud resource usage, no separate
cost for ContainersDocker Machine
• Cost is for cloud resource usage, no separate
cost for Containers
Docker’s
custom cloud
• AWS, ACS - Cost is for cloud resource usage,
no separate cost for Containers
• GKE – Chargeable after 5 Container nodes.
Cloud provider’s
CaaS
• DDC – Separate cost for Container nodes.
• Docker cloud – Separate charge for private
repositories
Docker’s CaaS
27. How do I pick the right option for me?
Production
use case
VM and
Container
used
Docker CaaS
Enterprise
grade DDC
Docker Cloud
Hybrid/Multi
cloud
Cloud
provider CaaS
Kubernetes
GKE
Azure
ECS
Azure
Docker custom
cloud
Docker
Machine
yes
yes
yes
yes
yesno
no
no
no
no
Caution:
This flowchart oversimplifies the problem.
There are more considerations than this.