90
Continuous Delivery @ Yahoo Baiyi YingSep 01, 2015

CD@ yahoo 2015 iThome devops conf

Embed Size (px)

Citation preview

Page 1: CD@ yahoo 2015 iThome devops conf

Continuous Delivery @ Yahoo Baiyi Ying⎪ Sep 01, 2015

Page 2: CD@ yahoo 2015 iThome devops conf

Questions

Page 3: CD@ yahoo 2015 iThome devops conf

Version Control

NASA's Marshall Space Flight Center@flickrcc

Code Change to Production

How Frequent ?

Page 4: CD@ yahoo 2015 iThome devops conf

Deliver ?

Yuri Samoilov@flickrcc

Page 5: CD@ yahoo 2015 iThome devops conf

Deliver ?

Yuri Samoilov@flickrcc

VALUE

Page 6: CD@ yahoo 2015 iThome devops conf

照顧花園...

優雅吃飯

久坐不累

Katerina Kamprani - The Uncomfortable project All rights reserved

nisha@flickrcc

visualplun.ch@flickrcc

Page 7: CD@ yahoo 2015 iThome devops conf

照顧花園...

優雅吃飯

久坐不累

Katerina Kamprani - The Uncomfortable project All rights reserved

Katerina Kamprani - The Uncomfortable project All rights reserved

nisha@flickrcc

visualplun.ch@flickrcc

Page 8: CD@ yahoo 2015 iThome devops conf

照顧花園...

優雅吃飯

久坐不累

Katerina Kamprani - The Uncomfortable project All rights reserved

Katerina Kamprani - The Uncomfortable project All rights reserved

Katerina Kamprani - The Uncomfortable project All rights reserved

nisha@flickrcc

visualplun.ch@flickrcc

Page 9: CD@ yahoo 2015 iThome devops conf

照顧花園...

優雅吃飯

久坐不累

Katerina Kamprani - The Uncomfortable project All rights reserved

Katerina Kamprani - The Uncomfortable project All rights reserved

Katerina Kamprani - The Uncomfortable project All rights reserved

花惹發?

Arturo J. Paniagua@flickrcc

nisha@flickrcc

visualplun.ch@flickrcc

Page 10: CD@ yahoo 2015 iThome devops conf

Katerina Kamprani - The Uncomfortable project All rights reserved

Page 11: CD@ yahoo 2015 iThome devops conf

Deliver ?

Yuri Samoilov@flickrcc

things customers want to use

Page 12: CD@ yahoo 2015 iThome devops conf

How do you know you’re delivering values?

IDEAS

CODEDATA

build

lear

n

measure

Page 13: CD@ yahoo 2015 iThome devops conf

VALUE

Katerina Kamprani - The Uncomfortable project All rights reserved

WASTE visualplun.ch@flickrcc

Page 14: CD@ yahoo 2015 iThome devops conf

VALUE

Katerina Kamprani - The Uncomfortable project All rights reserved

WASTE visualplun.ch@flickr visualplun.ch@flickrcc

Page 15: CD@ yahoo 2015 iThome devops conf

In the Good(?) Old Days…..

Page 16: CD@ yahoo 2015 iThome devops conf

Development

Testing

Page 17: CD@ yahoo 2015 iThome devops conf

Testing

Release Go/No-go

1 week before D day

Page 18: CD@ yahoo 2015 iThome devops conf

Release Go/No-go

Release Day

Page 19: CD@ yahoo 2015 iThome devops conf

Release Day

wolfgangfoto@flickr

Page 20: CD@ yahoo 2015 iThome devops conf

Development Testing

Release Go/No-go

Release Day

wolfgangfoto@flickr

Page 21: CD@ yahoo 2015 iThome devops conf

Why Change ?

Page 22: CD@ yahoo 2015 iThome devops conf

VALUE

Katerina Kamprani - The Uncomfortable project All rights reserved

WASTE visualplun.ch@flickr

Page 23: CD@ yahoo 2015 iThome devops conf

Speed

Small Batch

Easy toIdentifyIssues

Check&

Revise

Quality

Build the Right Thing

Build the Thing Right

Good Working Code

Lots Testing

Lots Auto Testing

Eliminate Human

Involvement

Page 24: CD@ yahoo 2015 iThome devops conf

Continuous Delivery

Page 25: CD@ yahoo 2015 iThome devops conf

From District 9 movie

COMMIT TO PRODUCTIONWITHOUT HUMAN INTERVENTION

Page 26: CD@ yahoo 2015 iThome devops conf

Results

Page 27: CD@ yahoo 2015 iThome devops conf

