SlideShare a Scribd company logo
BUILDING AN AUTOMATED DATABASE
DEPLOYMENT PIPELINE
Red Gate Software
Continuous delivery for databases
Goals
 Understand the technology and process
requirements to work towards automation step-
by-step in your release pipeline.
 Learn about the organizational changes
necessary to support process modifications.
 Appreciate why these changes are necessary in
support of modern development and
deployment methodologies.
ALM – and where the database fits in
Three core processes in Application Lifecycle Management:
Governance Development Operations
Natural friction across pipeline
Development → Operations
Building an automated database deployment pipeline
Natural friction across pipeline
Development → Operations
Operations → Development
Why?
Development focus is on speed
 Agile
 Scrum
 Lean
 Feature-driven Development
 Iterative
Operations focus is on production protectionprotection
 Monitoring
 Deployment
 Integrity
 Data Management
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
A quick primer on continuous delivery
Common misconception: it’s about automating to Production
In fact –
there’s a difference between three continuous approaches:
Building an automated database deployment pipeline
A quick primer on continuous delivery
Common misconception: 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
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, repeatability and
a strong team process for changes
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
SOURCE
CONTROL
CONTINUOUS
INTEGRATION:
FUNDAMENTALS
CONTINUOUS
INTEGRATION:
ADVANCED
AUTOMATED
DEPLOYMENT
Four key stages of the deployment pipeline
SOURCE
CONTROL
 Greenfields
 Existing systems
 Test data
Four key stages of the deployment pipeline
 Automate builds as first step
o Incremental
o Complete
 Build library of manual tests
 Automate testsCONTINUOUS
INTEGRATION:
FUNDAMENTALS
Four key stages of the deployment pipeline
 Select CI tooling
 Team discipline
 Customization of build steps
 Automate the testingCONTINUOUS
INTEGRATION:
ADVANCED
Four key stages of the deployment pipeline
 Testing
 Automation
 Safety
o Backups
o Rollback strategyAUTOMATED
DEPLOYMENT
Four key stages of the deployment pipeline
Create development environment
for automation
Empower Development
 Environment should let them work at their speed
Take part in Development
 Instead of stopping bad deployments, stop bad development
Automate your build process
 Supply clean production data or supply good sample data
Get started on writing tests
 Build your library
Integrate continuously
3 main approaches to achieve this:
 Sandbox for speed
 Integration for safety
 Automate the process
Different types of testing for different stages of the pipeline:
Development
Integration
Testing QA
Pre-Production/
Staging Production
Automate testing
Unit tests Integration tests
Automated tests
Deployment validation
Behaviour validation
Other validations
B C D
A
Always Be Continuously Delivering
Deliver
Every delivery is practice
Fail faster
 But less frequently
 Smooth the process
Testing, testing, testing
 Select the right tests for each stage
 Review and act on the results
Automate
DBAs must work with Devs…
Yes, you must protect the data for the business, but
that must be tempered with helping deliver functionality.
Changes to philosophy
Devs must work with DBAs…
Yes, you may know more about business needs,
so educate rather than isolate.
Changes to philosophy
Project Management must think of operations as part
of development…
Yes:
 Deployment is part of development
 Release 1.1 and on are part of development
o And planning for 1.1 is not premature optimization
 Data retention is part of development
Changes to philosophy
Changes to workplace
SOURCE
CONTROL
CONTINUOUS
INTEGRATION:
FUNDAMENTALS
CONTINUOUS
INTEGRATION:
ADVANCED
AUTOMATED
DEPLOYMENT
Changes to workplace for continuous
database delivery
 Empower developers to do more
 Bring DBAs into development teams
 Management must buy-in
 Management must get out of the way
How are other companies getting started?
Case Study: Boxon
 Global packaging and labelling company
 Based in Sweden; sub-division in China
 Three business areas: profitable packing
solutions; intelligent marking; customized
big-bags solutions for bulk handling
 One developer responsible for ASP.NET
application with SQL Server backend,
enabling customers to control consistent
printing of labels wherever the print shop
is located in the world
Boxon – Initial Process
 Deploying to production was scary…
 Database changes not version-
controlled
 2-hour window - at night - to
complete deployments to production
– difficult to find quiet period with a
global customer base
PAIN
POINTS
Boxon – Improved Process
 Deployments are less scary now…
 Tickets are logged and prioritized in Unfuddle
(unfuddle.com)
 Ticket numbers are logged in SVN and
TeamCity to track items
 Now use SQL Source Control and Subversion
