Releasing To Production Every Week India

210
Releasing to Production Every Week Owen Rogers Twitter: @exortech http://exortech.com/blog

description

 

Transcript of Releasing To Production Every Week India

Page 1: Releasing To Production Every Week   India

Releasing to Production Every Week

Owen RogersTwitter: @exortech

http://exortech.com/blog

Page 2: Releasing To Production Every Week   India

1 year

Page 3: Releasing To Production Every Week   India
Page 4: Releasing To Production Every Week   India

49 releases

Page 5: Releasing To Production Every Week   India

49 releases(excluding patch releases)

Page 6: Releasing To Production Every Week   India

~ 1 release / week

Page 7: Releasing To Production Every Week   India

summary

Page 8: Releasing To Production Every Week   India

lessons learned

Page 9: Releasing To Production Every Week   India

process

Page 10: Releasing To Production Every Week   India

practices

Page 11: Releasing To Production Every Week   India

tools

Page 12: Releasing To Production Every Week   India

Poll:

Page 13: Releasing To Production Every Week   India

how long is your release cycle?

Page 14: Releasing To Production Every Week   India

Me

Page 15: Releasing To Production Every Week   India
Page 16: Releasing To Production Every Week   India

Vancouver

Page 17: Releasing To Production Every Week   India
Page 18: Releasing To Production Every Week   India
Page 19: Releasing To Production Every Week   India
Page 20: Releasing To Production Every Week   India
Page 21: Releasing To Production Every Week   India
Page 22: Releasing To Production Every Week   India
Page 23: Releasing To Production Every Week   India
Page 24: Releasing To Production Every Week   India
Page 25: Releasing To Production Every Week   India
Page 26: Releasing To Production Every Week   India

> 15 teams

Page 27: Releasing To Production Every Week   India

Agile methods

Page 28: Releasing To Production Every Week   India
Page 29: Releasing To Production Every Week   India
Page 30: Releasing To Production Every Week   India

Company

Page 31: Releasing To Production Every Week   India
Page 32: Releasing To Production Every Week   India

start up

Page 33: Releasing To Production Every Week   India

real-time energy monitoring

Page 34: Releasing To Production Every Week   India

building energy efficiency

Page 35: Releasing To Production Every Week   India

save $

Page 36: Releasing To Production Every Week   India

save kW

Page 37: Releasing To Production Every Week   India

save

Page 38: Releasing To Production Every Week   India

aggregate data

Page 39: Releasing To Production Every Week   India
Page 40: Releasing To Production Every Week   India
Page 41: Releasing To Production Every Week   India
Page 42: Releasing To Production Every Week   India
Page 43: Releasing To Production Every Week   India
Page 44: Releasing To Production Every Week   India

hosted solution

Page 45: Releasing To Production Every Week   India

SaaS

Page 46: Releasing To Production Every Week   India

Java

Page 47: Releasing To Production Every Week   India
Page 48: Releasing To Production Every Week   India
Page 49: Releasing To Production Every Week   India

Team

Page 50: Releasing To Production Every Week   India
Page 51: Releasing To Production Every Week   India

• 9 developers

Page 52: Releasing To Production Every Week   India

• 9 developers• 1 product manager

Page 53: Releasing To Production Every Week   India

• 9 developers• 1 product manager• 1 graphic designer

Page 54: Releasing To Production Every Week   India

• 9 developers• 1 product manager• 1 graphic designer• 1 tester

Page 55: Releasing To Production Every Week   India

what’s missing?

Page 56: Releasing To Production Every Week   India

operations?

Page 57: Releasing To Production Every Week   India

support?

Page 58: Releasing To Production Every Week   India

QA?

Page 59: Releasing To Production Every Week   India

project manager?

Page 60: Releasing To Production Every Week   India

DBA?

Page 61: Releasing To Production Every Week   India

generalizing specialists

Page 62: Releasing To Production Every Week   India

fungibility

Page 63: Releasing To Production Every Week   India

rotating responsibility

Page 64: Releasing To Production Every Week   India

daily support duty

Page 65: Releasing To Production Every Week   India

few hand-offs

Page 66: Releasing To Production Every Week   India

empowered

Page 67: Releasing To Production Every Week   India

Process

Page 68: Releasing To Production Every Week   India

Goal:• to surface risk as early

as possible to keep problems out of production

Page 69: Releasing To Production Every Week   India

maximize feedback

Page 70: Releasing To Production Every Week   India

shrink time

Page 71: Releasing To Production Every Week   India

Continuous Integration

Page 72: Releasing To Production Every Week   India

Continuous Integration

