Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

Container orchestration - Chicago Coder Conference 2016

269 views

Published on

Quickly following the rise of micro­services came the rise of containers to help build and deploy micro­services. But how do you manage them effectively to get the best performance while simultaneously reducing cost? Thankfully, there are many solutions out there that can help you orchestrate large clusters of containers to auto­scale up or down. During this hands ­on talk, we will be using three of the most popular open source solutions ­ Kubernetes, Marathon, and Docker Swarm ­ to orchestrate container clusters in order to demonstrate the pros and cons of using each solution. After leaving the talk, you will be able to pick the solution that best fits your needs.

Published in: Software
  • Be the first to comment

  • Be the first to like this

Container orchestration - Chicago Coder Conference 2016

  1. 1. 1This 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
  2. 2. 2This information is confidential and prepared by Uptake solely for the use of the intended recipient Before we get started Pre-requisites
  3. 3. 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)
  4. 4. 4This information is confidential and prepared by Uptake solely for the use of the intended recipient Who are these guys?
  5. 5. 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. mariano.gonzalez.mx@gamil.com Rob Mills Rob 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. me@robgmills.com
  6. 6. 6This information is confidential and prepared by Uptake solely for the use of the intended recipient 1. Frameworks overview a. Marathon b. Kubernetes 1. Workshop a. Marathon b. Kubernetes 1. Conclusions 2. QA Agenda
  7. 7. 7This information is confidential and prepared by Uptake solely for the use of the intended recipient Why should I care?
  8. 8. 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)?
  9. 9. 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. McGrath http://www-cgsc.army.mil/carl/download/csipubs/mcgrath_op23.pdf 3:1 Support : Infantry Why should I care? U.S. Military deployments
  10. 10. 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?
  11. 11. 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.
  12. 12. 12This information is confidential and prepared by Uptake solely for the use of the intended recipient Let’s start at the beginning Just to level-set everyone
  13. 13. 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 Kernel lib App App App lib liblib liblib lib lib lib
  14. 14. 14This information is confidential and prepared by Uptake solely for the use of the intended recipient App OS Kernel lib lib lib App lib lib lib App lib lib lib App lib lib lib New Old Way
  15. 15. 15This information is confidential and prepared by Uptake solely for the use of the intended recipient Definition orchestration (noun) ˌȯr-kə-ˈstrā-shən the automated arrangement, coordination, and management of complex computer systems, middleware and services Chicago Coder Conference June 6-8, 2016
  16. 16. 16This information is confidential and prepared by Uptake solely for the use of the intended recipient Framework Background
  17. 17. 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
  18. 18. 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
  19. 19. 19This information is confidential and prepared by Uptake solely for the use of the intended recipient Kubernetes
  20. 20. 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
  21. 21. 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!
  22. 22. 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 lib cAdvisor Pod kube-proxykubelet App4 lib lib lib App3 lib lib lib cAdvisor kubectl API’s (Rest) Replication Controller (REST) Scheduling actuator Scheduler OS Kernel OS Kernel etcd
  23. 23. 23This information is confidential and prepared by Uptake solely for the use of the intended recipient Marathon + Mesos
  24. 24. 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
  25. 25. 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
  26. 26. 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
  27. 27. 27This information is confidential and prepared by Uptake solely for the use of the intended recipient Workshop
  28. 28. 28This information is confidential and prepared by Uptake solely for the use of the intended recipient Marathon / Kubernetes Workshop 1. Setup infrastructure 1. Self healing capabilities (Kubernetes) 1. Scale up down the app 1. Blue-Green (Marathon) / Rolling deployments
  29. 29. 29This information is confidential and prepared by Uptake solely for the use of the intended recipient Workshop
  30. 30. 30This information is confidential and prepared by Uptake solely for the use of the intended recipient Results ...but really, our opinions
  31. 31. 31This information is confidential and prepared by Uptake solely for the use of the intended recipient Advantages Service 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 deployments GCE integration Disadvantages Can only deploy Docker containers Blue/Green deployments are roll-your-own Less mature Can 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
  32. 32. 32This information is confidential and prepared by Uptake solely for the use of the intended recipient Advantages Requires fewer pieces to get running Can continue to run Mesos frameworks like Spark and other processes (not Docker-only) Easy-to-do Blue/Green deployments Greater compatibility for service discovery frameworks Full control the deployments via the UI Disadvantages Not as much control over multiple-container services Documentation sometimes sucks and the configuration or execution isn’t always intuitive Service discovery doesn’t come OOTB Not backed by Google Alerts not supported OOTB (and not many options besides Prometheus) Mesos+Marathon
  33. 33. 33This information is confidential and prepared by Uptake solely for the use of the intended recipient So who is the winner?
  34. 34. 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...
  35. 35. 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...
  36. 36. 36This information is confidential and prepared by Uptake solely for the use of the intended recipient The End?
  37. 37. 37This information is confidential and prepared by Uptake solely for the use of the intended recipient But really, here’s what’s coming +
  38. 38. 38This information is confidential and prepared by Uptake solely for the use of the intended recipient https://mesosphere.com/blog/2015/09/25/kubernetes-and-the-dcos/
  39. 39. 39This information is confidential and prepared by Uptake solely for the use of the intended recipient Questions? code: http://bit.ly/container-orchestration-code slides: http://bit.ly/container-orchestration-slides

×