to version DB changes
o Source of authority on database build
 TeamCity (CI build server) is triggered on
check-in of changes
o Fast response – changes checked in frequently
 Notification if build fails
 Build packaged into a Nuget file for deployment
BUILDING A
PIPELINE
Case Study: Move with Us
 Risk management solution and
sales and marketing channel
provider for residential property
businesses in the UK
 Located near Cambridge, UK
 Customers put a heavy load on
databases, so updates need to
be efficient
Move with Us – Initial Process
 Database code often not checked in
to VCS due to risk of conflicts –
changes were communicated by
email instead
 Hot fixes sometimes done directly
on integration server
 1 day needed to release updates –
a lot of work in building and testing
 Problems with merging code led to
a lot of firefighting
PAIN
POINTS
Move with Us – Improved Process
 Each developer has a local copy of database
 SQL Source Control and Subversion used to
check in database changes to version control
 TeamCity (CI build server) automatically
compiles changes on check-in
 Successful builds packaged into a Nuget file
automatically
o Fast getting here – multiple database changes
checked in per day
 Nuget package deployed to Test on demand
 If problems detected, return to Dev to fix
BUILDING A
PIPELINE
Case Study: Practice Fusion
 Web-based electronic health record
(EHR) company
 Founded in 2005
 Based in San Francisco
 Hosts over 50 million patient records
 Used in all 50 states and by 150k+
physicians
 3 DBA engineers; 1 data architect;
10+ developers
Practice Fusion – Initial Process
 Hand-crafted SQL scripts - inconsistent
 Database changes not always version
controlled
 Changes released by opening dozens
of files in SSMS
 Long-winded team comms if further
changes needed
 Smoke-testing deployments showed
some objects had been deployed
straight to Prod and weren’t in
deployment script
PAIN
POINTS
Practice Fusion – Improved Process
 SQL Source Control and Subversion to
version DB changes
o Source of authority on database build
 Jenkins (CI build server) is triggered on
check-in of changes
o More time to develop; less time managing scripts
 Build failed by Jenkins if problems detected
o Fewer issues deploying to production
 Jenkins, SQL Compare and SQL Data
Compare used to deploy changes to
environments
 Custom scripts for replication
BUILDING A
PIPELINE
Summary
 Eliminate or mitigate friction
o Slow is smooth, smooth is
fast
 Adopt lean methodologies
and focus
 Four key stages
o Source control
o Build automation
o Continuous Integration
o Continous Deployment
 A-B-C-D
 Change your philosophy
 Change your workplace
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
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”
n.raveender Wikimedia Commons Stop No Entry.jpg – Wikimedia Commons. This file is in the public domain. Source on Wikimedia Commons: “Own work.”
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.
Horia Varlan Flickr Graduated cylinders and beaker filled with chemical compounds – Flickr. This file is licensed under the Creative Commons
Attribution 2.0 Generic license.
Henry Mühlpfordt Flickr CERN Atlas Control Room 2010-07-01 – Flickr. This file is licensed under the Creative Commons Attribution-ShareAlike 2.0
Generic license.
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.

More Related Content

What's hot (19)

PPTX
The Challenges & Pitfalls of Database Continuous Delivery
Perforce
 
PDF
A Continuous Delivery Safety Net for Databases
IBM UrbanCode Products
 
PPT
Continous integration-leon-kehl-2010
Kitchener-Waterloo Agile
 
PPTX
DevOps Summit 2015 Presentation: Continuous Testing At the Speed of DevOps
Sailaja Tennati
 
PPTX
Devops online training ppt
KhalidQureshi31
 
PPTX
Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...
Simplilearn
 
PDF
Continuous Delivery Distilled
Matt Callanan
 
PDF
IBM DevOps Enabling continuous integration & delivery
Roberto Pozzi
 
PPTX
Spark 2013 Presentation of making the enterprise agile
gbgruver
 
PPTX
DevOps Overview
Omri Spector
 
PDF
DevOps 101
satya sudheer
 
PDF
Using Lean Thinking to Identify and Address Delivery Pipeline Bottlenecks
IBM UrbanCode Products
 
PPTX
DevOps - an Agile Perspective (at Scale)
Brad Appleton
 
PPTX
An introduction to DevOps
Alexander Meijers
 
PPTX
DevOps Overview in my own words
SUBHENDU KARMAKAR
 
PPTX
Challenges and best practices of database continuous delivery
DBmaestro - Database DevOps
 