• 3-4 Commits/dev/day

Page 73: Releasing To Production Every Week   India

Automated Build

Page 74: Releasing To Production Every Week   India

Automated Build

• 3 minute build

Page 75: Releasing To Production Every Week   India

Automated Build

• 3 minute build• 30-40 builds/day

Page 76: Releasing To Production Every Week   India

Automated Build

• 3 minute build• 30-40 builds/day

Page 77: Releasing To Production Every Week   India

Automated Test Deploy

Page 78: Releasing To Production Every Week   India

Automated Test Deploy

• 4-5 times per day

Page 79: Releasing To Production Every Week   India

Automated Test Deploy

• 4-5 times per day• Scheduled nightly at

11PM

Page 80: Releasing To Production Every Week   India

Daily Standup

Page 81: Releasing To Production Every Week   India

Daily Standup

• Weekly company standup

Page 82: Releasing To Production Every Week   India

Daily Review

Page 83: Releasing To Production Every Week   India

Daily Review

• Quick peer feature review

Page 84: Releasing To Production Every Week   India

Weekly Demo

Page 85: Releasing To Production Every Week   India

Weekly Demo

• 15 minute company-wide user-driven demo

Page 86: Releasing To Production Every Week   India

Mon Tues Wed Thurs Fri

9:30AMPlanningMeeting

10AMUser-drivenDemo Release

Testing

5pmRelease

weekly cycle

11pmCut-off

Page 87: Releasing To Production Every Week   India

Sustainable Pace

Page 88: Releasing To Production Every Week   India

Sustainable Pace

Page 89: Releasing To Production Every Week   India

Sustainable Pace

• regular release window

Page 90: Releasing To Production Every Week   India

Sustainable Pace

• regular release window• quality of life and code

Page 91: Releasing To Production Every Week   India

Sustainable Pace

• regular release window• quality of life and code• part of culture

Page 92: Releasing To Production Every Week   India

Sustainable Pace

• regular release window• quality of life and code• part of culture• company heartbeat

Page 93: Releasing To Production Every Week   India

“agile”

Page 94: Releasing To Production Every Week   India

Scrum?

Page 95: Releasing To Production Every Week   India

XP?

Page 96: Releasing To Production Every Week   India

what’s missing?

Page 97: Releasing To Production Every Week   India

user stories?

Page 98: Releasing To Production Every Week   India

user stories?

Page 99: Releasing To Production Every Week   India

user stories?

Page 100: Releasing To Production Every Week   India

story boards?

Page 101: Releasing To Production Every Week   India

story boards?

Page 102: Releasing To Production Every Week   India

story boards?

Page 103: Releasing To Production Every Week   India
Page 104: Releasing To Production Every Week   India

estimation?

Page 105: Releasing To Production Every Week   India

estimation?

Page 106: Releasing To Production Every Week   India

estimation?fits or it doesn’t

“muda”

Page 107: Releasing To Production Every Week   India

pairing?

Page 108: Releasing To Production Every Week   India

pairing?

Page 109: Releasing To Production Every Week   India

pairing?as needed

Page 110: Releasing To Production Every Week   India

pairing?as needed

code reviews

Page 111: Releasing To Production Every Week   India

pairing?as needed

code reviewsopen workspace

Page 112: Releasing To Production Every Week   India

TDD?

Page 113: Releasing To Production Every Week   India

TDD?

Page 114: Releasing To Production Every Week   India

TDD?52% coverage

Page 115: Releasing To Production Every Week   India

TDD?52% coverage+ Selenium

Page 116: Releasing To Production Every Week   India

TDD?52% coverage+ Selenium

Page 117: Releasing To Production Every Week   India

retrospectives?

Page 118: Releasing To Production Every Week   India

retrospectives?

Page 119: Releasing To Production Every Week   India

retrospectives?Release Review

Page 120: Releasing To Production Every Week   India

retrospectives?Release Review

5 Whys

Page 121: Releasing To Production Every Week   India

lightweight RCA

Page 122: Releasing To Production Every Week   India

5 Whys

Page 123: Releasing To Production Every Week   India

just-in-time

Page 124: Releasing To Production Every Week   India

within 24 hours

Page 125: Releasing To Production Every Week   India

1 Jira per question

Page 126: Releasing To Production Every Week   India

Practices

Page 127: Releasing To Production Every Week   India

Daily support rotation

Page 128: Releasing To Production Every Week   India

5 Whys

Page 129: Releasing To Production Every Week   India

Continuous Monitoring

Page 130: Releasing To Production Every Week   India

Continuous Monitoring

