continuous deployment demystified

81
Licensed Under Creative Commons by Naresh Jain Continuous Deployment Embrace Continuous Improvement Naresh Jain @nashjain [email protected] http://blogs.agilefaqs.com 1

Upload: naresh-jain

Post on 06-May-2015

5.015 views

Category:

Technology


1 download

DESCRIPTION

"Release Early, Release Often" is a proven mantra, but what happens when you push this practice to it's limits? .i.e. deploying latest code changes to the production servers every time a developer checks-in code. At Industrial Logic, developers are deploying code dozens of times a day, rapidly responding to their customers and reducing their "code inventory". In this talk I explained the approach, deployment architecture, tools and culture needed for CD and how at Industrial Logic, we have gradually got there. You can walk away with some good ideas of how your company can practice CD too.

TRANSCRIPT

Page 6: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

ROI?

Is there a p

roblem here?We a

re diffe

rent!

For us?Too much Chaos?Who? When?

Productivity?

4

Page 8: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

6

Page 9: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

Mumbai

7

Page 11: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

FitNesse ProTest

PatangLa"u

FitDecoratorDBFit

QWick

ProFIT

Panopticode

9

Page 12: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

10

Page 14: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

12

Page 15: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

13

Page 17: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

15

Page 18: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

Back in the Stone-age

16

Page 19: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

Hap

pine

ss/E

xcite

men

t

Time/Money/Opportunity Cost17

Page 20: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

Plan

Hap

pine

ss/E

xcite

men

t

Time/Money/Opportunity Cost17

Page 21: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

Plan

Design

Hap

pine

ss/E

xcite

men

t

Time/Money/Opportunity Cost17

Page 22: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

Plan

Design

Distribute

Hap

pine

ss/E

xcite

men

t

Time/Money/Opportunity Cost17

Page 23: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

Plan

Design

Distribute

Work in IsolationH

appi

ness

/Exc

item

ent

Time/Money/Opportunity Cost17

Page 24: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

Plan

Design

Distribute

Work in Isolation

Integrate

Hap

pine

ss/E

xcite

men

t

Time/Money/Opportunity Cost17

Page 25: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

Last Minute Integration Surprises

18

Page 26: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

BAD things were visible too Late...

19

Page 29: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

CI Helped Us Learn That... Life can Suck a lot Less!

22

Page 30: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

CI Helped Us Learn That... Life can Suck a lot Less!

Feedback Quality

Delivery Time Wastage

Collaboration

22

Page 31: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

If people are afraid to check-in frequently...your CI process is

NOT working.

23

Page 33: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

Multi-Stage CI ProcessScaling CI using Build Promotion

25

Page 35: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

While the Lean-Start-up Community

They tried something quite disruptive...

27

Page 37: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

CD is quite natural for companies delivering

content via Web

29

Page 38: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh JainFreeset - In Business for Freedom

30

Page 39: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

freesetglobal.com

Updates View

DB

StaticFiles

Stage 1

Freeset - In Business for Freedom30

Page 40: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

freesetglobal.com

Updates View

DB

StaticFiles

Stage 1

Structural

Changes

freesetglobal.com

Upda

tes View

DB

StaticFiles

Stage 2

dev.freesetglobal.com

DB

StaticFiles

Single-Click

Deploy

Sync

Freeset - In Business for Freedom30

Page 52: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

Can we embrace CD for eLearning?

Rich Multi-Media ContentVideo, Screencasts, Quizzes, Images, Personas, etc.

Programming ExercisesJava, C#, C++, C & Python

Mac OS, Windows, Linux, Solaris

Different IDE Plugins

Server side code analysis (Java, C#, C++, C & Python)

42

Page 60: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

Zero Downtime Requires

• The application code

• Database schema

• Data files

• Web Server

• Application Server or Servlet Container

• Database Server

• OS upgrades and patches

Performing updates without interrupting users is essential for Zero Downtime deployments.

50

Page 61: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

What about DB Upgrades?

Will Continuous Deployment work?

51

Page 62: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

Hibernate

• hbm2ddl.auto = update

• Rarely we need to go in and update DB manually

52

Page 63: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

Zero-downtime DB Updates

012_rename_login_id_to_user_name

012_add_user_name_column 02_remove_login_id_column

expansion contraction

Src: Owen Rogers http://exortech.com/blog/

53

Page 66: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

• expansion

• preserves backwards compatibility

Zero-downtime DB Updates

Src: Owen Rogers http://exortech.com/blog/

54

Page 67: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

• expansion

• preserves backwards compatibility

• contract

Zero-downtime DB Updates

Src: Owen Rogers http://exortech.com/blog/

54

Page 68: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

• expansion

• preserves backwards compatibility

• contract

• clean up

Zero-downtime DB Updates

Src: Owen Rogers http://exortech.com/blog/

54

Page 72: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

Encourage Evolutionary Design and Continuous Improvement culture

58

Page 73: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

Breaks work into micro-pieces, thereby enabling micro-deliveries

59

Page 75: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

Knows when to hide or reveal work in progress

61

Page 76: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

Team takes shared ownership of the entire software development lifecycle

62

Page 77: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

The product is in a always-working-state

No developer is blocked because they can't get stable code 63

Page 78: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

Stop the Line Culture

Team catches issues at the source and avoid last minute integration and deployment nightmares

64

Page 80: Continuous Deployment Demystified

Licensed Under Creative Commons by Naresh Jain

Complete Traceability

Version Control, Project & Requirements Managements tool, Bug Tracking and Build

system are completely integrated66