PDF
IBM Innovate - Uderstanding DevOps
Sanjeev Sharma
 
PPTX
Dev ops culture and practices
AnkaraCloud
 
PPTX
#ATATalk - Episode 1 : Session on Selenium Exceptions by Pallavi Sharma
Agile Testing Alliance
 
The Challenges & Pitfalls of Database Continuous Delivery
Perforce
 
A Continuous Delivery Safety Net for Databases
IBM UrbanCode Products
 
Continous integration-leon-kehl-2010
Kitchener-Waterloo Agile
 
DevOps Summit 2015 Presentation: Continuous Testing At the Speed of DevOps
Sailaja Tennati
 
Devops online training ppt
KhalidQureshi31
 
Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...
Simplilearn
 
Continuous Delivery Distilled
Matt Callanan
 
IBM DevOps Enabling continuous integration & delivery
Roberto Pozzi
 
Spark 2013 Presentation of making the enterprise agile
gbgruver
 
DevOps Overview
Omri Spector
 
DevOps 101
satya sudheer
 
Using Lean Thinking to Identify and Address Delivery Pipeline Bottlenecks
IBM UrbanCode Products
 
DevOps - an Agile Perspective (at Scale)
Brad Appleton
 
An introduction to DevOps
Alexander Meijers
 
DevOps Overview in my own words
SUBHENDU KARMAKAR
 
Challenges and best practices of database continuous delivery
DBmaestro - Database DevOps
 
IBM Innovate - Uderstanding DevOps
Sanjeev Sharma
 
Dev ops culture and practices
AnkaraCloud
 
#ATATalk - Episode 1 : Session on Selenium Exceptions by Pallavi Sharma
Agile Testing Alliance
 

Similar to Building an automated database deployment pipeline (20)

PPTX
Database Deployment Pipeline - SQL In The City Workshop 2014
Red Gate Software
 
PPTX
Continuous Database Delivery - 7/12/2018
David P. Moore
 
PPTX
The Secret to Pain Free Database Deployments SQLBits 2014
Red Gate Software
 
PDF
Workshop: Delivering chnages for applications and databases
Eduardo Piairo
 
PPTX
Challenges and Best Practices of Database Continuous Delivery
DBmaestro - Database DevOps
 
PPTX
Automate Database Deployment - SQL In The City Workshop
Red Gate Software
 
PPTX
Continuous delivery for databases
DevOpsGroup
 
PDF
ADDO 2021: Why and how to include database changes in the deployment pipeline
Eduardo Piairo
 
PDF
Usa prácticas de integración continua y sobrevive para luchar otro día.
Software Guru
 
PPTX
Continuous Integration and Delivery
Brandon Cornett
 
PPTX
Continuous delivery made possible
mimmozzo_
 
PPTX
Continuous Integration & the Release Maturity Model
cPrime | Project Management | Agile | Consulting | Staffing | Training
 
PDF
Relational Database CI/CD
Jasmin Fluri
 
PPTX
Continuous Delivery: why ? where to start ? how to scale ?
Jean-Philippe Briend
 
PPTX
DBmaestro's State of the Database Continuous Delivery Survey- Findings Revealed
DBmaestro - Database DevOps
 
PDF
Continuous delivery best practices and essential tools
DBmaestro - Database DevOps
 
PPTX
Webinar: "In database automation we trust"
Emerasoft, solutions to collaborate
 
PPTX
The Science of database CICD - UKOUG Breakthrough
Jasmin Fluri
 
PPTX
Introduction to Continuous Delivery (BBWorld/DevCon 2013)
Mike McGarr
 
PPTX
Continuous delivery applied (RJUG)
Mike McGarr
 
Database Deployment Pipeline - SQL In The City Workshop 2014
Red Gate Software
 
Continuous Database Delivery - 7/12/2018
David P. Moore
 
The Secret to Pain Free Database Deployments SQLBits 2014
Red Gate Software
 
Workshop: Delivering chnages for applications and databases
Eduardo Piairo
 
Challenges and Best Practices of Database Continuous Delivery
DBmaestro - Database DevOps
 
Automate Database Deployment - SQL In The City Workshop
Red Gate Software
 
Continuous delivery for databases
DevOpsGroup
 
ADDO 2021: Why and how to include database changes in the deployment pipeline
Eduardo Piairo
 
Usa prácticas de integración continua y sobrevive para luchar otro día.
Software Guru
 
Continuous Integration and Delivery
Brandon Cornett
 
Continuous delivery made possible
mimmozzo_
 
