Continous Delivery in Action

download Continous Delivery in Action

of 65

  • date post

    21-Oct-2014
  • Category

    Technology

  • view

    1.342
  • download

    2

Embed Size (px)

description

A story about the improvement of continuous delivery capability for a team in 5 months.

Transcript of Continous Delivery in Action

CONTINUOUS DELIVERY in Action

by Hu Zhenbo (Andy) ThoughtWorks

Friday, April 27, 2012

History

Friday, April 27, 2012

years

4

Friday, April 27, 2012

Millions

0

25

50

75

100

2008 2009 2010 2011

Page Views/Day

Friday, April 27, 2012

0

17.5

35

52.5

70

2008 2009 2010 2011

Team Size70+

Friday, April 27, 2012

2008 2009 2010 2011

Features Delivered Days between major releases

Friday, April 27, 2012

major releases per year

3

Friday, April 27, 2012

days to deploy

20

Friday, April 27, 2012

people involved in deployment

30

Friday, April 27, 2012

Angry CustomerFriday, April 27, 2012

Sad TeamFriday, April 27, 2012

Why?

Friday, April 27, 2012

RequirementFriday, April 27, 2012

Fragile SystemFriday, April 27, 2012

Deploy to DeathFriday, April 27, 2012

2008 2009 2010 2011 2012

Features Delivered Days between major releases

Friday, April 27, 2012

delivery frequency

every 1 or 2 week

Friday, April 27, 2012

days to deploy

0.5

Friday, April 27, 2012

person dedicated for deployment

1

Friday, April 27, 2012

Howd we do it?

Friday, April 27, 2012

One TeamFriday, April 27, 2012

CollaborationFriday, April 27, 2012

Friday, April 27, 2012

Friday, April 27, 2012

Incremental Developing

Decode 4 types of data

21 pts

Friday, April 27, 2012

Incremental Developing

Decode 4 types of data

21 pts

Design

5 pts

Framework

8 pts

Decode Data

8 pts

Friday, April 27, 2012

Incremental Developing

Decode 4 types of data

21 pts

Decode Data A

8 pts

Decode Data C

5 pts

Decode Data B

5 pts

Decode Data D

3 pts

Friday, April 27, 2012

Feature ToggleFriday, April 27, 2012

Feature ToggleFriday, April 27, 2012

Feature Toggle

# Feature TogglenonRealTimeRecharge = truerealTimeRecharge = false

Config File #if( $nonRealTimeRecharge )

...

#end

#if( $realTimeRecharge )

...#end

Page File

Friday, April 27, 2012

Deployment Pipeline

Commit Stagecompileanalysisunit test

...

Acceptance Test Stage

User Acceptance Testing

exploratory test...

Non-Functional Testing

performance test...

Production

Increasing confidence in builds production readiness

Environment become more production-like

Slower Feedback

Friday, April 27, 2012

Deployment PipelineFriday, April 27, 2012

Auto-Deploy

Code Change

JarCommit

Jar

Update Portal

DependenZIP Upload

Stop Server

Unzip ConfigCreate

Log FileStart

ServerBackup

Friday, April 27, 2012

Auto-Deploy

Code Change

JarCommit

Jar

Update Portal

DependenZIP Upload

Stop Server

Unzip ConfigCreate

Log FileStart

ServerBackup

Friday, April 27, 2012

Auto-Deploy

Code Change

JarCommit

Jar

Update Portal

DependenZIP Upload

Stop Server

Unzip ConfigCreate

Log FileStart

ServerBackup

One-click Deploy

Friday, April 27, 2012

Components & Dependencies

Common Core

Payment

Account

Order

Portal

Admin

Mobile

Friday, April 27, 2012

Components & Dependencies

Common Core

Payment

Account

Order

Portal

Admin

Mobile

Friday, April 27, 2012

Components & Dependencies

Common Core

Payment

Account

Order

Portal

Admin

Mobile

Friday, April 27, 2012

Components & Dependencies

Common Core

Payment

Account

Order

Portal

Admin

Mobile

Friday, April 27, 2012

Components & Dependencies

Common Core

Payment

Account

Order

Portal

Admin

Mobile

Friday, April 27, 2012

Components & Dependencies

Common Core

Payment

Account

Order

Portal

Admin

Mobile

Friday, April 27, 2012

Test QuadrantsFriday, April 27, 2012

Test Pyramid

AutomatedGUI Tests

API Tests

Integration Tests

Component Tests

Automated Unit Tests

ManualSessionBasedTesting

Friday, April 27, 2012

Deployment Test system configuration component communication service is up and running ...

Acceptance Test

Friday, April 27, 2012

Performance TestFriday, April 27, 2012

Blue-Green Deploy

WebServer

AppServer

DBServer

Router

Friday, April 27, 2012

Blue-Green Deploy

WebServer

AppServer

DBServer

v5.1 v5.1 v5.1

Router

Friday, April 27, 2012

Blue-Green Deploy

WebServer

AppServer

DBServer

v5.1 v5.1 v5.1

Router

Friday, April 27, 2012

Blue-Green Deploy

WebServer

AppServer

DBServer

v5.1 v5.1 v5.1

v5.2 v5.2 v5.2

Router

Friday, April 27, 2012

Blue-Green Deploy

WebServer

AppServer

DBServer

v5.1 v5.1 v5.1

v5.2 v5.2 v5.2

Router

Friday, April 27, 2012

Data Migration

migrate - 001_create_products_table.sql - 002_add_column_to_products.sql - 003_update_data_for_products.sql

rollback - 001_create_products_table.sql - 002_add_column_to_products.sql - 003_update_data_for_products.sql

Friday, April 27, 2012

Green Database

v5.1

Friday, April 27, 2012

Green Database

v5.1readonly

Friday, April 27, 2012

Green Database

v5.1 v5.1

Backup

readonly

Friday, April 27, 2012

Green Database

v5.1 v5.1

Backup

v5.2

Migrate

readonly

Friday, April 27, 2012

Decouple App & Database

v5.1 v5.2 v5.3

v5.2 v5.3

compatible with db 5.1 & 5.2 compatible with db 5.2 & 5.3

Friday, April 27, 2012

Production Monitoring

HardwareOS

MiddlewareApplication

Voltage

Fan Speed

Temperature

CPU

Memory

HTTP

Disk

DB

DNS

SMTP

Friday, April 27, 2012

Production MonitoringFriday, April 27, 2012

Cross Functional TeamContinuous IntegrationIncremental Developing

Feature ToggleAutomate DeploymentDeployment Pipeline

Blue-Green DeploymentDatabase Migration

Production Monitoring...

Weekly Release

Friday, April 27, 2012

Good Enough?

Friday, April 27, 2012

A Long Way to Go

http://code.flickr.com/

Friday, April 27, 2012

Big ReleaseFriday, April 27, 2012

Continuous DeliveryFriday, April 27, 2012

blue-green deployment

canary releases

data management

dark launch

build pipeline

automatic deployment

branch by abstraction

DevOps

acceptancetest

virtualization

configurationmanagement

Version ControlSystem

could computinginfrastructure as code

Friday, April 27, 2012

Q & A

weibo: @HuZhenbo

Friday, April 27, 2012