Post on 28-May-2015
description
Continuous Deployment
Martin Shwalbe
How Long does it take to Deploy?
More than a Year?
Six months to a Year? One to six months?
One day to two Weeks?
Two Weeks to a Month?One day to two Weeks?
One hour to one day?
Less than 10 Minutes?
How Long does it take to Deploy?
Continuous Deployment is a repeatable methodology to deploying code
Continuous Deployment is Automation
Deployment Reduces Code Inventory
Deployment improves Confidence
Continuous Deployment is Safety
Fast Turnaround leads to Happy Customers
… and happy developers
Traditional Release Cycle
Development Release Cut Stage QA Fix Bugs Integrate Patches
Release!
Timeline1-4 Weeks
Continuous Deployment Release Cycle
Development Release Cut Stage
Automated QATesting and
StagingFix Bugs Integrate
Patches
DeployRelease!
Timeline5-10 Minutes
x x x x
Tools
Jenkins
Statistic Analysers
Continuous Deployment
Continuous Integration Cycle
Developer
Version Control System
CI ServerBuild Servers
Feedback
Continuous Deployment Cycle
Deploy To Production
FeedBackContinuousIntegration
Deploy Test
Database Evolution in Continuous Deployment
Updating Database is scary!
Database Evolution
Database Evolution Categorize
Database Evolution: Addition
Addtions do not cause any problems.
Destructive Database Evolution
Destructive changes need a bit more care, the degree of which depends on the
degree of destruction involved
Destructive Database Evolution
Working Environment
Destructive Database Evolution
Updating The Database
Destructive Database Evolution
Unhappy Customer!
Database Evolution
Which comes first?Code or the Database?
Destructive Database Evolution
Apply Changes without breaking backwards compatibility
Destructive Database Evolution
The application can still read and write to the old columns
Destructive Database Evolution
Update the application.
//Keep this RequestSelect Address Data from Table User
//Additional RequestSelect Address Data from Table Address
Destructive Database Evolution
The application would read and write to both tables.
Destructive Database Evolution
Cleanup the Application.
Select Address Data from Table Address
SQL Script to copy old data from User table to Address table
Destructive Database Evolution
Delete the obsolete Columns
Thank you!