The Continuous delivery value - Funaro

241 views
177 views

Published on

Slides from David Funaro talk @ codemotion roma 2014

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

No Downloads
Views
Total views
241
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
9
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

The Continuous delivery value - Funaro

  1. 1. The Continuous DeliveryValue 12 - 04 - 2014 ROME 11-12 April 2014 David Funaro Crash dei sistemi, Migrazioni fallite, aggiornamenti interrotti: sono tutte problematiche che nessuno vorrebbe mai incontrare durante l'introduzione di nuove funzionalità nel proprio applicativo (deploy) e ... la speranza non basta. L'attività di deploy è importante tanto quanto quelle che la precedono. La Continuous Delivery è un insieme di strumenti e metodologie che permetteranno di rendere i rilasci a basso rischio, economici, veloci, predicibili e ... sonni tranquilli. d.funaro@dnsee.com
  2. 2. The Continuous Delivery Value 12 - 04 - 2014
  3. 3. David Funaro @ingdavidino davidfunaro.com
  4. 4. First Release
  5. 5. Release Day
  6. 6. WRONG WAY This talk is for you…
  7. 7. Overview
  8. 8. Facts keep system up and running release new features as soon as possible IT Business
  9. 9. … with CD IT Business
  10. 10. RELEASE FEEDBACK new features monetize bug performance layout
  11. 11. RELEASE ? Miss Release Price ? €
  12. 12. Reaction MetricsChange RELEASE Time Security Skills Cost Predictable Stress Repeatability
  13. 13. • How many time you need to release software Time
  14. 14. • 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
  15. 15. • Have, the selected person, all the skill needed to terminate the procedure ? • What about his behavior in some exception flow case Skills
  16. 16. • How many people you need ? • For how many time ? • Other Resources ? Cost
  17. 17. • are you able to indicate how much time will care ? Predictable
  18. 18. • What about the stress • stress => error-prone Stress
  19. 19. • Just finish a deploy. Software released.A bug is found.You have to re-start the deploy procedure Repeatability
  20. 20. Reaction Metrics RELEASE Production Testing Staging Time Security Skills Cost Predictable Stress Repeatability
  21. 21. No Automation Process ?
  22. 22. Lots of things to consider • Code evolution • Code dependency management • System evolution management • Data management and architecture • Component management
  23. 23. Software Release • Low Risk • Cheap • Frequent • Rapid • Predictable ... should be Continuous Delivery
  24. 24. CD requirements • Source Code Management • Continuous Integration Server • Automated Deploy • Real Time Alerting • Root Cause Analysis
  25. 25. CD FLOW Commit /push Automated Testing FAIL SUCCESS Automated Deploy Procedure notify Basic Scenario
  26. 26. Deploy Pipeline Commit Stage
 Compile
 UnitTest
 Analysis
 Build Installers Release Automated acceptance 
 testign Automated capacity 
 testing Manual Testing
 Showcases
 Explorarory
 testing example
  27. 27. Continuous
 Delivery Tools MethodologiesPractices Cautions
  28. 28. Anti-patterns • Deploy software manually • Manual Configuration • Deploy to a production-like Env Only after development is complete
  29. 29. Benefits • Empower Team • Reducing Errors • Lowering Stress • Deployment Flexibility • Practice Make Perfect
  30. 30. Keep Everything in version control Automate Almost Everything Principles If it hurts, do i more frequently Done means released Build quality in
  31. 31. SECTION I Source Code Management
  32. 32. i sent you a mail with the last change ... are you shure ? i can’t find the new file ?!? The problem
  33. 33. SCM :What is it ? 3 5 7 10 Repository
  34. 34. Local Check-out Pull 8 29
  35. 35. Check-in Push Local 3 4
  36. 36. SCM :What it does ? • Keeping multiple file version • Collaboration
  37. 37. CHECK POINT
  38. 38. Application Evolution
  39. 39. Collaboration
  40. 40. 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.
  41. 41. Best Practice • Little Commit • Frequent Commit • Consistent commit • User Meaningful Commit message
  42. 42. Different Products
  43. 43. SECTION II Continuous Integration
  44. 44. After your commit nothing works anymore Ops INTEGRATION PROBLEM (after one commit ) After your commit nothing works anymore But ...“was working on my computer”
  45. 45. Ops(after deploy in prod) INTEGRATION PROBLEM It was working on the stage environment !!!
  46. 46. sleepless nights before demo ... bug just after release
  47. 47. Cost Analysis Design Implementation Testing Release Resolve defects
  48. 48. t integration Regression Working Broken Effort
  49. 49. In software development the components integration need to be tested continuosly... ! 
 in order to find inconsistencies
 as soon as possible Good Solution
  50. 50. Continuous Integration
  51. 51. 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
  52. 52. Requirements Source Code Management
  53. 53. Requirements
  54. 54. Agile-Testing-Quadrants
  55. 55. F F F F F FF F Checkout last Commit CI Flow Build andTests Process
  56. 56. 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
  57. 57. 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
  58. 58. CI - Output System Status Documentation/Artifacts Quality Check
  59. 59. “Continuous Integration doesn’t get rid of bugs, but it does make them dramatically easier to find and remove.” Martin Fowler
  60. 60. Ci - Best practice • CI server === Production Server • Integrate it from the first commit • Find best way to get notified
  61. 61. Immediate feedback on the health of the system
  62. 62. Ci - software ... more and more
  63. 63. SECTION III Automated Deploy
  64. 64. Deployment “is all the activities that make a software system available for use” Wikipedia
  65. 65. A Critical part of the application life-cycle Deployment
  66. 66. RELEASE Real ? RELEASERELEASERELEASERELEASERELEASERELEASERELEASERELEASERELEASERELEASERELEASE feedback
  67. 67. Deployment • Low Risk • Cheap • Frequent • Rapid • Predictable
  68. 68. Low Risk • Exception catched • Rollback • Data on secure
  69. 69. Cheap • no more than one click • no more than one person • no skilled person
  70. 70. Frequent • to get feedback
  71. 71. Rapid
  72. 72. Predictable
  73. 73. Incomplete ways
  74. 74. is that a deploy procedure ? $ git pull origin master $ svn update Remote Desktop Versioning update
  75. 75. • Incomplete • Manual procedure • Slow • Server Downtime • No data migration • No Rollback Problems
  76. 76. Automated Deployment Goals
  77. 77. one click deploy Deploy Automated Deployment Goals
  78. 78. AnyTime AnyWhere AnyOne Automated Deployment Goals
  79. 79. Rollback Automated Deployment Goals
  80. 80. no downtime Automated Deployment Goals
  81. 81. Scalable Frontend 1 Frontend 1I Frontend III Balancer Automated Deployment Goals
  82. 82. Deployment Elements • Executable Code • Dependency Management • Software configuration • Infrastructure Management • Data Migrations • Manage Cache • Manage Assets
  83. 83. Executable code (SCM)
  84. 84. Dependency Management
  85. 85. 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
  86. 86. PIP
  87. 87. Data Migration
  88. 88. What if, after your first production deployment, you have to change the Entity Relationship ?
  89. 89. Infrastructure Management
  90. 90. 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
  91. 91. A way to setup your environment
  92. 92. Write 
 Configuration Script Versionable
  93. 93. Environment Management
  94. 94. Production TestingStaging
  95. 95. Manual - Follow recipe • Integrity problems • Problem with exception handling • Basic Skills requirements • Time consuming - expensive • Error - prone • Stress
  96. 96. Build a custom Script • Do a backup • Create new directory • Update the code • Update dependencies • Run migration data • Update Environements • Warm up cache • ...
  97. 97. Existing Tools Fabric ... and more others
  98. 98. Build quality in Done means released If it hurts, do i more frequently Automate Almost Everything Keep Everything in version control
  99. 99. David Funaro @ingdavidino davidfunaro.com Thanks

×