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

Continuous Delivery: More Than a Pipeline

Eberhard Wolff
November 14, 2018
290

Continuous Delivery: More Than a Pipeline

Continuous Delivery is a lot more than just a pipeline. This talks discusses reasons why software should be deployed more frequently and the barriers that keep teams from doing so.

Eberhard Wolff

November 14, 2018
Tweet

Transcript

  1. Deployment Frequency: Results • Elite Performers vs. Low Performers •

    Multiple times per day vs. once per week / month • 2.555x better lead time for change • 2.604x better time to restore service • 7x better change failure rate • 50% vs 30% time spent on new work
  2. MAERSK COST OF DELAY POWER LAW CURVE 200K 10 30

    60 70 80 20 50 40 Number of Requirements 1.2MM 2.2MM 400K 1.4MM 2.4MM 600K 1.6MM 2.6MM 1MM 2MM 1.8MM 2.8MM Cost of Delay/Week Source: State of DevOps Report, blackswarmfarming.com
  3. MAERSK COST OF DELAY POWER LAW CURVE 200K 10 30

    60 70 80 20 50 40 Number of Requirements 1.2MM 2.2MM 400K 1.4MM 2.4MM 600K 1.6MM 2.6MM 1MM 2MM 1.8MM 2.8MM Cost of Delay/Week Source: State of DevOps Report, blackswarmfarming.com Cost of delay might be much higher than cost reductions in operations!
  4. No Silver Bullet Essence and Accident in Software Engineering Frederick

    P. Brooks, Jr. There is no single development... which by itself promises even one order-of-magnitude improvement within a decade in productivity, in reliability, in simplicity.
  5. Continuous Delivery: Goals • Deploy often • More than once

    a week / month …because that is still low performer • Multiple times a day! • How???
  6. Manual Deployment • Manually deploy software to servers using scripts

    • Somehow check correctness • Takes hours or days
  7. Automated Deployment • Fully automated scripts …might be Dockerfiles •

    Faster • Automated deployment to deploy every few months? • Deployment: often focus but not enough
  8. Customer Scenario • Quarterly releases • 10 weeks of testing

    • Release two days over the weekend • Goal: Several deployments a day • Automated deployment not enough Development Testing Release Testing + Release + Development Time
  9. Separate Dev and QA • Problem: Hand over of code

    • Hand over of bug reports • Takes time • Lean: Hand-over is waste • Does not enforce collaboration
  10. Only Automated Tests For Deployment • Fully automated test suite

    • …including capacity tests and acceptance tests • No manual sign-off • Really: no manual sign-off!
  11. Going faster • Reduce risk not just with tests •

    …but with releasing • Smaller deployment unit • Full automation might not be feasible for large deployment units
  12. Monolith • Deployment monolith • Deploy the whole system at

    once • Internal structure: Might be great or not so great… • A valid architecture
  13. Monolith: Deployment • Deploy all at once • It is

    hard to deploy a large system • Tests even harder • Can take loooooong – days, weeks, months • So large infrequent deployments • Risky
  14. Microservices: Deployment • Deploy individually • Requires automated deployment •

    Commodity with Docker, Kubernetes… • Requires decoupled components & tests • Enables faster deployments & tests • Enables frequent deployments
  15. Release Train • Release multiple dependent systems together • Extreme:

    Release all systems in the IT together • The reason why developers at one point in the sixties or so stopped deploying continuously?
  16. Release Train • In total: a day or a few

    days Release System 1 Release dependent System 2 Release dependent System 3 …
  17. Release per System • Much easier to coordinate • Backward

    compatible interfaces • Speed depends on deployment size …see architecture
  18. Blue / Green Deployment • Needs lots of resources •

    Might be unrealistic: another production environment? • Migrate database • ...and keep consistent for fallback • Easier with small microservices
  19. Canary Releases • Less resources • Needs backwards compatibility of

    other components / database • Easier with small microservices
  20. Dark Launching • Install new version • Let it handle

    production traffic • ...but don’t let it change data. • Requires monitoring • Enables less focus on tests
  21. Feature Branches • Create a new branch to implement a

    feature • Integrate into master when done • Easy to parallelize development • Easy to add features to master at a specific point in time
  22. Feature Branch Master Feature Registration Feature Prediction Commit Branch Commit

    Branch Commit Commit Commit Merge Merge Release with Features
  23. Feature Branches • Feature branches’ goal: Delay integration • Might

    still compile all changes from all branches together to find issues early • True integration into master only after go / no go for features
  24. Feature Branch Master Feature Registration Feature Prediction Commit Branch Commit

    Branch Commit Commit Commit Merge Merge Release with Features Integration Integration
  25. Feature Branches vs. Continuous Integration • Continuous Integration: Continuously integrate

    all changes • Feature branches’ goal: Delay integration • Both approaches might work • See https://www.heise.de/ developer/artikel/Continuous-Integration- widerspricht-Feature-Branches-2736487.html • …or https://www.innoq.com/en/blog/continuous- integration-contradicts-feature-branches/
  26. Trunk-based Development • Could deploy any time • But: User

    must not use unfinished features Commit Registration Commit Prediction Commit Registration Commit Prediction Commit Prediction
  27. Feature Toggles • Deployment should not activate new features •

    Disable feature in production • Problem: Must be cleaned up eventually • Problem: Harder to test
  28. Conclusion • More frequent deployments have many advantages • Choose

    a desired speed • ...and break the next barrier! • It’s not just microservices or deployment automation!