docker orchestrators
TRANSCRIPT
Docker Orchestrators
1) Orchestrating Containerized Applications
2) The Orchestration Ecosystem Swarm
Kubernetes
Mesos
3) Deploying an Application
4) Advanced Topics
© 2015 NetApp, Inc. All rights reserved.2
Applications Are Hard
Monolithic applications
Hard to update - single massive code base
Single dimension of scalability
Waterfall development practices
Static, linear phases
Requirements
Analysis
Design
Code
Test
Deploy
© 2015 NetApp, Inc. All rights reserved.4
Tomcat
Database
Apache
Image Service
Search Service
UI Service
WAR
Simplify the Problem
Microservices
Each component is independently developed and scaled
Everything is a platform
DevOps
Continuous Integration – Finding and fixing bugs faster
Continuous Deployment – Releasing faster
© 2015 NetApp, Inc. All rights reserved.5
Load Balancer Tier
App Tier
Database Tier
UI Service Search Service
Image
Service
Multiple Swarm hosts behave like a single Docker host
Still uses Docker CLI
Uses standard Docker API
Execute containers against the cluster just like a single host
Application definitions using Compose
Not fully functional yet, network is incomplete
Docker Swarm
Image: http://www.slideshare.net/rajdeep/docker-swarm-introduction
© 2015 NetApp, Inc. All rights reserved.7
Based on Google Borg
Abstracts applications into pods and services
Schedules containers against cluster nodes using kubelets
Kubernetes
Image: https://github.com/kubernetes/kubernetes/blob/master/docs/design/architecture.md
© 2015 NetApp, Inc. All rights reserved.8
Mesos
Abstraction of resources: CPU, RAM, etc.
Generic execution of any task against resources
Frameworks define application types
Marathon, Chronos, Hadoop, Aurora, Jenkins, Cassandra
Marathon
Framework for scheduling applications onto Mesos providing private PaaS
Meta-framework, e.g. can start Chronos jobs
Mesos + Marathon
Image: https://mesosphere.github.io/marathon/
© 2015 NetApp, Inc. All rights reserved.9
Important Services
Scheduling
Swarm: Spread, BinPack, random + filters
Kubernetes: FitPredicate, PriorityFunction
Marathon: Resource offers + constraints, Cluster, Group_by, Like, Unlike
Service discovery
Internal DNS which registers applications
Networking
Overlay networks: Flannel, libnetwork (SocketPlane), Weave
© 2015 NetApp, Inc. All rights reserved.10
Our Sample Application
Multi-tier web application
Database
Web Application
Not included
Load balancer(s)
Distributed database
Horizontally scalable microservices
© 2015 NetApp, Inc. All rights reserved.12
Use standard docker CLI
Define the application using Compose
Simple, well known syntax
Scalability of components at the command line: docker-compose scale phpmyadmin:1 db:2
Docker Swarm
© 2015 NetApp, Inc. All rights reserved.13
Kubernetes
Pods
Group(s) of containers
Replication Controllers
Container lifecycle management
Services
Endpoint for one or more pods or replication controllers
© 2015 NetApp, Inc. All rights reserved.14
PodReplication
Controller
App:10.0.0.1
OR
Kubernetes
Pods
Group(s) of containers
Replication Controllers
Container lifecycle management
Services
Endpoint for one or more pods or replication controllers
© 2015 NetApp, Inc. All rights reserved.15
Kubernetes
Pods
Group(s) of containers
Replication Controllers
Container lifecycle management
Services
Endpoint for one or more pods or replication controllers
© 2015 NetApp, Inc. All rights reserved.16
Kubernetes
Pods
Group(s) of containers
Replication Controllers
Container lifecycle management
Services
Endpoint for one or more pods or replication controllers
© 2015 NetApp, Inc. All rights reserved.17
Application group to define multiple components
Dependency tracking
Scalability
Constraints
App components are standard Marathon definitions
Mesos + Marathon
© 2015 NetApp, Inc. All rights reserved.18
Application Group definition
Application definition
Container definition
Mesos + Marathon
© 2015 NetApp, Inc. All rights reserved.19
Application Group definition
Application definition
Container definition
Mesos + Marathon
© 2015 NetApp, Inc. All rights reserved.20
Application Group definition
Application definition
Container definition
Mesos + Marathon
© 2015 NetApp, Inc. All rights reserved.21
Persistent Storage
Swarm
volumes, volumes_from, volume_driver
Kubernetes
Persistent Volume Request mechanism
Predefined, pre-allocated units of storage
Mesos + Marathon
Persistent Volumes – Partially implemented by Mesos, not implemented by Marathon
Docker pass-through volumes
© 2015 NetApp, Inc. All rights reserved.23
Swarm Volume Definition
Kubernetes Volume DefinitionMarathon Volume Definition
Additional Orchestrator Considerations
Authentication and authorization
Distributed configuration management
etcd, zookeeper, etc.
Secrets management
Application HA / healing
Application scaling
Logging
Monitoring
© 2015 NetApp, Inc. All rights reserved.24
Key Takeaways
Choose the orchestrator that best fits your needs
Be conscious of complexity
Development and Operations must get along!
© 2015 NetApp, Inc. All rights reserved.26
Other Orchestrators
Tutum
Mesosphere DCOS
Rancher
CoreOS
Nomad
OpenStack Magnum (Kubernetes/Swarm)
StackEngine
Decking
© 2015 NetApp, Inc. All rights reserved.27
Additional Resources
Swarm
Documentation: https://docs.docker.com/swarm/
Kubernetes
Application Management Documentation - http://bit.ly/1M898gS
Mesos + Marathon
Documentation: https://mesosphere.github.io/marathon/docs/
Sample Code
https://github.com/Practical-Admin/meetup/
© 2015 NetApp, Inc. All rights reserved.28