Presentation is loading. Please wait.

Presentation is loading. Please wait.

Samir Behara, Senior Developer, EBSCO

Similar presentations


Presentation on theme: "Samir Behara, Senior Developer, EBSCO"— Presentation transcript:

1 Samir Behara, Senior Developer, EBSCO
DevOps, Continuous Integration & Database Lifecycle Management: Rule them all Samir Behara, Senior Developer, EBSCO @samirbehara

2 SAMIR BEHARA Senior Developer, EBSCO
Samir Behara builds software solutions using cutting edge Microsoft technologies, primarily C# and SQL Server. Has a Bachelor Degree in Computer Science with 12 years of IT experience. Co-Chapter Lead of Steel City SQL Server User Group , Birmingham, AL SAMIR BEHARA Senior Developer, EBSCO

3 DATABASE RELEASE? THE SCRIPTS & I WILL EXECUTE IT

4 DATABASE LIFECYCLE MANAGEMENT OVERVIEW
Continuous Integration Static Code Analysis Continuous Deployment Source Control Coding Unit Testing SHIFT LEFT – Catch issues as early as possible

5 COST OF DEVELOPING SOFTWARE

6 TESTING PYRAMID UI Tests Integration Tests Unit Tests

7 TEST DRIVEN DEVELOPMENT
RED GREEN REFACTOR

8 TECHNICAL DEBT

9 STATIC CODE ANALYSIS SQL Cop
Free and No Installation required SQL Cop has a set of predefined rules to identify anti-patterns for database development Need to have VIEW SERVER STATE or  VIEW DATABASE STATE permission

10 STATIC CODE ANALYSIS SonarQube
Continuous Inspection of Code Quality Identify Code Smells, Bugs and Vulnerabilities Analyzers for 20+ Programming Languages DevOps Integration Reject Check-in when Quality Gate not met

11 RELEASE PIPELINE CODE BUILD INTEGRATE TEST RELEASE DEPLOY
Continuous Integration Continuous Delivery Continuous Deployment

12 DEVELOPMENT CONTINUOUS INTEGRATION BUILD Trigger SOURCE CONTROL TEST Feedback Mechanism

13 CONTINUOUS DEPLOYMENT
CONTINUOUS DELIVERY CODE Auto BUILD Auto STAGING Manual PRODUCTION CONTINUOUS DEPLOYMENT CODE Auto BUILD Auto STAGING Auto PRODUCTION

14 Source Control is the system of truth
STATE BASED APPROACH Source Control is the system of truth COMPARE EXECUTE DATABASE PROJECT/ DACPAC SSDT SCHEMA COMPARE GENERATE DIFFERENCE SCRIPT

15 MIGRATION BASED APPROACH
Database is the system of truth STATE 1 STATE 2 STATE 3 STATE N Migration 1 Migration 2 Migration N

16 MIGRATION BASED APPROACH
STATE BASED APPROACH MIGRATION BASED APPROACH System of Truth is the Source Code Suited for frequent database changes Suited for large sized teams Source Code contains the current state of the database Less control on the migration script Complex refactoring might take multiple steps System of Truth is the Database Suited for infrequent database changes Suited for small sized teams Have to maintain a long list of migration scripts within the source control More fine grain control on the migration script Complex refactoring can be handled by a single script

17 DATABASE DRIFTS Any change to the database schema or reference data
that was made directly in the database environment, outside of the normal automated delivery pipeline. Ensure that all migrations are idempotent – meaning that running a script more than once has no additional impact.

18 BACKWARDS COMPATIBILITY
Non-Breaking Database Change Adding a Column/Table/Stored Procedure/ View/ Function Breaking Database Change Renaming a Column/Table/Stored Procedure/ View/ Function Dropping a Column/Table Remove a Stored Procedure/ View/ Function Moving a Column from one table

19 Expand Transition Phase Contract EXPAND AND CONTRACT PATTERN
Initial Refactoring is applied Data is migrated Perform Cleanup to complete the refactoring

20 DISCONNECTED DATABASE DEVELOPMENT CODE EDITING EXPERIENCE
VERSION CONTROL DISCONNECTED DATABASE DEVELOPMENT DECLARATIVE APPROACH SQL SERVER DATA TOOLS DACPAC DEPLOPYMENTS CODE EDITING EXPERIENCE SCHEMA & DATA COMPARE

21 SSDT INSTALLATION IN VISUAL STUDIO 2017

22 MORE CONTROL ON MIGRATION SCRIPT
INCREMENTAL CHANGE SHIFT LEFT MORE CONTROL ON MIGRATION SCRIPT REDGATE READYROLL HYBRID APPROACH PROGRAMMABLE OBJECTS OFFLINE SCHEMA MODEL

23 READYROLL INSTALLATION IN VISUAL STUDIO 2017

24 Flyway is free and open source.
Flyway facilitates the Automatic Deployment of database changes. Flyway creates a table name ‘schema_version‘ in your database. Flyway supports number of databases – Oracle, SQL Server, MySQL, PostgreSQL, MariaDB, SQLite, Redshift and more.

25 BRANCHING STRATEGY MAIN
Reverse Integration MAIN Changes made to same file causes Merge Conflict. Longer running features has the potential to create Merge issues. Conflicts are caused by merge issues because of long running feature branches. BRANCH 1 BRANCH 2 File1.cs File2.cs 7 Changes 5 Changes Resolving Merge Conflicts is Error Prone and Time Consuming.

26 FEATURE FLAGS Potential alternative to maintaining multiple feature branches. Reduces the need for constant branching and merging. Enables releases with unfinished features at no risk.

27 RESOURCES Continuous Integration with SQL Server Data Tools in Visual Studio 2017 Database Static Code Analysis using SQL Cop Managing your Technical Debt using SonarQube Continuous Integration, Continuous Delivery and Continuous Deployment

28 @samirbehara dotnetvibes.com


Download ppt "Samir Behara, Senior Developer, EBSCO"

Similar presentations


Ads by Google