Building an automated database deployment pipeline

Red Gate Software
Red Gate SoftwareRed Gate Software
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.
1 of 47

Recommended

Automated Database Deployment at SQL Rally by
Automated Database Deployment at SQL RallyAutomated Database Deployment at SQL Rally
Automated Database Deployment at SQL RallyGrant Fritchey
690 views26 slides
Building an Automated Database Deployment Pipeline by
Building an Automated Database Deployment PipelineBuilding an Automated Database Deployment Pipeline
Building an Automated Database Deployment PipelineGrant Fritchey
7.2K views48 slides
Continuous Delivery at Oracle Database Insights by
Continuous Delivery at Oracle Database InsightsContinuous Delivery at Oracle Database Insights
Continuous Delivery at Oracle Database InsightsMichael Medin
555 views63 slides
Continuous Integration for Oracle Database Development by
Continuous Integration for Oracle Database DevelopmentContinuous Integration for Oracle Database Development
Continuous Integration for Oracle Database DevelopmentVladimir Bakhov
4.4K views53 slides
DevOps and the Case for ROI to Executives by
DevOps and the Case for ROI to ExecutivesDevOps and the Case for ROI to Executives
DevOps and the Case for ROI to ExecutivesIBM UrbanCode Products
5.3K views20 slides
Database continuous integration, unit test and functional test by
Database continuous integration, unit test and functional testDatabase continuous integration, unit test and functional test
Database continuous integration, unit test and functional testHarry Zheng
1.6K views53 slides

More Related Content

What's hot

The Challenges & Pitfalls of Database Continuous Delivery by
The Challenges & Pitfalls of Database Continuous DeliveryThe Challenges & Pitfalls of Database Continuous Delivery
The Challenges & Pitfalls of Database Continuous DeliveryPerforce
3.1K views55 slides
A Continuous Delivery Safety Net for Databases by
A Continuous Delivery Safety Net for DatabasesA Continuous Delivery Safety Net for Databases
A Continuous Delivery Safety Net for DatabasesIBM UrbanCode Products
2.7K views59 slides
Continous integration-leon-kehl-2010 by
Continous integration-leon-kehl-2010Continous integration-leon-kehl-2010
Continous integration-leon-kehl-2010Kitchener-Waterloo Agile
317 views35 slides
DevOps Summit 2015 Presentation: Continuous Testing At the Speed of DevOps by
DevOps Summit 2015 Presentation: Continuous Testing At the Speed of DevOpsDevOps Summit 2015 Presentation: Continuous Testing At the Speed of DevOps
DevOps Summit 2015 Presentation: Continuous Testing At the Speed of DevOpsSailaja Tennati
8.3K views22 slides
Devops online training ppt by
Devops online training pptDevops online training ppt
Devops online training pptKhalidQureshi31
360 views18 slides
Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ... by
Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...
Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...Simplilearn
8.5K views59 slides

What's hot(20)

