continuous delivery in a complex s.o.a
DESCRIPTION
Slides from STV Tech Talks (Glasgow, UK) - 27 August 2013 -- Based on the experience of leading the current initiative to move towards Continuous Delivery at Skyscanner, I presented a view on 5 key focus areas that must be considered to make Continuous Delivery an achievable objective within a very complex Service Oriented Architecture.TRANSCRIPT
Continuous Delivery in a Complex S.O.A.
Richard LennoxSenior Architect, Skyscannerwww.skyscanner.net
@richardlennoxwww.linkedin.com/in/rlennox
Skyscanner
Why Continuous Delivery?
Continuous Delivery“How long would it take your organisation to deploy a change that involved just a single line of code?” Do you do this on a repeatable, reliable basis?”
…is a set of practices and principles aimed at building, testing and releasing software reliably and repeatably at a necessary frequency.
Keeping systems production-ready throughout development, so that they can be released to users at any time
Goals of CD
Quality Cycle Time
Efficiency
Core Practices Continuous Integration Automated Testing [Automated] Configuration Management Deployment Pipelines
Continuous Integration
Continuous Integration Everyone Commits to the Mainline Every
Day Automate the Build Make Build Self Testing Every Commit triggers build on Integration
server Fail Fast, Feedback Faster
http://martinfowler.com/articles/continuousIntegration.html
Automated Testing
Build Quality In
“Cease dependence on mass inspection to achieve quality. Improve the process and build quality into the product in the first place”
W. Edwards Deming
Automated TestingCost of
Execution Time
Number of Tests
Unit Tests
Integration Tests
UI Tests
100% Automated
100% Manual
Acceptance Tests
Configuration Management
Configuration Management Stuff we make is valuable Not just the source code :
Application configurationOS setupMachine ConfigurationTestsDocumentation
Where possible should live with the code
Deployment Pipeline
Deployment Pipeline
8 Principles / Patterns Reliable & Repeatable delivery process Automate (almost) everything Take the pain early and more often Source control is king Done or Done, Done = Released, Build quality in Everybody is responsible Continuous improvement
Service Oriented Architecture
Definition:- software architecture design pattern- structured collections of discrete software
modules (the services)- collectively provide the complete functionality
of a large software application
Vision of Necessary State
Individual ServicesWorking of own heartbeat
Considerations for CD in SOA
Focus on 5 key areas- Partitioning the SOA into governed
Deployable Units- Consistent Deployment Pipelines- Just Enough Test Automation Coverage- Real Time Metrics- Aligning the Delivery Conditions
Deployable Units 1+ Services to be deployed Single, built once Package Comprising:
Releasable Software Tests Application Configuration“Install” / Rollback ScriptsAssets
One mainline (Trunk) per Deployable Unit Decoupled Deployments and Rollbacks Fits naturally with S.O.A.
But not necessarily 1:1 ratio
Not a 1:1 ratio?
Service Governance
a.k.a. Making sure people do the right things – Anne Thomas Manes, OOP2007
SLAs Versioning Fault Tolerance and Resilient Engineering
Service Compatibility Governance
Client(v1)
Client(v2)
Service(v1)
Service(v2)
Deployment
Deployment
Rollback
Rollback
Databases Services may have own DB
Versioned with
Some DBs act as integration pointsLegacy
Must be treated as any other ServiceSame levels of governance,Same SLAsSame Tolerance to failures
Consistent Deployment Pipelines
Early Integration not Late Integration Consistency, Consistency and Consistency
Build ScriptsTools of choice,Test Frameworks and UsageEverything where possible
Canary Release Patterns Aligning to a single flow for all components
Just Enough Test AutomationCost of
Execution Time
Number of Tests
Unit Tests
Integration Tests
Acceptance Tests
UI Tests
100% Automated
100% Manual
Dependency Test Triggers
C D E
B
A
Y
XX
ZI
Real Time Metrics Safety Net for canary release Coupled with Operational Metrics Individual Service defined
Asynchronous Data Loaders – throughputFailing Fast and Hard
Cascading Healthchecks1
F G D
E
A
H
C
I
B
2 3
Aligning Delivery Conditions
Culture Agile Practices First Breaking down Silos Getting over the fear of collaboration Trunk Based Development over Feature
Branching Discipline in Continuous Integration Dealing with breaks
Summary Architecture has a huge impact on the
ability to Continuously Deliver Comes with its own set of challenges and It is the right thing for modern web-based
businesses.
Thanks!
Richard LennoxSenior Architect, Skyscannerwww.skyscanner.net
@richardlennoxwww.linkedin.com/in/rlennox
Questions?