A pragmatic approach to continuous delivery

2,113 views

Published on

Here are the slides from my presentation at jDays 2012.

Published in: Technology
  • Be the first to comment

  • Be the first to like this

A pragmatic approach to continuous delivery

  1. 1. A Pragmatic Approach to Continuous Delivery Ivar GrimstadjDays 2012 1 Ivar Grimstad
  2. 2. 2012-12-03 2 e.g. name of the presenter
  3. 3. @ivar_grimstadjDays 2012 3 Ivar Grimstad
  4. 4. A Little History • JUnit • Ant • Continuous Integration • Maven • Continuous DeliveryjDays 2012 4 Ivar Grimstad
  5. 5. Agile Manifesto Individuals and interactions over processes and tools Working software over comprehensive documentation Customer collaboration over contract negotiation Responding to change over following a plan http://www.agilemanifesto.org/jDays 2012 5 Ivar Grimstad
  6. 6. Principles behind the Agile Manifesto Our highest priority is to satisfy the customer through early and continuous delivery of valuable software. Welcome changing requirements, even late in development. Agile processes harness change for the customers competitive advantage. Deliver working software frequently, from a couple of weeks to a couple of months, with a preference to the shorter timescale. Business people and developers must work together daily throughout the project. Build projects around motivated individuals. Give them the environment and support they need, and trust them to get the job done. The most efficient and effective method of conveying information to and within a development team is face-to-face conversation. Working software is the primary measure of progress. Agile processes promote sustainable development. The sponsors, developers, and users should be able to maintain a constant pace indefinitely. Continuous attention to technical excellence and good design enhances agility. Simplicity--the art of maximizing the amount of work not done--is essential. The best architectures, requirements, and designs emerge from self-organizing teams. At regular intervals, the team reflects on how http://www.agilemanifesto.org/ to become more effective, then tunes and adjusts its behavior accordingly.jDays 2012 6 Ivar Grimstad
  7. 7. Principles behind the Agile Manifesto Our highest priority is to satisfy the customer through early and continuous delivery of valuable software. Welcome changing requirements, even late in development. Agile processes harness change for the customers competitive advantage. Deliver working software frequently, from a couple of weeks to a couple of months, with a preference to the shorter timescale. Business people and developers must work together daily throughout the project. Build projects around motivated individuals. Give them the environment and support they need, and trust them to get the job done. The most efficient and effective method of conveying information to and within a development team is face-to-face conversation. Working software is the primary measure of progress. Agile processes promote sustainable development. The sponsors, developers, and users should be able to maintain a constant pace indefinitely. http://www.agilemanifesto.org/ Continuous attention to technical excellence and good design enhances agility.jDays 2012 7 Ivar Grimstad Simplicity--the art of maximizing the amount
  8. 8. Motivation A Pragmatic Approach to Continuous DeliveryjDays 2012 8 Ivar Grimstad
  9. 9. The Deployment Pipeline • Build Binaries Once • One Process Deploy • Test Deployments • Flow • Fail -> Stop the LinejDays 2012 9 Ivar Grimstad
  10. 10. Deployment Pipeline Stages • Commit • Analysis • Deploy • Test • Deliver Remember that this is a pragmatic approachjDays 2012 10 Ivar Grimstad
  11. 11. The Commit Stage - Steps • Compile • Test • Create binaries for later usejDays 2012 11 Ivar Grimstad
  12. 12. The Commit Stage - ExamplejDays 2012 12 Ivar Grimstad
  13. 13. The Analysis Stage - Steps • Static AnalysisjDays 2012 13 Ivar Grimstad
  14. 14. The Analysis Stage - Metrics • Test Coverage • Duplications • Complexity • Coupling • Rule Compliance • Code StylejDays 2012 14 Ivar Grimstad
  15. 15. SonarjDays 2012 15 Ivar Grimstad
  16. 16. The Analysis Stage - ExamplejDays 2012 16 Ivar Grimstad
  17. 17. The Deploy Stage - Steps • Copy Artifact from Commit Stage • Deploy to Test EnvironmentjDays 2012 17 Ivar Grimstad
  18. 18. The Deploy Stage - ExamplejDays 2012 18 Ivar Grimstad
  19. 19. The Test Stage - Steps • Choose a subset of tests to run • Run tests most likely to fail firstjDays 2012 19 Ivar Grimstad
  20. 20. The Test Stage - ExamplejDays 2012 20 Ivar Grimstad
  21. 21. The Test Stage - ExamplejDays 2012 21 Ivar Grimstad
  22. 22. The Deliver Stage - Steps • Copy Artifact from Commit Stage • Deliver according to agreementjDays 2012 22 Ivar Grimstad
  23. 23. The Deliver Stage - ExamplejDays 2012 23 Ivar Grimstad
  24. 24. Jenkins Build Pipeline PluginjDays 2012 24 Ivar Grimstad
  25. 25. Jenkins Build Pipeline PluginjDays 2012 25 Ivar Grimstad
  26. 26. What about Versioning? • Use Maven Release Plugin – mvn release:branch or mvn release:prepare – mvn release:perform • Jenkins Fingerprint FunctionalityjDays 2012 26 Ivar Grimstad
  27. 27. What about Documentation? Do not underestimate JavaDoc!jDays 2012 27 Ivar Grimstad
  28. 28. Designing for Continuous Delivery • Blue/Green Deployments • Canary Releasing • Feature Toggles • Branch by AbstractionjDays 2012 28 Ivar Grimstad
  29. 29. Antipatterns • Manual Deployment • Deployment to production-like environment after development is complete • Manual configuration of production environment • Excessive BranchingjDays 2012 29 Ivar Grimstad
  30. 30. To Sum Up • Every change should trigger the feedback process • Fast Feedback • Act on the FeedbackjDays 2012 30 Ivar Grimstad
  31. 31. Tools • Jenkins – Build Pipeline Plugin – Copy Artifact Plugin • Sonar • Maven – Maven Release Plugin – Maven Javadoc Plugin – Maven Glassfish Plugin (similar for all app servers)jDays 2012 31 Ivar Grimstad
  32. 32. Where to start? • Define your pipeline steps • Set up the jobs • Start configuring • Evolve your pipelinejDays 2012 32 Ivar Grimstad
  33. 33. More at jDays • Architecting for Continuous Delivery Axel Fontaine Tuesday 14:40 • Building a Continuous Deployment Pipeline with Maven Alan Parkinson Wednesday 13:30jDays 2012 33 Ivar Grimstad
  34. 34. Remember… It is not that hard!jDays 2012 34 Ivar Grimstad
  35. 35. …and You’re probably doing it already!jDays 2012 35 Ivar Grimstad
  36. 36. @ivar_grimstad http://www.agilejava.eujDays 2012 36 Ivar Grimstad

×