App Server Socket Logger LogMaster

WARN | ERROR

(async)

Page 131: Releasing To Production Every Week   India

Continuous Monitoring

Page 132: Releasing To Production Every Week   India

Continuous Monitoring

• Proactive response to issues

Page 133: Releasing To Production Every Week   India

Continuous Monitoring

• Proactive response to issues

• Clean logs

Page 134: Releasing To Production Every Week   India

Continuous Monitoring

• Proactive response to issues

• Clean logs

• Message throttling

Page 135: Releasing To Production Every Week   India

Continuous Monitoring

• Proactive response to issues

• Clean logs

• Message throttling

• Gmail

Page 136: Releasing To Production Every Week   India

Continuous Monitoring

• Proactive response to issues

• Clean logs

• Message throttling

• Gmail

• Managing the signal-to-noise ratio

Page 137: Releasing To Production Every Week   India

Continuous Monitoring

Page 138: Releasing To Production Every Week   India

Continuous Monitoring

Page 139: Releasing To Production Every Week   India

Continuous Monitoring

Page 140: Releasing To Production Every Week   India

Continuous Monitoring

App Server

gmetad

web app

RRD

gmondUDP multicast

Page 141: Releasing To Production Every Week   India

Continuous Monitoring

Page 142: Releasing To Production Every Week   India

Continuous Monitoring

Page 143: Releasing To Production Every Week   India

Continuous Monitoring

Page 144: Releasing To Production Every Week   India

Continuous Monitoring

Page 145: Releasing To Production Every Week   India

Zero-downtime Deployment

Page 146: Releasing To Production Every Week   India

Zero-downtime Deploys

Load Balancer

App Server App Server App Server

Deploy

Page 147: Releasing To Production Every Week   India

Zero-downtime Deploys

Page 148: Releasing To Production Every Week   India

Zero-downtime Deploys

• Fully automated deployment

Page 149: Releasing To Production Every Week   India

Zero-downtime Deploys

• Fully automated deployment

• One button deploy from TeamCity

Page 150: Releasing To Production Every Week   India

Zero-downtime Deploys

• Fully automated deployment

• One button deploy from TeamCity

• Gracefully bring down servers

Page 151: Releasing To Production Every Week   India

Zero-downtime Deploys

What about the DB?

Page 152: Releasing To Production Every Week   India

Zero-downtime Deploys

Bering

Page 153: Releasing To Production Every Week   India

Zero-downtime Deploys

012_rename_login_id_to_user_name

ALTER TABLE USER RENAME COLUMN login_id user_name

Page 154: Releasing To Production Every Week   India

Zero-downtime Deploys

012_rename_login_id_to_user_name

012_add_user_name_column 02_remove_login_id_column

expansion contraction

Page 155: Releasing To Production Every Week   India

Zero-downtime Deploys

Page 156: Releasing To Production Every Week   India

Zero-downtime Deploys

• expansion

Page 157: Releasing To Production Every Week   India

Zero-downtime Deploys

• expansion

• preserves backwards compatibility

Page 158: Releasing To Production Every Week   India

Zero-downtime Deploys

• expansion

• preserves backwards compatibility

• contract

Page 159: Releasing To Production Every Week   India

Zero-downtime Deploys

• expansion

• preserves backwards compatibility

• contract

• clean up

Page 160: Releasing To Production Every Week   India

Zero-downtime Deploys

Page 161: Releasing To Production Every Week   India

Zero-downtime Deploys

• Typically safe expansion operations:

Page 162: Releasing To Production Every Week   India

Zero-downtime Deploys

• Typically safe expansion operations:

• add table, add column, insert data

Page 163: Releasing To Production Every Week   India

Zero-downtime Deploys

• Typically safe expansion operations:

• add table, add column, insert data

• Typically unsafe expansion operations:

Page 164: Releasing To Production Every Week   India

Zero-downtime Deploys

• Typically safe expansion operations:

• add table, add column, insert data

• Typically unsafe expansion operations:

• rename or remove columns or tables

Page 165: Releasing To Production Every Week   India

Zero-downtime Deploys

• Typically safe expansion operations:

• add table, add column, insert data

• Typically unsafe expansion operations:

• rename or remove columns or tables

• add constraint

Page 166: Releasing To Production Every Week   India

Zero-downtime Deploys

/expand/.../143001_create_login_table002_add_login_id_index003_create_user_table004_create_group_table

/.../contract/.../143001_add_inv_constraint002_drop_alias_column

/...

Page 167: Releasing To Production Every Week   India

Zero-downtime Deploys