The Challenges & Pitfalls of Database Continuous Delivery by Perforce
The Challenges & Pitfalls of Database Continuous DeliveryThe Challenges & Pitfalls of Database Continuous Delivery
The Challenges & Pitfalls of Database Continuous Delivery
Perforce3.1K views
DevOps Summit 2015 Presentation: Continuous Testing At the Speed of DevOps by Sailaja Tennati
DevOps Summit 2015 Presentation: Continuous Testing At the Speed of DevOpsDevOps Summit 2015 Presentation: Continuous Testing At the Speed of DevOps
DevOps Summit 2015 Presentation: Continuous Testing At the Speed of DevOps
Sailaja Tennati8.3K views
Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ... by Simplilearn
Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...
Introduction To DevOps | Devops Tutorial For Beginners | DevOps Training For ...
Simplilearn8.5K views
Continuous Delivery Distilled by Matt Callanan
Continuous Delivery DistilledContinuous Delivery Distilled
Continuous Delivery Distilled
Matt Callanan7.3K views
IBM DevOps Enabling continuous integration & delivery by Roberto Pozzi
IBM DevOps Enabling continuous integration & deliveryIBM DevOps Enabling continuous integration & delivery
IBM DevOps Enabling continuous integration & delivery
Roberto Pozzi5.6K views
Spark 2013 Presentation of making the enterprise agile by gbgruver
Spark 2013 Presentation of making the enterprise agileSpark 2013 Presentation of making the enterprise agile
Spark 2013 Presentation of making the enterprise agile
gbgruver2.8K views
How to Use DevOps & APM to Release Better Software Faster by Dynatrace
How to Use DevOps & APM to Release Better Software FasterHow to Use DevOps & APM to Release Better Software Faster
How to Use DevOps & APM to Release Better Software Faster
Dynatrace1.3K views
Using Lean Thinking to Identify and Address Delivery Pipeline Bottlenecks by IBM UrbanCode Products
Using Lean Thinking to Identify and Address Delivery Pipeline BottlenecksUsing Lean Thinking to Identify and Address Delivery Pipeline Bottlenecks
Using Lean Thinking to Identify and Address Delivery Pipeline Bottlenecks
DevOps - an Agile Perspective (at Scale) by Brad Appleton
DevOps - an Agile Perspective (at Scale)DevOps - an Agile Perspective (at Scale)
DevOps - an Agile Perspective (at Scale)
Brad Appleton2.4K views
IBM Innovate - Uderstanding DevOps by Sanjeev Sharma
IBM Innovate - Uderstanding DevOpsIBM Innovate - Uderstanding DevOps
IBM Innovate - Uderstanding DevOps
Sanjeev Sharma8.6K views
Dev ops culture and practices by AnkaraCloud
Dev ops culture  and  practicesDev ops culture  and  practices
Dev ops culture and practices
AnkaraCloud303 views
7 Practices to Expand Performance and Effective Collaboration in DevOps by Dynatrace
7 Practices to Expand Performance and Effective Collaboration in DevOps7 Practices to Expand Performance and Effective Collaboration in DevOps
7 Practices to Expand Performance and Effective Collaboration in DevOps
Dynatrace1.3K views

Similar to Building an automated database deployment pipeline

Database Deployment Pipeline - SQL In The City Workshop 2014 by
Database Deployment Pipeline - SQL In The City Workshop 2014Database Deployment Pipeline - SQL In The City Workshop 2014
Database Deployment Pipeline - SQL In The City Workshop 2014Red Gate Software
640 views39 slides
Automate Database Deployment - SQL In The City Workshop by
Automate Database Deployment - SQL In The City WorkshopAutomate Database Deployment - SQL In The City Workshop
Automate Database Deployment - SQL In The City WorkshopRed Gate Software
1.4K views31 slides
Using Lean Thinking to identify and address Delivery Pipeline bottlenecks by
Using Lean Thinking to identify and address Delivery Pipeline bottlenecksUsing Lean Thinking to identify and address Delivery Pipeline bottlenecks
Using Lean Thinking to identify and address Delivery Pipeline bottlenecksSanjeev Sharma
3.7K views25 slides
Pivotal korea transformation_strategy_seminar_enterprise_dev_ops_20160630_v1.0 by
Pivotal korea transformation_strategy_seminar_enterprise_dev_ops_20160630_v1.0Pivotal korea transformation_strategy_seminar_enterprise_dev_ops_20160630_v1.0
Pivotal korea transformation_strategy_seminar_enterprise_dev_ops_20160630_v1.0minseok kim
311 views51 slides
DataOps , cbuswaw April '23 by
DataOps , cbuswaw April '23DataOps , cbuswaw April '23
DataOps , cbuswaw April '23Jason Packer
100 views23 slides
What is DevOps? by
What is DevOps?What is DevOps?
What is DevOps?Mesut Güneş
3.5K views34 slides

Similar to Building an automated database deployment pipeline(20)

