Upload
red-gate-software
View
187
Download
0
Embed Size (px)
Citation preview
The secret to pain-free database deployments? Automation (yes, really)
David AtkinsonProduct Strategy
Red Gate
[email protected] @dtabase
Continuous delivery for databases
Grant FritcheyProduct Evangelist
Red Gate
[email protected]@GFritchey
Goals
Evolution of database deployments How automation has solved release problems Evolve your own pipeline
Database Delivery
It’s about automating to Production.
In fact – there’s a difference between three continuous approaches:
DevelopmentSource control CI server Test Production
Continuous integration
Continuous deployment
Continuous delivery
Releasepipeline
Databases as a bottleneck – historically
Odd languages SQL Cubes X-Query
3 reasons why databases have traditionally slowed down deployments:
Data persistence Data outlives
applications Data can’t be
replaced
DBA paranoia Frankly…
1 2 3
So what’s changed?
Tools, techniques and processes…
Getting your database under version control is easier
Lean and agile are more frequently used in software delivery
We’re learning from the ALM space on pipeline building
The goals of continuous delivery for databases
Faster feedback on changes madeo Continuously integrate team changeso Automated testingo Releases rehearsed in testing environments before
deployed to Production
= repeatability, reliability and a strong team process for changes
Pre-2000:deployments using hand-crafted scripts
DeploymentScript
Development Production
It’s like a master craft to do it well
But…
Human error is likely
Time-consuming
Changes will be missed
2000: deployments using diff tools
Deploy
Development Production
Letting software take the strain
Much reduced potential for human error
Generate diff report
Deployment scripts dynamically generated
Teams keep changes in sync using SQL Compare
Deploy
Production
Deployment
Team Development
Development
But source control is the recognised development collaboration tool…
2010: SQL Source Control is released
Production
Development
Deploy
Source ControlDevelopment Deployment
• Team collaboration
• Prevent painful merges
• Maintain an audit trail of changes
• Undo and roll back
Source Control provides:
VERSIONCONTROL
CONTINUOUS INTEGRATION:
FUNDAMENTALS
CONTINUOUS INTEGRATION:
ADVANCED
AUTOMATED DEPLOYMENT
Four stages to evolve your deployment pipeline
VERSIONCONTROL
Foundation – the first step towards automation
Greenfield and brownfield projects Source for audit trail Sandbox for speed and isolation
Four stages to evolve your deployment pipeline
Automate builds as first stepo Incrementalo Complete
Verify database changes on check-in can be built successfullyCONTINUOUS
INTEGRATION:FUNDAMENTALS
Four stages to evolve your deployment pipeline
Team discipline Customization of build steps Automate database tests
CONTINUOUS INTEGRATION:
ADVANCED
Four stages to evolve your deployment pipeline
Automation of releases to test and staging environmentso Every delivery is practice
Safetyo Rollback strategies and backups
Approval gate for production-ready releasesAUTOMATEDDEPLOYMENT
Four key stages to evolve your deployment pipeline
Remember those changes that were checked in?
Successful build is deployed to pre-production
Changes to workplace
SOURCECONTROL
CONTINUOUS INTEGRATION:
FUNDAMENTALS
CONTINUOUS INTEGRATION:
ADVANCED
AUTOMATED DEPLOYMENT
Technology is only half the story…
It’s not always easy
Operations focus is on production protectionprotection
Development pressure is on speed to deliver
…is a DevOps approach the solution?
Focus on the pipelineThink of the Toyota production system…
Start with Leano Focus on the customer, eliminate wasteo Continuously improveo Empower the teamo Optimize the wholeo Plan for changeo Automate processeso Build quality in
What does the future hold?
2015+: Automated deployments as far as Production
Development
Continuous integration
Build Test
Publish Sync
ALTERTABLEfoo…
Deployment script
SQLRelease
Artifact repository
Production
Release management
Trigger
Deploy
Continuous IntegrationSource ControlDevelopment Backup Deployment
Remember those changes that were checked in?
Summary
Automation is arriving in the database worldo Deployments are already evolving
Four key stageso Source control – start here!o Automate your buildso Advanced CI – automate tests and integrate frequentlyo Continuous delivery – release to pre-production
Documentation and resources Continuous Delivery by Jez Humble and David Farley (Addison Wesley) The Phoenix Project: A Novel About IT, DevOps, and Helping Your Business Win by Gene Kim,
Kevin Behr and George Spafford (IT Revolution Press) The Goal: A Process of Ongoing Improvement by Eliyahu M. Goldratt and Jeff Cox (Gower
Publishing Ltd.) Agile Organization by the agile admin (theagileadmin.com)
Further resources: Database Delivery Learning program: www.red-gate.com/delivery
o Patterns and practices on Simple-Talko Tutorials in Red Gate training academy
www.youtube.com/user/RedGateVideos - for recorded seminars
Image sourcesAuthor Source Information
Chiltepinster Wikimedia Commons
Mocking Bird Argument.jpg – Wikimedia Commons. This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license. Source on Wikimedia Commons: “Own work”
Tableatny Wikimedia Commons
Athlete at Starting block.jpg – Wikimedia Commons. This file is licensed under the Creative Commons Attribution 2.0 Generic license. Source on Wikimedia Commons: “BXP135671”
Original uploader was Liface at en.wikipedia Wikimedia Commons
Cross Country US.jpg – Wikimedia Commons. This file is licensed under the Creative Commons Attribution-Share Alike 3.0 Unported license. Source on Wikimedia Commons: “Transferred from en.wikipedia; transfer was stated to be made by User:TFCforever.” Notes on license: Liface at the English language Wikipedia, the copyright holder of this work, hereby publishes it under the following license:GNU head Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. Subject to disclaimers.
Department for Business, Innovation and Skills Flickr Toyota’s new Auris – Flickr. This file is licensed under the Creative Commons Attribution-NoDerivs 2.0 Generic license.
Qrodo Photos Flickr Sport Action – Fencing – Flickr. This file is licensed under the Creative Commons Attribution 2.0 Generic license.
William Warby Flickr Gears – Flickr. This file is licensed under the Creative Commons Attribution 2.0 Generic license.
Guillaume Baviere Flickr 2012-12-30 Paris. Sur les Champs-Elysées.- Flickr. This file is licensed under the Creative Commons Attribution 2.0 Generic license.
William Warby Flickr Jim’s Wood Turning - Flickr. This file is licensed under the Creative Commons Attribution 2.0 Generic license.
Katy Warner Flickr post-its! (01-08-08) – Flickr. This file is licensed under the Creative Commons Attribution-ShareAlike 2.0 Generic (CC BY-SA 2.0) license.
Possumgirl2 Flickr Ploughing for Maize Crop – Flickr. This file is licensed under the Creative Commons Attribution-ShareAlike 2.0 Generic (CC BY-SA 2.0) license.
Tom Page Flickr 208/365: Long-jump v2 – Flickr. This file is licensed under the Creative Commons Attribution-ShareAlike 2.0 Generic (CC BY-SA 2.0) license.
Martin Pettitt Flickr Microlight taking off – Flickr. This file is licensed under the Creative Commons Attribution 2.0 Generic license.
Gunnar Hildonen Flickr Northern lights – Tromso – Flickr. This file is licensed under the Creative Commons Attribution-ShareAlike 2.0 Generic (CC BY-SA 2.0)