Page 168: Releasing To Production Every Week   India

Zero-downtime Deploys

• Database migration decoupled from the release

Page 169: Releasing To Production Every Week   India

Zero-downtime Deploys

• Database migration decoupled from the release

• Simplified rollback

Page 170: Releasing To Production Every Week   India

Zero-downtime Deploys

• Database migration decoupled from the release

• Simplified rollback

• Some additional complexity in writing migrations

Page 171: Releasing To Production Every Week   India

Release Options

Page 172: Releasing To Production Every Week   India

Traditional Release

Page 173: Releasing To Production Every Week   India

Traditional Release

Page 174: Releasing To Production Every Week   India

Traditional Release

• high risk

Page 175: Releasing To Production Every Week   India

Traditional Release

• high risk

• not scalable

Page 176: Releasing To Production Every Week   India

Traditional Release

• high risk

• not scalable

• prolonged release: “Don’t release until it’s all ready”

Page 177: Releasing To Production Every Week   India

Release Options

Page 178: Releasing To Production Every Week   India

Release Options

Page 179: Releasing To Production Every Week   India

Release Options

• release to user subset (private beta)

Page 180: Releasing To Production Every Week   India

Release Options

• release to user subset (private beta)

• split test (experimentation)

Page 181: Releasing To Production Every Week   India

Release Options

• release to user subset (private beta)

• split test (experimentation)

• incremental rollout

Page 182: Releasing To Production Every Week   India

Release Options

• release to user subset (private beta)

• split test (experimentation)

• incremental rollout

• selective enabling/downgrading

Page 183: Releasing To Production Every Week   India

Release Options

• release to user subset (private beta)

• split test (experimentation)

• incremental rollout

• selective enabling/downgrading

• disable feature (feature darkmode)

Page 184: Releasing To Production Every Week   India

Release Options

• release to user subset (private beta)

• split test (experimentation)

• incremental rollout

• selective enabling/downgrading

• disable feature (feature darkmode)

• defer commit

Page 185: Releasing To Production Every Week   India

Release Options

• release to user subset (private beta)

• split test (experimentation)

• incremental rollout

• selective enabling/downgrading

• disable feature (feature darkmode)

• defer commit

• defer release

Page 186: Releasing To Production Every Week   India

Release Options

Page 187: Releasing To Production Every Week   India

Release Options

• Features running in production for weeks before fully available

Page 188: Releasing To Production Every Week   India

Release Options

• Features running in production for weeks before fully available

• lots of data

Page 189: Releasing To Production Every Week   India

Release Options

• Features running in production for weeks before fully available

• lots of data

• “Release is a marketing term”

Page 190: Releasing To Production Every Week   India

Release Options

• Features running in production for weeks before fully available

• lots of data

• “Release is a marketing term”

• Production levers

Page 191: Releasing To Production Every Week   India

Release Options

• Features running in production for weeks before fully available

• lots of data

• “Release is a marketing term”

• Production levers

• WANGMI: the discipline to defer

Page 192: Releasing To Production Every Week   India

Use Production Data

Page 193: Releasing To Production Every Week   India

Use Production Data

Page 194: Releasing To Production Every Week   India

Use Production Data

• Upload Nightly backups

Page 195: Releasing To Production Every Week   India

Use Production Data

• Upload Nightly backups

• Automated Test DB refresh after every release

Page 196: Releasing To Production Every Week   India

Use Production Data

• Upload Nightly backups

• Automated Test DB refresh after every release

• Local DB refresh on demand

Page 197: Releasing To Production Every Week   India

Use Production Data

• Upload Nightly backups

• Automated Test DB refresh after every release

• Local DB refresh on demand

• Cleansed

Page 198: Releasing To Production Every Week   India

Use Production Data

• Upload Nightly backups

• Automated Test DB refresh after every release

• Local DB refresh on demand

• Cleansed

• Test data is a liability

Page 199: Releasing To Production Every Week   India

Single Feature Release

Page 200: Releasing To Production Every Week   India

• Daily Support Rotation

• 5 Whys

• Continuous Monitoring

• Zero-downtime deployment

• Release Options

• Use Production Data

• Single Feature Release

Page 201: Releasing To Production Every Week   India

Tools

Page 202: Releasing To Production Every Week   India
Page 203: Releasing To Production Every Week   India
Page 204: Releasing To Production Every Week   India
Page 205: Releasing To Production Every Week   India
Page 206: Releasing To Production Every Week   India
Page 207: Releasing To Production Every Week   India
Page 208: Releasing To Production Every Week   India
Page 209: Releasing To Production Every Week   India