how to build a metrics-optimized software delivery pipeline

59
1 COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE #APMLive Building a Metrics Optimized Pipeline Andi Grabner Performance Advocate @grabnerandi Andrew Phillips VP DevOps Strategy XebiaLabs

Upload: dynatrace

Post on 16-Apr-2017

900 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: How to Build a Metrics-optimized Software Delivery Pipeline

1 COMPANY CONFIDENTIAL – DO NOT DISTRIBUTE #APMLive

Building a MetricsOptimized Pipeline

Andi GrabnerPerformance Advocate@grabnerandi

Andrew PhillipsVP DevOps StrategyXebiaLabs

Page 2: How to Build a Metrics-optimized Software Delivery Pipeline

1 Today’s Unicorn • Recap from Velocity & PERFORM 2015• Why we don’t have to be like Facebook

2 Why Unicorns Excel? • Speed through automation• Quality through metrics

3 Metrics and approach • Service, business & user metrics• Pre-Prod - from integration and load

tests• Prod - from real-users

4 Dynatrace andXL Release by XebiaLabs

• Building a metric-driven pipeline

Today’s agenda

Page 3: How to Build a Metrics-optimized Software Delivery Pipeline

U N I C O R N S T A T U S

Page 4: How to Build a Metrics-optimized Software Delivery Pipeline

700 deployments / year

10 + deployments / day

50 – 60 deployments / day

Every 11.6 seconds

Page 5: How to Build a Metrics-optimized Software Delivery Pipeline
Page 6: How to Build a Metrics-optimized Software Delivery Pipeline

• Waterfall agile: 3 years• 220 Apps - 1 deployment per month• “EVERY manual tester does automation”• “We don’t log bugs. We fix them.”

• Measures are built in & visible to everyone• Promote your wins! Educate your peers.

• EVERYONE can do continuous delivery.

Page 7: How to Build a Metrics-optimized Software Delivery Pipeline

CHALLENGE

Page 8: How to Build a Metrics-optimized Software Delivery Pipeline

“Deploy Faster!!”

Page 9: How to Build a Metrics-optimized Software Delivery Pipeline

Fail Faster!

Page 10: How to Build a Metrics-optimized Software Delivery Pipeline

It‘s not about blind automation of pushing more bad code through a shiny pipeline

Page 11: How to Build a Metrics-optimized Software Delivery Pipeline

879! SQL Queries8! Missing CSS & JS Files

340! Calls to GetItemById

Example #1: Public Website based on SharePoint

Page 12: How to Build a Metrics-optimized Software Delivery Pipeline

Example #2: Migrated to (Micro)-Services

26.7s Execution Time 33! Calls to the

same Web Service

171! SQL Queries through LINQ by this Web Service –

request similar data for each call

Architecture Violation: Direct access to DB from frontend logic

Page 13: How to Build a Metrics-optimized Software Delivery Pipeline

Key App Metrics # SQL (INS, UPD, DEL, …)

# LOGs

# API Calls (Hibernate, …) # Exceptions

Execution Time

Page 14: How to Build a Metrics-optimized Software Delivery Pipeline

20%80%

Page 15: How to Build a Metrics-optimized Software Delivery Pipeline

Level Upfrom doing . . .

Page 16: How to Build a Metrics-optimized Software Delivery Pipeline

this

Page 17: How to Build a Metrics-optimized Software Delivery Pipeline

SQL

Object allocation

Bytes transferred

Exceptions

Service CallsJavaScript

to this!

Page 18: How to Build a Metrics-optimized Software Delivery Pipeline

18

What you currently measureQuality Metrics inContinuous Delivery # Test Failures

Overall Duration

What you should measure

# Log Messages# HTTP 4xx/5xxRequest/Response SizePage Load/Rendering Time…

Execution Time per test# calls to API# executed SQL statements# Web Service Calls# JMS Messages# Objects Allocated# Exceptions

Page 19: How to Build a Metrics-optimized Software Delivery Pipeline

Measures from your Tests in Action

Build 17 testPurchase OKtestSearch OK

Build # Test Case Status

Test & Monitoring Framework Results

Page 20: How to Build a Metrics-optimized Software Delivery Pipeline

Measures from your Tests in Action

Build 17 testPurchase OKtestSearch OK

Build 18 testPurchase FAILEDtestSearch OK

Build # Test Case Status

Test & Monitoring Framework Results

We identified a regression

Page 21: How to Build a Metrics-optimized Software Delivery Pipeline

Measures from your Tests in Action

Build 17 testPurchase OKtestSearch OK

Build 18 testPurchase FAILEDtestSearch OK

Build 19 testPurchase OK

testSearch OK

Build # Test Case Status

Test & Monitoring Framework Results

Problem solved

Page 22: How to Build a Metrics-optimized Software Delivery Pipeline

Measures from your Tests in Action

Build 17 testPurchase OKtestSearch OK

Build 18 testPurchase FAILEDtestSearch OK

Build 19 testPurchase OK

testSearch OK

Build # Test Case Status # SQL # Excep CPU

Test & Monitoring Framework Results Architectural Data

