DevOps, Continuous Integration & Automated Testing: Rule...

32
#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM DevOps, Continuous Integration & Automated Testing: Rule Them All SAMIR BEHARA Solution Architect EBSCO, Birmingham, AL

Transcript of DevOps, Continuous Integration & Automated Testing: Rule...

Page 1: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

DevOps, Continuous Integration & Automated Testing: Rule Them All

SAMIR BEHARASolution ArchitectEBSCO, Birmingham, AL

Page 2: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

DATABASE RELEASE?

EMAIL THE SCRIPTS & I WILL EXECUTE IT

Page 3: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Database Lifecycle Management Overview

SHIFT LEFT – Catch issues as early as possible

Page 4: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Automated CI/CD Pipelines

Page 5: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Azure DevOps

An end-to-end solution for organizations looking for an enterprise-grade toolchain

Page 6: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Azure Pipelines and GitHub Integration

Cloud-hosted pipelines for Linux, Windows and macOS, with unlimited minutes for open source

Any language, any platform, any cloud

Extensible

Containers and Kubernetes

Best-in-class for open source

Page 7: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Microservices CI/CD Ecosystem

Page 8: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Test Driven Development

Page 9: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Testing your Microservices Applications

Page 10: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

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

Static Code Analysis - SonarQube

Page 11: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Release Pipeline

Page 12: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Continuous Integration

Page 13: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Continuous Delivery

Continuous Deployment

Page 14: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Potential alternative to maintaining multiple feature branches.

Reduces the need for constant branching and merging.

Enables releases with unfinished features at no risk.

Feature Flags

Page 15: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

Scenario: Incremental feature deployment

PRODMOCKQADEV

Feature A

Feature B.1

Feature B.2

Feature A

Feature B

FEATURE FLAGS – DEPLOYMENT SCENARIO 1

Page 16: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

Scenario: One passes QA and one fails QA

PRODMOCKQADEV

Feature A

Feature B

Feature A

Feature B

Bug Created

Feature A Bug Fix

Feature A Bug Fix

Even though feature A did not receive QA approval, we can still deliver feature B to the customer. We simply switch off the offending feature and create a new task to fix the bug.

FEATURE FLAGS – DEPLOYMENT SCENARIO 2

Page 17: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

Scenario: Comparative Performance Enhancement Testing

PRODMOCKQADEV

Feature A

Feature A

Gather Performance Data: OriginalGather Performance Data: New Feature

< Compare >

FEATURE FLAGS – DEPLOYMENT SCENARIO 3

Page 18: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

Scenario: Selectively flipping a feature on need basis in Production

PRODMOCKQADEV

Processing Override

Processing Override

We keep this feature flag in production to act as a toggle switch.

During busy season we turn it for alternative processing.

After busy season, we turn it off and resume normal order processing.

FEATURE FLAGS – DEPLOYMENT SCENARIO 4

Page 19: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Blue-Green Deployment

Page 20: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Canary Release

Page 21: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Dark Release

Page 22: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Source Control is the system of truth

Page 23: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Database is the system of truth

Page 24: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

• 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

• STATE BASED APPROACH

State Based Approach Migration Based Approach

Page 25: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

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.

Page 26: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.✓ Renaming a Column/Table/Stored Procedure/ View/ Function✓ Dropping a Column/Table✓ Remove a Stored Procedure/ View/ Function✓ Moving a Column from one table

✓ Adding a Column/Table/Stored Procedure/ View/ Function

Non-Breaking Database Change

Breaking Database Change

Page 27: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Expand and Contract Pattern

Page 28: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

VERSION CONTROL

DISCONNECTED DATABASE

DEVELOPMENT

DECLARATIVE APPROACH

DACPAC DEPLOPYMENTS

CODE EDITING EXPERIENCE

SCHEMA & DATA COMPARE

Page 29: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

INCREMENTAL CHANGE

SHIFT LEFTMORE CONTROL ON MIGRATION

SCRIPT

HYBRID APPROACH

PROGRAMMABLE OBJECTS

OFFLINE SCHEMA MODEL

Page 30: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

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.

Page 31: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Additional 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

Page 32: DevOps, Continuous Integration & Automated Testing: Rule ...files.informatandm.com/uploads/2018/10/DevOps_Continuous_Integr… · Continuous Inspection of Code Quality Identify Code

#ITDEVCONNECTIONS | ITDEVCONNECTIONS.COM

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Content goes here. Content goes here.

Thank You

@samirbehara dotnetvibes.com