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

OpenSource 101: A DevOps State of Mind with Mic...

OpenSource 101: A DevOps State of Mind with Microservices, Containers
and Kubernetes

Chris Van Tuin

April 17, 2018
Tweet

More Decks by Chris Van Tuin

Other Decks in Technology

Transcript

  1. A DevOps State of Mind with Microservices, Containers
 and Kubernetes

    Chris Van Tuin Chief Technologist, NA West / Silicon Valley [email protected]
  2. $4.3 billion in unsold inventory H&M gets hit with the

    ‘Amazon effect’ https://www.marketwatch.com/story/hm-gets-hit-with-the-amazon-effect-2018-04-03
  3. 1 to 8
 weeks 3 months 6 months SUPPLY CHAIN

    BOTTLENECK in Era of Fast Fashion
  4. “H&M need to make 
 sure they’re innovating 
 ahead

    of the curve, 
 not just to catch up” H&M’s position is magnified by the fact that they recognized the problem later than their peers H&M investing in I.T. to … Speed Up Innovation Amplify & Shorten
 Feedback Loop
  5. DEV QA OPS “THROW IT OVER THE WALL” Challenges
 1.

    Environment drift 2. Large change set = 
 more bugs, more testing 3. Extended feedback loop Walled off people, walled off processes, walled off technologies
  6. HOW DOES I.T. TRANSFORM FROM A COST CENTER INTO AN

    INNOVATION CENTER? Months Innovation
  7. DEVOPS Speeding Up Time to Market Leverage tooling & automation

    Reduce organizational silos Accept failure
 as normal Implement gradual change Measure everything
  8. DEV QA OPS Linux + Containers IaaS Orchestration CI/CD Source

    Control Management Collaboration Build and Artifact Management Testing Frameworks Culture Process Technology + + Collaborative Transparent Open Agile Continuous Iterative Automate Open Source Hybrid Dynamic THE DEVOPS FACTORY
  9. THE VALUE OF DEVOPS Faster Time to Market Security More

    time To Innovate Faster Resolution Of Problems More Stable Operating Environment Improved Communication & Collaboration Less Complex Less Risk
  10. Collaboration Shared problems are solved faster + OPEN SOURCE CULTURE

    Transparency 
 (both access and 
 the ability to act) Working together creates necessary standardization + IT’S NOT JUST CODE; IT’S CULTURE
  11. 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 CONTENT: EACH LAYER MATTERS AYER MATTERS CONTAINER OS RUNTIME APPLICATION JAR CONTAINER
  12. 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
  13. Scheduling Monitoring Persistence Discovery Lifecycle & health Scaling Aggregation Security

    CONTAINERS AT SCALE BARE METAL VIRTUAL PRIVATE CLOUD PUBLIC CLOUD
  14. DEV QA OPS Open organization + 
 cross-functional teams Software

    factory automation CI/CD pipelines with feedback Culture Process Technology + + THE DEVOPS FACTORY
  15. code config data Kubernetes configmaps secrets Container image Traditional 


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

    Declarative Nodes Controller Manager & Data Store (etcd)
  17. 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
  18. Web Database role=web role=db role=web replicas=1, 
 role=db replicas=2, 


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

    role=web role=db role=web replicas=1, 
 role=db replicas=2, 
 role=web
  20. 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)
  21. 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)
  22. 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
  23. 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)
  24. 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)
  25. 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
  26. Version 1 Version 1 Version 1 Version 1.2 ` Tests

    / CI ROLLING UPDATES with ZERO DOWNTIME
  27. 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
  28. 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
  29. 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
  30. ”only about 1/3 of ideas improve the metrics 
 they

    were designed to improve.”
 Ronny Kohavi, Microsoft (Amazon) MICROSERVICES RAPID INNNOVATION & EXPERIMENTATION
  31. Version 1.2 Version 1 100% Tests / CI Version 1.2

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

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

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

    20% Conversion Rate CANARY DEPLOYMENTS