highly available and distributed containers - containercon na 2016

23
Highly Available and Distributed Containers Image 3 Kendrick Coleman Developer Advocate @kendrickcoleman github.com/kacole2

Upload: code-by-dell-emc

Post on 08-Jan-2017

504 views

Category:

Technology


0 download

TRANSCRIPT

Highly Available and Distributed ContainersImage 3

Kendrick ColemanDeveloper [email protected]/kacole2

3 of Y

4 of Y

5 of Y

A single car has about 30,000 parts, counting every part down to the smallest screws

6 of Y

In the beginning…

7 of Y

libNetworkhttps://github.com/docker/libnetwork

8 of Y

• Swarm 1.0– Required external Key/Value for scale and use with libNetwork– Container restarts required additional flags

• Kubernetes– https://github.com/kelseyhightower/kubernetes-the-hard-way

• Mesos– Bring your own framework with specific syntax

Orchestration wasn’t easy

9 of Y

• Integration of SwarmKit– https://github.com/docker/swarmkit

• Integrated into the Docker engine

• Desired state service declaration with reconciliation

• Decentralized service with managers and workers

• Multi-host networking with integrated service discovery and load balancing

• Rolling updates for services

• Secure by default using TLS mutual authentication and encrypted communication

Docker 1.12 with Swarm Mode

DEMO!

11 of Ycredit: LightBend (source: www.slideshare.net/Lightbend/the-6-traits-of-reactive-microservices)

12 of Y

hub.docker.com

7 of the top 12 require persistence

13 of Y

What's the problem?• When I run a persistent

application in a container, where does my data get stored?– The container holds the data

directory and structure of the entire application

– Optionally use local volumes

• Stateless applications work well – nginx, httpd, kibana, haproxy,

memcached, solr, celery

$ docker run -v redisData:/data redis

redisData

/etc /var/bin /opt/data

14 of Y

What's the problem?• Lose a container

– Lose the data

• Lose a server– Lose the data

• Local data storage– Failed hard drives or failed RAID– Can not scale beyond the

physical limit of the server

/etc /var/bin /opt/data

15 of Y

Containers + EMC {code}

https://github.com/emccode/rexray

16 of Y

REX-Raygithub.com/emccode/rexray• Integrations:

– Docker, Mesos, Marathon, Kubernetes

• Support for multiple storage platforms– On-Prem:

› EMC ScaleIO, XtremIO, Isilon, VMAX› Oracle VirtualBox

– Cloud:› AWS› GCE› RackSpace/OpenStack Cinder

• Only solution to provide High Availability

• Open Source and in sync with Docker development cycle

• Single binary with simple installation using curl | sh and configured using 1 YAML file

17 of Y

Solving the problem• Docker created a volume plugin

framework, allowing volume plugins to receive API requests from the Docker daemon to perform storage operations– Create/Mount/Unmount/Delete/

Snapshot

$ docker run --volume-driver=rexray -v redisData:/data redis

/redisData

/etc /var/bin /opt/data

18 of Y

Solving the problem• Lose the container or lose the

server– Data persists and remains in tact

on the remote storage platform

/etc /var/bin /opt

/redisData

19 of Y

Solving the problem• Attach the volume to a new

container on a different host– Equivalent of a hard reset.

Application starts and resumes from the last write to disk

– Container schedulers can perform automated failover

• Scalability– Application data can scale to the

maximum supported by the storage platform

/etc /var/bin /opt/data /redisData

20 of Y

How it works

$ docker run --volume-driver=rexray -v redisData:/data redis

redisData

/etc /var/bin /opt/data

Storage Platform

Persistent Volume

DEMO!

22 of Y

• What we learned– Clustering, networking, and failover with persistent applications in containers is

easier than ever before

• Get Hands On!– emccode.com– github.com/emccode/rexray– github.com/emccode/vagrant

Kendrick ColemanDeveloper [email protected]/kacole2

23 of Y

Who is {code}?• Open Source initiative focused on next-

generation infrastructure

• Contribute to meaningful Open Source Software (OSS) projects

• Create OSS integrations to keep EMC relevant when container-based infrastructure enters a conversation

• Driving awareness of OSS opportunities with product teams

• Acting in the interest of building a community