Database Deployment Pipeline - SQL In The City Workshop 2014 by Red Gate Software
Database Deployment Pipeline - SQL In The City Workshop 2014Database Deployment Pipeline - SQL In The City Workshop 2014
Database Deployment Pipeline - SQL In The City Workshop 2014
Red Gate Software640 views
Automate Database Deployment - SQL In The City Workshop by Red Gate Software
Automate Database Deployment - SQL In The City WorkshopAutomate Database Deployment - SQL In The City Workshop
Automate Database Deployment - SQL In The City Workshop
Red Gate Software1.4K views
Using Lean Thinking to identify and address Delivery Pipeline bottlenecks by Sanjeev Sharma
Using Lean Thinking to identify and address Delivery Pipeline bottlenecksUsing Lean Thinking to identify and address Delivery Pipeline bottlenecks
Using Lean Thinking to identify and address Delivery Pipeline bottlenecks
Sanjeev Sharma3.7K views
Pivotal korea transformation_strategy_seminar_enterprise_dev_ops_20160630_v1.0 by minseok kim
Pivotal korea transformation_strategy_seminar_enterprise_dev_ops_20160630_v1.0Pivotal korea transformation_strategy_seminar_enterprise_dev_ops_20160630_v1.0
Pivotal korea transformation_strategy_seminar_enterprise_dev_ops_20160630_v1.0
minseok kim311 views
DataOps , cbuswaw April '23 by Jason Packer
DataOps , cbuswaw April '23DataOps , cbuswaw April '23
DataOps , cbuswaw April '23
Jason Packer100 views
Continuous Database Delivery - 7/12/2018 by David P. Moore
Continuous Database Delivery - 7/12/2018Continuous Database Delivery - 7/12/2018
Continuous Database Delivery - 7/12/2018
David P. Moore311 views
DevOps and Application Delivery for Hybrid Cloud - DevOpsSummit session by Sanjeev Sharma
DevOps and Application Delivery for Hybrid Cloud  - DevOpsSummit sessionDevOps and Application Delivery for Hybrid Cloud  - DevOpsSummit session
DevOps and Application Delivery for Hybrid Cloud - DevOpsSummit session
Sanjeev Sharma5.2K views
Using IBM Rational Change as an Enterprise-Wide Error Management Solution – ... by Contribyte
 Using IBM Rational Change as an Enterprise-Wide Error Management Solution – ... Using IBM Rational Change as an Enterprise-Wide Error Management Solution – ...
Using IBM Rational Change as an Enterprise-Wide Error Management Solution – ...
Contribyte185 views
DataOps, DevOps and the Developer: Treating Database Code Just Like App Code by DevOps.com
DataOps, DevOps and the Developer: Treating Database Code Just Like App CodeDataOps, DevOps and the Developer: Treating Database Code Just Like App Code
DataOps, DevOps and the Developer: Treating Database Code Just Like App Code
DevOps.com270 views
Dev ops in agile - 1st Conference Melbourne by Mirco Hering
Dev ops in agile - 1st Conference MelbourneDev ops in agile - 1st Conference Melbourne
Dev ops in agile - 1st Conference Melbourne
Mirco Hering1.4K views
Agile & DevOps - It's all about project success by Adam Stephensen
Agile & DevOps - It's all about project successAgile & DevOps - It's all about project success
Agile & DevOps - It's all about project success
Adam Stephensen344 views
Deployment Automation for Hybrid Cloud and Multi-Platform Environments by IBM UrbanCode Products
Deployment Automation for Hybrid Cloud and Multi-Platform EnvironmentsDeployment Automation for Hybrid Cloud and Multi-Platform Environments
Deployment Automation for Hybrid Cloud and Multi-Platform Environments
DevOps for dummies study sharing - part II by Chen-Tien Tsai
DevOps for dummies study sharing - part IIDevOps for dummies study sharing - part II
DevOps for dummies study sharing - part II
Chen-Tien Tsai780 views
[WSO2Con EU 2017] Continuous Integration, Delivery and Deployment: Accelerate... by WSO2
[WSO2Con EU 2017] Continuous Integration, Delivery and Deployment: Accelerate...[WSO2Con EU 2017] Continuous Integration, Delivery and Deployment: Accelerate...
[WSO2Con EU 2017] Continuous Integration, Delivery and Deployment: Accelerate...
WSO21.4K views

More from Red Gate Software

