Bringing DevOps to the Database

Slides:



Advertisements
Similar presentations
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.
Advertisements

Database Change Management One solution to an often complex problem Kevin Hurwitz Headspring Systems
Perforce Software Version Everything.. Visual Studio Industry Partner Perforce Software NEXT STEPS Contact us at: Perforce products.
Continuous Integration for Databases Steve Jones SQLServerCentral Red Gate Software.
Continuous Deployments using SSDT
Get testing with tSQLt Practical examples and automation Steve Jones SQLServerCentral Red Gate Software.
9 Copyright © 2004, Oracle. All rights reserved. Getting Started with Oracle Migration Workbench.
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.
Microsoft Virtual Academy
Version Control for PL/SQL
Automated Build and Test
Bringing DevOps to the Database
Bringing DevOps to the Database
Securing SQL Server Processes with Certificates
Agenda:- DevOps Tools Chef Jenkins Puppet Apache Ant Apache Maven Logstash Docker New Relic Gradle Git.
Stress Free Deployments with Octopus Deploy
Essentials of UrbanCode Deploy v6.1 QQ147
Visual Studio Database Tools (aka SQL Server Data Tools)
Working in the Forms Developer Environment
Data Virtualization Demoette… Data Lineage Reporting
Continuous Deployments using SSDT
Bringing DevOps to the Database
Building a Continuous Integration Pipeline using VSTS
Build /21/2018 © 2015 Microsoft Corporation. All rights reserved. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION.
6 Principles of the GDPR and SQL Provision
Continuous Integration For Databases
Automated Testing and Integration with CI Tool
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
Quality Assurance in an Agile Development Team Michelle Wu 2018 PNSQC
Course: Module: Lesson # & Name Instructional Material 1 of 32 Lesson Delivery Mode: Lesson Duration: Document Name: 1. Professional Diploma in ERP Systems.
Continuous Deployments using SSDT
Delivering Business Value Faster
DAT381 Team Development with SQL Server 2005
Your code is not just…your code
Paul S Waters Getting Git.
Presented by : Chirag Dani & Dhaval Shah
SSDT and Database Project Basics
Introduction to VSTS Database Professional
Delivering Business Value Faster
Summit Nashville /3/2019 1:48 AM
HCL’s Viewpoint – DevOps on MS Cloud
Windows 8.1 Deployment Jump Start
TechEd /23/2019 9:23 AM © 2013 Microsoft Corporation. All rights reserved. Microsoft, Windows, and other product names are or may be registered trademarks.
DEVOPS & THE FUTURE OF TESTING
SSDT, Docker, and (Azure) DevOps
Keeping your SQL Code safe
Office 365 Development July 2014.
SSDT, Docker, and (Azure) DevOps
Adopting a Compliant Database DevOps Process
The Future of Database Development
Adopting a Compliant Database DevOps Process
Scott Sauber Slides up at scottsauber.com
The Future of Database Development
Azure DevOps Simplified with Production Data
SSDT, Docker, and (Azure) DevOps
Applying 3C DevOps approach in Mobility World
Your code is not just…your code
Miao Jiang API Management: deep dive - Part 1
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 Editor, SQLServerCentral Redgate Software @way0utwest 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.

Takeaways The database can be built* The database can be tested* Three Takeaways Takeaways The database can be built* The database can be tested* The database can be released* This should be at the beginning and end of your presentation: What are the three talking points your audience should be able to answer after this presentation? * like other software

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

Steve Jones 26 years SQL Server data experience DBA, developer, manager, writer, speaker in a variety of companies and industries Founder, SQLServerCentral And current editor, with the goal of helping you learn to be a better data professional every day Steve Jones Evangelist, Redgate Software Editor, SQLServerCentral 10 years Microsoft Data Platform MVP steve I am honored to be recognized by Microsoft for the last decade as an MVP /in/way0utwest @way0utwest www.voiceofthedba.com

The Three Ways Principles underlying DevOps from Gene Kim Systems Thinking Amplify Feedback Loops Culture of Experimentation and Learning

What is DevOps? “DevOps is the union of people, process, and products to enable continuous delivery of value to our end users.” - Donovan Brown

DevOps in Practice Culture Automation Lean Measurement Sharing DBAs and developers working together Automation Introduce tools to the database Lean make db changes simpler, evolve the db Measurement consider impact of db change Sharing understand how a db change impacts development and operations

The Application Development Pipeline Operations Continuous integration QA Build Production Trigger Test Staging Sync Report Beta Publish Artifact repository

The Database Development Pipeline Operations Continuous integration QA Build Production Trigger Test Staging Shared Sync Report UAT Publish Artifact repository

Evolving Database Development The foundation is Version Control Treat the database code just like application code Capture our DDL (and DML) VCS Organization Can be same repo or separate repo (I prefer separate) Use a sub folder for the DDL Use Pull Requests for code review

SQL and Version Control The process is Get changed code to a text file Commit to the VCS Comments are why changes were made, not what. Options for database DDL and DML Scripting – SMO in SQL Server Third Party Tools File | Save

Demo Store database code in a VCS

Database Continuous Integration Database Build Process Pull code from VCS Order code according to rules of SQL Execute code on a database Run tests Package code for downstream release Use a Build Server just like application code TFS Build, Bamboo, Team City, Cruise Control, Jenkins, whatever

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

Demo Implement Continuous Integration

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)

Deploy the Code Use a consistent process Use automation where you can, use manual steps (documented) where you cannot Slowly and continuously improve the process Use a Release Management Server Octopus Deploy TFS Bamboo

Demo Release to Downstream Environments

Release Issues - Rollback For code – Deploy the previous version Views Procs Functions For tables Need custom code I write and test for risky tables In general, I am a fan of dark deploys and roll forward

Release Issues – Environmental Data Data that varies by environment (queue names, security, etc) Script and deploy with deploy once scripts (maybe separate pipeline) Use tokens where possible and store config data in the environment

Summary Understand and apply the DevOps principles to the db 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 /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