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.

DevOps Days Boston 2017: Developer first workflows for Kubernetes

807 views

Published on

Kubernetes is a powerful, operational platform for containerized applications. However, the developer workflow on Kubernetes – how you code, deploy, update, and monitor your services – is much less mature.

How should you lay out your Git repo? How do you create loosely coupled services? How do you support deploying your service at any time?

In this talk, we’ll talk about these questions and more. We’ll discuss the journey towards a rapid development workflow, discuss best practices, and, talk about the process we followed to get to a rapid development workflow.

DevOps Days Boston 2017

Published in: Software
  • Be the first to comment

DevOps Days Boston 2017: Developer first workflows for Kubernetes

  1. 1. 1 DeveloperFirstWorkflowsonKubernetes (adoptingmicroservicestogofaster) Richard Li
  2. 2. How do you ship better (cloud) software faster?
  3. 3. Microservices. (Multiple, asynchronous launches.)
  4. 4. 4 Take the standard development process: Code (Dev) Test (QA) Prod (Ops) Release (Release) Define (Product)
  5. 5. 5 … and make it distributed. > No central release, test, dev cycle. Each person/team operates an independent development process. > Team needs to have the skills / knowledge to operate all aspects of the development process. Service A Service B Service C
  6. 6. 6 Microservices is a distributed development process for cloud-native software. > Not an architecture! Your architecture supports the process, and not the other way around.
  7. 7. 7 Howdoyouadoptadistributed developmentprocess?
  8. 8. 8 Startbycreatinganindependentprocess! (withafrom-scratchAPIservice) New service Monolith independent process!! (think spinning off a developer or dev team)
  9. 9. 9 1. Self-sufficiency. Each team needs to be self-sufficient in all aspects of the development cycle to avoid bottlenecks. 2. Safety. Since it’s hard to be an expert in every area of the development, need to insure an oops isn’t catastrophic. Givethedeveloper/devteamtheabilitytoSUCCESSFULLY operateindependently.
  10. 10. 10 Wait!DoIhavetobuildthese capabilitiesfromscratch?
  11. 11. 11 • Massive community and ecosystem • 14M Docker hosts • 3300+ contributors • Lots of third party tools • Build, package, and deploy your service (and dependencies!) in a consistent way
  12. 12. 12 • Massive community and ecosystem • 789 companies, 2505 developers • Google, Red Hat, Oracle, Microsoft have embraced Kubernetes • 62% of K8S are on AWS • Mesosphere is embracing K8S on DC/OS • Kubernetes is the cloud POSIX … not just a container scheduler • Declarative definition of your cloud infrastructure
  13. 13. 13 • Fast growing community and ecosystem • Lyft, Google, IBM, Verizon, Yahoo, Datawire … • CNCF project • Modern L7 proxy • Designed for distributed cloud architectures (global rate-limiting, observability, circuit breakers, …) • APIs for managing fleets of Envoy proxies
  14. 14. 14 1. Microservices is a distributed development workflow that helps you go faster. 2. Start your microservices journey by building an efficient workflow for your first services team, then your organization. 3. The Kubernetes ecosystem, Docker, and Envoy provide the foundational components you need to build that workflow.
  15. 15. 15 Gettingstartedwithmicroservices, usingKubernetes,Docker,andEnvoy.
  16. 16. 5 Analyze metrics. 16 Prototyping workflow Production workflow Yourdeveloper-firstworkflowforbuilding1service. 1 Bootstrap the service. 2 Code. 3 Run your code (in a dev Kube cluster). 4 Deploy to production Kubernetes cluster.
  17. 17. 17 Howdoyoumaximize productivity?
  18. 18. SPEED. (self sufficiency)
  19. 19. 19 1 Bootstrap the service with a service template. $ git clone $URL todo/ Dockerfile # How do you build your code + container k8s/ # How should Kubernetes run your service tf/ # What non-Kubernetes resources need to be provisioned app.py # stub for your application service.yaml # Metadata about your service
  20. 20. Realism: How closely does this mirror production? Fast feedback cycle for developers Low setup and maintenance cost for developers Scalability as your application gets more complex Run entire system locally Run business logic locally, cloud resources remote Single service local, all other services remote All remote development 100% remote development100% local development 2 Code. Build a productive development environment. Docker or Minikube Telepresence + Kubernetes Kubernetes + CI/CD Set up local drivers to cloud resources
  21. 21. 21 3 Deploy to development Kubernetes cluster. A Build a container image that contains your code, dependencies, and configuration, based on the Dockerfile. B Tag the image. C Push image to a container registry. D Update Kubernetes manifest with tag. docker build docker tag docker push E Apply Kubernetes manifest to cluster. Start with a Kubernetes manifest template, and instantiate the image tag (and other variables, too) into the template. kubectl apply F Repeat for all dependencies. e.g., other services
  22. 22. 22 4 Deploy to production Kubernetes cluster. A Build a container image that contains your code, dependencies, and configuration, based on the Dockerfile. B Tag the image. C Push image to a container registry. D Update Kubernetes manifest with production config data and update Envoy configuration for canary routing. Keep the same environment & deploy process for dev/prod to eliminate environmental differences. E Apply Kubernetes manifest to cluster. F Repeat for all dependencies, including Envoy. Envoy deploys the same way as any other service.
  23. 23. 23 5 Analyze metrics. A Deploy each service behind Envoy. B C Add additional service-specific metrics as appropriate. Automatically measure L7 throughput, latency, and availability for the service via Envoy. D Collect metrics in Prometheus or equivalent.
  24. 24. 24 Yourarchitecturefordistributeddevelopment. EnvoyMonolith Service Auth • Canary routing • Authentication • URL mapping • L7 observability
  25. 25. Makingyourorganizationfaster. Team A Team B Team C 1 2 3 4 5 1 2 3 4 5 1 2 3 4 5
  26. 26. 26 1. Microservices is a distributed development workflow that helps you go faster. 2. Start your microservices journey by building an efficient workflow for your first services team, then your organization. 3. The Kubernetes ecosystem, Docker, and Envoy provide the foundational components you need to build that workflow. 4. To maximize productivity, optimize the loop. Make your workflow from source code to getting feedback as fast as possible — which means self-sufficiency.
  27. 27. SAFETY.
  28. 28. 28 Asample,multi-serviceapplication. Envoy Tasks Search Auth
  29. 29. 29 <demo>
  30. 30. We have FEARLESSLY pushed a (buggy) update into production!
  31. 31. 31 1. Microservices is a distributed development workflow that helps you go faster. 2. Start your microservices journey by building an efficient workflow for your first services team, then your organization. 3. The Kubernetes ecosystem, Docker, and Envoy provide the foundational components you need to build that workflow. 4. To maximize productivity, make your workflow from source code to getting feedback as fast as possible. 5. An efficient workflow lets teams be safely self-sufficient — letting them to move fast and not break things.
  32. 32. 32 Thanks! Feedback/questions: richard@datawire.io Tutorial to do this yourself: http://www.datawire.io/guide/ development/fast-develop-deploy-canary-workflow/ Open source tools for developers on K8S: https:// www.datawire.io (Telepresence, Forge, Ambassador) We’re hiring an OSS/C++ engineer to work on Envoy!

×