The future of DevOps: fully left-shifted deployments with version control and... by
The future of DevOps: fully left-shifted deployments with version control and...The future of DevOps: fully left-shifted deployments with version control and...
The future of DevOps: fully left-shifted deployments with version control and...Red Gate Software
286 views19 slides
Embracing DevOps through database migrations with Flyway by
Embracing DevOps through database migrations with FlywayEmbracing DevOps through database migrations with Flyway
Embracing DevOps through database migrations with FlywayRed Gate Software
278 views37 slides
Database DevOps for Managed Service Providers by
Database DevOps for Managed Service ProvidersDatabase DevOps for Managed Service Providers
Database DevOps for Managed Service ProvidersRed Gate Software
161 views12 slides
Mizuho Financial: Launching our Database DevOps journey by
Mizuho Financial: Launching our Database DevOps journeyMizuho Financial: Launching our Database DevOps journey
Mizuho Financial: Launching our Database DevOps journeyRed Gate Software
114 views14 slides
7 steps to effective SQL Server monitoring by
7 steps to effective SQL Server monitoring7 steps to effective SQL Server monitoring
7 steps to effective SQL Server monitoringRed Gate Software
107 views26 slides
Level up your deployments for SQL Source Control by
Level up your deployments for SQL Source Control Level up your deployments for SQL Source Control
Level up your deployments for SQL Source Control Red Gate Software
78 views11 slides

More from Red Gate Software(20)

The future of DevOps: fully left-shifted deployments with version control and... by Red Gate Software
The future of DevOps: fully left-shifted deployments with version control and...The future of DevOps: fully left-shifted deployments with version control and...
The future of DevOps: fully left-shifted deployments with version control and...
Red Gate Software286 views
Embracing DevOps through database migrations with Flyway by Red Gate Software
Embracing DevOps through database migrations with FlywayEmbracing DevOps through database migrations with Flyway
Embracing DevOps through database migrations with Flyway
Red Gate Software278 views
Database DevOps for Managed Service Providers by Red Gate Software
Database DevOps for Managed Service ProvidersDatabase DevOps for Managed Service Providers
Database DevOps for Managed Service Providers
Red Gate Software161 views
Mizuho Financial: Launching our Database DevOps journey by Red Gate Software
Mizuho Financial: Launching our Database DevOps journeyMizuho Financial: Launching our Database DevOps journey
Mizuho Financial: Launching our Database DevOps journey
Red Gate Software114 views
7 steps to effective SQL Server monitoring by Red Gate Software
7 steps to effective SQL Server monitoring7 steps to effective SQL Server monitoring
7 steps to effective SQL Server monitoring
Red Gate Software107 views
Level up your deployments for SQL Source Control by Red Gate Software
Level up your deployments for SQL Source Control Level up your deployments for SQL Source Control
Level up your deployments for SQL Source Control
Key findings from the 2020 state of database dev ops report by Red Gate Software
Key findings from the 2020 state of database dev ops reportKey findings from the 2020 state of database dev ops report
Key findings from the 2020 state of database dev ops report
Quality in Software Development: Anglia Ruskin University by Red Gate Software
Quality in Software Development: Anglia Ruskin UniversityQuality in Software Development: Anglia Ruskin University
Quality in Software Development: Anglia Ruskin University
Red Gate Software113 views
How SQL Change Automation helps you deliver value faster by Red Gate Software
How SQL Change Automation helps you deliver value fasterHow SQL Change Automation helps you deliver value faster
How SQL Change Automation helps you deliver value faster
Red Gate Software161 views
DevOps essentials from Abel Wang and Steve Jones by Red Gate Software
DevOps essentials from Abel Wang and Steve JonesDevOps essentials from Abel Wang and Steve Jones
DevOps essentials from Abel Wang and Steve Jones
Red Gate Software138 views
Successfully migrating existing databases to Azure by Red Gate Software
Successfully migrating existing databases to AzureSuccessfully migrating existing databases to Azure
Successfully migrating existing databases to Azure
Red Gate Software275 views
The Ultimate Guide to Choosing and Implementing the Right Monitoring Tool by Red Gate Software
The Ultimate Guide to Choosing and Implementing the Right Monitoring ToolThe Ultimate Guide to Choosing and Implementing the Right Monitoring Tool
The Ultimate Guide to Choosing and Implementing the Right Monitoring Tool
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re... by Red Gate Software
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...
Everything You Need to Know About the 2019 DORA Accelerate State of DevOps Re...
Red Gate Software318 views
Using Redgate, AKS and Azure to bring DevOps to your database by Red Gate Software
Using Redgate, AKS and Azure to bring DevOps to your databaseUsing Redgate, AKS and Azure to bring DevOps to your database
Using Redgate, AKS and Azure to bring DevOps to your database
Red Gate Software104 views
Using Redgate, AKS and Azure to bring DevOps to your Database by Red Gate Software
Using Redgate, AKS and Azure to bring DevOps to your DatabaseUsing Redgate, AKS and Azure to bring DevOps to your Database
Using Redgate, AKS and Azure to bring DevOps to your Database
Red Gate Software184 views
How to Pitch a Software Development Initiative and Ignite Culture Change by Red Gate Software
How to Pitch a Software Development Initiative and Ignite Culture ChangeHow to Pitch a Software Development Initiative and Ignite Culture Change
How to Pitch a Software Development Initiative and Ignite Culture Change
Red Gate Software144 views

