80
FROM C.I. TO CD & DEVOPS CONTINUOUS DELIVERY OVERVIEW Luca Minudel

From Continuous Integration to Continuous Delivery and DevOps

Embed Size (px)

Citation preview

Page 1: From Continuous Integration to Continuous Delivery and DevOps

FROM C.I. TO CD & DEVOPS CONTINUOUS DELIVERY

OVERVIEWLuca Minudel

Page 2: From Continuous Integration to Continuous Delivery and DevOps

LUCA MINUDELDID CONTINUOUS DELIVERY AT:

WORKS @

SESSION’S LINKS TWITTER @SMHARTERLTD

Page 3: From Continuous Integration to Continuous Delivery and DevOps

CD’S BUSINESS VALUE PROPOSITIONBusiness side of CD

3

Page 4: From Continuous Integration to Continuous Delivery and DevOps

SIEMENS S62Used in Italy from 1962 to 1980, 18 years

Page 5: From Continuous Integration to Continuous Delivery and DevOps

WHY CONTINUOUS DELIVERY?

Page 6: From Continuous Integration to Continuous Delivery and DevOps

6

Page 7: From Continuous Integration to Continuous Delivery and DevOps

RAI

WHY CONTINUOUS DELIVERY?1) REDUCE RISKBuild the right thing, build it right – Avoid expensive mistakes

Page 8: From Continuous Integration to Continuous Delivery and DevOps

UNRELEASED CHANGES = RISK

1 1

2

1

2

3

4

1

2

3

Value

ReleaseTimeRis

k

Page 9: From Continuous Integration to Continuous Delivery and DevOps

1 2 3 4

1

1

2

1

2

3Release Release Release

RELEASED CHANGES = VALUE

RELEASED TO1. ANYONE, OR2. EARLY ADOPTERS,3. REQUESTORS OF THE

FEATURE,4. INTERNAL USERS

Page 10: From Continuous Integration to Continuous Delivery and DevOps

RAI WHY CONTINUOUS DELIVERY?1) OVERCOME THE ‘90% DONE’ SYNDROME Done and done

Page 11: From Continuous Integration to Continuous Delivery and DevOps

11

Page 12: From Continuous Integration to Continuous Delivery and DevOps

Validated learning over working software (over

comprehensive documentation)

Kent Beck

Page 13: From Continuous Integration to Continuous Delivery and DevOps

RAI WHY CONTINUOUS DELIVERY?2) ALIGNMENT BETWEEN IT - BUSINESS - MARKETPlay ball together

Page 14: From Continuous Integration to Continuous Delivery and DevOps
Page 15: From Continuous Integration to Continuous Delivery and DevOps

FAST FREQUENT COMUNICATIONSharing the same context

Page 16: From Continuous Integration to Continuous Delivery and DevOps

RAI

WHY CONTINUOUS DELIVERY?3) INNOVATE FASTEROne step ahead

Page 17: From Continuous Integration to Continuous Delivery and DevOps

RAI WHY CONTINUOUS DELIVERY?1)+3) FASTER AND SAFER TOGETHERHave your cake and eat it too

Page 18: From Continuous Integration to Continuous Delivery and DevOps
Page 19: From Continuous Integration to Continuous Delivery and DevOps

IMPLEMENTING CD:PREREQUISITES & QUICK SELF-ASSESSMENTIT side of CD

Page 20: From Continuous Integration to Continuous Delivery and DevOps

PREREQUISITES TO CDIterative software development & Continuous Integration

Page 21: From Continuous Integration to Continuous Delivery and DevOps

from Adaptive Leadership by Jim Highsmith

Page 22: From Continuous Integration to Continuous Delivery and DevOps

ITERATIVE DEVELOPMENTUse with care.

Page 23: From Continuous Integration to Continuous Delivery and DevOps

ITERATIVE DEVELOPMENT

Page 24: From Continuous Integration to Continuous Delivery and DevOps

from ThoughtWorks

Page 25: From Continuous Integration to Continuous Delivery and DevOps

CONTINUOUS INTEGRATION Is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily, leading to multiple integrations per day.

Martin Fowler