CD Adoption Rate

Page 28: CD@ yahoo 2015 iThome devops conf

Months

Multiplier

Production Pushes

Page 29: CD@ yahoo 2015 iThome devops conf

APAC Production Pushes

Page 30: CD@ yahoo 2015 iThome devops conf

PO: 好開心!!設計的 features可以很快的上 production 得到 users 的反應

SE: release 成本變小,incidents 沒有變多

Dev: 開始習慣先寫測試。測試變得更重要了,因為如果沒測好,就直奔production了

QA: Incremental changes rock!

Dan Goodwin@flickrcc

Page 31: CD@ yahoo 2015 iThome devops conf

IDEAS

CODEDATA

build

lear

nmeasure

Page 32: CD@ yahoo 2015 iThome devops conf

Lessons Learned

Page 33: CD@ yahoo 2015 iThome devops conf

CD is Simple

Page 34: CD@ yahoo 2015 iThome devops conf

Version Control

NASA's Marshall Space Flight Center@flickrcc

Certify

Build

Build

Certify

Page 35: CD@ yahoo 2015 iThome devops conf

Version Control

NASA's Marshall Space Flight Center@flickrcc

Certify

Build

Build

Certify

Page 36: CD@ yahoo 2015 iThome devops conf

Version Control

NASA's Marshall Space Flight Center@flickrcc

Certify

Build

Build

Certify

Page 37: CD@ yahoo 2015 iThome devops conf

Version Control

NASA's Marshall Space Flight Center@flickrcc

Certify

Build

Build

Certify

Page 38: CD@ yahoo 2015 iThome devops conf

Not Cheap Nor Easy

Page 39: CD@ yahoo 2015 iThome devops conf

We Thought

William Warby@flickrcc

Page 40: CD@ yahoo 2015 iThome devops conf

In Reality ….

Page 41: CD@ yahoo 2015 iThome devops conf

Tools v.s. People

Page 42: CD@ yahoo 2015 iThome devops conf

sean@flickrcc

hakanforss.wordpress.com

● tools will never be perfect ● can implement CD with imperfect tools

Page 43: CD@ yahoo 2015 iThome devops conf

hakanforss.wordpress.com

● Mindset Change● Culture Change● CD is the Norm● All-in

Page 44: CD@ yahoo 2015 iThome devops conf

How

Page 45: CD@ yahoo 2015 iThome devops conf

Executive Mandate

Page 46: CD@ yahoo 2015 iThome devops conf

Lost Planet Airmen (1951)

NO CD, NO LAUNCH, NO FOOLING

sean@flickrcc Nick Royer@flickrcc

Page 47: CD@ yahoo 2015 iThome devops conf

5 Stages of Adopting CD

Page 48: CD@ yahoo 2015 iThome devops conf

5 Stage of Grief

Denial

Arturo J. Paniagua@flickrcc

AngerDavid K@flickrcc

Bargaining

mark engelbrecht@flickrcc

Depression

marc latermouille@flickrcc

Acceptance

Page 49: CD@ yahoo 2015 iThome devops conf

Denial

Arturo J. Paniagua@flickrcc

AngerDavid K@flickrcc

Bargaining

mark engelbrecht@flickrcc

Depression

marc latermouille@flickrcc

Acceptance

5 Mental Stages of Adopting CD

Page 50: CD@ yahoo 2015 iThome devops conf

Denial 否認

蛤?難道你的老闆的老闆的老闆... x N不是 Marrisa 嗎?

全面CD ? 怎麼可能!應該不包括我們吧?

Page 51: CD@ yahoo 2015 iThome devops conf

別鬧了!!Projects 都作不完了,一堆 features 等著要上...都這麼忙了,還來搞這個!!

Anger 憤怒

Arturo J. Paniagua@flickrcc

Page 52: CD@ yahoo 2015 iThome devops conf

Bargaining 討價還價

好啦好啦,我們會作啦!不過手上這個 project 超重要,沒有人力時間弄 CD,可不可以幫這個 project 申請 exception ?

David K@flickrcc

Page 53: CD@ yahoo 2015 iThome devops conf

持續洗腦

Page 54: CD@ yahoo 2015 iThome devops conf

Depression 沮喪

kris gabbard@flickrcc

● fear● misunderstanding● doubt

Page 55: CD@ yahoo 2015 iThome devops conf
Page 56: CD@ yahoo 2015 iThome devops conf

Version Control

NASA's Marshall Space Flight Center@flickrcc

Certify

Build

Build

Certify

