how docker simplifies ci/cd

19
How Docker simplifies CI/CD

Upload: gabriel-n-schenker

Post on 15-Apr-2017

337 views

Category:

Software


0 download

TRANSCRIPT

Page 1: How Docker simplifies CI/CD

How Docker simplifies

CI/CD

Page 2: How Docker simplifies CI/CD

Gabriel N. SchenkerDistinguished Software ArchitectPhD in Astrophysics

@gnschenker

www.lostechies.com/gabrielschenker

www.linkedin.com/in/gabrielschenker

https://github.com/gnschenker

Page 3: How Docker simplifies CI/CD

Professional Scrum Foundations Training, Monday May 16 – Tuesday May 17

Held at Clear Measure Office

More Info/Register: http://www.scrum.org

Page 4: How Docker simplifies CI/CD

•CI/CD – What and Why•Classical CI/CD pipeline•Containers – Quick Intro•CI using Docker•Defining a Service Stack•Blue-Green Deployment

By Dreamstime

Page 5: How Docker simplifies CI/CD

CI/CD – What and Why• CI = Continuous Integration• Why do we need CI?

• CD = Continuous Delivery or Continuous Deployment• Why do we need CD?

Page 6: How Docker simplifies CI/CD

Classical CI/CD pipelineYou need:• Source repository• CI Server• Multiple Environments (INT, UAT, Staging, PROD, etc.)• Infrastructure as Code• Service Discovery• Health Monitoring, Auto-Healing• Routing, Load Balancing• Blue-Green Deployment• Canary Releases• Centralized Logging & Monitoring• SLAs; Numbers and Metrics indicating Health

Page 7: How Docker simplifies CI/CD

implement

SCMS

Push often(feature toggle OFF) Peer review

Developer 1

Developer 2Turn FeatureToggle ON Artifacts

Buildartifacts

BacklogPull story

1

3

2

8

Pull code4

5

7 Run unit-, integration-and end-2-end tests

6

Configure environment

CI-Server

when complete

QA/PO

Sign o

ff

9

10

CI

Page 8: How Docker simplifies CI/CD

CodeRepo

Developer

Pushfeature

CI Server Integration Staging

promote

Build ArtifactsRun Unit andIntegration Tests

Infrastructure &Public Pool Tests

promote

Infrastructure andSmoke TestsA/B Testing

QAEnvironment

Full CI/CD pipeline

approve

promote

Continuous Delivery

Continuous Deployment

pull

Page 9: How Docker simplifies CI/CD

Containers

Page 10: How Docker simplifies CI/CD

VMs versus Containers

Operating System

Hypervisor

Guest OS

Bins/Libs

App 1

VM 1

Guest OS

Bins/Libs

App 2

VM 2

Guest OS

Bins/Libs

App 3

VM 3

Infrastructure

Operating System

Docker Host

Infrastructure

Bins/Libs

App 1

Container 1

Bins/Libs

App 2

Container 2

Bins/Libs

App 3

Container 3

Page 11: How Docker simplifies CI/CD

A Sample Application

• APS.NET Core 1.0 RC1• Sample Template• Running on CLR-CORE

Page 12: How Docker simplifies CI/CD

Containerizing my Application

Page 13: How Docker simplifies CI/CD

Containerizing my Build Server

Page 14: How Docker simplifies CI/CD

Publishing Container Images• Docker Hub• Trusted Registry

Page 15: How Docker simplifies CI/CD

Deploying my Application

Page 16: How Docker simplifies CI/CD

Scaling and High Availability

Page 17: How Docker simplifies CI/CD

Blue-Green Deployment

ReverseProxy

Service Av1

Service Av2

request

ReverseProxy

Green

Blue

A/B testing

10%

90%

Centralized loggingand stats monitor

decision

collect

0% 100%

Canary ReleaseAlso called: A/B Testing

Page 18: How Docker simplifies CI/CD
Page 19: How Docker simplifies CI/CD