Upload
david-funaro
View
253
Download
4
Tags:
Embed Size (px)
DESCRIPTION
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.
Citation preview
The Continuous Delivery Value
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.
The Continuous Delivery
Value
12 - 04 - 2014
David Funaro
@ingdavidino
davidfunaro.com
First Release
Release Day
WRONG WAY
This talk is for you…
Overview
Facts
keep system up and running
release new features as soon as possible
IT Business
… with CD
ITBu
sine
ss
RELEASE
FEEDBACK
new features monetize bug
performance layout
RELEASE
? Miss Release Price ?
€
Reaction MetricsC
hang
e
REL
EASE
Time
Security
Skills
Cost
Predictable
Stress
Repeatability
• How many time you need to release software
Time
• 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
• Have, the selected person, all the skill needed to terminate the procedure ?
• What about his behavior in some exception flow case
Skills
• How many people you need ?
• For how many time ?
• Other Resources ?
Cost
• are you able to indicate how much time will care ?
Predictable
• What about the stress
• stress => error-prone
Stress
• Just finish a deploy. Software released. A bug is found. You have to re-start the deploy procedure
Repeatability
Reaction Metrics
REL
EASE
Production
Testing
Staging
Time
Security
Skills
Cost
Predictable
Stress
Repeatability
No Automation Process ?
Lots of things to consider
• Code evolution
• Code dependency management
• System evolution management
• Data management and architecture
• Component management
Software Release
• Low Risk
• Cheap
• Frequent
• Rapid
• Predictable
... should be
Continuous Delivery
CD requirements
• Source Code Management
• Continuous Integration Server
• Automated Deploy
• Real Time Alerting
• Root Cause Analysis
CD FLOW
Commit /pushAutomated
Testing
FAIL
SUCCESS Automated Deploy
Procedure
notify
Basic Scenario
Deploy Pipeline
Commit StageCompile UnitTest Analysis
Build Installers
ReleaseAutomated acceptance
testign
Automated capacity testing
Manual TestingShowcasesExplorarory
testing
example
ContinuousDelivery
Tools
MethodologiesPractices
Cautions
Anti-patterns
• Deploy software manually
• Manual Configuration
• Deploy to a production-like Env Only after development is complete
Benefits
• Empower Team
• Reducing Errors
• Lowering Stress
• Deployment Flexibility
• Practice Make Perfect
Keep Everything in version control
Automate Almost Everything
Principles
If it hurts, do i more frequently
Done means released
Build quality in
SECTION ISource Code Management
i sent you a mail with the last change
... are you shure ?
i can’t find the new file ?!?
The problem
SCM : What is it ?
3
57
10
Repository
Local
Check-out
Pull
8
29
Check-in
Push
Local
3 4
SCM : What it does ?
• Keeping multiple file version
• Collaboration
CHECK POINT
Application Evolution
Collaboration
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.
Best Practice
• Little Commit
• Frequent Commit
• Consistent commit
• User Meaningful Commit message
Different Products
SECTION IIContinuous Integration
After your commit nothing works anymore
Ops
INTEGRATION PROBLEM
(after one commit )
After your commit nothing works anymore
But ... “was working on my computer”
Ops (after deploy in prod)
INTEGRATION PROBLEM
It was working on the stage environment !!!
sleepless nights before demo ... bug just after release
Cos
t
Analysis Design Implementation Testing Release
Resolve defects
t
integration
Regression
Working
Broken
Effort
In software development the components integration need to be tested continuosly...
!
in order to find inconsistenciesas soon as possible
Good Solution
Continuous Integration
Cont inuous In tegrat ion i s a so f tware 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
Requirements
Source Code Management
Requirements
Agile-Testing-Quadrants
F
F
F
F
F
FF
F
Checkout last Commit
CI Flow
Build and Tests Process
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
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
CI - Output
System Status Documentation/Artifacts Quality Check
“Continuous Integration doesn’t get rid of bugs, but it does make them dramatically easier to find and
remove.”
Martin Fowler
Ci - Best practice
• CI server === Production Server
• Integrate it from the first commit
• Find best way to get notified
Immediate feedback on the health of the system
Ci - software
... more and more
SECTION IIIAutomated Deploy
Deployment
“is all the activities that make a software system available for use”
Wikipedia
A Critical part of the application life-cycle
Deployment
RELEASE
Real ?
RELEASERELEASERELEASERELEASERELEASERELEASERELEASERELEASERELEASERELEASERELEASEfeedback
Deployment
• Low Risk
• Cheap
• Frequent
• Rapid
• Predictable
Low Risk
• Exception catched
• Rollback
• Data on secure
Cheap
• no more than one click
• no more than one person
• no skilled person
Frequent
• to get feedback
Rapid
Predictable
Incomplete ways
is that a deploy procedure ?
$ git pull origin master
$ svn update
Remote Desktop Versioning update
• Incomplete
• Manual procedure
• Slow
• Server Downtime
• No data migration
• No Rollback
Problems
Automated Deployment Goals
one click deploy
Deploy
Automated Deployment Goals
AnyTime AnyWhere AnyOne
Automated Deployment Goals
Rollback
Automated Deployment Goals
no downtime
Automated Deployment Goals
Scalable
Frontend 1 Frontend 1I Frontend III
Balancer
Automated Deployment Goals
Deployment Elements
• Executable Code
• Dependency Management
• Software configuration
• Infrastructure Management
• Data Migrations
• Manage Cache
• Manage Assets
Executable code (SCM)
Dependency Management
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
PIP
Data Migration
What if, after your first production deployment, you have to change the Entity Relationship ?
Infrastructure Management
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 903OK
A way to setup your environment
Write Configuration
Script
Versionable
Environment Management
Production TestingStaging
Manual - Follow recipe
• Integrity problems
• Problem with exception handling
• Basic Skills requirements
• Time consuming - expensive
• Error - prone
• Stress
Build a custom Script• Do a backup
• Create new directory
• Update the code
• Update dependencies
• Run migration data
• Update Environements
• Warm up cache
• ...
Existing Tools
Fabric
... and more others
Build quality in
Done means released
If it hurts, do i more frequently
Automate Almost Everything
Keep Everything in version control
David Funaro
@ingdavidinodavidfunaro.com
Thanks