Lee Calcote
DevOpsDays Austin, May 2016
clouds, containers, infrastructure, applications
and their management
[k uh n- tey -ner]
[ awr -k uh -streyt-or]
Definition:
(Stay tuned for updates to presentation)
One size does not fit all.
A strict apples-to-apples comparison is inappropriate and not the objective, hence characterizing and contrasting.
Genesis & Purpose
Support & Momentum
Host & Service Discovery
Scheduling
Modularity & Extensibility
Updates & Maintenance
Health Monitoring
Networking & Load-Balancing
High Availability & Scale
Compute
Network
Storage
Cluster Management
Host Discovery
Host Health Monitoring
Scheduling
Orchestrator Updates and Host Maintenance
Service Discovery
Networking and Load-Balancing
Application Health Monitoring
Application Deployments
Announced as production-ready 5 months ago (Nov 2015)
image: digital trends
Host Discovery
Service Discovery
image: iStock
Swarm’s scheduler is pluggable
Swarm scheduling is a combination of strategies and filters/constraint:
Random
Binpack
Spread*
Plugin?
Filters
container constraints (affinity, dependency, port) are defined as environment variables in the specification file
node constraints (health, constraint) must be specified when starting the docker daemon and define which nodes a container may be scheduled on.
image: pickywallpapers
Ability to remove batteries is a strength for Swarm:
image: Alan Chia
Nodes
Applications
image: 123RF
Nodes
Applications
Docker Swarm is fully compatible with Docker’s networking
Docker multi-host networking (requires a K/V store) provides for user-defined overlay networks that are micro-segmentable
uses a gossip protocol for quick convergence of neighbor table
facilitates container name resolution via embedded DNS server (previously via etc/hosts)
You may bring your own network driver
Load-balancing is new in 1.11.0
- no documentation available
Rebalancing is not available
Rescheduled containers lose access to volumes mounted on the former host.
use volume plugins like Flocker to avoid this
Scaling swarm to 1,000 AWS nodes and 50,000 containers
Suitable for orchestrating a combination of infrastructure containers
Less built-in functionality for application containers
Swarm is a young project and lacks advanced features.
High Availability out of experimental as of latest release (1.11.0)
Load-balancing in 1.11.0? Swarm needs to be used with third-party software.
Only schedules Docker containers, not containers using other specifications.
While dependency and affinity filters are available, Swarm does not provide the ability to enforce scheduling of two containers onto the same host or not at all.
Swarm works. Swarm is simple and easy to deploy.
If you already know Docker CLI, using Swarm is straight-forward
facilitates earlier stages of adoption by organizations viewing containers as faster VMs
Less built-in functionality for applications
Swarm is easy to extend, if can already know Docker APIs, you can customize Swarm
Highly modular:
Pluggable scheduler
Pluggable K/V store for both node and multi-host networking
considered a third generation container orchestrator led by Google, Red Hat and others.
bakes in load-balancing, scale, volumes, deployments and secret management among other features.
Declaratively, opinionated with many key features included
Host Discovery
Service Discovery
Two primary modes of finding a Service
image: iStock
Predicates (node resources and characteristics):
PodFitPorts , PodFitsResources, NoDiskConflict , MatchNodeSelector, HostName , ServiceAffinit, LabelsPresence
Priorities (weighted strategies used to identify “best fit” node):
LeastRequestedPriority, BalancedResourceAllocation, ServiceSpreadingPriority, EqualPriority
Applications
Deployment objects automate deploying and rolling updating applications.
Kubernetes Components
Upgrading the Kubernetes components and hosts is done via shell script
image: 123RF
Nodes
cAdvisor, Heapster, InfluxDB, Grafana
Applications
three types of user-defined application health-checks and uses the Kubelet agent as the the health check monitor
HTTP Health Checks, Container Exec, TCP Socket
Cluster-level Logging
collect logs which persist beyond the lifetime of the pod’s container images or the lifetime of the pod or even cluster
standard output and standard error output of each container can be ingested using a Fluentd agent running on each node
…enter the Pod
Load-Balancing
For those familiar with Docker-only, Kubernetes requires understanding of new concepts
Powerful frameworks with more moving pieces beget complicated cluster deployment and management.
Lightweight graphical user interface
Mesos is a distributed systems kernel
stitches together many different machines into a logical computer
Mesos has been around the longest (launched in 2009)
and is arguably the most stable, with highest (proven) scale currently
Frameworks
Frameworks have a scheduler and executor. Schedulers get resource offers. Executors run tasks.
Marathon is written in Scala
Mesos-DNS generates an SRV record for each Mesos task
including Marathon application instances
Marathon will ensure that all dynamically assigned service ports are unique
Mesos-DNS is particularly useful when:
apps are launched through multiple frameworks (not just Marathon)
you are using an IP-per-container solution like Project Calico
you use random host port assignments in Marathon
image: iStock
Frameworks
multiple available
may run multiple frameworks
Modules
has three types of Modules
Replacement, Hook, Anonymous
Nodes
- Mesos has maintenance mode
Applications
image: 123RF
Nodes
Applications
Networking
An IP per Container
No longer share the node's IP
Helps remove port conflicts
Enables 3rd party network drivers
Load-Balancing
Marathon offers two TCP/HTTP proxy.
A simple shell script and a more complex one called marathon-lb that has more features.
Pluggable (e.g. Traefic for load-balancing)
Great at asynchronous jobs. High availability built-in.
Referred to as the “golden standard” by Solomon Hykes, Docker CTO.
Universal Containerizer
abstract away from Docker Engine, (runc, appc)
Can run multiple frameworks, including Kubernetes and Swarm.
Good for Big Data house and job-oriented or task-oriented workloads.
Good for mixed workloads and with data-locality policies
Powerful and scalable, Battle-tested
Good for multiple large things you need to do 10,000+ node cluster system
Marathon UI is young, but promising
Still needs 3rd party tools
Marathon interface could be more Docker friendly (hard to get at volumes and registry)
May need a dedicated infrastructure IT team
an overly complex solution for small deployments
Text
Host Discovery
Gossip protocol - Serf is used
Service Discovery
Nomad integrates with Consul to provide service discovery and monitoring.
image: iStock
Task drivers
Nodes
Applications
type: This indicates the check types supported by Nomad. Valid options are currently http, tcp and script. In the future Nomad will add support for more Consul checks.
image: 123RF
Nodes
Applications
Networking
Dynamic ports are allocated in a range from 20000 to 60000.
An IP per Container
No longer share the node's IP
Helps remove port conflicts
Enables 3rd party network drivers
Load-Balancing
Marathon offers two TCP/HTTP proxy.
A simple shell script and a more complex one called marathon-lb that has more features.
Pluggable (e.g. Traefic for load-balancing)
asdf
asdf
A high-level perspective of the container orchestrator spectrum .