Page 26: From Continuous Integration to Continuous Delivery and DevOps

CONTINUOUS INTEGRATION Is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily, leading to multiple integrations per day.

Each integration is verified by an automated build including tests to detect integration errors as quickly as possible.Martin Fowler

Page 27: From Continuous Integration to Continuous Delivery and DevOps

C.I. IMPLIES => TRUNK BASED DEVELOPMENT

All development is done on the mainline (also known as the head or trunk) of the source-code repository.

All the developers commit the code to the mainline at least once per day.

Developers commit only potentially releasable code using practices like latent-code patterns, feature toggles, and branch by abstraction.

Every new release is built from the mainline.

Page 28: From Continuous Integration to Continuous Delivery and DevOps

C.I. IMPLIES => TRUNK BASED DEVELOPMENT

Merge

Merge

Trunk

NO FEATURE BRANCHING

Page 29: From Continuous Integration to Continuous Delivery and DevOps

C.I. IMPLIES => TRUNK BASED DEVELOPMENT

Trunk

2 2

3

4

2

3

1 1 1 1

4

5

2

3

1

2

1

3

2

1 1

4

3

2

Page 30: From Continuous Integration to Continuous Delivery and DevOps

C.I. IMPLIES => TRUNK BASED DEVELOPMENT

Merge

Merge

Trunk

2 2

3

4

2

3

1 1 1 1

4

5

2

3

1

2

1

3

2

1 1

4

3

2

1 432

14

52 3

Page 31: From Continuous Integration to Continuous Delivery and DevOps

C.I. IMPLIES => TRUNK BASED DEVELOPMENT

Trunk

1 2 3 4 5

1

1

3 42

4 52 1 3 2 4 3

Page 32: From Continuous Integration to Continuous Delivery and DevOps

WHAT IS CONTINUOUS DELIVERY?Definitions

Page 33: From Continuous Integration to Continuous Delivery and DevOps

CONTINUOUS DELIVERY

COLLABORAT.PEOPLE SKILLS

PRACTICES

TOOLS

Page 34: From Continuous Integration to Continuous Delivery and DevOps

Continuous Delivery is a software development discipline where you build software in such a

way that the software can be

released to production at any time - Martin Fowler.

Page 35: From Continuous Integration to Continuous Delivery and DevOps

Continuous Delivery aims to reduce the cost, time,

and risk of delivering incremental

changes to users - Jez Humble.

Page 36: From Continuous Integration to Continuous Delivery and DevOps

ARE YOU DOING CONTINUOUS DELIVERY?

Page 37: From Continuous Integration to Continuous Delivery and DevOps

THE CD WORKING GROUP AT THOUGHTWORKS SAYS

You are doing CD when:

① your software is deployable throughout its lifecycle② your team prioritizes keeping the software deployable over

working on new features

Page 38: From Continuous Integration to Continuous Delivery and DevOps

THE CD WORKING GROUP AT THOUGHTWORKS SAYS

You are doing CD when:

① your software is deployable throughout its lifecycle② your team prioritizes keeping the software deployable over

working on new features③ anybody can get fast, automated feedback on the production

readiness of their systems whenever somebody makes a change to them

Page 39: From Continuous Integration to Continuous Delivery and DevOps

THE CD WORKING GROUP AT THOUGHTWORKS SAYS

You are doing CD when:

① your software is deployable throughout its lifecycle② your team prioritizes keeping the software deployable over

working on new features③ anybody can get fast, automated feedback on the production

readiness of their systems whenever somebody makes a change to them

④ you can perform push-button deployments of any version of the software to any environment on demand.

Page 40: From Continuous Integration to Continuous Delivery and DevOps

CD WAR STORIESCase studies with numbers

Page 41: From Continuous Integration to Continuous Delivery and DevOps

SAP 65K employees, 30K database tablesBEFORE: 2010• Business frustrated • 6-12 months from idea to production• Prod. Error => S**t-storm & late nights• Monthly production releases

AFTER: 2012• Business happy• 1 week from idea to production• Prod. Error => less then 1min rollback• Two production releases per week, 8x

increase!!!

Page 42: From Continuous Integration to Continuous Delivery and DevOps

