A pragmatic approach to continuous delivery

1,597 views

Published on

Continuous Delivery Presentation at Javaforum, Malmö 2013-03-26.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
1,597
On SlideShare
0
From Embeds
0
Number of Embeds
1,207
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

A pragmatic approach to continuous delivery

  1. 1. A Pragmatic Approach to Continuous Delivery Ivar GrimstadJavaforum 2013 1 Ivar Grimstad
  2. 2. 2013-03-26 2 e.g. name of the presenter
  3. 3. @ivar_grimstadJavaforum 2013 3 Ivar Grimstad
  4. 4. 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/Javaforum 2013 4 Ivar Grimstad
  5. 5. 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.Javaforum 2013 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. http://www.agilemanifesto.org/ Continuous attention to technical excellence and good design enhances agility.Javaforum 2013 6 Ivar Grimstad Simplicity--the art of maximizing the amount
  7. 7. A Little History • JUnit • Ant • Continuous Integration • Maven • Continuous DeliveryJavaforum 2013 7 Ivar Grimstad
  8. 8. Motivation A Pragmatic Approach to Continuous DeliveryJavaforum 2013 8 Ivar Grimstad
  9. 9. The Deployment Pipeline • Build Binaries Once • One Process Deploy • Test Deployments • Flow • Fail -> Stop the LineJavaforum 2013 9 Ivar Grimstad
  10. 10. Deployment Pipeline Stages • Commit • Analysis • Deploy • Test • Deliver Remember that this is a pragmatic approachJavaforum 2013 10 Ivar Grimstad
  11. 11. The Commit Stage - Steps • Compile • Test • Create binaries for later useJavaforum 2013 11 Ivar Grimstad
  12. 12. The Commit Stage - ExampleJavaforum 2013 12 Ivar Grimstad
  13. 13. The Analysis Stage - Steps • Static AnalysisJavaforum 2013 13 Ivar Grimstad
  14. 14. The Analysis Stage - Metrics • Test Coverage • Duplications • Complexity • Coupling • Rule Compliance • Code StyleJavaforum 2013 14 Ivar Grimstad
  15. 15. SonarJavaforum 2013 15 Ivar Grimstad
  16. 16. The Analysis Stage - ExampleJavaforum 2013 16 Ivar Grimstad
  17. 17. The Deploy Stage - Steps • Copy Artifact from Commit Stage • Deploy to Test EnvironmentJavaforum 2013 17 Ivar Grimstad
  18. 18. The Deploy Stage - ExampleJavaforum 2013 18 Ivar Grimstad
  19. 19. The Test Stage - Steps • Choose a subset of tests to run • Run tests most likely to fail firstJavaforum 2013 19 Ivar Grimstad
  20. 20. The Test Stage - ExampleJavaforum 2013 20 Ivar Grimstad
  21. 21. The Test Stage - ExampleJavaforum 2013 21 Ivar Grimstad
  22. 22. The Deliver Stage - Steps • Copy Artifact from Commit Stage • Deliver according to agreementJavaforum 2013 22 Ivar Grimstad
  23. 23. The Deliver Stage - ExampleJavaforum 2013 23 Ivar Grimstad
  24. 24. Jenkins Build Pipeline PluginJavaforum 2013 24 Ivar Grimstad
  25. 25. Jenkins Build Pipeline PluginJavaforum 2013 25 Ivar Grimstad
  26. 26. What about Versioning? • Use Maven Release Plugin – mvn release:branch or mvn release:prepare – mvn release:perform • Jenkins Fingerprint FunctionalityJavaforum 2013 26 Ivar Grimstad
  27. 27. What about Documentation? Do not underestimate JavaDoc!Javaforum 2013 27 Ivar Grimstad
  28. 28. Designing for Continuous Delivery • Blue/Green Deployments • Canary Releasing • Feature Toggles • Branch by AbstractionJavaforum 2013 28 Ivar Grimstad
  29. 29. Antipatterns • Manual Deployment • Deployment to production-like environment after development is complete • Manual configuration of production environment • Excessive BranchingJavaforum 2013 29 Ivar Grimstad
  30. 30. To Sum Up • Every change should trigger the feedback process • Fast Feedback • Act on the FeedbackJavaforum 2013 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)Javaforum 2013 31 Ivar Grimstad
  32. 32. Where to start? • Define your pipeline steps • Set up the jobs • Start configuring • Evolve your pipelineJavaforum 2013 32 Ivar Grimstad
  33. 33. Remember… It is not that hard!Javaforum 2013 33 Ivar Grimstad
  34. 34. …and You’re probably doing it already!Javaforum 2013 34 Ivar Grimstad
  35. 35. @ivar_grimstad http://www.agilejava.euJavaforum 2013 35 Ivar Grimstad

×