Manual deployments are terrible because they they ask people to be as repeatable as machines. This presentation looks at why manual deployments fail, what automation brings to the table, and how to build on top of automated deployments.
control from the command line § It’s how I’ve always done it § I know what I did and see the output of the commands I ran § When something goes wrong, I can be the hero and fix it ?
I have scripts! – How many scripts? – What order? – Who has permissions to run them? – Are they the same across environments? – What else do you need to do? § Scripts are only part of a fully automated deployment.
on – continuous deploys, smoke tests, other goodies § Empower people while increasing control – stop waiting on other people – stop being harassed by other people § Better, Faster, Cheaper (Pick any 3)
email (or file shares) § Developers, QA, and Ops deploy differently § Tweaks communicated on an as-broken basis § Deployments steps are a huge document § The term “deployment weekend” is used § Developers have production passwords
§ You fail in production § You don’t know who deployed what, where or when The main page won’t load? Oh… Right, you needed to add another data source.
consistent across environments § You fail in production § You don’t know who deployed what, where or when That’s ok, I don’t really like my kids anyway
everything – always be updated – could be followed them, perfectly, every time. § Audit spreadsheets – could capture everything – could update them Image from: http://www.ultimatebasictraining.com/blog/2010/02/what-area-drill-sergeants-like/
good at consistency Automated deployments leverage the strengths of people and machines. Alistar Cockburn, “Characterizing People as Non-Linear, First-Order Components in Software Development”
solutions that copy the structure of their organization § Ops wants to maintain control – doesn’t care about DEV, can’t keep up with the frequent changes § Development doesn’t want responsibility for production deployments § QA lacks influence in DEV & PROD
§ Multiple versions per environment (or machine) § Uncontrolled What we need § Single script reused across environments § Controlled access to deployment steps § Auto record what happened Fast, consistent and repeatable
§ In a Release Manager’s spreadsheet § Total plan based on documented changes for each release – Redesign every time What we need § A model for whole systems § Standard deployment based on changes to all pieces and parts § Actual deployment runs the needed subset. Move all tiers, services, config etc together
scripts, property files, ini files § Environment information either uncontrolled or in source control What we need § Environments a first-level entity § Properties controlled at the environment level § Secure storage of sensitive values (passwords) Per-environment configuration and passwords
on the network § Source control for binary control § Uncontrolled § Crude control over what to keep What we need § Definitive Software Library § Consistent set of artifacts across environments § Tamper-proof artifacts § Automated retention policies based on deployments Know what you’re getting
the machine § Access tends to grow over time in response to crisis § Access control distributed across machines What we need § Role-based access control § Access control by environment § Single source of access control § LDAP / Active Directory authentication (or authorization) Who can deploy to which environment
spreadsheet § Our Change Management System has what we think we did § Audit trail starts at PROD What we need § Win at Clue: – Who – What – Where – When / How (better than Clue!) § Require no additional work § End-to-end traceability Know what happened
succeed § QA can take new builds faster § DEV deployments fast enough to keep up with our rate of change § We have an audit trail from day one § We have separation of duties
a new build when they need one. § Solution: Use per-environment access control to allow the QA people to deploy on-demand, but only to the test environment.
should be deployed to production if it doesn’t break anything. § Solution: After deployment to test environment run automated test suites. If they all pass, trigger a deployment to production, then test that production deploy was successful. Rollback on failure.