Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Devoxx France 2015 - The Docker Orchestration Ecosystem on Azure

5.040 visualizaciones

Publicado el

Overview of the Docker ecosystem and orchestration systems, and how to make them run on Microsoft Azure.

Publicado en: Tecnología
  • Sé el primero en comentar

Devoxx France 2015 - The Docker Orchestration Ecosystem on Azure

  1. 1. Patrick Chanezon, Docker Inc. @chanezon The Docker Ecosystem With slides from @jpetazzo @timpark @vieux @tnachen IBM on Microsoft Azure Ride the Whale!
  2. 2. French Polyglot Platforms San Francisco Developer Relations @chanezon
  3. 3. 1995 2015
  4. 4. Docker in the cloud market
  5. 5. Cloud Market PublicHybridPrivate IT Pros Devops DevelopersArchitects
  6. 6. History of containerization • 1960’s mainframe • 1990’s hardware virtualization • 1990’s OS virt precursors: BSD Jails, Solaris zones • 2006 Cloud IaaS • 2009 platform virtualization (PaaS) • 2013 Docker See @bcantrill’s deck http://www.slideshare.net/bcantrill/docker-and-the-future-of-containers-in-production
  7. 7. 7
  8. 8. Happy birthday!
  9. 9. Why Docker success now? • Cloud adoption • Portability • Hybrid • Devops
  10. 10. It’s an ecosystem
  11. 11. Linux Container Ecosystem
  12. 12. Docker
  13. 13. Isolation using Linux kernel features namespaces  pid  mnt  net  uts  ipc  user cgroups  memory  cpu  blkio  devices
  14. 14. Docker language stacks https://registry.hub.docker.com/_/java/
  15. 15. Docker now  A platform to build, ship, and run any app, anywhere  docker engine  docker hub  docker-machine  docker-compose  docker-swarm
  16. 16. Docker, the community  >700 contributors  ~20 core maintainers  >40,000 Dockerized projects on GitHub  >60,000 repositories on Docker Hub  >25000 meetup members, >140 cities, >50 countries  >2,000,000 downloads of boot2docker
  17. 17. Docker Inc, the company  Headcount: ~130  Revenue:  t-shirts and stickers featuring the cool blue whale  SAAS delivered through Docker Hub  Support & Training  soon: Docker Hub Enterprise, behind the firewall
  18. 18. It’s all about Devops
  19. 19. Separation of concerns: Dave the Developer  Inside my container:  my code  my libraries  my package manager  my app  my data
  20. 20. Separation of concerns: Oscar the Ops guy  Outside the container:  logging  remote access  network configuration  monitoring
  21. 21. Docker on Microsoft
  22. 22. Containers
  23. 23. Microsoft engaging with the Docker ecosystem
  24. 24. Windows Server Containers
  25. 25. Deploy almost anywhere
  26. 26. More Windows options • Nano Server • Hyper-V Containers http://azure.microsoft.com/blog/2015/04/08/microsoft-unveils-new-container-technologies-for-the-next-generation-cloud
  27. 27. Docker on Azure
  28. 28. Azure Portal Ubuntu Docker VM
  29. 29. Azure x-plat CLI VMNAME=jpetazzo IMAGE=b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-14_04-LTS-amd64-server-20140724-en-us-30GB USER=jpetazzo PASSWORD=1234abcdABCD@ LOCATION="West US" azure vm docker create $VMNAME $IMAGE $USER $PASSWORD -l "$LOCATION" export DOCKER_HOST=tcp://$VMNAME.cloudapp.net:4243 docker --tls version azure vm endpoint create $VMNAME 80
  30. 30. docker-machine docker-machine create -d azure —azure-subscription-id="c4f51be3-784c-xxx-7c50ad9e1b7c" --azure-subscription-cert="/Users/pat/.ssh/docker-azure- cert.pem" --azure-location="East US" --azure-size=Small --azure-username="pat" pat-docker-machine-n
  31. 31. Linux Container Ecosystem
  32. 32. Plugins
  33. 33. Weave
  34. 34. Flocker
  35. 35. Powerstrip Prototyping Docker Plugins https://clusterhq.com/blog/powerstrip-prototype-docker-extensions-today/
  36. 36. Orchestration
  37. 37. Docker Swarm
  38. 38. Docker Swarm 0.2.0 @abronan - @aluzzardi - @vieux
  39. 39. Running containers on multiple hosts
  40. 40. Today Docker CLI Docker CLI Docker CLI
  41. 41. Introducing Docker Swarm us-west us-east Docker CLI Docker CLI Swarm
  42. 42. Swarm in a nutshell • Docker REST API (>85%) • Resource management (CPU, Mem, Networking) • Advanced scheduling with constraints and affinities • Multiple Discovery Backends (hub, etcd, consul, zookeeper) • TLS: Encryption & Authentication
  43. 43. Timeline Oct Nov Dec Jan Feb Jun Proof of Concept DockerCon EU Open Repository First Release Candidate Swarm Beta Release Global Hack Day Open Proposal
  44. 44. Setup using the hosted discovery service • Create a cluster: $ swarm create • Add nodes to a cluster: $ swarm join --add=<node_ip> token://<token> • Start Swarm $ swarm manage --addr=<swarm_ip> token://<token> Or you can use your own etcd, zookeeper or consul Contributions are welcome :
  45. 45. Resource Management • Memory $ docker run -m 1g … • CPU $ docker run -c 1 … • Ports $ docker run -p 80:80 … • More to come, ex: network interfaces
  46. 46. Constraints • Standard constraints induced from docker info docker run -e “constraint:operatingsystem==*fedora*” … docker run -e “constraint:storagedriver==*aufs*” … • Custom constraints with host labels docker -d --label “region==us-east” docker run -e “constraint:region==us-east” … • Pin a container to a specific host docker run –e “constraint:node==ubuntu-2” …
  47. 47. Affinities • Containers affinities docker run --name web nginx docker run -e “affinity:container==web” logger • Containers Anti-affinities docker run --name redis-master redis docker run --name redis-slave -e “affinity:container!=redis*” … • Images affinities docker run -e “affinity:image==redis” redis
  48. 48. New in 0.2.0: Soft Affinities/Constraints • Containers affinities docker run -e “affinity:container~!=—name web nginx docker run -e “affinity:container==web” logger • Containers Anti-affinities docker run --name redis-master redis docker run --name redis-slave -e “affinity:container!=redis*” … • Images affinities docker run -e “affinity:image==redis” redis
  49. 49. Swarm Scheduler 2 steps: • 1- Apply filters to exclude nodes - ports - labels - health • 2- Use a strategy to pick the best node - random - binpack - spread Contributions are welcome :
  50. 50. Swarm Beta: Integrations • Fully integrated with Machine • Partially integrated with Compose • Mesos integration has started in collaboration with Mesosphere.
  51. 51. Mesos
  52. 52. CoreOS
  53. 53. CoreOS
  54. 54. Fleet
  55. 55. Docker & etcd
  56. 56. Cluster Architecture https://coreos.com/docs/cluster-management/setup/cluster-architectures/
  57. 57. CoreOS / Docker / Spring Boot https://github.com/chanezon/azure-linux/tree/master/coreos/cloud-init
  58. 58. Deis
  59. 59. Deis (http://deis.io) • Open source PaaS platform that builds on CoreOS. • Replicates the popular Heroku devops workflow. • Primary mechanism for pushing applications is through git. • Developer experience is not unlike Azure Websites… • …but is built on Linux so full support for open source stacks. • Enables us to win migrations from Salesforce to Azure. • Hackfest in November to enable Deis for Tagboard. • Enables us to win startups that expect this workflow.
  60. 60. tpark:www$ git push deis master • Git pushes master to deis git remote on endpoint • Deis senses static web application • Selects Heroku Buildpack • Uses buildpack to build application Docker container. • Pushes this container to a private Docker registry. • Orchestrates the creation or update of this container on the cluster. • Updates routing mesh to route to these containers.
  61. 61. Router Mesh deis-1 deis-2 deis-3 deis-4 www CoreOS CoreOS CoreOS CoreOS
  62. 62. tpark:www$ deis scale www=3 • Deis pushes the container to two more cluster nodes. • Updates routing mesh to pass traffic to these nodes.
  63. 63. Router Mesh deis-1 deis-2 deis-3 deis-4 www www www
  64. 64. tpark:api$ git push deis master • Git pushes master to deis git remote on endpoint • Deis senses node.js application • Selects Heroku node.js Buildpack • Uses buildpack to build application Docker container. • Pushes this container to a private Docker registry. • Orchestrates the creation or update of this container on the cluster. • Updates routing mesh to route to these containers.
  65. 65. Router Mesh deis-1 deis-2 deis-3 deis-4 www api www api www api
  66. 66. Router Mesh deis-1 deis-2 deis-3 deis-4 www api www api www api
  67. 67. Router Mesh deis-1 deis-2 deis-3 deis-4 www api www api www api
  68. 68. tpark:api$ deis config:set DATABASE_URL=postgres://user:pass@example.com:54 32/db • Applications in Deis are configured through environmental variables. • MUST READ: http://12factor.net/ • Key point: Code is separated from config. • Enables generic containers that are configured at runtime. • Every app container spun up by Deis will have a copy of these config environmental variables.
  69. 69. tpark:api$ deis logs • Deis automatically rolls and consolidates logs from all containers.
  70. 70. Router Mesh deis-1 deis-2 deis-3 deis-4 www api www api www api
  71. 71. Router Mesh deis-1 deis-2 deis-3 deis-4 www api www api www api
  72. 72. Kubernetes
  73. 73. Kubernetes (http://kubernetes.io)
  74. 74. Kubernetes Master / Scheduler host-1 host-2 host-3 host-n ….. Container Agent Container Agent Container Agent Container Agent Linux Linux Linux Linux
  75. 75. Kubernetes Scheduler host-1 host-2 host-3 host-n ….. Container Agent Container Agent Container Agent Container Agent Linux Linux Linux Linux Container Container
  76. 76. Kubernetes host-1 Container host-2 host-3 host-4 host-n … Container Container Container Container ContainerContainer Container Container
  77. 77. Kubernetes host-1 host-2 host-3 host-4 host-n … Frontend Worker my_app pod MyAppMyApp MyApp Replication Controller 3
  78. 78. Kubernetes host-1 host-2 host-3 host-4 host-n … Frontend Worker my_app pod MyAppMyApp MyApp Replication Controller 3
  79. 79. Kubernetes host-1 host-2 host-3 host-4 host-n … MyAppMyApp MyApp Replication Controller Pod Pod Pod Pod PodPod Pod Pod Replication Controller
  80. 80. Kubernetes host-1 host-2 host-3 host-4 host-n … MyApp staging MyApp staging MyApp staging MyApp prod MyApp prod MyApp prod MyApp prod MyApp prod MyApp Production Service { environment: prod } MyApp Staging Service { environment: staging } Labels and Services
  81. 81. Cloud Foundry & IBM BlueMix
  82. 82. Cloud Foundry Diego & Lattice cf docker-push my-app cloudfoundry/lattice-app
  83. 83. IBM Bluemix The Digital Innovation Platform
  84. 84. 97 Customer Managed Service Provider Managed IBM SoftLayer Bluemix started as a public PaaS Bluemix started with a major focus on developer productivity in the public cloud. Infrastructure as a Service Code Data Runtime Middleware OS Virtualization Servers Storage Networking Code Data Runtime Middleware OS Virtualization Servers Storage Networking Platform as a Service
  85. 85. 98 Customer Managed Service Provider Managed IBM SoftLayer We listened. Now we’re evolving to become even more flexible. Capabilities in Bluemix now span PaaS and IaaS and can be delivered as a public, dedicated, or on-premises* implementation. Infrastructure as a Service Code Data Runtime Middleware OS Virtualization Servers Storage Networking Code Data Runtime Middleware OS Virtualization Servers Storage Networking Platform as a Service *Bluemix Local coming Summer 2015 Built on open technologies:
  86. 86. How does Bluemix work? Bluemix is underlined by three key open compute technologies: Cloud Foundry, Docker, and OpenStack. It extends each of these with a growing number of services, robust DevOps tooling, integration capabilities, and a seamless developer experience. 99 Flexible Compute Options to Run Apps / Services Instant Runtimes Containers Virtual Machines Platform Deployment Options that Meet Your Workload Requirements Bluemix Public Bluemix Dedicated Bluemix Local* DevOps Tooling Your Own Hosted Apps / Services Integration and API Mgmt Powered by IBM SoftLayer In Your Data Center + + + + + + Always focused on what’s next Catalog of Services that Extend Apps’ Functionality Web Data Mobile AnalyticsCognitive IoT Security Yours + *Bluemix Local coming Summer 2015
  87. 87. Containers in Bluemix Bluemix now comes with a fully integrated, high performance Docker experience, meaning monitoring, logging, elasticity, enterprise images, and VM abstraction are all standard. 100 Docker Value IBM Value-add Customer Value Docker Hub Registry holds a repository of 75000+ Docker images • IBM hosted public registry containing IBM images - linked to Docker Hub • Client unique registry available on and off premises • Enterprise-ready images Access to the images you require to deploy containers that meet your business needs and strategy Open-source, standardized, lightweight, self sufficient LXC container technology • Enhanced performance with bare metal deployment • Run images to local datacenter or cloud • Deployment choice with pSeries & zSeries Flexibility to choose the right hybrid cloud mix for your business Build, ship, and run standardized containers • Integrated monitoring & logging • Elasticity to grow storage & container needs • Life-cycle management of containers and data volumes • No VMs to manage Docker ease of use combined with enterprise- level integrity and confidence Container connections using links and service discovery • Private network communication • External IP address • Subnet Range Extends and connects Docker containers to production-ready enterprise environments
  88. 88. Others
  89. 89. Joyent Triton The network is the computer… v2:-)
  90. 90. CleverCloud
  91. 91. RancherOS
  92. 92. Orchestration summary • Docker Swarm: Docker-style, provision with docker-machine • Mesos: Twitter-style, aligned with Swarm • Fleet: CoreOS-style, simple • Kubernetes: Google-style, heavy-duty, many concepts • Deis: Heroku-style workflow • Cloud Foundry Diego, IBM BlueMix: PaaS -> orchestration • Also: Joyent, Tutum, Flynn
  93. 93. Fire up your first container today! on Microsoft Azure Ride the Whale!
  94. 94. Learning • https://github.com/chanezon/azure-linux • Docker container to get started docker run –ti chanezon/linux • CoreOS cluster, fleet • Deis • Weave • docker-machine • Deploy Java app
  95. 95. 10 3 References • talk about cloud platforms: Managing complexity in giant systems http://www.slideshare.net/chanezon/tackling- complexity-in-giant-systems-approaches-from-several-cloud-providers • talk about Devops, the Microsoft Way http://www.slideshare.net/chanezon/devops-the-microsoft-way • MS Open Tech https://msopentech.com/ Blog, VM Depot • P@ Linux on Azure pages https://github.com/chanezon/azure-linux/ • Tim’s CoreOS tutorial https://github.com/timfpark/coreos-azure • Tim’s Deis documentation • @jpetazzo’s presentations http://www.slideshare.net/jpetazzo/ • @bcantrill’s deck http://www.slideshare.net/bcantrill/docker-and-the-future-of-containers-in-production • @vieux deck on Swarm • @htchen deck on Mesos + Swarm https://speakerdeck.com/tnachen/docker-swarm-plus-mesos
  96. 96. Q&A

×