Continuous Integration & the Release Maturity Model
cPrime | Project Management | Agile | Consulting | Staffing | Training
 
Relational Database CI/CD
Jasmin Fluri
 
Continuous Delivery: why ? where to start ? how to scale ?
Jean-Philippe Briend
 
DBmaestro's State of the Database Continuous Delivery Survey- Findings Revealed
DBmaestro - Database DevOps
 
Continuous delivery best practices and essential tools
DBmaestro - Database DevOps
 
Webinar: "In database automation we trust"
Emerasoft, solutions to collaborate
 
The Science of database CICD - UKOUG Breakthrough
Jasmin Fluri
 
Introduction to Continuous Delivery (BBWorld/DevCon 2013)
Mike McGarr
 
Continuous delivery applied (RJUG)
Mike McGarr
 
Ad

More from Red Gate Software (20)

PDF
The future of DevOps: fully left-shifted deployments with version control and...
Red Gate Software
 
PDF
Embracing DevOps through database migrations with Flyway
Red Gate Software
 
PPTX
Database DevOps for Managed Service Providers
Red Gate Software
 
PDF
Mizuho Financial: Launching our Database DevOps journey
Red Gate Software
 
PDF
7 steps to effective SQL Server monitoring
Red Gate Software
 
PDF
Level up your deployments for SQL Source Control
Red Gate Software
 
PDF
Key findings from the 2020 state of database dev ops report
Red Gate Software
 
PPTX
Extend DevOps to Your SQL Server Databases
Red Gate Software
 
PDF
2019 year in review slides
Red Gate Software
 
PPTX
What we learned at PASS Summit in 2019
Red Gate Software
 
PPTX
Quality in Software Development: Anglia Ruskin University
Red Gate Software
 
PPTX
How SQL Change Automation helps you deliver value faster
Red Gate Software
 
PPTX
DevOps essentials from Abel Wang and Steve Jones
Red Gate Software
 
PPTX
Successfully migrating existing databases to Azure
Red Gate Software
 
PPTX
The Ultimate Guide to Choosing and Implementing the Right Monitoring Tool
Red Gate Software
 
PDF
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...
Red Gate Software
 
PDF
Using Redgate, AKS and Azure to bring DevOps to your database
Red Gate Software
 
PDF
Using Redgate, AKS and Azure to bring DevOps to your Database
Red Gate Software
 
PDF
How to Pitch a Software Development Initiative and Ignite Culture Change
Red Gate Software
 
PDF
Taming the Wild West
Red Gate Software
 
The future of DevOps: fully left-shifted deployments with version control and...
Red Gate Software
 
Embracing DevOps through database migrations with Flyway
Red Gate Software
 
Database DevOps for Managed Service Providers
Red Gate Software
 
Mizuho Financial: Launching our Database DevOps journey
Red Gate Software
 
7 steps to effective SQL Server monitoring
Red Gate Software
 
Level up your deployments for SQL Source Control
Red Gate Software
 
Key findings from the 2020 state of database dev ops report
Red Gate Software
 
Extend DevOps to Your SQL Server Databases
Red Gate Software
 
2019 year in review slides
Red Gate Software
 
What we learned at PASS Summit in 2019
Red Gate Software
 
Quality in Software Development: Anglia Ruskin University
Red Gate Software
 
How SQL Change Automation helps you deliver value faster
Red Gate Software
 
DevOps essentials from Abel Wang and Steve Jones
Red Gate Software
 
Successfully migrating existing databases to Azure
Red Gate Software
 
The Ultimate Guide to Choosing and Implementing the Right Monitoring Tool
Red Gate Software
 
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...
Red Gate Software
 
Using Redgate, AKS and Azure to bring DevOps to your database
Red Gate Software
 
Using Redgate, AKS and Azure to bring DevOps to your Database
Red Gate Software
 
How to Pitch a Software Development Initiative and Ignite Culture Change
Red Gate Software
 
Taming the Wild West
Red Gate Software
 
Ad

Recently uploaded (20)

PDF
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
PPTX
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
PDF
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
PDF
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
PPTX
Digital Circuits, important subject in CS
contactparinay1
 
PPTX
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
PDF
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
DOCX
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
PDF
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
PDF
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
PDF
Staying Human in a Machine- Accelerated World
Catalin Jora
 
PPTX
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
PPTX
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
PDF
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
PDF
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
PDF
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
PDF
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
PDF
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
PDF
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 
Reverse Engineering of Security Products: Developing an Advanced Microsoft De...
nwbxhhcyjv
 
