Continuous DeliveryMike McGarrmike.mcgarr@excella.comhttp://earlyandoften.wordpress.com @jmichaelmcgarr
About MeJ. Michael (Mike) McGarr
Excella Consulting, Arlington VA
Lead of Excella’s Java Center of Excellence
Java Developer for over 11 years
Interests:
Developer Productivity
XP & Agile
Automation
Testing
Polyglot Programming2
AgendaStoryWhat is Continuous Delivery?Core PracticesTools3
Typical Project4Analyst & CustomerRequirementsArchitectDesignDeveloperDevelopmentTesterQAOperationsRelease
5Waterfallhttp://flic.kr/p/6fREaa
6Problems with WaterfallLong QA feedback loopLack of collaborationInability to change direction
WaterFall Project7Analyst & CustomerRequirementsArchitectDesignDeveloperDevelopmentTesterQAOperationsMonths!Release
8Agilehttp://flic.kr/p/PQFQg
Agile Project9Customer & TeamCustomer & TeamCustomer & TeamRequirementsRequirementsRequirementsTestTestTestDevelopmentDevelopmentDevelopmentOperationsReleaseDays!TheLast Mile?Months!
10The Last MileManual DeploymentsInsufficient Configuration ManagementInfrequent, Error Prone Deployments
11Stressful Releases
AgendaStoryWhat is Continuous Delivery?Core PracticesTools12
13What isContinuous Delivery?
14
15
…a set of practices and principles aimed at, building, testing, and releasing software faster and more frequently.16Continuous Delivery is…
“Our highest priority is to satisfy the customer through early and continuous delivery of valuable software.”- First of the Twelve Principles behind the Agile Manifesto17
GoalsCycle TimeQuality18
“How long would it take your organization to deploy a change [to production] that involves just one single line of code?  Do you do this on a repeatable, reliable basis?”Mary and Tom Poppendieck,Implementing Lean Software Development19Cycle Time
http://flic.kr/p/y8KV820Done means Released
21Frequent Automated Deploymentshttp://flic.kr/p/29Ree
22Continuous what?ContinuousDeliveryContinuousDeploymentContinuousIntegration
AgendaStoryWhat is Continuous Delivery?Core PracticesTools23
24Core Practices
25Continuous DeploymentBuild PipelinesDeployment AutomationConfigurationManagementContinuous IntegrationTestingAgile
26Configuration ManagementVersion Everything!Single Identifier	DependenciesApp ConfigurationsDataEnvironments
27Continuous Integrationhttp://flic.kr/p/5GpzSM
28Continuous IntegrationCheck-in DailyCommit to Trunk Automate the BuildKeep the Build FastEvery Commit results in BuildTest in Clone of ProductionAutomate Deployment
29Recommended PracticesExtreme Programming (XP)Fail a Build for Design BreachesFail a Build for Slow TestsFail a Build for Warnings & Code Style Breaches
30Testing
31Kinds of TestsUnit TestsIntegration TestsFunctional/Acceptance TestsPerformance & Load TestsPenetration TestsExploratory Tests
32Testing StrategyIdentify and Prioritize Project RiskDecide what Actions to TakeTests = Executable SpecificationsConfidence
33
34Testing RecommendationsAutomate your TestsUse Fakes/MocksAutomated Acceptance Testing
35Automated Acceptance TestsFast FeedbackReduce Tester workloadTesters can do Exploratory TestingRegression TestsRequirements can be generated from Tests
Acceptance Test ApproachesAcceptance Test Driven Development (ATDD)Behavior Driven Development (BDD)Given [some precondition]When [some event]Then [some result]36
http://flic.kr/p/6VmGxK37Deployment Automation
38Deployment AutomationArtifactRepositoryApplicationConfigurationsMiddlewareVersionControlOperating SystemDatabase
39Use Appropriate Technologyhttp://flic.kr/p/6pmtQL
Scripting ApproachesScript logs into each box and runs deployment script commandsScript runs locally, each remote machine has agent execute scriptPackage app using platform’s packaging technology, and use infrastructure management tools push new versions40
Database DeploymentsVersion your DatabaseEvolve Your Database Incrementally41
Environment ManagementVersion your Application ConfigurationVersion your Operating System42
43Deploying to the Cloudhttp://flic.kr/p/4R35Dd
44Build Pipelineshttp://www.fotopedia.com/users/chmehl
Build PipelinesA Build Pipeline is an automated manifestation of your process for getting software from version control into the hands of your users.45
SynonymsBuild PipelineDeployment PipelineContinuous Integration PipelineDeployment Production LineLiving Build46
BuildPipelinesA Chain of Jobs Early Jobs run FastEvery Check-in creates a new PipelineWhen a Job Fails, the Pipeline failsKeep Code Production Ready47
48Stages of a Pipeline
49Pipeline PracticesBuild Once, Deploy ManyDeploy the Same Way to All EnvironmentsSmoke Test you DeploymentsDeploy into a Copy of ProductionEach Change should Propagate InstantlyIf any part fails, Stop the line
50Pull System
51Continuous Deployment
AgendaStoryWhat is Continuous Delivery?Core PracticesTools52
53Toolshttp://flic.kr/p/5cK2
Version Control54

Continuous Delivery

Editor's Notes

  • #5 Requirements/Design/Development Feedback Loop is months.So much can change in that timeFeedback Loop for Release is just as long.
  • #6 Continuous delivery is a……set of practices and principles aimed at building, testing and releasing software faster and more frequently.
  • #7 Collaboration (DEV + Customer, DEV + Operations)Talking early and often…break down walls. [DevOps]Automation. Automate Everything! Build, Test, Deploy!Frequency. Frequent means small. Easier to troubleshoot, rollback. Reduces Risk.Feedback. Change triggers feedback. Feedback is fast. Team acts on it.
  • #10 Agile fixes the feedback loop problem for Requirements/Design/Development.Release Feedback is still months.
  • #11 Collaboration (DEV + Customer, DEV + Operations)Talking early and often…break down walls. [DevOps]Automation. Automate Everything! Build, Test, Deploy!Frequency. Frequent means small. Easier to troubleshoot, rollback. Reduces Risk.Feedback. Change triggers feedback. Feedback is fast. Team acts on it.
  • #20 The Last Mile tends to be an obstacle to achieving thisTransition – why are automated deployment so important? Because a feature doesn’t add value until it is in production.
  • #31 Does anybody know what this is a picture of?