Presentation is loading. Please wait.

Presentation is loading. Please wait.

Bringing DevOps to the Database

Similar presentations


Presentation on theme: "Bringing DevOps to the Database"— Presentation transcript:

1 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.

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

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

4 What is DevOps? Grew out of the Agile movement
Velocity ‘09 – 10+ Deploys Per Day: Dev and Ops Cooperation at Flickr Is not Agile (or Scrum or Lean or Kanban) Is an amalgamation of various ideas and principles that describe how to better build software.

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

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

7 Seven Key DevOps Practices
Configuration Management Release Management Continuous Integration Continuous Deployment Infrastructure as Code Test Automation Application Performance Monitoring

8 Seven Key DevOps Habits
Team Autonomy and Enterprise Alignment Rigorous Management of Technical Debt Focus on Flow of Customer Value Hypothesis Driven Development Evidence Gathered in Production Live Site Culture Manage Infrastructure as a Flexible Resource

9 DevOps in Practice Automation Testing
Continuous Integration Continuous Delivery Testing Should be automated Measurement and Tracking/Auditing Logging in the application/database Monitoring and baselining Communication Transparency Sharing

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

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

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

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

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

15 Evolving Database Development
Version Control Options for database DDL and DML Scripting – SMO in SQL Server Third Party Tools File | Save VCS Organization Can be same repo or separate repo Keep code separated Use Pull Requests like other code

16 Demo Store database code in a VCS

17 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)

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

19 Demo Implement Continuous Integration

20 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)

21 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

22 Release Issues Rollback Environment Data
For code (views, procs, functions) – Deploy the previous version For tables – Need custom code In general, I am a fan of dark deploys and roll forward Environment Data Data that varies by environment (queue names, security, etc) Script and deploy with deploy once scripts Use tokens where possible and store config data in the environment

23 Demo Release to Downstream Environments

24 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

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

26 References You’re Doing DevOps Wrong - Codifying DevOps Practices - 3 DevOps Principles to Apply to Your IT Team - apply-team/ DevOps Distilled, Part 1: Closing the Gap Between Database Continuous Delivery and Code Continuous Delivery Where’s the Database in DevOps - How do Databases Fit into DevOps - devops/

27 Images


Download ppt "Bringing DevOps to the Database"

Similar presentations


Ads by Google