Presentation by David Atkinson @dtabase and Grant Fritchey @GFritchey from Red Gate Software at SQL Bits 2014. Presentation covers the evolution of database deployments, how automation has solved release problems, and how to evolve your own pipeline.
The Secret to Pain Free Database Deployments SQLBits 2014
1. The secret to pain-free database
deployments? Automation (yes, really)
David Atkinson
Product Strategy
Red Gate
David.Atkinson@red-gate.com
@dtabase
Continuous delivery for databases
Grant Fritchey
Product Evangelist
Red Gate
grant@scarydba.com
@GFritchey
2. Goals
Evolution of database deployments
How automation has solved release problems
Evolve your own pipeline
3. Database Delivery
It’s about automating to Production.
In fact –
there’s a difference between three continuous approaches:
Development
Source
control CI server Test Production
Continuous integration
Continuous deployment
Continuous delivery
Release
pipeline
4. 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
10. The goals of continuous delivery for databases
Faster feedback on changes made
o Continuously integrate team changes
o Automated testing
o Releases rehearsed in testing environments before
deployed to Production
= repeatability, reliability and
a strong team process for changes
20. VERSION
CONTROL
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
21. Automate builds as first step
o Incremental
o Complete
Verify database changes on check-in can
be built successfullyCONTINUOUS
INTEGRATION:
FUNDAMENTALS
Four stages to evolve your deployment pipeline
22. Team discipline
Customization of build steps
Automate database tests
CONTINUOUS
INTEGRATION:
ADVANCED
Four stages to evolve your deployment pipeline
23. Automation of releases to test and staging
environments
o Every delivery is practice
Safety
o Rollback strategies and backups
Approval gate for production-ready releasesAUTOMATED
DEPLOYMENT
Four key stages to evolve your deployment
pipeline
28. Operations focus is on production protectionprotection
Development pressure is on speed to deliver
…is a DevOps approach the solution?
29. Focus on the pipeline
Think of the Toyota production system…
Start with Lean
o Focus on the customer, eliminate waste
o Continuously improve
o Empower the team
o Optimize the whole
o Plan for change
o Automate processes
o Build quality in
31. 2015+: Automated deployments as far as Production
Development
Continuous
integration
Build Test
Publish Sync
ALTER
TABLE
foo…
Deployment
script
SQL
Release
Artifact
repository
Production
Release management
Trigger
Deploy
Continuous
Integration
Source
Control
Development Backup Deployment
33. Summary
Automation is arriving in the database world
o Deployments are already evolving
Four key stages
o Source control – start here!
o Automate your builds
o Advanced CI – automate tests and integrate frequently
o Continuous delivery – release to pre-production
34. 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-Talk
o Tutorials in Red Gate training academy
www.youtube.com/user/RedGateVideos - for recorded seminars
35. Image sources
Author 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)