System Crash, failure data migration, partial update: issues that no one would ever want to meet during the deploy and ... hoping for the best is not enough.
The deployment activity is important as those that precede it. The Continuous Delivery will give you low risk, cheap, fast, predictable delivery and ... soundly.
Strategies for Landing an Oracle DBA Job as a Fresher
The Continuous Delivery Value - Codemotion Milano 2014
1. MILAN november 28th/29th 2014
The Continuous Delivery Value
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.
!
@ingdavidino - Dnsee
15. MILAN november 28th/29th 2014 – David Funaro
Security
• 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) ?
16. MILAN november 28th/29th 2014 – David Funaro
Skills
• Have, the selected person, all the skill
needed to terminate the procedure ?
• What about his behavior in some
exception flow case
17. MILAN november 28th/29th 2014 – David Funaro
Cost
• How many people you need ?
• For how many time ?
• Other Resources ?
18. MILAN november 28th/29th 2014 – David Funaro
Predictable
• are you able to indicate how much time will
care ?
19. MILAN november 28th/29th 2014 – David Funaro
Stress
• What about the stress
• stress => error-prone
20. MILAN november 28th/29th 2014 – David Funaro
Repeatability
• Just finish a deploy. Software released. A bug
is found. You have to re-start the deploy
procedure
22. MILAN november 28th/29th 2014 – David Funaro
Reaction Metrics
RELEASE
Production
Time
Security
Skills
Cost
Predictable
Stress
Repeatability
23. MILAN november 28th/29th 2014 – David Funaro
Reaction Metrics
RELEASE
Staging
Production
Time
Security
Skills
Cost
Predictable
Stress
Repeatability
24. MILAN november 28th/29th 2014 – David Funaro
Reaction Metrics
RELEASE
Staging
Production
Testing
Time
Security
Skills
Cost
Predictable
Stress
Repeatability
26. MILAN november 28th/29th 2014 – David Funaro
Lots of things to
consider
• Code evolution
• Code dependency management
• System evolution management
• Data management and architecture
• Component management
27. MILAN november 28th/29th 2014 – David Funaro
Software Release
• Low Risk
• Cheap
• Frequent
• Rapid
• Predictable
... should be
Continuous Delivery
28. MILAN november 28th/29th 2014 – David Funaro
CD Requirements
• Source Code Management
• Continuous Integration Server
• Automated Deploy
• Real Time Alerting
• Root Cause Analysis
29. MILAN november 28th/29th 2014 – David Funaro
CD FLOW
Commit /
push
Automated
Deploy
Procedure
Basic Scenario Notify Team
Real Time
Alerting
Automated
Testing
RELEASE
30. MILAN november 28th/29th 2014 – David Funaro
CD FLOW
Commit /
push
Automated
Deploy
Procedure
Basic Scenario Notify Team
Real Time
Alerting
Automated
Testing
RELEASE
32. MILAN november 28th/29th 2014 – David Funaro
Deploy Pipeline
Commit Stage
Compile
UnitTest
Analysis
Release
Automated
acceptance
testign
Automated
capacity
testing
example
Manual Testing
Showcases
Explorarory
testing
33. MILAN november 28th/29th 2014 – David Funaro
Tools
Continuous
Delivery
Practices Methodologies
Cautions
34. MILAN november 28th/29th 2014 – David Funaro
CD Anti-patterns
• Deploy software manually
• Manual Configuration
• First Deploy when development is
complete
• … to a production-like Environment
35. MILAN november 28th/29th 2014 – David Funaro
CD Benefits
• Empower Team
• Reducing Errors
• Lowering Stress
• Deployment Flexibility
• Practice Make Perfect
36. MILAN november 28th/29th 2014 – David Funaro
Principles
Keep Everything in version control
Automate Almost Everything
If it hurts, do it more frequently
Done means released
Build quality in
46. MILAN november 28th/29th 2014 – David Funaro
SCM : What it does ?
• Keeping multiple file version
• Collaboration
47. MILAN november 28th/29th 2014
CHECK POINT
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.
!
@ingdavidino - Dnsee
50. MILAN november 28th/29th 2014 – David Funaro
Cautions
isn’t just for source code
you need everything required to re-create your
application’s binaries and the environments in
which they run.
51. MILAN november 28th/29th 2014 – David Funaro
Best Practice
• Little Commit
• Frequent Commit
• Consistent commit
• Use Meaningful Commit message
54. MILAN november 28th/29th 2014 – David Funaro
Ops
(after one commit )
After your commit
nothing works anymore
But ... “was working on
my computer”
INTEGRATION PROBLEM
55. MILAN november 28th/29th 2014 – David Funaro
Ops (after deploy in prod)
It was working on the
stage environment !!!
INTEGRATION PROBLEM
56. MILAN november 28th/29th 2014 – David Funaro
• sleepless nights before demo ... bug just after
release
•
sleepless nights before demo ... bug just after release
57. MILAN november 28th/29th 2014 – David Funaro
Resolve defects
Cost
Analysis Design Implementation Testing Release
60. MILAN november 28th/29th 2014 – David Funaro
Good Solution
In software development the components
integration need to be tested continuosly...
!
in order to find inconsistencies
as soon as possible
62. MILAN november 28th/29th 2014 – David Funaro
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
68. MILAN november 28th/29th 2014 – David Funaro
F
Checkout last Commit
CI Flow
Build and Tests Process
69. MILAN november 28th/29th 2014 – David Funaro
F
Checkout last Commit
CI Flow
Build and Tests Process
70. MILAN november 28th/29th 2014 – David Funaro
F
F
F
Checkout last Commit
CI Flow
Build and Tests Process
71. MILAN november 28th/29th 2014 – David Funaro
F
F
F
F
F
F
Checkout last Commit
CI Flow
Build and Tests Process
72. MILAN november 28th/29th 2014 – David Funaro
F
F
F
F
F
F
F F
Checkout last Commit
CI Flow
Build and Tests Process
73. MILAN november 28th/29th 2014 – David Funaro
F
F
F
F
F
F
F F
Checkout last Commit
CI Flow
Build and Tests Process
74. MILAN november 28th/29th 2014 – David Funaro
Build & Test
✓ Process creating executable code
✓ Unit test
✓ Quality criteria
✓ Functional Test
✓ Non Functional Test
Valid Syntax Compile
Code behavior
Code coverage, Mass detector
Business Acceptance Criteria
Application performance
PASS
75. MILAN november 28th/29th 2014 – David Funaro
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
76. MILAN november 28th/29th 2014 – David Funaro
CI - Output
System Status Documentation/
Artifacts
Quality Check
77. MILAN november 28th/29th 2014 – David Funaro
“Continuous Integration doesn’t get rid of
bugs, but it does make them dramatically
easier to find and remove.”
Martin Fowler
78. MILAN november 28th/29th 2014 – David Funaro
Ci - Best practice
• CI server === Production Server
• Integrate it from the first commit
• Find best way to get notified
87. MILAN november 28th/29th 2014 – David Funaro
RELEASE
Real ?
RRRRREEEELELLLELEEEAEAAAASSSSESEEEE RRRRREEEELELLLELEEEAEAAAASSSSESEEEE RELEASE
feedback
88. MILAN november 28th/29th 2014 – David Funaro
Deployment
• Low Risk
• Cheap
• Frequent
• Rapid
• Predictable
89. MILAN november 28th/29th 2014 – David Funaro
Low Risk
• Exception catched
• Rollback
• Data on secure
90. MILAN november 28th/29th 2014 – David Funaro
Cheap
• no more than one click
• no more than one person
• no skilled person
106. MILAN november 28th/29th 2014 – David Funaro
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
113. MILAN november 28th/29th 2014 – David Funaro
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
OK the module 903
119. MILAN november 28th/29th 2014 – David Funaro
Manual - Follow recipe
• Integrity problems
• Problem with exception handling
• Basic Skills requirements
• Time consuming - expensive
• Error - prone
• Stress
120. MILAN november 28th/29th 2014 – David Funaro
Build a custom Script
• Do a backup
• Create new directory
• Update the code
• Update dependencies
• Run migration data
• Update Environements
131. MILAN november 28th/29th 2014 – David Funaro
Keep Everything in version control
Automate Almost Everything
If it hurts, do it more frequently
Done means released
Build quality in