Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Microservices entfesseln mit Kubernetes und Deis Workflow

F029ec9c798e4dc447cab5e76f62fa17?s=47 Nicolas Byl
November 16, 2016

Microservices entfesseln mit Kubernetes und Deis Workflow

F029ec9c798e4dc447cab5e76f62fa17?s=128

Nicolas Byl

November 16, 2016
Tweet

Transcript

  1. 1 MICROSERVICES ENTFESSELN MIT KUBERNETES UND DEIS WORKFLOW Nicolas Byl,

    codecentric AG
  2. 2 . 1 Developing in the enterprise environment http://mrg.bz/e867f8

  3. https://www.flickr.com/photos/37996588780@N01/505425620

  4. 2 . 2 https://www.flickr.com/photos/47738379@N00/1566590110

  5. 2 . 3 2 . 4 3 . 1 TWELVE-FACTOR

    APPLICATIONS
  6. 3 . 2 Codebase One codebase tracked in revision control,

    many deploys Dependencies Explicitly declare and isolate dependencies Config Store config in the environment Backing Services Treat backing services as attached resources Build, release, run Strictly separate build and run stages Processes Execute the app as one or more stateless processes
  7. 3 . 3 Port binding Export services via port binding

    Concurrency Scale out via the process model Disposability Maximize robustness with fast startup and graceful shutdown Dev/prod parity Keep development, staging, and production as similar as possible Logs Treat logs as event streams Admin processes Run admin/management tasks as one-off processes
  8. 4 . 1 Kubernetes "Kubernetes is an open-source platform for

    automating deployment, scaling, and operations of application containers across clusters of hosts, providing container- centric infrastructure."
  9. portable: public, private, hybrid, multi-cloud extensible: modular, pluggable, hookable, composable

    self-healing: auto-placement, auto-restart, auto- replication, auto-scaling
  10. 4 . 2 4 . 3 Architektur

  11. 5 . 1 DEIS WORKFLOW

  12. None
  13. 5 . 2 5 . 3 Workflow

  14. 5 . 4 Architecture

  15. 5 . 5 Application Structure

  16. 5 . 6 Application Access Application is reachable at <application>.

    <cluster-base>, e.g. logmon.apps.codecentric.de Deis Controller Interface is available at deis. <cluster-base>
  17. 5 . 7 Scaling deis scale web=5 worker=2

  18. 5 . 8 Updating Applications Deploy application New Pods will

    be rolled out using Kubernetes Rolling- Upgrade Feature
  19. 6 . 1 APPLICATION DEPLOYMENT

  20. 6 . 2 Buildpack Deployment Code per git push übertragen

    Deis erstellt Archiv und rollt dieses aus
  21. 6 . 3 Buildpacks Ruby Nodejs Java Gradle Grails Play

    Python PHP Clojure Scala Go Multi
  22. 6 . 4 Demo

  23. 6 . 5 Dockerfile Deployment Dockerfile erstellen Code per git

    push übertragen Image wird erstellt und ausgerollt
  24. 6 . 6 Demo

  25. 6 . 7 Docker Image Deployment Docker Image erstellen Starten:

    deis pull nbyl-docker- docker.bintray.io/12factor-demo:latest Continous Delivery
  26. 6 . 8 Demo

  27. 7 . 1 INTEROPERABILITÄT

  28. 7 . 2 Aber ich brauche mehr Flexibilität! https://www.flickr.com/photos/110382334@N05/11303036263

  29. 7 . 3 12 Factor Applications mit Deis Workflow Normale

    Applikationen mit deployen Zugriff per DNS: helm <service­name>.<namespace­name>.svc.cluster.local
  30. 8 . 1 INSTALLATION

  31. 8 . 2 Requirements minikube helm deis cli

  32. 8 . 3 Spielwiese erstellen minikube start helmc repo add

    deis https://github.com/deis/charts helmc fetch deis/workflow­v2.8.0 helmc generate ­x manifests workflow­v2.8.0 helmc install workflow­v2.8.0 # some cofffee deis register http://deis.$(minikube ip).nip.io
  33. 9 . 1 The End Copyright 2016