the next generation of continuous delivery

43
1 Next Gen Continuous Delivery From Build delivery to Value delivery

Upload: ibm-urbancode-products

Post on 10-May-2015

2.647 views

Category:

Business


1 download

DESCRIPTION

The build pipeline model of continuous delivery works great for simple projects, but can be challenging for applications with many pieces and parts. In this deck, we look at two approaches for reconciling CD and these applications. In one approach, we force the applications into a simple pipeline, in the other, the pipeline is reimagined.

TRANSCRIPT

Page 1: The Next Generation of Continuous Delivery

1

Next Gen Continuous Delivery

From Build delivery to Value delivery

Page 2: The Next Generation of Continuous Delivery

2

Eric’s Bio

I’m a Lead Consultant at Urbancode where I helps customers get the most out of their build, deploy and release processes. I have 9 years of automation experience throughout the application life-cycle in roles as a developer, test automation engineer, and support engineer. I’ve been at the forefront of CI & CD for 7+ years

Eric [email protected]

Page 3: The Next Generation of Continuous Delivery

3

Agenda

• Introduction to Continuous Delivery• Continuous Delivery & Complex Apps• Adapting apps to CD• Adapting CD to complex apps• Q&A

Page 4: The Next Generation of Continuous Delivery

4

What is CD?

• An automated flow from build to “ready to deploy to production”

• Push-button deployment to production

• The execution of many types of tests

• Cultural emphasis on constant shipability

Page 5: The Next Generation of Continuous Delivery

5

“Normal” CD

• Expanding the CI emphasis on quality and automation downstream

Page 6: The Next Generation of Continuous Delivery

6

The Build Pipeline (Build > ? > Prod)

• Perform a build– and execute unit tests

• Promote build to a test environment & test– Repeat N times

• Release

Page 7: The Next Generation of Continuous Delivery

7

We even have a maturity model for it

Page 8: The Next Generation of Continuous Delivery

8

Why are we doing it?

• Small batch sizes:– Reduce risk– Lower the “waste” of unreleased features

• Natural extension of the “test your builds” mentality of CI

• Address the deployment bottleneck in Operations.

Page 9: The Next Generation of Continuous Delivery

9

Continuous Delivery is a “DevOps” Strategy

• Successful implementation requires assistance from developers, operations, and others

• Cooperation and coordination between developers and operations must improve

Page 10: The Next Generation of Continuous Delivery

10

Agenda

• Introduction to Continuous Delivery• Continuous Delivery & Complex Apps• Adapting apps to CD• Adapting CD to complex apps• Q&A

Page 11: The Next Generation of Continuous Delivery

11

The Hard Part is Coordination

Image from wisc.edu

Page 12: The Next Generation of Continuous Delivery

12

Complex apps have related builds

• Builds of one part of the app depend on another

• A change in one “pipeline” could impact another pipeline

• Tests cross-cut builds pipelines

Page 13: The Next Generation of Continuous Delivery

13

Multiple tier apps

• Different tiers, different teams, different builds

• How do align the changes?

Page 14: The Next Generation of Continuous Delivery

14

Modern architectures make it worse

• Dozens of inter-related components

• The promise of “change only one piece” is rarely realized in practice

Image from ischool.tv

Page 15: The Next Generation of Continuous Delivery

15

Prod deployments aren’t of one build

Page 16: The Next Generation of Continuous Delivery

16

Build pipelines in coupled systems

Page 17: The Next Generation of Continuous Delivery

17

Some pieces aren’t built

• Databases

• Infrastructure

• Content

• Reports / ETL

Page 18: The Next Generation of Continuous Delivery

18

CD’s Build Pipeline isn’t Perfect

• It fails to:– Account for deployment time dependencies– Model things that aren’t built– Deal with incremental updates

Page 19: The Next Generation of Continuous Delivery

19

Now what?

Work hard to salvage build pipelines

Or

Use a different model

Page 20: The Next Generation of Continuous Delivery

20

Agenda

• Introduction to Continuous Delivery• Continuous Delivery & Complex Apps• Adapting apps to CD• Adapting CD to complex apps• Q&A

Page 21: The Next Generation of Continuous Delivery

21

Adapting apps to CD: Principals

• Principals– Everything is a “build”– Builds are promoted independent of other builds

• Example techniques– Release build of builds– Enforce backwards compatibility– Expand / Contact pattern for databases

Page 22: The Next Generation of Continuous Delivery

22

A Build of Builds

• Create a mini-release process for each component, and combine them into a big build.

• Mega build contains the binaries from the others

devtest

Comp.Build

devtest

Comp.Build

devtest

Comp.Build

Page 23: The Next Generation of Continuous Delivery

23

A Build of Builds

• Create a mini-release process for each component, and combine them into a big build.

• Mega build contains the binaries from the others

• Challenges: My “mega build” is big, and is always fully deployed. My components don’t know if they went to Prod.

devtest

Comp.Build

devtest

Comp.Build

devtest

Comp.Build

Page 24: The Next Generation of Continuous Delivery

