container orchestration - chicago coder conference 2016

39
1 This information is confidential and prepared by Uptake solely for the use of the intended recipient Container Orchestration Mariano Gonzalez Rob Mills code: http://bit.ly/container-orchestration- code slides: http://bit.ly/container- orchestration-slides

Upload: mariano-gonzalez

Post on 13-Apr-2017

131 views

Category:

Software


2 download

TRANSCRIPT

Page 1: Container orchestration - Chicago Coder Conference 2016

1This information is confidential and prepared by Uptake solely for the use of the intended recipient

Container OrchestrationMariano GonzalezRob Mills

code: http://bit.ly/container-orchestration-codeslides: http://bit.ly/container-orchestration-slides

Page 2: Container orchestration - Chicago Coder Conference 2016

2This information is confidential and prepared by Uptake solely for the use of the intended recipient

Before we get startedPre-requisites

Page 3: Container orchestration - Chicago Coder Conference 2016

3This information is confidential and prepared by Uptake solely for the use of the intended recipient

Pre-requisites

• Docker Toolbox (http://bit.ly/docker-toolbox)– docker– docker-machine– docker-compose

• Kubernetes (http://bit.ly/kubernetes-install)– brew install kubernetes-cli

• Git (optional - to pull the code)– brew install git

• Code examples (http://bit.ly/container-orchestration-code)– git clone https://github.com/eschizoid/container-orchestration.git

Install (or have installed)

Page 4: Container orchestration - Chicago Coder Conference 2016

4This information is confidential and prepared by Uptake solely for the use of the intended recipient

Who are these guys?

Page 5: Container orchestration - Chicago Coder Conference 2016

5This information is confidential and prepared by Uptake solely for the use of the intended recipient

Mariano Gonzalez

Mariano is a Chicago-based computer geek originally from Mexico. He loves working with all types of middleware technologies such as Apache Camel, IBM Integration Bus, Mule and Spring Integration just to mention a few. He has been using Java for almost 10 years, implementing multiple kinds of applications for different business fields (insurance, banking, and trade shows). Mariano used to work for Peapod.com before joining Uptake. He enjoyed sharing his knowledge about Java platforms SE/EE and it's huge ecosystem.

[email protected]

Rob MillsRob is a technology enthusiast and born problem solver originally from Boston. His experience covers the full stack, including mobile applications, rich single page javascript UIs, e-Commerce applications, enterprise middleware integration applications, and document management applications for clients and employers in a number of verticals. He loves sharing his passion for software engineering in all languages but has a professional background in mostly Java stacks. Rob currently works for Uptake, a predictive analytics/big data/IoT company, as a Software Engineering Manager.

[email protected]

Page 6: Container orchestration - Chicago Coder Conference 2016

6This information is confidential and prepared by Uptake solely for the use of the intended recipient

1. Frameworks overviewa. Marathonb. Kubernetes

2. Workshopa. Marathonb. Kubernetes

3. Conclusions

4. QA

Agenda

Page 7: Container orchestration - Chicago Coder Conference 2016

7This information is confidential and prepared by Uptake solely for the use of the intended recipient

Why should I care?

Page 8: Container orchestration - Chicago Coder Conference 2016

8This information is confidential and prepared by Uptake solely for the use of the intended recipient

Why should I care?

Is your (Dev)Ops team

… always putting out fires?… building special snowflake servers?… supporting applications that they

have no idea how they work?… generally overworked (by volume or

by scope)?

Page 9: Container orchestration - Chicago Coder Conference 2016

9This information is confidential and prepared by Uptake solely for the use of the intended recipient

“The Other end of the spear: the tooth-to-tail ratio (T3R) in modern military operations” by John J. McGrathhttp://www-cgsc.army.mil/carl/download/csipubs/mcgrath_op23.pdf

3:1Support : Infantry

Why should I care?

U.S. Military deployments

Page 10: Container orchestration - Chicago Coder Conference 2016

10This information is confidential and prepared by Uptake solely for the use of the intended recipient

Why should I care?

So what if you could

… allow your DevOps team to focus on more sustainable infrastructure approaches?

… have a clear handoff between operations and developers?

… allow your developers to reliably ship new changes with minimal DevOps support?

… decrease the DevOps workload?

Page 11: Container orchestration - Chicago Coder Conference 2016

11This information is confidential and prepared by Uptake solely for the use of the intended recipient

Ok, now I care.

• More reliable deployments - containers are the same throughout the pipeline

• Narrower DevOps responsibilities - they deliver the underlying hosts and the frameworks* and nothing else

• Keep application domain knowledge with the application - engineers can better see and control how their application runs

• Fewer man-hours required to prototype or test new deployments

The Promise

*please use chef, ansible, puppet, salt, CloudFoundry or the like.

Page 12: Container orchestration - Chicago Coder Conference 2016

12This information is confidential and prepared by Uptake solely for the use of the intended recipient

Let’s start at the beginningJust to level-set everyone

Page 13: Container orchestration - Chicago Coder Conference 2016

13This information is confidential and prepared by Uptake solely for the use of the intended recipient

The Old Old Way of Application deployments

App

OS Kernellib

App App Applib liblib liblib lib lib lib

Page 14: Container orchestration - Chicago Coder Conference 2016

14This information is confidential and prepared by Uptake solely for the use of the intended recipient

App

OS Kernel

lib lib lib

Applib lib lib

Applib lib lib

Applib lib lib

New Old Way

Page 15: Container orchestration - Chicago Coder Conference 2016

15This information is confidential and prepared by Uptake solely for the use of the intended recipient

Definition

orchestration(noun)

\ˌor-kə-ˈstrā-shən\

the automated arrangement, coordination, and management of complex computer systems, middleware and services

Chicago Coder Conference June 6-8, 2016

Page 16: Container orchestration - Chicago Coder Conference 2016

16This information is confidential and prepared by Uptake solely for the use of the intended recipient

Framework Background

Page 17: Container orchestration - Chicago Coder Conference 2016

17This information is confidential and prepared by Uptake solely for the use of the intended recipient

Framework Background

“an open-source system for automating deployment, scaling, and management of containerized applications”

Chicago Coder Conference June 6-8, 2016

Page 18: Container orchestration - Chicago Coder Conference 2016

18This information is confidential and prepared by Uptake solely for the use of the intended recipient

Framework Background

“production-grade container orchestration platform”

Chicago Coder Conference June 6-8, 2016

Page 19: Container orchestration - Chicago Coder Conference 2016

19This information is confidential and prepared by Uptake solely for the use of the intended recipient

Kubernetes

Page 20: Container orchestration - Chicago Coder Conference 2016

20This information is confidential and prepared by Uptake solely for the use of the intended recipient

So, to rephrase...

a mixed of best practices and an opinionated technology stack to provide a robust, scalable way of managing containers

Chicago Coder Conference June 6-8, 2016

Page 21: Container orchestration - Chicago Coder Conference 2016

21This information is confidential and prepared by Uptake solely for the use of the intended recipient

Kubernetes

• Pods• Flat Networking Space• Labels• Services• Replication Controllers• Docker

Key components

Not going to demonstrate today, but come talk to us about it!

Page 22: Container orchestration - Chicago Coder Conference 2016

22This information is confidential and prepared by Uptake solely for the use of the intended recipient

Kubernetes Way

Pod

Proxykubelet

App2

lib lib lib

App1

lib lib libcAdvisor

Pod

kube-proxykubelet

App4

lib lib lib

App3

lib lib libcAdvisor

kubectl

API’s (Rest)

Replication Controller (REST)

Schedulingactuator

Scheduler

OS Kernel OS Kernel

etcd

Page 23: Container orchestration - Chicago Coder Conference 2016

23This information is confidential and prepared by Uptake solely for the use of the intended recipient

Marathon+ Mesos

Page 24: Container orchestration - Chicago Coder Conference 2016

24This information is confidential and prepared by Uptake solely for the use of the intended recipient

Marathon

a UI for an infrastructure abstraction to enable running compute units at scale

Chicago Coder Conference June 6-8, 2016

Page 25: Container orchestration - Chicago Coder Conference 2016

25This information is confidential and prepared by Uptake solely for the use of the intended recipient

Marathon

• Mesos– Master– Agent(s) (a.k.a. Slave(s))

• Marathon• Zookeeper• Docker*

Key components

*Actually optional, but not for the purposes of this presentation

Page 26: Container orchestration - Chicago Coder Conference 2016

26This information is confidential and prepared by Uptake solely for the use of the intended recipient

OS Kernel

Mesos/Marathon Way

Agent

OS Kernel

Agent

OS Kernel

Agent

Master

marathon-lb

lib lib lib

api

lib lib lib App

cURL

api

lib lib lib

Page 27: Container orchestration - Chicago Coder Conference 2016

27This information is confidential and prepared by Uptake solely for the use of the intended recipient

Workshop

Page 28: Container orchestration - Chicago Coder Conference 2016

28This information is confidential and prepared by Uptake solely for the use of the intended recipient

Marathon / Kubernetes Workshop

1. Setup infrastructure

2. Self healing capabilities (Kubernetes)

3. Scale up down the app

4. Blue-Green (Marathon) / Rolling deployments

Page 29: Container orchestration - Chicago Coder Conference 2016

29This information is confidential and prepared by Uptake solely for the use of the intended recipient

Workshop

Page 30: Container orchestration - Chicago Coder Conference 2016

30This information is confidential and prepared by Uptake solely for the use of the intended recipient

Results...but really, our opinions

Page 31: Container orchestration - Chicago Coder Conference 2016

31This information is confidential and prepared by Uptake solely for the use of the intended recipient

AdvantagesService discovery and replication baked-in Feature rich command-line client for remote container-level management (kubectl)Powerful control over multiple-containers services (Pods and Services)Rolling deploymentsGCE integration

DisadvantagesCan only deploy Docker containersBlue/Green deployments are roll-your-ownLess matureCan only use etcd (skydns)Alerts not supported OOTB (however there are many options: Google Cloud Monitoring, Bosun +

InfluxDB, Reimann + InfluxDB)Can’t modify the running pods/services/containers using the UI

Kubernetes

Page 32: Container orchestration - Chicago Coder Conference 2016

32This information is confidential and prepared by Uptake solely for the use of the intended recipient

AdvantagesRequires fewer pieces to get runningCan continue to run Mesos frameworks like Spark and other processes (not Docker-only)Easy-to-do Blue/Green deploymentsGreater compatibility for service discovery frameworksFull control the deployments via the UI

DisadvantagesNot as much control over multiple-container servicesDocumentation sometimes sucks and the configuration or execution isn’t always intuitiveService discovery doesn’t come OOTBNot backed by GoogleAlerts not supported OOTB (and not many options besides Prometheus)

Mesos+Marathon

Page 33: Container orchestration - Chicago Coder Conference 2016

33This information is confidential and prepared by Uptake solely for the use of the intended recipient

So who is the winner?

Page 34: Container orchestration - Chicago Coder Conference 2016

34This information is confidential and prepared by Uptake solely for the use of the intended recipient

• you only have containerized apps• you are already using Google Compute Engine• you want to use the kubernetes label-based service-discovery, load-

balancing, and replication control• you already have monitoring and alerting frameworks

We recommend going with Kubernetes if...

Page 35: Container orchestration - Chicago Coder Conference 2016

35This information is confidential and prepared by Uptake solely for the use of the intended recipient

• you are using any of the Mesos frameworks like – Hadoop, Storm or Spark for big data processing– Chronos for time-based scheduling

• you already have service discovery other than etcd• you’re using any cloud provider other than Google Compute Engine

We recommend starting with Marathon + Mesos if...

Page 36: Container orchestration - Chicago Coder Conference 2016

36This information is confidential and prepared by Uptake solely for the use of the intended recipient

The End?

Page 37: Container orchestration - Chicago Coder Conference 2016

37This information is confidential and prepared by Uptake solely for the use of the intended recipient

But really, here’s what’s coming

+

Page 38: Container orchestration - Chicago Coder Conference 2016

38This information is confidential and prepared by Uptake solely for the use of the intended recipienthttps://mesosphere.com/blog/2015/09/25/kubernetes-and-the-dcos/

Page 39: Container orchestration - Chicago Coder Conference 2016

39This information is confidential and prepared by Uptake solely for the use of the intended recipient

Questions?

code: http://bit.ly/container-orchestration-codeslides: http://bit.ly/container-orchestration-slides