From Sci-Fi to Reality: Exploring AI Evolution
Svetlana Meissner
 
Go Concurrency Real-World Patterns, Pitfalls, and Playground Battles.pdf
Emily Achieng
 
What’s my job again? Slides from Mark Simos talk at 2025 Tampa BSides
Mark Simos
 
Digital Circuits, important subject in CS
contactparinay1
 
COMPARISON OF RASTER ANALYSIS TOOLS OF QGIS AND ARCGIS
Sharanya Sarkar
 
Kit-Works Team Study_20250627_한달만에만든사내서비스키링(양다윗).pdf
Wonjun Hwang
 
Cryptography Quiz: test your knowledge of this important security concept.
Rajni Bhardwaj Grover
 
Future-Proof or Fall Behind? 10 Tech Trends You Can’t Afford to Ignore in 2025
DIGITALCONFEX
 
“NPU IP Hardware Shaped Through Software and Use-case Analysis,” a Presentati...
Edge AI and Vision Alliance
 
Staying Human in a Machine- Accelerated World
Catalin Jora
 
Agentforce World Tour Toronto '25 - Supercharge MuleSoft Development with Mod...
Alexandra N. Martinez
 
The Project Compass - GDG on Campus MSIT
dscmsitkol
 
“Squinting Vision Pipelines: Detecting and Correcting Errors in Vision Models...
Edge AI and Vision Alliance
 
POV_ Why Enterprises Need to Find Value in ZERO.pdf
darshakparmar
 
Transforming Utility Networks: Large-scale Data Migrations with FME
Safe Software
 
UPDF - AI PDF Editor & Converter Key Features
DealFuel
 
Newgen 2022-Forrester Newgen TEI_13 05 2022-The-Total-Economic-Impact-Newgen-...
darshakparmar
 
Book industry state of the nation 2025 - Tech Forum 2025
BookNet Canada
 
The 2025 InfraRed Report - Redpoint Ventures
Razin Mustafiz
 