Let’s look behind the scenes

Page 23: How to Build a Metrics-optimized Software Delivery Pipeline

Measures from your Tests in Action

Build 17 testPurchase OKtestSearch OK

Build 18 testPurchase FAILEDtestSearch OK

Build 19 testPurchase OK

testSearch OK

Build # Test Case Status # SQL # Excep CPU

12 0 120ms3 1 68ms

Test & Monitoring Framework Results Architectural Data

Let’s look behind the scenes

Page 24: How to Build a Metrics-optimized Software Delivery Pipeline

Measures from your Tests in Action

Build 17 testPurchase OKtestSearch OK

Build 18 testPurchase FAILEDtestSearch OK

Build 19 testPurchase OK

testSearch OK

Build # Test Case Status # SQL # Excep CPU

12 0 120ms3 1 68ms

12 5 60ms

3 1 68ms

Test & Monitoring Framework Results Architectural Data

Exceptions probably reason for failed tests

Let’s look behind the scenes

Page 25: How to Build a Metrics-optimized Software Delivery Pipeline

Measures from your Tests in Action

Build 17 testPurchase OKtestSearch OK

Build 18 testPurchase FAILEDtestSearch OK

Build 19 testPurchase OK

testSearch OK

Build # Test Case Status # SQL # Excep CPU

12 0 120ms3 1 68ms

12 5 60ms

3 1 68ms

75 0 230ms

3 1 68ms

Test & Monitoring Framework Results Architectural Data

Problem fixed but now we have an architectural regression

Problem fixed but now we have an architectural regression

Let’s look behind the scenes

Page 26: How to Build a Metrics-optimized Software Delivery Pipeline

Measures from your Tests in Action

12 0 120ms

3 1 68ms

Build 20 testPurchase OK

testSearch OK

Build 17 testPurchase OKtestSearch OK

Build 18 testPurchase FAILEDtestSearch OK

Build 19 testPurchase OK

testSearch OK

Build # Test Case Status # SQL # Excep CPU

12 0 120ms3 1 68ms

12 5 60ms

3 1 68ms

75 0 230ms

3 1 68ms

Test & Monitoring Framework Results Architectural Data

Now we have the functional and architectural confidence

Let’s look behind the scenes

Page 27: How to Build a Metrics-optimized Software Delivery Pipeline

One goal: deliver better features to customers fasterTwo fundamental components: speed + quality

Page 28: How to Build a Metrics-optimized Software Delivery Pipeline

When, and how, should we measure?

Not just in production!

Measure as early as possible in your development and delivery process

Fast feedback is both more effective and cheaper at identifying and fixing problems

Reuse what you already have - automated “functional” tests but convert them into Architectural, Performance and Scalability Validation Tests

Page 29: How to Build a Metrics-optimized Software Delivery Pipeline

When, and how, shall we measure?

Build/CI Integration & Perf User Analysis Analysis Analysis

Service-level

Service-level

Business application

Service-level

Business application

User experience

Feedback Loop

Page 30: How to Build a Metrics-optimized Software Delivery Pipeline

OK, OK, …how do I get started?

Page 31: How to Build a Metrics-optimized Software Delivery Pipeline

31

Metric-DrivenContinuous DeliveryWith Dynatrace & XL Release by XebiaLabs

Page 32: How to Build a Metrics-optimized Software Delivery Pipeline

• XebiaLabs XL Release is a pipeline orchestrator• It allows you to define, execute, track and improve all the tasks in your

delivery pipeline• All = Automated + manual, technical + process-oriented• Insight, visibility and control into people and tools

Orchestrating your delivery pipeline with XL Release

Page 33: How to Build a Metrics-optimized Software Delivery Pipeline

XL Release and Dynatrace XL Release by XebiaLabs allows you to integrate

Dynatrace quality metrics into your overall Continuous Delivery pipeline

Automatically verify architectural quality during your integration testing

Trigger and review performance monitoring results Automatically register releases in Dynatrace to allow for

“before/after” comparisons of user behavior Deliver better software and close the Continuous

Delivery feedback loop!

Page 34: How to Build a Metrics-optimized Software Delivery Pipeline

Quality metrics in your unit & integration tests

ArchitecturalQuality Metrics from

Unit & Integration Tests

Page 35: How to Build a Metrics-optimized Software Delivery Pipeline

#1: Analyzing every Unit & Integration test

#2: Metrics for each test

#3: Detecting regression based on measure

Unit / Integration Tests are auto baselined! Regressions auto-detected!

Page 36: How to Build a Metrics-optimized Software Delivery Pipeline

Build-by-Build Quality View

Build Quality Overview in Dynatrace or Jenkins

Build Quality Overview in Dynatrace & your CI server

Page 37: How to Build a Metrics-optimized Software Delivery Pipeline

Beyond unit & integration tests

ArchitecturalQuality Metrics from

Unit & Integration TestsPerformance Metrics

From Load Tests

Deployment Marker to support

ProductionMonitoring

Page 38: How to Build a Metrics-optimized Software Delivery Pipeline

Load tests: finding hotspots per test easily