24

Enforce Backwards Compatibility

• Build and immediately deploy to integration testing

• If integration tests fail, the build is rejected and the old build of that component is redeployed to integration testing

Page 25: The Next Generation of Continuous Delivery

25

Enforce Backwards Compatibility

• Build and immediately deploy to integration testing

• If integration tests fail, the build is rejected and the old build of that component is redeployed to integration testing

• Challenges: Good integration tests, extra engineering to support new and old versions, etc.

Page 26: The Next Generation of Continuous Delivery

26

Database Expand / Contract

• Goal: Backwards compatible, zero downtime database deployments.

• Never remove objects old / active users of the database need. Only add new objects. Once all clients are using the new objects, remove the old.

See: http://exortech.com/blog/2009/02/01/weekly-release-blog-11-zero-downtime-database-deployment/

Page 27: The Next Generation of Continuous Delivery

27

Database Expand / Contract

• Goal: Backwards compatible, zero downtime database deployments.

• Never remove objects old / active users of the database need. Only add new objects. Once all clients are using the new objects, remove the old.

• Challenges: a significant and not always easy change to how organizations develop DB updates.

See: http://exortech.com/blog/2009/02/01/weekly-release-blog-11-zero-downtime-database-deployment/

Page 28: The Next Generation of Continuous Delivery

28

Agenda

• Introduction to Continuous Delivery• Continuous Delivery & Complex Apps• Adapting apps to CD• Adapting CD to complex apps• Q&A

Page 29: The Next Generation of Continuous Delivery

29

Adapting CD to our Apps

• Account for deployment time dependencies• Model things that aren’t built• Deal with incremental updates

Page 30: The Next Generation of Continuous Delivery

30

Use the “Build of Builds” model as a start

devtest

Comp.Build

devtest

Comp.Build

devtest

Comp.Build

Page 31: The Next Generation of Continuous Delivery

31

Shift to “Release Sets” or “Snapshots”

• We don’t need a new build, we need a name for a collection of builds.

• Delay the creation of these until integration tests pass, and create based on the successful integration tests

UATSign-off

Staging Prod

Snapshots at “Application” or “System” level.

Page 32: The Next Generation of Continuous Delivery

32

Don’t require “build”

• Extracts from existing systems, artifact repos, or source control are OK to get deployable version.

UATSign-off

Staging Prod

Snapshots at “Application” or “System” level.

Page 33: The Next Generation of Continuous Delivery

33

Support multiple incremental moves

• Incremental requires:– Multiple versions of a component in snapshots– Awareness when tracking what is where– Order awareness when performing rollbacks.

Page 34: The Next Generation of Continuous Delivery

34

Pipeline with Snapshots

UATSign-off

Stage Prod

Web

Mid. Code

Mid. Config

DB

Page 35: The Next Generation of Continuous Delivery

35

In story form

• A change to a component, creates a new version (often by doing a build).

Page 36: The Next Generation of Continuous Delivery

36

In story form

• A change to a component, creates a new version (often by doing a build).

• The new version is vetted, and then tested in an integration environment.

Page 37: The Next Generation of Continuous Delivery

37

In story form

• A change to a component, creates a new version (often by doing a build).

• The new version is vetted, and then tested in an integration environment.

• When the integrated system passes tests, a snapshot of all the component versions in the system is created.

Page 38: The Next Generation of Continuous Delivery

38

In story form

• A change to a component, creates a new version (often by doing a build).

• The new version is vetted, and then tested in an integration environment.

• When the integrated system passes tests, a snapshot of all the component versions in the system is created.

• Snapshot deployments don’t redeploy unchanged components

Page 39: The Next Generation of Continuous Delivery

39

In story form

• A change to a component, creates a new version (often by doing a build).

• The new version is vetted, and then tested in an integration environment.

• When the integrated system passes tests, a snapshot of all the component versions in the system is created.

• Snapshot deployments don’t redeploy unchanged components

• The component version is promoted & released

Page 40: The Next Generation of Continuous Delivery

40

In Summary

• Today, continuous delivery on complex systems is hard to coordinate.

• Two options1. Strict development standards to force our

systems into the build promotion model2. A shift towards snapshot deployments that

accommodate projects “as they are”

Page 41: The Next Generation of Continuous Delivery

41

References

http://urbancode.com/resources• Enterprise CD Maturity Model

• Death to Manual Deployments!• Build & Deployment Automation for the Lean Economy• ITIL Release Management and Automation

Urbancode.com/blogs/Twitter.com/UrbanCodeSoftFacbebook.com/UrbanCodeSoftSlideshare.net/Urbancode

Page 42: The Next Generation of Continuous Delivery

42

Yes, we sell products for this

• AnthillPro– Build automation and build promotion

• uDeploy– Deployment and release management

Upcoming AnthillPro + uDeploy demo:http://web.urbancode.com/using-anthillpro-with-udeploy

Page 43: The Next Generation of Continuous Delivery

43

Questions?

[email protected]@EricMinick