34
Microservices, Service Mesh, and CI/CD Pipelines - Making it All Work Together Brian Redmond, Microsoft

Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

  • Upload
    others

  • View
    2

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

Microservices, Service Mesh, and CI/CD Pipelines - Making it All Work Together

Brian Redmond, Microsoft

Page 2: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

Brian Redmond

• Cloud Architect @ Microsoft (17 years)• Azure Global Black Belt Team• Live in Pittsburgh, PA, USA• Avid marathon runner and

outdoors enthusiast• World traveler

Who am I?

@chzbrgr71

Page 3: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing
Page 4: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

Microservices

The answer to all problems.

@chzbrgr71

Page 5: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

Containers

The answer to all problems.

@chzbrgr71

Page 6: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

Kubernetes

The answer to all problems.

@chzbrgr71

Page 7: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing
Page 8: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing
Page 9: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing
Page 10: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing
Page 11: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

@chzbrgr71

Page 12: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

Deployment Strategies

• Container Native Development• Continuous Integration• Continuous Deployment• Blue/Green testing• Canary testing• A/B testing

@chzbrgr71

Page 13: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

Blue / Green Testing

v1

proxy

v2testing

@chzbrgr71

Page 14: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

Canary Testing

v1

proxy

v2

80%

20%100%

@chzbrgr71

Page 15: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

A / B Testing

v1

proxy

v2Duplicate for

analysis

Live Traffic

@chzbrgr71

Page 16: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

Microservices Deployment

ui

proxy

@chzbrgr71

Page 17: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

What’s missing?

Page 18: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

advanced routing

Page 19: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

observability

Page 20: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

chaos testing

Page 21: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

Enter Istio

• Service discovery and routing• Health checking• Observability• Authentication and authorization• Resiliency• Policy enforcement

@chzbrgr71

Page 22: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

Istio

@chzbrgr71

Page 23: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

What can I do with Istio?

advanced routing → route rules, traffic shaping

observability → metrics, logs, and tracing

chaos testing → fault injection (delays, faults)

@chzbrgr71

Page 24: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

what about a CI/CD tool?

Page 25: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing
Page 26: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

Brigade

brigade = event-driven scripting for kubernetes

• Encapsulate functions in containers• Run in parallel or serial • Trigger workflow from Github, Docker registry, etc.• Javascript (pipeline as code)• Project config stored as secrets• Well suited for CI/CD pipelines

Page 27: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

27

Page 28: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

Demo time!

@chzbrgr71

Page 29: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

web-earth

Demo App Architecture

api-earthquakes

api-fracking

api-weather

api-flights

api-location

AzureCosmosDB

Azure Kubernetes Service

@chzbrgr71

Page 30: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

Demo - What you will see

web-earth api-earthquakes

webhook

ACR Build helm slack

Azure Container Registry

Istio

api-location

version: prod

api-location

version: canary

100%

25%

“virtualservice”

75%

@chzbrgr71

Page 31: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing
Page 32: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

• Microservices and containers bring added challenges for deployment/testing

• Testing in production is a good idea (with canary)• Service Mesh solutions help with:

– Observability– Advanced Routing– Chaos Testing

• CI/CD can automate the process

Summary

@chzbrgr71

Page 33: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing

you can find me at:

• Twitter, Github: @chzbrgr71 • [email protected]• Demo code: https://github.com/chzbrgr71/os-summit-tokyo

Questions?

@chzbrgr71

Page 34: Pipelines - Making it All Work Together …...• Blue/Green testing • Canary testing • A/B testing @chzbrgr71 Blue / Green Testing v1 proxy testing v2 @chzbrgr71 Canary Testing