#1: Analyze Load Testing Results by Timer Name, Script Name, …

Page 39: How to Build a Metrics-optimized Software Delivery Pipeline

Load tests: finding hotspots per test easily

#1: Analyze Load Testing Results by Timer Name, Script Name, …

#2: Which TIERS have a problem?

Page 40: How to Build a Metrics-optimized Software Delivery Pipeline

Load tests: finding hotspots per test easily

#1: Analyze Load Testing Results by Timer Name, Script Name, …

#2: Which TIERS have a problem?

#3: Is it the DATABASE?

Page 41: How to Build a Metrics-optimized Software Delivery Pipeline

Load tests: finding hotspots per test easily

#1: Analyze Load Testing Results by Timer Name, Script Name, …

#2: Which TIERS have a problem?

#3: Is it the DATABASE?#4: How HEALTHY is the

JVM and the Host?

Page 42: How to Build a Metrics-optimized Software Delivery Pipeline

Load tests: finding hotspots per test easily

#1: Analyze Load Testing Results by Timer Name, Script Name, …

#2: Which TIERS have a problem?

#3: Is it the DATABASE?#4: How HEALTHY is the

JVM and the Host?

#5: Do we have any ERRORS?

Page 43: How to Build a Metrics-optimized Software Delivery Pipeline

Load tests: finding hotspots per test easily

#1: Analyze Load Testing Results by Timer Name, Script Name, …

#2: Which TIERS have a problem?

#3: Is it the DATABASE?#4: How HEALTHY is the

JVM and the Host?

#5: Do we have any ERRORS?

#6: LOAD vs. RESPONSETime over time?

Page 44: How to Build a Metrics-optimized Software Delivery Pipeline

Load tests: We can compare two runs

Did we get better or worse? DB, Web Requests, API, …

Did we get better or worse? DB, Web Requests, API …

Page 45: How to Build a Metrics-optimized Software Delivery Pipeline

Don’t stop atGo Live!

Page 46: How to Build a Metrics-optimized Software Delivery Pipeline

Production data: real-user & application monitoring

Page 47: How to Build a Metrics-optimized Software Delivery Pipeline

Physical, Virtual or Containers

Page 48: How to Build a Metrics-optimized Software Delivery Pipeline

A metric-driven Continuous Delivery pipeline

ArchitecturalQuality Metrics from

Unit & Integration TestsPerformance Metrics

from Load Tests

Deployment Marker to support

Production Monitoring

Review user behaviorthrough UEM Data

Page 49: How to Build a Metrics-optimized Software Delivery Pipeline

Start Here

Page 50: How to Build a Metrics-optimized Software Delivery Pipeline

Level Up with Dynatrace Free Trial & Personalhttp://bit.ly/dtpersonal

Page 51: How to Build a Metrics-optimized Software Delivery Pipeline

Download XL Release from XebiaLabs

Automate, orchestrate and get visibility into your release pipelines - at enterprise scale!

Start a Free 30-Day Trial Today!http://bit.ly/TryXLRelease

Page 52: How to Build a Metrics-optimized Software Delivery Pipeline

Download the XebiaLabs XL Release Dynatrace Plugin - GitHub

Page 53: How to Build a Metrics-optimized Software Delivery Pipeline

Integrate with all of your existing tools

Page 54: How to Build a Metrics-optimized Software Delivery Pipeline

Putting it all together

Page 55: How to Build a Metrics-optimized Software Delivery Pipeline

Summary Continuous Delivery = Speed + Quality

3 levels of metrics: service, business and user

Dynatrace can already collect these metrics for you

Get started today: incorporate quality metrics into your release pipeline straight away using tools like XL Release by XebiaLabs

Page 56: How to Build a Metrics-optimized Software Delivery Pipeline

One goal: deliver better features to customers fasterTwo fundamental components: speed + quality

Page 57: How to Build a Metrics-optimized Software Delivery Pipeline

Resources

Check out XebiaLabs & Dynatrace Blogs and

Plugins

http://bit.ly/dtpersonal

Click Here

Test drive the Dynatrace

Personal License

Click Here

Try

by

http://bit.ly/XLGuide

http://bit.ly/TryXLRelease

http://bit.ly/XLDynatrace

Page 58: How to Build a Metrics-optimized Software Delivery Pipeline

Thank You!

Time for Q & A

Andrew PhillipsVP DevOps StrategyXebiaLabshttp://blog.xebialabs.com/

Andi Grabner@grabnerandihttp://blog.dynatrace.com

Page 59: How to Build a Metrics-optimized Software Delivery Pipeline

Participate in our Forum :: • community.dynatrace.com

Like us on Facebook :: • facebook.com/dynatrace• facebook.com/xebialabs

Follow us on LinkedIn :: • linkedin.com/company/dynatrace• linkedin.com/company/xebialabs

Connect with us!Follow us on Twitter :: • twitter.com/dynatrace• twitter.com/xebialabs

Watch our Videos & Demos :: • youtube.com/dynatrace• youtube.com/xebialabs

Read our Blog :: • application-performance-blog.com• blog.xebialabs.com