Bringing DevOps to the Database

Slides:



Advertisements
Similar presentations
#sqlsatPordenone #sqlsat367 February 28, 2015 Testing your databases Alessandro
Advertisements

Agenda Model migration vs MDS upgrade Model migration overview Model migration – how does it work? Model package Demo.
René Balzano Technology Solution Professional Data Platform Microsoft Switzerland Database Development with SQL Server Data Tools (SSDT)
Improving Software Quality with Continuous Integration
| Basel Verwalten von Deployments und Release Management – mit dem TFS 2013 ganz einfach! Hansjörg Scherer ALM Spezialist Microsoft
Continuous Integration for Databases Learn how to automate your build and test Steve Jones Red Gate Software Part II of the Continuous Delivery for Databases.
& Dev Ops. Sherwin-Williams & DevOps Introduction to Sherwin-Williams.
Database Change Management One solution to an often complex problem Kevin Hurwitz Headspring Systems
Database Projects in Visual Studio Improving Reliability & Productivity.
Real World SQL Server Data Tools Benjamin
Release Management with Visual Studio Team Services
Cruise Training Introduction of Continuous Integration.
Continuous Integration for Databases Steve Jones SQLServerCentral Red Gate Software.
Continuous Deployments using SSDT
End to End Always Encrypted in SQL Server 2016 Steve Jones SQLServerCentral Redgate Software.
Get testing with tSQLt Practical examples and automation Steve Jones SQLServerCentral Red Gate Software.
Avoiding the Pitfalls of Database Change Automation Cindy Bean Sr. Software Consultant DBmaestro SQLSaturday #514 – Houston, May 14, 2016.
A Practical Approach to Version Control for SQL Server Steve Jones SQLServerCentral Redgate Software.
Others Talk, We Listen. Managing Database Projects in Visual Studio 2013.
Continuous Integration for Databases Steve Jones SQLServerCentral Red Gate Software.
Version Control for PL/SQL
Automated Build and Test
Bringing DevOps to the Database
Bringing DevOps to the Database
Don’t Forget Security When Delivering Software
Agenda:- DevOps Tools Chef Jenkins Puppet Apache Ant Apache Maven Logstash Docker New Relic Gradle Git.
Continuous Delivery- Complete Guide
Visual Studio Database Tools (aka SQL Server Data Tools)
using System; namespace Demo01 { class Program
Data Virtualization Demoette… Data Lineage Reporting
Continuous Deployments using SSDT
DevOps: What it is & why you should care
Change Deployment in ServiceN w
Building a Continuous Integration Pipeline using VSTS
Entity Framework Core for Enterprise Applications
Release Management with Visual Studio Team Services
Bringing DevOps to the Database
SQL Server Data Tools Gert Drapers
6 Principles of the GDPR and SQL Provision
Continuous Integration For Databases
Database Code Management with VS 2017 and RedGate
Intro to Unit Testing with tSQLt
Visual Studio Database Tools (aka SQL Server Data Tools)
Continuous Deployments using SSDT
Bringing DevOps to the Database
End to End Security and Encryption in SQL Server
Continuous Deployments using SSDT
Continuous Deployments using SSDT
Your code is not just…your code
Continuous Integration
Presented by : Chirag Dani & Dhaval Shah
SSDT and Database Project Basics
CONTINUOUS INTEGRATION –WHY WE DO IT?
Delivering Business Value Faster
DEVOPS & THE FUTURE OF TESTING
SSDT, Docker, and (Azure) DevOps
Keeping your SQL Code safe
SSDT, Docker, and (Azure) DevOps
Adopting a Compliant Database DevOps Process
The Future of Database Development
Adopting a Compliant Database DevOps Process
The Future of Database Development
PNW SQL Users Group August 10th, 2011
Azure DevOps Simplified with Production Data
SSDT, Docker, and (Azure) DevOps
Your code is not just…your code
The Future of Database Development (with containers)
Samir Behara, Senior Developer, EBSCO
SQL in the City Summit.
Thanks to our Sponsors Platinum Sponsor: Gold Sponsors:
Presentation transcript:

Bringing DevOps to the Database Steve Jones SQLServerCentral Redgate Software DevOps is a hot topic in today’s software development world. However most of the knowledge and experience with DevOps is based around application software and ignores the database. We will examine how the concepts and principles of DevOps can be applied to database development by looking at both automated comparison analysis as well as migration script management. Automated building, testing, and deployment of database changes will be shown.

Agenda Who am I? The Database Development Pipeline Principles of DevOps Evolving Database Development

Who am I? Steve Jones www.voiceofthedba.com @way0utwest /in/way0utwest SQLServerCentral founder Redgate Software Evangelist www.voiceofthedba.com sjones@sqlservercentral.com @way0utwest /in/way0utwest

The Database Development Pipeline Create table Orders ( OrderID int , OrderDate datetime , salesrep int , customerid int , status tnyint ) Dev Create procedure GetOrders @o datetime As Begin Select * from orders Where orderdate > @o using System; using System.Collections.Generic; using System.Text; using eBay.Service.Core.Sdk; using eBay.Service.Core.Soap; namespace Trading_Samples {     class Program     {         static void Main(string[] args)         {             MakeGetOrders();             Console.ReadLine(); Developers write code, working with test systems.

The Database Development Pipeline Create table Orders ( OrderID int , OrderDate datetime , salesrep int , customerid int , status tnyint ) Dev Create procedure GetOrders @o datetime As Begin Select * from orders Where orderdate > @o using System; using System.Collections.Generic; using System.Text; using eBay.Service.Core.Sdk; using eBay.Service.Core.Soap; namespace Trading_Samples {     class Program     {         static void Main(string[] args)         {             MakeGetOrders();             Console.ReadLine(); Application code usually goes to a VCS

The Database Development Pipeline Continuous Integration Create table Orders ( OrderID int , OrderDate datetime , salesrep int , customerid int , status tnyint ) Dev Create procedure GetOrders @o datetime As Begin Select * from orders Where orderdate > @o using System; using System.Collections.Generic; using System.Text; using eBay.Service.Core.Sdk; using eBay.Service.Core.Soap; namespace Trading_Samples {     class Program     {         static void Main(string[] args)         {             MakeGetOrders();             Console.ReadLine(); Here the application usually kicks off a CI process Build Test Commit Publish

The Database Development Pipeline Continuous Integration Testing Create table Orders ( OrderID int , OrderDate datetime , salesrep int , customerid int , status tnyint ) Alter table Orders Add status tinyint; Create procedure GetOrders ….. Dev QA Create procedure GetOrders @o datetime As Begin Select * from orders Where orderdate > @o using System; using System.Collections.Generic; using System.Text; using eBay.Service.Core.Sdk; using eBay.Service.Core.Soap; namespace Trading_Samples {     class Program     {         static void Main(string[] args)         {             MakeGetOrders();             Console.ReadLine(); Here the application usually kicks off a CI process Build Test Commit Publish

The Database Development Pipeline Continuous Integration Testing Create table Orders ( OrderID int , OrderDate datetime , salesrep int , customerid int , status tnyint ) Alter table Orders Add status tinyint; Create procedure GetOrders ….. Dev QA Create procedure GetOrders @o datetime As Begin Select * from orders Where orderdate > @o using System; using System.Collections.Generic; using System.Text; using eBay.Service.Core.Sdk; using eBay.Service.Core.Soap; namespace Trading_Samples {     class Program     {         static void Main(string[] args)         {             MakeGetOrders();             Console.ReadLine(); Here the application usually kicks off a CI process Build Test Commit Publish

The Database Development Pipeline Continuous Integration Testing Production Create table Orders ( OrderID int , OrderDate datetime , salesrep int , customerid int , status tnyint ) Alter table Orders Add status tinyint; Create procedure GetOrders ….. Alter table Orders Add status tinyint; Create procedure GetOrders ….. Prod Dev QA Create procedure GetOrders @o datetime As Begin Select * from orders Where orderdate > @o using System; using System.Collections.Generic; using System.Text; using eBay.Service.Core.Sdk; using eBay.Service.Core.Soap; namespace Trading_Samples {     class Program     {         static void Main(string[] args)         {             MakeGetOrders();             Console.ReadLine(); Here the application usually kicks off a CI process Build Test COPY Commit Publish

DevOps Principles Systems Thinking Amplify Feedback Loops Experimentation and Learning

Communication and collaboration. These are the most important. Note: Your DevOps process will be different than mine. And anyone else’s.

DevOps in Practice Automation Testing Measurement and Tracking/Auditing Communication Transparency Sharing

Evolving Database Development Create table Orders ( OrderID int , OrderDate datetime , salesrep int , customerid int , status tnyint ) Dev Create procedure GetOrders @o datetime As Begin Select * from orders Where orderdate > @o Here the application usually kicks off a CI process

Evolving Database Development Getting database code into a VCS Scripting – SMO in SQL Server Third Party Tools File | Save

Demo Store database code in a VCS

Evolving Database Development Continuous Integration Create table Orders ( OrderID int , OrderDate datetime , salesrep int , customerid int , status tnyint ) Dev Create procedure GetOrders @o datetime As Begin Select * from orders Where orderdate > @o Here the application usually kicks off a CI process Build Test Commit Publish

Database Continuous Integration Use a Build Server TFS Build, Bamboo, Team City, Cruise Control, Jenkins, whatever Database Build Pull code from VCS Execute code (in order) on a database Database Testing Use a framework (next slide) Publish Generate an Upgrade Script for an existing database (coming soon)

Database Testing For SQL Server tSQLt Microsoft Unit Testing Projects DBUnit TSQLUnit Custom scripted tests * For best results, use curated test data

Demo Implement Continuous Integration

Evolving Database Development Continuous Integration Testing Create table Orders ( OrderID int , OrderDate datetime , salesrep int , customerid int , status tnyint ) Alter table Orders Add status tinyint; Create procedure GetOrders ….. Dev Create procedure GetOrders @o datetime As Begin Select * from orders Where orderdate > @o QA Here the application usually kicks off a CI process Build Test Commit Publish

Generate the Update Script For code (stored procedures, functions, views, modules, etc.) Take latest version from VCS For tables Use Comparison or migration scripts to make changes. Tools Comparison tools (SQL Compare, etc) Migration Tools (ReadyRoll, FlywayDB, Liquibase, etc)

Use a Process

Demo Release to Downstream Environments

Evolving Database Development Continuous Integration Testing Production Create table Orders ( OrderID int , OrderDate datetime , salesrep int , customerid int , status tnyint ) Alter table Orders Add status tinyint; Create procedure GetOrders ….. Alter table Orders Add status tinyint; Create procedure GetOrders ….. COPY Prod Dev Create procedure GetOrders @o datetime As Begin Select * from orders Where orderdate > @o QA Here the application usually kicks off a CI process Build Test Commit Publish

Summary Understand and implement the DevOps principles Systems Thinking Feedback Loops Experimentation and Learning Treat the database like application code Build the exceptions into your process Adapt to your environment Do more of what works Do less of what doesn’t

The End www.voiceofthedba.com sjones@sqlservercentral.com @way0utwest Thank you for coming Questions? More product info at http://www.red-gate.com/products/dlm/ Training: red-gate.com/training www.voiceofthedba.com sjones@sqlservercentral.com @way0utwest /in/way0utwest

References You’re Doing DevOps Wrong - https://techcrunch.com/2016/07/04/youre-doing-devops-wrong/ Codifying DevOps Practices - http://www.jedi.be/blog/2012/05/12/codifying-devops-area-practices/ 3 DevOps Principles to Apply to Your IT Team - http://blogs.atlassian.com/2015/09/3-key-devops-principles- apply-team/ DevOps Distilled, Part 1: http://www.ibm.com/developerworks/library/se-devops/part1/index.html Closing the Gap Between Database Continuous Delivery and Code Continuous Delivery http://devops.com/2014/11/19/closing-gap-database-continuous-delivery-code-continuous-delivery/ Where’s the Database in DevOps - https://www.red-gate.com/library/wheres-the-database-in-devops How do Databases Fit into DevOps - https://blog.devopsguys.com/2015/02/19/how-do-databases-fit-into- devops/

Images https://coupongy.files.wordpress.com/2013/06/scratching-head3.gif http://sipsoftlogic.com/qa-testing/ http://www.qahipster.com/uploads/8/1/4/4/8144013/417638_orig.gif https://commons.wikimedia.org/wiki/File:Server-blades.svg http://sethkravitz.com/wp-content/uploads/2016/01/culture.jpg http://cdn.electric-cloud.com/wp-content/uploads/2015/04/end_to_end_automation.jpeg https://media.licdn.com/mpr/mpr/p/6/005/0b0/1ca/3876971.jpg http://studyjams.scholastic.com/studyjams/assets/jams/math/measurement/image.jpg http://static1.squarespace.com/static/50e6cb55e4b0404f376ac3a9/t/51001a3ce4b0479a8076a5da/1358961213093/feedback.png https://www.govloop.com/blogs/4001-5000/4920-Experiment.gif http://onlinelearningtips.com/wp-content/uploads/2014/04/worlde-online-learning.gif http://successagency.com/blog/wp-content/uploads/2014/05/5.-Communication-gif.gif https://elizajanee.files.wordpress.com/2015/03/tumblr_n652boc6hf1rpfx57o1_400.gif http://cdn2.totallythebomb.com/wp-content/uploads/2011/09/stopsign.gif http://threesixtysafety.com/wp-content/uploads/effective-communication.jpg http://www.millenniumrecycling.com/wp-content/uploads/2015/01/Process-Gif.gif