MADRID · NOV 18-19 · 2016 ¿Por qué necesita Docker un orquestador? - Mantener el estado de un cluster - Networking entre hosts - Load balancing - Service Discovery - Rolling updates - ...
MADRID · NOV 18-19 · 2016 Funcionalidad - Gestión de un cluster de Dockerhosts - Abstracción de servicio en el cluster - Networking multi-host (red de overlay) - Service discovery - Load balancing entre nodos - Rolling updates
MADRID · NOV 18-19 · 2016 El modo Swarm de Docker $ docker swarm init --advertise-addr 192.168.99.121 Swarm initialized: current node (bvz81updecsj6wjz393c09vti) is now a manager. To add a worker to this swarm, run the following command: docker swarm join \ --token 1awxwuwd3z9j1z3puu7rcgdbx \ 172.17.0.2:2377 To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.
MADRID · NOV 18-19 · 2016 Gestión del cluster $ docker node COMMAND Commands: demote Demote one or more nodes from manager in the swarm inspect Display detailed information on one or more nodes ls List nodes in the swarm promote Promote one or more nodes to manager in the swarm rm Remove one or more nodes from the swarm ps List tasks running on a node update Update a node
MADRID · NOV 18-19 · 2016 - En 1.12 es funcionalidad experimental - Se pueden generar a partir de un docker-compose.yml - $docker-compose bundle Docker Application Bundles (DAB)
MADRID · NOV 18-19 · 2016 Despligue de DABs $ docker stack COMMAND Manage Docker stacks Commands: config Print the stack configuration deploy Create and update a stack from a Distributed Application Bundle (DAB) rm Remove the stack ps List the tasks in the stack
MADRID · NOV 18-19 · 2016 Funcionalidad - Aporta abstracciones adicionales - Gestión de replicación de las aplicaciones - Service discovery y load balancing - Rolling updates - Distribución de secretos - Montaje de volúmenes
MADRID · NOV 18-19 · 2016 Funcionalidad - Monitorización de recursos - Autoescalado horizontal - Networking mediante add-ons - Identificación y autorización - Gestión de logs de containers
MADRID · NOV 18-19 · 2016 Instalador automatizado: kubeadm $ kubeadm init generated token: "f0c861.753c505740ecde4c" [...] Kubernetes master initialised successfully! You can connect any number of nodes by running: kubeadm join --token $ kubectl apply -f
MADRID · NOV 18-19 · 2016 Otras formas de instalación - En AWS: kops - Resto de instalaciones: script de kube-up.sh - Script para generar un cluster con valores por defecto: export KUBERNETES_PROVIDER=YOUR_PROVIDER; curl -sS https://get.k8s.io | bash
MADRID · NOV 18-19 · 2016 Funcionalidad de DC/OS - Scheduling de dos niveles - Multiples workloads en el mismo hardware - Gestión de aislamiento de recursos - Gestión del almacenamiento - Repositorios de paquetes - Alta disponibilidad - Service discovery y load balancing
MADRID · NOV 18-19 · 2016 Funcionalidad - Drivers: Docker, fork/exec, Java, LXC, Qemu, Rkt… - Único binario en versiones para todos los OS - Multi-datacenter y multi-región - Altamente escalable - Scheduler optimísticamente concurrente
MADRID · NOV 18-19 · 2016 Integración con productos Hashicorp - Cónsul - Service discovery - Healthchecks - Registro de nodos en el cluster - Templating - Vault - Gestión de secretos
MADRID · NOV 18-19 · 2016 Ejecutar un job $ nomad run echo.nomad ==> Monitoring evaluation "1cb1720e" Evaluation triggered by job "echo" Allocation "c7f66ffe" created: node "15cfa6e3", group "example" Evaluation status changed: "pending" -> "complete" ==> Evaluation "1cb1720e" finished with status "complete" $ nomad status echo ID = echo [...] Summary Task Group Queued Starting Running Failed Complete Lost example 0 0 1 0 0 0 Allocations ID Eval ID Node ID Task Group Desired Status Created At c7f66ffe 1cb1720e 15cfa6e3 example run running 11/12/16 21:35:48 UTC
MADRID · NOV 18-19 · 2016 Docker Swarm - Mayor facilidad de transición - Plug and play para muchos casos de uso - 100% compatible con Docker - Parte experimental del DAB - Sólo soporta Docker
MADRID · NOV 18-19 · 2016 Kubernetes - Excelentes funcionalidades y abstracciones para containers - Ritmo imparable - Curva de aprendizaje pronunciada - Sólo vale para Docker y Rkt
MADRID · NOV 18-19 · 2016 DC/OS - Arquitectura de schedulers muy potente - Excelente para otro tipo de tareas distintas de containers - Curva de aprendizaje muy pronunciada - Docker no es su prioridad
MADRID · NOV 18-19 · 2016 Nomad - Liviano y sencillo - Arquitectura robusta, escalable - Impresionante soporte multi-plataforma y multi-driver - Sólo es responsable de una funcionalidad - Le falta rodaje
MADRID · NOV 18-19 · 2016 Despliegues en producción - Swarm: Bugsnag, Flugel.it, Runnable - Kubernetes: GKE, HP Helion, Red Hat Openshift, eBay - DC/OS: Autodesk, ESRI, Time Warner Cable, Verizon, Bloomberg, Azure Container service - (Mesos): Twitter, Uber, PayPal - Nomad: Citadel