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

DeveloperWeek SF: A DevOps State of Mind with Microservices and Containers

DeveloperWeek SF: A DevOps State of Mind with Microservices and Containers

Rapid innovation, changing business landscapes, and new IT demands force businesses to make changes quickly. In the eyes of many, containers are at the brink of becoming a pervasive technology in Enterprise IT to accelerate Microservices delivery. In this presentation, you'll learn about the • The transformation of IT to a DevOps, Microservices, and Container based Architecture • What are containers and how DevOps practices can operate in a Microservices based environment • How Kubernetes can reduce software delivery cycle times, drive automation, and increase efficiency • How other organizations are using DevOps + Containers with Microservices and how to replicate their success Also, a demonstration of automated container based Microservices builds and pipelines, running Jenkins CI on Kubernetes, and continuous deployments of containerized Microservices with Kubernetes.

Chris Van Tuin

February 06, 2018
Tweet

More Decks by Chris Van Tuin

Other Decks in Technology

Transcript

  1. Culture of experimentation A B 20% vs. 25% Empowered organization

    Time Change Rapid Innovation THE DISRUPTORS = AI /
 ML Data-driven intelligence Data, Data, Data
  2. I.T. ENABLING 
 BUSINESS DIFFERENTIATION Taxi Ridesharing $2.50/mile, $0.50/idle Fare

    Static
 Pricing Dynamic 
 Pricing vs. Ack: William Benton Fare 
 based on 
 real-time and historical data: supply/demand distance, time
 route, traffic etc.
  3. DEV QA OPS Walled off people, walled off processes, walled

    off technologies “THROW IT OVER THE WALL”
  4. HOW DOES I.T. TRANSFORM FROM A COST CENTER INTO AN

    INNOVATION CENTER? Months Innovation
  5. DEV QA OPS Collaborative and empowered teams, 
 consistent processes,

    consistent technologies MOVE FAST, BREAK THINGS Line of Business Security , DBA, Network, etc.
  6. I.T. MUST EVOLVE Development Model Application Architecture Deployment & Packaging

    Application Infrastructur e Storage Waterfall Agile Monolithic N-tier Bare Metal Virtual Servers Data Center Hosted Scale Up Scale Out DevOps MicroServices Containers Hybrid Cloud Storage as a Service
  7. DEV QA OPS Open organization + 
 cross-functional teams Software

    factory automation Linux + Containers IaaS Orchestration CI/CD Source Control Management Collaboration Build and Artifact Management Testing Frameworks Open Source CI/CD pipelines with feedback Culture Process Technology + + THE SOFTWARE FACTORY
  8. CI/CD PIPELINE Continuous Integration Continuous Build Continuous Deployment Developer ->

    Source -> Git Git -> RPMS -> Images-> Registry Images from 
 Registry -> Clusters
  9. 24x Faster Recovery From Failure 3x Lower Change Failure Rate

    2555x Shorter Lead Times https://puppet.com/resources/whitepaper/2016-state-of-devops-report 200x More Deployments THE IMPACT…
  10. Hybrid Cloud: Self-Service, On-Demand, Elastic Infrastructure Automation + Containers CI

    & CD Deployment Pipeline Advanced Deployment Techniques Microservices (and flying elephants!) Re-Org to DevOps THE EVOLUTION
  11. CUSTOMER CHALLENGES “It could take 6 weeks to get a

    single word changed on the web site.” “It took 2 years after a competitive start-up launch to get a competing product to market.” “When developers work in Node.js, they can change the code they’re working on, direct it to run, and see whether it works-in the blink of an eye.” “The environment, while stable, didn’t use the sexiest technologies, which made recruiting difficult.”
  12. APPS IN MULTIPLE ENVIRONMENTS ANY COMBINATION, WHETHER TRADITIONAL OR CONTAINERIZED

    LEGACY APPS (1,000+) BARE METAL PRIVATE CLOUD (OpenStack) PUBLIC CLOUD (AMZ, MS, GOOG, etc.) VMware/
 Red Hat Virtualization PRODUCTION DEV/TEST
  13. PRODUCTION & DATA ON-PREMISE, 
 DEV/TEST OFF RED HAT OPENSHIFT

    CONTAINER PLATFORM RED HAT OPENSHIFT CONTAINER PLATFORM BARE METAL VIRTUAL PRIVATE CLOUD OFF-PREMISE ON-PREMISE AMAZON RELATIONAL DB (MySQL) RDS SERVICE
  14. From development… …to production. COMMUNICATION IS THE KEY TO DEVOPS.

    
 DEV/TEST Q/A OPERATIONS MANAGEMENT OUTSOURCERS DEV/TEST Q/A AUTOMATION: CONFIGURATION MANAGEMENT + ORCHESTRATION BARE METAL VIRTUAL PRIVATE CLOUD PUBLIC CLOUD
  15. • Application processes on a shared kernel • Simpler, lighter,

    and denser than VMs • Portable across different environments • Package apps with all dependencies • Deploy to any environment in seconds • Easily accessed and shared INFRASTRUCTURE APPLICATIONS WHAT ARE CONTAINERS? It depends who you ask…
  16. docker.io Registry Private Registry Red Hat Certified FROM fedora:latest CMD

    echo “Hello” Build file Physical, Virtual, Cloud Image Container Build Run Ship CONTAINERS: BUILD, SHIP, RUN
  17. 4 • Are there known vulnerabilities in the application layer?

    • Are the runtime and OS layers up to date? • How frequently will the container be updated and how will I know when it’s updated? CONTENT: EACH LAYER MATTERS CONTAINER OS RUNTIME APPLICATION AYER MATTERS CONTAINER OS RUNTIME APPLICATION JAR CONTAINER CONTAINERS
  18. TOP CHALLENGES WITH CONTAINERS AT SCALE Operational 
 Efficiency Service

    Health Security & Compliance Financial Management
  19. DEV QA OPS Open organization + 
 cross-functional teams Software

    factory automation CI/CD pipelines with feedback Culture Process Technology + + THE SOFTWARE FACTORY
  20. Scheduling Monitoring Persistence Discovery Lifecycle & health Scaling Aggregation Security

    CONTAINERS AT SCALE BARE METAL VIRTUAL PRIVATE CLOUD PUBLIC CLOUD
  21. CrunchyData GitLab Iron.io Couchbase Sonatype EnterpriseDB and many more ...and

    virtually any docker image out there! PHP Python Java NodeJS Perl Ruby .NET Core Apache
 HTTP Server MySQL Redis nginx Tomcat Varnish JBoss EAP JBoss A-MQ JBoss Fuse JBoss BRMS JBoss BPMS JBoss Data Grid JBoss Data Virt RH Mobile RH SSO 3SCALE API mgmt JBoss Web Server Spring
 Boot Wildfly Swarm Vert.x PostgreSQ L MongoDB Phusion Passenger Third-party
 Language Runtimes Third-party
 Databases Third-party
 App Runtimes Third-party
 Middleware Third-party
 Middleware TRUE POLYGLOT PLATFORM
  22. code config data Kubernetes configmaps secrets Container image Traditional 


    data services, Kubernetes 
 persistent volumes TREAT CONTAINERS AS IMMUTABLE
  23. Web Database replicas=1, 
 role=db replicas=2, 
 role=web ORCHESTRATION Deployment,

    Declarative Nodes Controller Manager & Data Store (etcd)
  24. role=web role=db role=web Pods Nodes Image Registry ORCHESTRATION Schedule +

    Provision Pods (Compute/Storage/Network) Web replicas=2, 
 role=web ReplicaSet Database replicas=1, 
 role=db StatefulSet
  25. Web Database role=web role=db role=web replicas=1, 
 role=db replicas=2, 


    role=web ORCHESTRATION Service (Load Balancer) Pods Nodes Services Controller Manager & Data Store (etcd)
  26. HEALTH CHECK Monitoring & Logging Pods Nodes Services Web Database

    role=web role=db role=web replicas=1, 
 role=db replicas=2, 
 role=web
  27. HEALTH CHECK Pods Nodes Services Web Database role=web role=db role=web

    replicas=1, 
 role=db replicas=2, 
 role=web role=web Controller Manager & Data Store (etcd)
  28. Web Database replicas=1, 
 role=db replicas=2, 
 role=web HEALTH CHECK

    Pods Nodes Services role=web role=db role=web Controller Manager & Data Store (etcd)
  29. Web Database replicas=1, 
 role=db replicas=2, 
 role=web AUTO-SCALE Monitoring

    & Logging 80% CPU Pods Nodes Services role=web role=db role=web
  30. Web Database replicas=1, 
 role=db replicas=3 
 role=web AUTO-SCALE 80%

    CPU Pods Nodes Services role=web role=db role=web role=web Controller Manager & Data Store (etcd)
  31. Pods Nodes Services Web Database replicas=1, 
 role=db replicas=3 


    role=web AUTO-SCALE 50% CPU role=web role=db role=web role=web Controller Manager & Data Store (etcd)
  32. CONTINUOUS DELIVERY DEPLOYMENT STRATEGIES DEPLOYMENT STRATEGIES • Recreate • Rolling

    updates • Blue / Green deployment • Canary deployments • A / B testing
  33. Version 1.2 Version 1.2 Version 1.2 RECREATE WITH DOWNTIME Use

    Case • Non-mission critical services Cons • Downtime Pros • Simple, clean • No Schema incompatibilities • No API versioning
  34. Version 1 Version 1 Version 1 Version 1.2 ` Tests

    / CI ROLLING UPDATES with ZERO DOWNTIME
  35. Deploy new version and wait until it’s ready… Version 1

    Version 1 V1.2 Health Check: readiness probe e.g. tcp, http, script V1
  36. Each container/pod is updated one by one Version 1.2 Version

    1.2 Version 1.2 100% Use Case • Horizontally scaled • Backward compatible API/data • Microservices Cons • Require backward compatible APIs/data • Resource overhead Pros • Zero downtime • Reduced risk, gradual rollout w/health checks • Ready for rollback
  37. Version 1 BLUE / GREEN DEPLOYMENT Rollback Route Version 1.2

    BLUE GREEN Use Case • Self-contained micro services (data) Cons • Resource overhead • Data synchronization Pros • Low risk, never change production • No downtime • Production like testing • Rollback
  38. “Our experience at Microsoft is no different—only about 1/3 of

    ideas improve the metrics they were designed to improve.”
 Ronny Kohavi, Microsoft (Amazon) http://ai.stanford.edu/~ronnyk/ExPThinkWeek2009Public.pdf http://ai.stanford.edu/~ronnyk/ExPThinkWeek2009Public.pdf
  39. Version 1.2 Version 1 100% Tests / CI Version 1.2

    Route 25% Conversion Rate ?! Conversion Rate CANARY DEPLOYMENTS
  40. 50% 50% Version 1.2 Version 1 Route Version 1.2 25%

    Conversion Rate 30% Conversion Rate CANARY DEPLOYMENTS
  41. 25% Conversion Rate 100% Version 1 Version 1.2 Route Version

    1.2 30% Conversion Rate CANARY DEPLOYMENTS
  42. Version 1.2 Version 1 100% Route Rollback 25% Conversion Rate

    20% Conversion Rate CANARY DEPLOYMENTS
  43. Deployment Frequency Change Volume Lead Time Deployment
 Failure Rate Mean

    Time to Recover 99.999 Service Availability DEVOPS METRICS