Recently uploaded

AMD: 4th Generation EPYC CXL Demo by
AMD: 4th Generation EPYC CXL DemoAMD: 4th Generation EPYC CXL Demo
AMD: 4th Generation EPYC CXL DemoCXL Forum
126 views6 slides
TE Connectivity: Card Edge Interconnects by
TE Connectivity: Card Edge InterconnectsTE Connectivity: Card Edge Interconnects
TE Connectivity: Card Edge InterconnectsCXL Forum
96 views12 slides
Astera Labs: Intelligent Connectivity for Cloud and AI Infrastructure by
Astera Labs:  Intelligent Connectivity for Cloud and AI InfrastructureAstera Labs:  Intelligent Connectivity for Cloud and AI Infrastructure
Astera Labs: Intelligent Connectivity for Cloud and AI InfrastructureCXL Forum
125 views16 slides
MemVerge: Past Present and Future of CXL by
MemVerge: Past Present and Future of CXLMemVerge: Past Present and Future of CXL
MemVerge: Past Present and Future of CXLCXL Forum
110 views26 slides
Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum... by
Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum...Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum...
Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum...NUS-ISS
28 views35 slides
Samsung: CMM-H Tiered Memory Solution with Built-in DRAM by
Samsung: CMM-H Tiered Memory Solution with Built-in DRAMSamsung: CMM-H Tiered Memory Solution with Built-in DRAM
Samsung: CMM-H Tiered Memory Solution with Built-in DRAMCXL Forum
105 views7 slides

Recently uploaded(20)

