Automation & the Deployment Pipeline Adam Goucher @adamgoucher [email protected]This workshop is about the various forms of automation that happens in the Deployment Pipeline. On this slide we talk about: - The Going Camping Heuristic photo credit: http://www.flickr.com/photos/nataliejohnson/2763306217/
This is the deck for a [number of] talks I do on Continuous Delivery and where automation fits into each step of getting code out of a product owner's imagination and into the hands of eager users.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Automation & the Deployment Pipeline
Adam Goucher@adamgoucher
[email protected] workshop is about the various forms of automation that happens in the Deployment Pipeline.
On this slide we talk about:- The Going Camping Heuristic
The Lightsaber HeuristicThere are commercial tools available to do all this stuff. Instead, we’ll use all open-source tools to build a custom solution.
On this slide we talk about:- The Lightsaber Heuristic
Lots of parts, working togetherTo have a fully automated deployment pipeline, there are /lots/ of moving parts. The big ones are- acceptance criteria- configuration management- continuous integration- data migration- deployment- functional test automation- immunization systems.
The best way to illustrate all these things is to do them live. As a result, we will create a Ruby-on-Rails application and have push it through each part of the Deployment Pipeline. Both the application and all the pipeline support code will be made available shortly after the workshop.
SpecificationsIt can be argued when the Pipeline really starts. So lets start from the beginning; with acceptance criteria.
On this slide we talk about:- Specification Workshops- Given / When / Then
I’m not a fan of any of the current BDD/ATDD tools from an automation perspective, but going through the exercise of producing the specifications absolutely has merit.
DeploymentCompared to everything else before now, pushing the code out onto the server(s) is a snap.
On this slide we talk about:- Zero-downtime deploys- Rollbacks
Most ‘platforms’ have a deployment tool that has grown with it. For our deployments, we’ll be using Capistrano. Cap is not limited to just Ruby-on-Rails deployments though so we’ll talk about how to customize it for a number of different scenarios.
Functional AutomationSo we’re finally at the point where we can do some ‘traditional’ automation. And since our stack is all Open Source, we’re going to use Selenium.
For our project, we will construct some Page Object based Selenium scripts using RSpec. Though we can discuss and/or create examples of them in other languages too.
On this slide we talk about:- Using Jenkins as a replacement for se-grid- Advanced job chaining
Immunization Systems
Immunizations shots keep you healthy. Immunization systems keep your deployments healthy.
On this slide we talk about:- Immunization Systems- Business vs. Technical metrics- Incremental deployments- Automated rollback
In order to ensure our deployment will not negatively impact our users, we will build a basic Immunization System for our application. By their nature, these are highly customized per application.
G-ForcesKent Beck uses the notion of G-Forces to explain how things respond to speeding up your process. With a fully automated deployment pipeline things will be able to go faster. And faster.
But you could also get thrown from the carousel, so be careful.
On this slide we talk about:- Kent Beck’s G-Forces