Continuous Delivery

9,069 views
9,122 views

Published on

Presentation from XP Days Ukraine (December, 2011) about establishing continuous delivery process in development team

Published in: Technology

Continuous Delivery

  1. 1. CONTINUOUS DELIVERY Mikalai Alimenkou http://xpinjection.com 17.12.2011
  2. 2. Background• Java Technical Lead/Scrum Master at Zoral Labs• 7+ years in software development• 5+ years of working by Agile methodologies• Expert in Agile engineering practices• Founder and coach at XP Injection (http://xpinjection.com)• Organizer of Selenium Camp, JEEConf and XP Days Ukraine conferences
  3. 3. Every tool or practice should solve particular problemsWHY CONTINUOUS DELIVERY?
  4. 4. What changed in business? It is faster now!• Что изменилось в бизнесе? Он стал быстрее.
  5. 5. How long?
  6. 6. Still afraid of releases?
  7. 7. Your typical release
  8. 8. !!!
  9. 9. Kanban promotes continuous flow
  10. 10. XP style – ifit hurts, do it more often
  11. 11. “How long would it take your organization todeploy a change that involves just one single lineof code?Do you do this on a repeatable reliable basis?” - Mary and Tom Poppendieck
  12. 12. Continuous Delivery Keeping systems production- ready throughout development, so that they canbe released to users at any time
  13. 13. ”Continuous delivery is about putting the releaseschedule in the hands of the business, not in the handsof IT.Implementing continuous delivery means making sureyour software is always production ready throughoutits entire lifecycle – that any build could potentially bereleased to users at the touch of a button using a fullyautomated process in a matter of seconds or minutes.” - Jez Humble
  14. 14. Nobody tell you it is easy, but many people practice itREQUIRED STEPS FOR SUCCESS
  15. 15. 1. Select version Release should2. Select environment be simple3. Push the button
  16. 16. WTF?!? What about QA?Risk Management? Team Policies?
  17. 17. Automateeverything! Upgrade TestsBuild Deployment
  18. 18. Stable releasable trunk
  19. 19. How is it possible? Small features Slicing development Don’t show UI Feature flags
  20. 20. Global Continuous Integration
  21. 21. TDD at all levels ATDD TDDCustomer’s Tests Programmers’ Tests Acceptance Fixtures Production Unit Integration Tests Code Tests Tests
  22. 22. Detailed static code analysis
  23. 23. 1. Plan 2. Prepare 3. TestAlways thinkabout rollback
  24. 24. Deployment Load balancer sample XApp Server X DB Server
  25. 25. Deployment Load balancer sample X X 1. Start new App Server 2. Use slave DBApp Server App Server X X DB Server DB Server
  26. 26. Deployment Load balancer sample X X 1. Start new App Server 2. Use slave DB 3. Deploy in read only modeApp Server App Server 4. Switch load balancer X X DB Server DB Server
  27. 27. Deployment Load balancer sample Y X 1. Start new App Server 2. Use slave DB 3. Deploy in read only modeApp Server App Server 4. Switch load balancer 5. Update master DB 6. Deploy new code Y X DB Server DB Server
  28. 28. Deployment Load balancer sample Y X 1. Start new App Server 2. Use slave DB 3. Deploy in read only modeApp Server App Server 4. Switch load balancer 5. Update master DB 6. Deploy new code 7. Switch load balancer Y X DB Server DB Server
  29. 29. Deployment Load balancer sample Y 1. Start new App Server 2. Use slave DB 3. Deploy in read only modeApp Server 4. Switch load balancer 5. Update master DB 6. Deploy new code 7. Switch load balancer Y Y 8. Release old App Server 9. Synchronize slave DB DB Server DB Server
  30. 30. Don’t forget about…Monitoring Smoke testing5 whys technique Retrospective
  31. 31. How to start?Start with walking skeleton Automate step by stepReduce deploy batch size Reduce deployment cycle
  32. 32. Visualize path of your code from developers to end usersBUILD PIPELINES
  33. 33. Performance Dev Testing Testing Staging Demo UATProduction Different environments on code path
  34. 34. Build Pipeline sample
  35. 35. Build pipeline sequence
  36. 36. Jenkins BuildPipeline Plugin
  37. 37. TeamCityBuild Chain
  38. 38. Cruise Pipelines
  39. 39. Do nothing before benefits are not clear for youCONTINUOUS DELIVERY BENEFITS
  40. 40. Reduce errors in manual repeatable tasks
  41. 41. Fail early with deployment
  42. 42. Small changes reduce risks
  43. 43. Short feedback cycle
  44. 44. Everybody can deploy to production
  45. 45. Before After Dev Commit Monitor TestRelease QA Deploy • 2 week release cycles • code freeze • multiple releases a day • big events • non-events • large code changes • small number of changes
  46. 46. Books to read
  47. 47. @xpinjection http://xpinjection.commikalai.alimenkou@xpinjection.com

×