Page 57: CD@ yahoo 2015 iThome devops conf

uncle bob@Ruining your Test Automation Strategy.

Nate Steiner@flickrcc

天啊! 要怎麼把這 30K 隻manual tests 改成自動化測試程式?

Page 58: CD@ yahoo 2015 iThome devops conf

Well, you don’t

Page 59: CD@ yahoo 2015 iThome devops conf
Page 60: CD@ yahoo 2015 iThome devops conf

Acceptance 接受

● No manual testings● No manual commands in production● Not just an engineering project

marc latermouille@flickrcc

Page 61: CD@ yahoo 2015 iThome devops conf

Aggressive Audacious Goals by Phases

Page 62: CD@ yahoo 2015 iThome devops conf

Git in 30

Page 63: CD@ yahoo 2015 iThome devops conf

1800 repos

30 D

Page 64: CD@ yahoo 2015 iThome devops conf

Build Farms in 30

Page 65: CD@ yahoo 2015 iThome devops conf

130 Farms 4 Centralized Farms

30 D

40K Jobs65K Builds / days

Page 66: CD@ yahoo 2015 iThome devops conf
Page 67: CD@ yahoo 2015 iThome devops conf
Page 68: CD@ yahoo 2015 iThome devops conf

CD in 2

Page 69: CD@ yahoo 2015 iThome devops conf

Scale & Diversity

cellanr@flickrcc

Page 70: CD@ yahoo 2015 iThome devops conf
Page 71: CD@ yahoo 2015 iThome devops conf

Single Way

Common Terminology

Common Principles

Tools & Services

Teams to Figure Out

Page 72: CD@ yahoo 2015 iThome devops conf

Common Terminology

■ Package● compiled software, scripts, configuration or other data● smallest granularity of deployment● versioned

Page 73: CD@ yahoo 2015 iThome devops conf

Common Terminology

■ Image● a set of packages● determines the functionality a

node will have

Page 74: CD@ yahoo 2015 iThome devops conf

■ Component● runtime entity● defined by an image

Common Terminology

Page 75: CD@ yahoo 2015 iThome devops conf

■ System● one or more components ● certified, launched, and operated together.

Common Terminology

Page 76: CD@ yahoo 2015 iThome devops conf

Principles

■ Repeatable & Reproducible ● Versioned● Immutable Artifacts

■ Traceable● Artifact -> all the changes made

■ Version Control● source code, launch scripts and configurations, test code, test data.

Page 77: CD@ yahoo 2015 iThome devops conf

Version Control

Package Component System

Package

Certify

ArtifactStorages

Build Build

PackagePackagePackage

Image

Deploy

Certify

Tagger

Build

Prod

PC1

PPC2

P

Manifest

DeployCertify

NASA's Marshall Space Flight Center@flickrcc

ArtifactStorages

Page 78: CD@ yahoo 2015 iThome devops conf
Page 79: CD@ yahoo 2015 iThome devops conf

Tools & Services■ Build & Workflow

● Jenkins ■ Artifact Storages

● Proprietary ● Artifactory

■ Tagger● Proprietary

■ Visualizer● Proprietary

■ Software Delivery ● Proprietary● Chef

Page 80: CD@ yahoo 2015 iThome devops conf

■ End-2-End examples■ STOP development and Do it■ Use Senior Engineers■ Pipeline Demos and Reviews

Other Tactics

Page 81: CD@ yahoo 2015 iThome devops conf

Results Recap

■ 7X More Production Pushes ■ Quality

Page 82: CD@ yahoo 2015 iThome devops conf

Test

able

Cod

e

Ref

acto

ring

CD

Dec

oupl

ed

Des

ign

Prin

cipl

es

Dat

a D

riven

TDD

BD

D

Ope

ratio

nal

■ First Domino ● Product Excellence● Engineering Excellence

……

…..

etc

Page 83: CD@ yahoo 2015 iThome devops conf

After Adopting CD

Page 84: CD@ yahoo 2015 iThome devops conf

Before Adopting CD

回不去了!誰想回去啊?

Page 85: CD@ yahoo 2015 iThome devops conf

Summary

Page 86: CD@ yahoo 2015 iThome devops conf

visualplun.ch@flickr

Page 87: CD@ yahoo 2015 iThome devops conf

Jesse! S?@flickrcc

Nathan E Photography@flickrcc

Page 88: CD@ yahoo 2015 iThome devops conf

sean@flickrcc

hakanforss.wordpress.com

Page 89: CD@ yahoo 2015 iThome devops conf
Page 90: CD@ yahoo 2015 iThome devops conf