Diese Präsentation wurde erfolgreich gemeldet.
Wir verwenden Ihre LinkedIn Profilangaben und Informationen zu Ihren Aktivitäten, um Anzeigen zu personalisieren und Ihnen relevantere Inhalte anzuzeigen. Sie können Ihre Anzeigeneinstellungen jederzeit ändern.

Container orchestration on_aws

Presentation given at the AWS Meetup in Aarhus on November 22nd 2016.

  • Loggen Sie sich ein, um Kommentare anzuzeigen.

Container orchestration on_aws

  1. 1. Container orchestration on AWS by Kasper Nissen @phennex
  2. 2. Hi! My name is Kasper @phennex
  3. 3. kubecloud.io foto: Lars Kruse, Aarhus Universitet Pervasive Systems group, Section of Electrical and Computer Engineering, Department of Engineering, Aarhus University
  4. 4. @phennex
  5. 5. @phennex AGENDA 1. Containers 2. Container Orchestration 3. Options? 4. Implementations? 5. Demo (rancher & kops)
  6. 6. CONTAINERS @phennex what? why?
  7. 7. @phennex “… The value of this utilitarian object lies not in what it is, but in how it is used. The container is at the core of a highly automated system for moving goods from anywhere, to anywhere, with a minimum of cost and complication on the way.” –Marc Levinson
  8. 8. @phennex TEXT A B illustrations from:
  9. 9. @phennex illustrations from:
  10. 10. @phennex illustrations from:
  11. 11. @phennex Multiplicity of goods Multiplicity of methods for transport/storing illustrations from:
  12. 12. @phennex illustrations from:
  13. 13. @phennex Multiplicity of stacks Multiplicity of hardware environments illustrations from: Static website nginx 1.5 + mod security + openssl + bootstrap 3 User DB postgresql + pgv8 + v8 Background workers Python 3.0 + celery + pyredis + libcurl + ffmpeg + libopencv + nodejs + phantomjs API endpoint Python 2.7 + Flask + pyredis + celery + psycopg + postgresql-client Public cloud Production cluster Customer Data Center Development Laptop Contributor’s desktop Web frontend Ruby + Rails + sass + Unicorn
  14. 14. Host OS OS Runtime App Container @phennex illustrations from: Dev Ops
  15. 15. @phennex Host OS OS Runtime App Container OS Runtime App Container OS Runtime App Container Multiple containers on the same host
  16. 16. @phennex prometheus: image: quay.io/prometheus/prometheus links: - node-exporter:nodeexporter grafana: image: grafana/grafana links: - prometheus:prometheus node-exporter: ports: - 9100:9100/tcp image: prom/node-exporter docker-compose
  17. 17. @phennex Host OS Container Elastic Load Balancer Container Container Host OS Container Container Container Host OS Container Container Container Replicated setup
  18. 18. @phennex WHAT DO WE NEED?
  19. 19. @phennex Scheduling
  20. 20. @phennex Resource optimization
  21. 21. @phennex Consensus
  22. 22. @phennex Resilience
  23. 23. @phennex Scalability
  24. 24. @phennex CONTAINER ORCHESTRATION
  25. 25. @phennex Node Node Node Node Node Node Node Node NodeNode Node Node Node Node big dataapp Bapp A database … maybe a node we forgot about… The reality?
  26. 26. @phennex Node Node Node Node Node Node Node Node Node Node big dataapp Bapp A database The dream datacenter Cluster Manager
  27. 27. @phennex CATTLE VS PETS
  28. 28. @phennex WHAT OPTIONS DO WE HAVE?
  29. 29. @phennex Docker Swarm Kit
  30. 30. @phennex Master Pluggable Executor Agent Pluggable Executor Agent Pluggable Executor Raft Consensus (Leader election) Docker Swarm Kit Docker Engine TaskService Submit a task Execute the task
  31. 31. @phennex Docker Swarm Kit docker service create --replicas 1 --name helloworld alpine docker service ls
  32. 32. @phennex You like using the docker CLI, and ecosystem tools Get the native Docker API experience and compatibility Easy to setup
 Why Docker Swarm Kit? docker swarm init docker swarm join
  33. 33. @phennex Controlled by Docker Inc. Fairly new (Launched at DockerCon 2016) Why NOT Docker Swarm Kit?
  34. 34. @phennex APACHE MESOS
  35. 35. @phennex ZooKeeper ZooKeeper ZooKeeper Service 1Service 1Mesos Master Service 1Service 1Marathon Coordination & Configurations Long running tasks Jobs Mesos Slaves Apache Mesos
  36. 36. @phennex You are a Big Data house You have a lot of job oriented or task oriented workloads You have an infrastructure team Your IT department employs a team of distributed systems specialists You want to schedule multiple giant workload types concurrently Maybe you will run Hadoop, Marathon, and Chronos all together You have a 10.000+ node cluster Cluster design is extremely scalable, and easily supports thousands of nodes Battleprooved (Twitter, AirBnB, Uber) Why Apache Mesos?
  37. 37. @phennex Requires a lot of management (2 layers, Mesos and the frameworks) Too big for many use cases? Why NOT Apache Mesos?
  38. 38. @phennex KUBERNETES
  39. 39. @phennex Kubernetes Based on Google’s 10 years of experience with Borg Designed for containers Declarative definition of desired state Modular Built with fault tolerance and resilience in mind Govern by CNCF (Cloud Native Computing Foundation)
  40. 40. @phennex Kubernetes Scheduler API Server Kubernetes master Kubelet Kubelet Kubelet Application containers Nodes
  41. 41. @phennex Pods Pod Web server Container Pod Web server Container Git sync Container Git repoConsumers Consumers
  42. 42. @phennex Services Pod Web server Container Pod Web server Container Pod Web server Container type=FE type=FE type=FE Service VIP Label selector: type=FE Consumers
  43. 43. @phennex Labels Pod Container type=FE Pod Container type=FE Pod Container version=2 version=2 Dashboard Dashboard show: type=FE show: version=v2
  44. 44. @phennex Deployment (Replica Set) Pod Container type=FE Pod Container type=FE Pod Container type=FE Current: 3 Desired: 3 version=2 version=2 version=2 Deployment
  45. 45. @phennex Deployment (Replica Set) Pod Container type=FE Pod Container type=FE Pod Container type=FE Current: 3 Desired: 3 version=2 version=2 version=2 Deployment Pod Container type=FE version=3 New version
  46. 46. @phennex Deployment (Replica Set) Pod Container type=FE Pod Container type=FE Pod Container type=FE Current: 3 Desired: 3 version=3 version=2 version=2 Deployment
  47. 47. @phennex Deployment (Replica Set) Pod Container type=FE Pod Container type=FE Pod Container type=FE Current: 3 Desired: 3 version=3 version=3 version=2 Deployment
  48. 48. @phennex Deployment (Replica Set) Pod Container type=FE Pod Container type=FE Pod Container type=FE Current: 3 Desired: 3 version=3 version=3 version=3 Deployment
  49. 49. @phennex Canary (AB testing) Pod Container type=BE Pod Container type=BE Pod Container type=BE Deployment version=1 type=BE
 Current: 2 Desired: 2 Deployment version=3version=2version=2 version=2 type=BE
 Current: 1 Desired: 1 Service VIP name=backend Label selector: type=BE Consumers
  50. 50. @phennex Governed by the Cloud Native Computing Foundation Built by many years of experience with containers at Google Topmost projects on Github Large and engaged community Why Kubernetes?
  51. 51. @phennex Too small application for setting up a cluster? Why NOT Kubernetes?
  52. 52. @phennex HOW TO SET THIS UP ON AWS?
  53. 53. @phennex
  54. 54. @phennex
  55. 55. @phennex
  56. 56. @phennex
  57. 57. @phennex Rancher Catalog User Management Container Orchestration and Scheduling Infrastructure Services (Storage, Networking, Load Balancer, DNS, etc.) Ops Management Rancher overview LDAP Leverage existing tools: - CI/CD - Monitoring - etc.
  58. 58. @phennex DEMO: KUBERNETES ON AWS WITH RANCHER
  59. 59. @phennex OTHER SOLUTIONS
  60. 60. @phennex https://stackpoint.io/#/
  61. 61. @phennex https://github.com/kubernetes/kops
  62. 62. @phennex DEMO: KUBERNETES ON AWS WITH KOPS
  63. 63. @phennex
  64. 64. @phennex
  65. 65. @phennex
  66. 66. @phennex
  67. 67. @phennex WHAT WOULD YOU CHOOSE?
  68. 68. @phennex ? Questions
  69. 69. Thank you! @phennex kaspernissen@gmail.com @phennex
  70. 70. Resources @phennex https://apprenda.com/blog/introducing-kismatic-enterprise-toolkit-fully-automated-path- production-kubernetes/ https://www.openshift.com/ http://rancher.com/ http://research.google.com/pubs/pub44843.html http://research.google.com/pubs/pub43438.html https://docs.docker.com/swarm/overview/ http://kubernetes.io/
  71. 71. Graphic credits @phennex http://www.freepik.com Many of the used illustrations in this presentation is designed by

×