HP LASERJET FIRMWARE TEAM Between 400-800 developers, 10+MLOC

BEFORE: 2008• Only 5% of time available for

creating/supporting new features• A code branch for each LaserJet model,

manual integration & testing• Max two releases per year

AFTER: 2011• 40% of time available creating or

supporting new features, 8x increase!!!• One main branch for all products,

automated integration & testing• 10-15 candidate releases per day

Page 43: From Continuous Integration to Continuous Delivery and DevOps

HP LASERJET FIRMWARE TEAM

Page 44: From Continuous Integration to Continuous Delivery and DevOps

IMPLEMENTING CD: STRATEGIES, TIPS, COMMON MISTAKESHow to

Page 45: From Continuous Integration to Continuous Delivery and DevOps

Skills &Practice

s

Automation

& Tools

Architecture

& Design

GREEN FIELD – 3/6 MONTHS

• BUILD AUTOMATION• DEPLOY AUTOMATION• REMEDIATION AUT.• TEST AUTOMATION• INFRASTRUCTURE• MONITORING

• CONFIGURABILITY FOR MULTIPLE ENVIRONMENTS

• TESTABILITY• HOT DEPLOYABILITY • REMEDIABILITY• TRUNK BASED DEV.

Page 46: From Continuous Integration to Continuous Delivery and DevOps

Automation& Tools

Architecture

& Design

BROWN FIELD - INITIAL 3/6 MONTHS - LOW HANGING FRUIT

• BUILD AUTOMATION• DEPLOY AUTOMATION• BASIC REMEDIATION

AUTOMATION• INFRASTRUCTURE

• CONFIGURABILITY FOR MULTIPLE ENVIRONMENTS

Page 47: From Continuous Integration to Continuous Delivery and DevOps

BROWN FIELD – 1/2 YEARS BASED ON SIZE – TO THE FINISH LINESkills &

PracticesAutomation

& ToolsArchitectur

e& Design

• FULL REMEDIATION AUTOMATION

• TEST AUTOMATION• MONITORING

• TESTABILITY• HOT DEPLOYABILITY • REMEDIABILITY• TRUNK BASED DEV.

Automation& Tools

Architecture

& Design

BROWN FIELD - INITIAL 3/6 MONTHS - LOW HANGING FRUIT

• BUILD AUTOMATION• DEPLOY AUTOMATION• BASIC REMEDIATION

AUTOMATION• INFRASTRUCTURE

• CONFIGURABILITY FOR MULTIPLE ENVIRONMENTS

Page 48: From Continuous Integration to Continuous Delivery and DevOps

ON HIRING DEVOPSHey HR, creating a separate role for DevOps misses the point

Page 49: From Continuous Integration to Continuous Delivery and DevOps

DEVOPS DEFINITION

A term coined by Patrick DeboisTo encourage people to think about software development and software support in a holistic way, as opposed to two separate activities.

Page 50: From Continuous Integration to Continuous Delivery and DevOps

DEVOPS DEFINITION

Development Operations

Page 51: From Continuous Integration to Continuous Delivery and DevOps

DEVOPS DEFINITION

Development Operations

Page 52: From Continuous Integration to Continuous Delivery and DevOps

DEVOPS DEFINITION

Development OperationsDevOps

DEVOPS ANTI-PATTERN

Page 53: From Continuous Integration to Continuous Delivery and DevOps

SELECTING CD TOOLSIndividuals and interactions over processes and tools

Page 54: From Continuous Integration to Continuous Delivery and DevOps

TOOLS FOR CONTINUOUS DELIVERY

■Package management: RPM, WiX, Wise, …■Infrastructure management: Puppet, Chef, …■CD server: Go , …■Dependencies management: … ■Binaries repository: …■…■…

■Enter begins the next bullet●Demote again for sub-bullets

- And again for tiny bullets

Page 55: From Continuous Integration to Continuous Delivery and DevOps

If there is any rule

to selecting tools to support software delivery and

support,

it is to assume that:

any tools chosen may need to be changed in the future

- Kief Morris.

Page 56: From Continuous Integration to Continuous Delivery and DevOps