Building an automated database deployment pipeline

  • 1. BUILDING AN AUTOMATED DATABASE DEPLOYMENT PIPELINE Red Gate Software Continuous delivery for databases
  • 2. Goals  Understand the technology and process requirements to work towards automation step- by-step in your release pipeline.  Learn about the organizational changes necessary to support process modifications.  Appreciate why these changes are necessary in support of modern development and deployment methodologies.
  • 3. ALM – and where the database fits in Three core processes in Application Lifecycle Management: Governance Development Operations
  • 4. Natural friction across pipeline Development → Operations
  • 6. Natural friction across pipeline Development → Operations Operations → Development Why?
  • 8.  Agile  Scrum  Lean  Feature-driven Development  Iterative
  • 9. Operations focus is on production protectionprotection
  • 10.  Monitoring  Deployment  Integrity  Data Management
  • 11. 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
  • 12. A quick primer on continuous delivery Common misconception: it’s about automating to Production In fact – there’s a difference between three continuous approaches:
  • 14. A quick primer on continuous delivery Common misconception: 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
  • 15. 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, repeatability and a strong team process for changes
  • 16. 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
  • 18. SOURCE CONTROL  Greenfields  Existing systems  Test data Four key stages of the deployment pipeline
  • 19.  Automate builds as first step o Incremental o Complete  Build library of manual tests  Automate testsCONTINUOUS INTEGRATION: FUNDAMENTALS Four key stages of the deployment pipeline
  • 20.  Select CI tooling  Team discipline  Customization of build steps  Automate the testingCONTINUOUS INTEGRATION: ADVANCED Four key stages of the deployment pipeline
  • 21.  Testing  Automation  Safety o Backups o Rollback strategyAUTOMATED DEPLOYMENT Four key stages of the deployment pipeline
  • 22. Create development environment for automation Empower Development  Environment should let them work at their speed Take part in Development  Instead of stopping bad deployments, stop bad development Automate your build process  Supply clean production data or supply good sample data Get started on writing tests  Build your library
  • 23. Integrate continuously 3 main approaches to achieve this:  Sandbox for speed  Integration for safety  Automate the process
  • 24. Different types of testing for different stages of the pipeline: Development Integration Testing QA Pre-Production/ Staging Production Automate testing Unit tests Integration tests Automated tests Deployment validation Behaviour validation Other validations
  • 25. B C D A Always Be Continuously Delivering Deliver
  • 26. Every delivery is practice
  • 27. Fail faster  But less frequently  Smooth the process
  • 28. Testing, testing, testing  Select the right tests for each stage  Review and act on the results
  • 30. DBAs must work with Devs… Yes, you must protect the data for the business, but that must be tempered with helping deliver functionality. Changes to philosophy
  • 31. Devs must work with DBAs… Yes, you may know more about business needs, so educate rather than isolate. Changes to philosophy
  • 32. Project Management must think of operations as part of development… Yes:  Deployment is part of development  Release 1.1 and on are part of development o And planning for 1.1 is not premature optimization  Data retention is part of development Changes to philosophy
  • 34. Changes to workplace for continuous database delivery  Empower developers to do more  Bring DBAs into development teams  Management must buy-in  Management must get out of the way
  • 35. How are other companies getting started?
  • 36. Case Study: Boxon  Global packaging and labelling company  Based in Sweden; sub-division in China  Three business areas: profitable packing solutions; intelligent marking; customized big-bags solutions for bulk handling  One developer responsible for ASP.NET application with SQL Server backend, enabling customers to control consistent printing of labels wherever the print shop is located in the world
  • 37. Boxon – Initial Process  Deploying to production was scary…  Database changes not version- controlled  2-hour window - at night - to complete deployments to production – difficult to find quiet period with a global customer base PAIN POINTS
  • 38. Boxon – Improved Process  Deployments are less scary now…  Tickets are logged and prioritized in Unfuddle (unfuddle.com)  Ticket numbers are logged in SVN and TeamCity to track items  Now use SQL Source Control and Subversion to version DB changes o Source of authority on database build  TeamCity (CI build server) is triggered on check-in of changes o Fast response – changes checked in frequently  Notification if build fails  Build packaged into a Nuget file for deployment BUILDING A PIPELINE
  • 39. Case Study: Move with Us  Risk management solution and sales and marketing channel provider for residential property businesses in the UK  Located near Cambridge, UK  Customers put a heavy load on databases, so updates need to be efficient
  • 40. Move with Us – Initial Process  Database code often not checked in to VCS due to risk of conflicts – changes were communicated by email instead  Hot fixes sometimes done directly on integration server  1 day needed to release updates – a lot of work in building and testing  Problems with merging code led to a lot of firefighting PAIN POINTS
  • 41. Move with Us – Improved Process  Each developer has a local copy of database  SQL Source Control and Subversion used to check in database changes to version control  TeamCity (CI build server) automatically compiles changes on check-in  Successful builds packaged into a Nuget file automatically o Fast getting here – multiple database changes checked in per day  Nuget package deployed to Test on demand  If problems detected, return to Dev to fix BUILDING A PIPELINE
  • 42. Case Study: Practice Fusion  Web-based electronic health record (EHR) company  Founded in 2005  Based in San Francisco  Hosts over 50 million patient records  Used in all 50 states and by 150k+ physicians  3 DBA engineers; 1 data architect; 10+ developers
  • 43. Practice Fusion – Initial Process  Hand-crafted SQL scripts - inconsistent  Database changes not always version controlled  Changes released by opening dozens of files in SSMS  Long-winded team comms if further changes needed  Smoke-testing deployments showed some objects had been deployed straight to Prod and weren’t in deployment script PAIN POINTS
  • 44. Practice Fusion – Improved Process  SQL Source Control and Subversion to version DB changes o Source of authority on database build  Jenkins (CI build server) is triggered on check-in of changes o More time to develop; less time managing scripts  Build failed by Jenkins if problems detected o Fewer issues deploying to production  Jenkins, SQL Compare and SQL Data Compare used to deploy changes to environments  Custom scripts for replication BUILDING A PIPELINE
  • 45. Summary  Eliminate or mitigate friction o Slow is smooth, smooth is fast  Adopt lean methodologies and focus  Four key stages o Source control o Build automation o Continuous Integration o Continous Deployment  A-B-C-D  Change your philosophy  Change your workplace
  • 46. 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
  • 47. 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” n.raveender Wikimedia Commons Stop No Entry.jpg – Wikimedia Commons. This file is in the public domain. Source on Wikimedia Commons: “Own work.” 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. Horia Varlan Flickr Graduated cylinders and beaker filled with chemical compounds – Flickr. This file is licensed under the Creative Commons Attribution 2.0 Generic license. Henry Mühlpfordt Flickr CERN Atlas Control Room 2010-07-01 – Flickr. This file is licensed under the Creative Commons Attribution-ShareAlike 2.0 Generic license. 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.