AMD: 4th Generation EPYC CXL Demo by CXL Forum
AMD: 4th Generation EPYC CXL DemoAMD: 4th Generation EPYC CXL Demo
AMD: 4th Generation EPYC CXL Demo
CXL Forum126 views
TE Connectivity: Card Edge Interconnects by CXL Forum
TE Connectivity: Card Edge InterconnectsTE Connectivity: Card Edge Interconnects
TE Connectivity: Card Edge Interconnects
CXL Forum96 views
Astera Labs: Intelligent Connectivity for Cloud and AI Infrastructure by CXL Forum
Astera Labs:  Intelligent Connectivity for Cloud and AI InfrastructureAstera Labs:  Intelligent Connectivity for Cloud and AI Infrastructure
Astera Labs: Intelligent Connectivity for Cloud and AI Infrastructure
CXL Forum125 views
MemVerge: Past Present and Future of CXL by CXL Forum
MemVerge: Past Present and Future of CXLMemVerge: Past Present and Future of CXL
MemVerge: Past Present and Future of CXL
CXL Forum110 views
Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum... by NUS-ISS
Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum...Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum...
Beyond the Hype: What Generative AI Means for the Future of Work - Damien Cum...
NUS-ISS28 views
Samsung: CMM-H Tiered Memory Solution with Built-in DRAM by CXL Forum
Samsung: CMM-H Tiered Memory Solution with Built-in DRAMSamsung: CMM-H Tiered Memory Solution with Built-in DRAM
Samsung: CMM-H Tiered Memory Solution with Built-in DRAM
CXL Forum105 views
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor... by Vadym Kazulkin
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...
How to reduce cold starts for Java Serverless applications in AWS at JCON Wor...
Vadym Kazulkin70 views
GigaIO: The March of Composability Onward to Memory with CXL by CXL Forum
GigaIO: The March of Composability Onward to Memory with CXLGigaIO: The March of Composability Onward to Memory with CXL
GigaIO: The March of Composability Onward to Memory with CXL
CXL Forum126 views
Future of Learning - Khoong Chan Meng by NUS-ISS
Future of Learning - Khoong Chan MengFuture of Learning - Khoong Chan Meng
Future of Learning - Khoong Chan Meng
NUS-ISS31 views
"Quality Assurance: Achieving Excellence in startup without a Dedicated QA", ... by Fwdays
"Quality Assurance: Achieving Excellence in startup without a Dedicated QA", ..."Quality Assurance: Achieving Excellence in startup without a Dedicated QA", ...
"Quality Assurance: Achieving Excellence in startup without a Dedicated QA", ...
Fwdays33 views
"How we switched to Kanban and how it integrates with product planning", Vady... by Fwdays
"How we switched to Kanban and how it integrates with product planning", Vady..."How we switched to Kanban and how it integrates with product planning", Vady...
"How we switched to Kanban and how it integrates with product planning", Vady...
Fwdays61 views
The details of description: Techniques, tips, and tangents on alternative tex... by BookNet Canada
The details of description: Techniques, tips, and tangents on alternative tex...The details of description: Techniques, tips, and tangents on alternative tex...
The details of description: Techniques, tips, and tangents on alternative tex...
BookNet Canada110 views
Data-centric AI and the convergence of data and model engineering: opportunit... by Paolo Missier
Data-centric AI and the convergence of data and model engineering:opportunit...Data-centric AI and the convergence of data and model engineering:opportunit...
Data-centric AI and the convergence of data and model engineering: opportunit...
Paolo Missier29 views
"Ukrainian Mobile Banking Scaling in Practice. From 0 to 100 and beyond", Vad... by Fwdays
"Ukrainian Mobile Banking Scaling in Practice. From 0 to 100 and beyond", Vad..."Ukrainian Mobile Banking Scaling in Practice. From 0 to 100 and beyond", Vad...
"Ukrainian Mobile Banking Scaling in Practice. From 0 to 100 and beyond", Vad...
Fwdays40 views
CXL at OCP by CXL Forum
CXL at OCPCXL at OCP
CXL at OCP
CXL Forum208 views
Spesifikasi Lengkap ASUS Vivobook Go 14 by Dot Semarang
Spesifikasi Lengkap ASUS Vivobook Go 14Spesifikasi Lengkap ASUS Vivobook Go 14
Spesifikasi Lengkap ASUS Vivobook Go 14
Dot Semarang35 views
The Importance of Cybersecurity for Digital Transformation by NUS-ISS
The Importance of Cybersecurity for Digital TransformationThe Importance of Cybersecurity for Digital Transformation
The Importance of Cybersecurity for Digital Transformation
NUS-ISS25 views
Liqid: Composable CXL Preview by CXL Forum
Liqid: Composable CXL PreviewLiqid: Composable CXL Preview
Liqid: Composable CXL Preview
CXL Forum121 views
Architecting CX Measurement Frameworks and Ensuring CX Metrics are fit for Pu... by NUS-ISS
Architecting CX Measurement Frameworks and Ensuring CX Metrics are fit for Pu...Architecting CX Measurement Frameworks and Ensuring CX Metrics are fit for Pu...
Architecting CX Measurement Frameworks and Ensuring CX Metrics are fit for Pu...
NUS-ISS32 views

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.