WWW.GO.CD OPEN SOURCE - FREE DOWNLOAD

Page 57: From Continuous Integration to Continuous Delivery and DevOps

ON CD & AGILEAgile Manifesto

Page 58: From Continuous Integration to Continuous Delivery and DevOps

AGILE MANIFESTO

Principle #1Our highest priority is to satisfy the customerthrough early and continuous delivery

of valuable software.

Page 59: From Continuous Integration to Continuous Delivery and DevOps

ON CD & LEAN?Lean principles

Page 60: From Continuous Integration to Continuous Delivery and DevOps

LEAN SOFTWARE DEVELOPMENT

Principle #5Deliver as fast as possible.

Page 61: From Continuous Integration to Continuous Delivery and DevOps

TECHNICAL PRACTICES OVERVIEWTo get it right

Page 62: From Continuous Integration to Continuous Delivery and DevOps

MAIN CD PRINCIPLES & PRACTICESHow to?

Page 63: From Continuous Integration to Continuous Delivery and DevOps

Create a repeatable, reliable way

to release software

Page 64: From Continuous Integration to Continuous Delivery and DevOps

Everybodyis responsible

for the delivery process

Page 65: From Continuous Integration to Continuous Delivery and DevOps

Automate almost everything

Page 66: From Continuous Integration to Continuous Delivery and DevOps

AUTOMATE ALMOST EVERYTHING

The build Database changes Deployment to test/staging/production environments Tests Remediation plans Monitoring Infrastructure as code

Page 67: From Continuous Integration to Continuous Delivery and DevOps

THE DEPLOYMENT PIPELINE IS:

1) A Model of your process for getting software from version control into the hands of your users.

2) An Implementation that automates each stage of the process your software goes through after every change, from check-in to release – and it may also contain few manual stages such as approvals.

3) A Visualisation in real-time of the status of software code-base after every change, for all stages from check-in to release.

Page 68: From Continuous Integration to Continuous Delivery and DevOps

THE DEPLOYMENT PIPELINE

Page 69: From Continuous Integration to Continuous Delivery and DevOps

THE DEPLOYMENT PIPELINE

BACKLOG

PLANNING

MEETING

CODE &COMMIT

BUILDUNIT

TESTS

INTEGRATION, ACCEPTANCE,

…TESTS

MANUAL APPROVAL

CODE CHANGE

READY TO GO LIVE

ANATOMY OF A BASIC PIPELINE

Page 70: From Continuous Integration to Continuous Delivery and DevOps

AUTOMATE TESTS

Page 71: From Continuous Integration to Continuous Delivery and DevOps

AUTOMATE REMEDIATION PLANS

Page 72: From Continuous Integration to Continuous Delivery and DevOps

AUTOMATE INFRASTRUCTURE

If someone threw a server out of the window, how long would it take to

recreate it?

Page 73: From Continuous Integration to Continuous Delivery and DevOps

CONCLUSIONSTo get it right

Page 74: From Continuous Integration to Continuous Delivery and DevOps

LET’S FINISH FROM THE START:WHY CONTINUOUS DELIVERY?

Page 75: From Continuous Integration to Continuous Delivery and DevOps

We cannot always decide when/where change will

come.

But we can decide where each change will take us…

…as long as we move faster

than the change

Page 76: From Continuous Integration to Continuous Delivery and DevOps

WHAT IS CONTINUOUS DELIVERY? AGAINDo me a sketch!

Page 77: From Continuous Integration to Continuous Delivery and DevOps

CONTINUOUS DELIVERY

BEFORE

Page 78: From Continuous Integration to Continuous Delivery and DevOps

CONTINUOUS DELIVERY

AFTER

Page 79: From Continuous Integration to Continuous Delivery and DevOps

CONTINUOUS DELIVERY OVERVIEW

Page 80: From Continuous Integration to Continuous Delivery and DevOps

THANK YOU !WAR STORIES, BOOKS, & SLIDES WILL BE ON TWITTER @SmHarterLTD

LOOKING FOR A- CD ASSESSMENT - CD TRAINING EMAIL ME AT: LUCA.MINUDEL @ SMHARTER.COM