Continuous delivery @wcap 5-09-2013

1,180 views

Published on

Release software is no less important than activities that precede it.
The Continuous Delivery is a set of practices and methodologies that build an ecosystem for the software development lifecycle.
We will see how to build this ecosystem around the applications developed, for which this release activities becomes a low-risk, inexpensive, fast and predictable.

Published in: Technology
2 Comments
6 Likes
Statistics
Notes
No Downloads
Views
Total views
1,180
On SlideShare
0
From Embeds
0
Number of Embeds
64
Actions
Shares
0
Downloads
24
Comments
2
Likes
6
Embeds 0
No embeds

No notes for slide

Continuous delivery @wcap 5-09-2013

  1. 1. Continuous Delivery 05 - 09 - 2013
  2. 2. David Funaro CTO@Dnsee @ingdavidino davidfunaro.com
  3. 3. Overview
  4. 4. STARTUP
  5. 5. STARTUP
  6. 6. STARTUP Testo?
  7. 7. STARTUP Testo? Implementation
  8. 8. • is the only phase ? • it’s really sufficient to release software Implementation
  9. 9. Implementation
  10. 10. Progettazione Implementation
  11. 11. Progettazione Implementation Analisi
  12. 12. Collaudo Progettazione Implementation Analisi
  13. 13. Collaudo Progettazione Implementation Analisi Manutezione
  14. 14. Collaudo Progettazione Implementation Analisi Manutezione
  15. 15. Collaudo Progettazione Implementation Analisi Manutezione Software Development Life Cycle
  16. 16. SW - LC Feedback
  17. 17. SW - LC Feedback • New Features • Bug fixing • System specification Changes • Web services changes • Customer support tips
  18. 18. Software Evolution
  19. 19. RELEASE SoftwareComponents ‣Layout ‣Frontend ‣Backend ‣Api ‣Webservices ‣... ‣... ‣... ‣Librerie Changes
  20. 20. RELEASE FEEDBACK new features monetize bug performance layout
  21. 21. RELEASE ? Miss Release Price ? €
  22. 22. Reaction Metrics Change RELEASE
  23. 23. Reaction Metrics Change RELEASE Time interval ... Security Skills Cost Predictable Stress Repeatability
  24. 24. • How many time you need to release software Time interval ...
  25. 25. • Everything will be ok ? • Can i be sure that every needed step will be done ? • Exceptions, are managed ? • Data migration goes well ? • Can i go back (rollback) ? Security
  26. 26. • Have, the selected person, all the skill needed to terminate the procedure ? • What about his behavior in some exception flow case Skills
  27. 27. • How many people you need ? • For how many time ? • Other Resources ? Cost
  28. 28. • are able to indicate how much time will care ? Predictable
  29. 29. • What about the stress • stress => error-prone Stress
  30. 30. • Just finish a deploy. Software released.A bug is found.You have to re-start Repeatability
  31. 31. Reaction Metrics RELEASE Time interval ... Security Skills Cost Predictable Stress Repeatability Production
  32. 32. Reaction Metrics RELEASE Time interval ... Security Skills Cost Predictable Stress Repeatability Production Staging
  33. 33. Reaction Metrics RELEASE Time interval ... Security Skills Cost Predictable Stress Repeatability Production Testing Staging
  34. 34. No Automation Process ?
  35. 35. Lots of things to consider • Code dependency management • System evolution management • Data management and architecture • Component management
  36. 36. Software Release • Low Risk • Cheap • Frequent • Rapid • Predictable ... should be Continuous Delivery
  37. 37. What we need • Source Code Management • Continuous Integration Server • Automated Deploy • Real Time Alerting • Root Cause Analysis
  38. 38. Deploy Pipeline Commit Stage Compile UnitTest Analysis Build Installers Release Automated acceptance testign Automated capacity testing Manual Testing Showcases Explorarory testing
  39. 39. Overview Commit /push Testing FAIL SUCCESS Automated Deploy Procedure dev team
  40. 40. Continuous Delivery Tools MethodologiesPractices Cautions
  41. 41. Anti-patterns • Deploy software manually • Manual Configuration • Deploy to a production-like Env Only after development is complete
  42. 42. Benefits • Empower Team • Reducing Errors • Lowering Stress • Deployment Flexibility • Practice Make Perfect
  43. 43. Keep Everything in version control Automate Almost Everything Keys
  44. 44. PAUSE
  45. 45. SECTION I Source Code Management
  46. 46. i sent you a mail with the last change ... are you shure ? i can’t find the new file ?!? The problem
  47. 47. SCM :What is it ? 3 5 7 10 Repository
  48. 48. SCM :What it does ? •Keeping multiple file version •Collaboration
  49. 49. CHECK POINT
  50. 50. Application Evolution
  51. 51. Sharing
  52. 52. isn’t just for source code Cautions you need everything required to re-create your application’s binaries and the environments in which they run.
  53. 53. How it works
  54. 54. Trunk/Master
  55. 55. Check-in Push Local 3
  56. 56. Check-in Push Local 34
  57. 57. Local Check-out Pull 8 29
  58. 58. Local Check-out Pull 8 2 9
  59. 59. Local Conflict/Resolve Pull ! 3 5
  60. 60. Conflict/Resolve !
  61. 61. Branching & Merging
  62. 62. Tag
  63. 63. Best Practice • Little Commit • Frequent Commit • Consistent commit • User Meaningful Commit message
  64. 64. Different Products
  65. 65. DEMO
  66. 66. PAUSE
  67. 67. SECTION II Continuous Integration
  68. 68. After your commit nothing works anymore But ...“was working on my computer” Ops INTEGRATION PROBLEM (dopo un commit )
  69. 69. It was working on the stage environment !!! Ops(dopo un deploy in produzione) INTEGRATION PROBLEM
  70. 70. sleepless nights before demo ... bug just after release
  71. 71. Cost Analysis Design Implementation Testing Maintenance Changes
  72. 72. DEFECT BUG ≠ Glossary
  73. 73. http://agitar.com/solutions/why_unit_testing.html
  74. 74. t integrazione Regressione Working Broken
  75. 75. t integrazione Regressione Working Broken Effort
  76. 76. In software development the components integration need to be tested continuosly... in order to find inconsistencies as soon as possible Good Solution
  77. 77. Continuous Integration
  78. 78. Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily - leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Martin Fowler
  79. 79. Requirements Source Code Management
  80. 80. Requirements
  81. 81. Test Scopes
  82. 82. Agile-Testing-Quadrants
  83. 83. CI Flow
  84. 84. F CI Flow
  85. 85. F Checkout last Commit CI Flow Build andTests Process
  86. 86. F Checkout last Commit CI Flow Build andTests Process
  87. 87. F F F Checkout last Commit CI Flow Build andTests Process
  88. 88. F F F F F F Checkout last Commit CI Flow Build andTests Process
  89. 89. F F F F F FF F Checkout last Commit CI Flow Build andTests Process
  90. 90. F F F F F FF F Checkout last Commit CI Flow Build andTests Process
  91. 91. Github Jenkins Hooks
  92. 92. Build & Test ✓Process creating executable code ✓Unit test ✓Quality criteria ✓FunctionalTest ✓Non FunctionalTest Valid Syntax Compile Code behavior Code coverage, Mass detector Business Acceptance Criteria Application performance PASS
  93. 93. CI - Reduce Risk • Say goodbye to long and tense integrations • Increase visibility which enables greater communication • Catch issues fast and nip them in the bud • Spend less time debugging and more time adding features • Proceed in the confidence you’re building on a solid foundation • Stop waiting to find out if your code’s going to work • Reduce integration problems allowing you to deliver software more rapidly
  94. 94. CI - Output System Status Documentation/Artifacts Quality Check
  95. 95. “Continuous Integration doesn’t get rid of bugs, but it does make them dramatically easier to find and remove.” Martin Fowler
  96. 96. Immediate feedback on the health of the system
  97. 97. DEMO
  98. 98. Team Responsibilities • Check in frequently • Don’t check in broken code • Don’t check in untested code • Don’t check in when the build is broken • Repair the build as soon as possible
  99. 99. Ci - Best practice • CI server === Production Server • Integrate it from the first commit • Find best way to get notified
  100. 100. Ci - software ... more and more
  101. 101. PAUSA
  102. 102. PARTE III Automated Deploy
  103. 103. Deployment “is all the activities that make a software system available for use” Wikipedia
  104. 104. A Critical part of the application life-cycle Deployment
  105. 105. RELEASE Real ?
  106. 106. RELEASE Real ? RELEASERELEASERELEASERELEASERELEASERELEASERELEASERELEASERELEASERELEASERELEASE feedback
  107. 107. Deployment • Low Risk • Cheap • Frequent • Rapid • Predictable
  108. 108. Low Risk • Exception catched • Rollback • Data on secure
  109. 109. Cheap • no more than one click • no more than one person • no skilled person
  110. 110. Frequent • to get feedback
  111. 111. Rapid
  112. 112. Predictable
  113. 113. Incomplete ways
  114. 114. Ftp is a deploy procedure ?
  115. 115. Rsync Rsync is a deploy procedure ?
  116. 116. TeamViewer Teamviewer is a deploy procedure ?
  117. 117. SCM $ git pull origin master $ svn update Versioning checkout is a deploy procedure ?
  118. 118. • Incomplete • Manual procedure • Slow • Server Downtime • No data migration • No Rollback Problems
  119. 119. Automated Deployment Goals
  120. 120. one click deploy Deploy Automated Deployment Goals
  121. 121. AnyTime AnyWhere AnyOne Automated Deployment Goals
  122. 122. Rollback Automated Deployment Goals
  123. 123. no downtime Automated Deployment Goals
  124. 124. Scalable Frontend 1 Frontend 1I Frontend III Balancer Automated Deployment Goals
  125. 125. Deployment Elements • Executable Code • Dependency Management • Software configuration • Environment Management • Data Migrations • Manage Cache • Manage Assets
  126. 126. Executable code (SCM)
  127. 127. Dependency Management
  128. 128. How you keep updated your libraries dependencies ? to get the feature 103 done, i use library XXX ok, i’ll note it here ... to get the feature 103 done, i use library XXX OK ..
  129. 129. PIP
  130. 130. Data Migration
  131. 131. What if, after your first production deployment, you have to change the Entity Relationship ?
  132. 132. Software Configuration
  133. 133. How you keep updated your OS componets/ libraries ? to get the feature 103 done, i use library XXX, that require the module 288 ok, i’ll note it here ... to get the feature 103 done, i use library XXX, that require the module 903 OK ..
  134. 134. A new way to setup your environment
  135. 135. Write Configuration Script
  136. 136. Write Configuration Script Versionable
  137. 137. Environment Management
  138. 138. Production TestingStaging
  139. 139. Manual - Follow recipe • Integrity problems • Problem with exception handling • Basic Skills requirements • Time consuming - expensive • Error - prone • Stress
  140. 140. Build a custom Script • Do a backup • Create new directory • Update the code • Update dependencies • Run migration data • Update Environements • Warm up cache • ...
  141. 141. Existing Tools Fabric ... and more others
  142. 142. • Built in Ruby • Easy setup • Event Task based, easy to hook into • Multiple server • Multistage extension • Multiple recipe for different environments
  143. 143. Web deploy Strategy Document Root
  144. 144. Web deploy Strategy Document Root
  145. 145. Web deploy Strategy Document Root
  146. 146. Web deploy Strategy Document Root
  147. 147. DEMO
  148. 148. Keep Everything in version control Automate Almost Everything
  149. 149. Thanks

×