continuous delivery: implementation considerations...devops and continuous delivery dev agile...

44
Continuous Delivery: implementation considerations Léon Hagenaars-Keus [email protected] Edwin van Dillen [email protected]

Upload: others

Post on 05-Oct-2020

14 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Continuous Delivery:

implementation

considerations

Léon Hagenaars-Keus [email protected]

Edwin van Dillen [email protected]

Page 2: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Done = Released

SOFTWARE INNOVATORS

Page 3: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

What is Continuous

Delivery all about?

SOFTWARE INNOVATORS 3

Page 4: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

At first there was a machine

SOFTWARE INNOVATORS 4

Dev is operator, operator is dev

Source: What is DevOps? By Mike Loukides

Page 5: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Dev versus ops

The first reaction to a bug or issue:

Ops: “It’s not my machines, it’s your code”

Dev: “It’s not my code, it’s your machines”

SOFTWARE INNOVATORS 5Source: 10+ Deploys Per Day: Dev and Ops Cooperation at Flickr

Page 6: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Dev and Ops

“Operations doesn’t go away, it becomes part of

development.”

“The infrastructure doesn’t go away, it moves into

the code”

By James Urquhart

SOFTWARE INNOVATORS 6Source: What is DevOps? By Mike Loukides

Page 7: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

DevOps and

Continuous Delivery

DEV

Agile (SCRUM, ..)

High frequently

change

Ops

Strong procedure (ITIL, ASL,…)

Stable production

environment

SOFTWARE INNOVATORS 7

Continuous Delivery

Embrace change in a high

quality driven environment

Page 8: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Who is in control of …

SOFTWARE INNOVATORS 8

D T PA

Ops

Dev

Page 9: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Reduce the cost, time and risk of delivering

incremental changes to users

Jez Humble

Author of Continuous Delivery

What is continuous delivery

Page 10: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Shorter time to market▫ Smaller batches of change, more grip

Faster user feedback▫ Show them the results instead of specs

Contributes to the increase of overall quality▫ Automation versus manual

process

Reduced risk of release

▫ If it hurts, do it more often

What should be the benefits

10SOFTWARE INNOVATORSSource: “introducing continuous delivery in the Enterprise” by XebiaLabs

Page 11: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Signs are:

Extensive and detailed documentation

Reliance on manual testing

Frequent calls to the dev team why it’s gone

wrong

Frequent corrections to the release process

Releases that take more than 5 minutes

Releases that are unpredictable in their outcome

Anti-Pattern:

Deploying software manually

12SOFTWARE INNOVATORSSource: Continuous Delivery by Jez Humble, e.a.

Page 12: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Signs are:

The system has been tested on dev machines

Releasing is the first time operation people

interact with the new release

A production like environment is not available or

hard to get access to

Little to no collaboration between Dev and

Operations or Deployers

Anti-Pattern: Deploying to a

production-like environment only

after development is complete

13SOFTWARE INNOVATORSSource: Continuous Delivery by Jez Humble, e.a.

Page 13: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Signs are:

Many successful deployments to staging but deploying

to production fails

The operations team take a long time to prepare an

environment for a release

You can not step back to an earlier configuration/version

Configuration is carried out by modifying it directly on the

production systems

Anti-Pattern: Manual

configuration management of

production environment

14SOFTWARE INNOVATORSSource: Continuous Delivery by Jez Humble, e.a.

Page 14: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Howto:

Continuous Delivery

SOFTWARE INNOVATORS 16

Page 15: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Software pipeline

SOFTWARE INNOVATORS 17

D T PA

Page 16: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Continuous Integration

Growth of software projects

SOFTWARE INNOVATORS 18

Source code

Continuous Build

Unit Tests

Continuous Test

Test server

Continuous Deploy

Acceptance

Continuous Delivery

Load test server

Production

Page 17: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Flow of software change

SOFTWARE INNOVATORS 19

Source code

Integrate Test Release

Page 18: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Everyone owns the code

▫ The developers

▫ The product owner

▫ Operations

If stuff breaks everyone is responsible

Trunk is the mainline, trunk must work

Code ownership

20SOFTWARE INNOVATORS

Source code

Integrate Test Release

Page 19: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

CD in DATP

Single environment

No, branches just the trunk!

Build in feature flags

Turn off and on features for the user

Run features without users knowing about it

They are in production and the environment is

configured

SOFTWARE INNOVATORS 21“Dark Launching”

Page 20: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

At every check-in:

▫ Check-out

▫ Sign the deployables with build and revision number

▫ Build the code

▫ Run the unit-tests

▫ Run the code analysis

If the build fails:

▫ Inform the team

▫ Revert the change

If build succeeds

▫ Tag

▫ Trigger deploy

Continuous

Integration

22SOFTWARE INNOVATORS

Source code

Integrate Test Release

Page 21: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

More at http://en.wikipedia.org/wiki/Comparison_of_continuous_integration_software

Examples of CI tools

23SOFTWARE INNOVATORS

Source code

Integrate Test Release

Page 22: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

24

When is a build

successful?

The moment it builds it is successful

It is successful when: All the latest sources are checked out of the SCM

Every file is compiled from scratch

The resulting object files are linked and deployed for execution

The system is started and suite of tests is run against the system

If all these steps execute without error or human intervention and every test passes, then we have a successful build!

“Smoke test : switch it on and see if smoke comes out” McConnell

Source code

Integrate Test Release

Page 23: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Automated deploy

At every check-in, deploy to test, including

automated upgrade

Dev is done if test environment still works

If test breaks:

▫ Revert the test machine to before deploy

▫ Alter the automated upgrade to keep test alive

▫ Check in the changed automate upgrade

Result: automated deploy to acceptance or

production does not break the environment

SOFTWARE INNOVATORS 25

Source code

Integrate Test Release

“If it hurts do it more often”

Page 24: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Testing

Unit testing

▫ NUnit, JUnit, QUnit, PyUnit

Specification testing

▫ Specflow, JBehave

Application testing

▫ Selenium (Web & javascript), NUnit.Forms

Load testing

▫ JMeter, LoadRunner, Firebenchmarks

SOFTWARE INNOVATORS 26

Source code

Integrate Test Release

Page 25: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

You, the developer are responsible for your

code working on the live environment

You, the developer are responsible for

deployment to this live environment

Infrastucture

responsibility

27SOFTWARE INNOVATORS

Source code

Integrate Test Release

Page 26: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

You, the systems admin are responsible for your

the live environment running the code

You, the systems admin are responsible for the

differences between the live environment and

various staging facilities

Infrastucture

responsibility

28SOFTWARE INNOVATORS

Source code

Integrate Test Release

Page 27: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Benefits

Dependencies on environment specifics will be

found when introduced, not when deployed to

live.

Deploy has been tested at test and at

acceptance, therefor will work on live.

SOFTWARE INNOVATORS 29

Source code

Integrate Test Release

Page 28: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Delivery tools

SOFTWARE INNOVATORS 30

Continuous Delivery Automation

SmartCloud Continuous Delivery

Source code

Integrate Test Release

Page 29: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Continuous delivery requires

Continuous integration

A single code repository

Automated testing

▫ Acceptance

▫ Nonfunctional requirements

Automated deployment

Configuration Management

SOFTWARE INNOVATORS 31

Continuous imporving process

Page 30: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Lessons Learned:

Rules of continuous delivery

Done = released

DRY (don’t repeat yourself)

Releasable over new features

Fail fast

If you break it, you fix it

Deploy often

Quality built in

A deploy must maintain a workable state

Acceptance test: intention, not implementation

SOFTWARE INNOVATORS 32Scoure: based upon Humble

Page 31: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Fast feedback of failure

SOFTWARE INNOVATORS 33

Page 32: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Asking various devs

“Why we haven’t implemented CD?”:

The code is not in our repository

The production server is not in our control

Operations won’t give us ‘x’

We haven’t got the time

We haven’t got round to it

The project is too small

We haven’t …

“What was your first response to TDD?”

SOFTWARE INNOVATORS 34

Page 33: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

ContextOf:

Continuous Delivery

SOFTWARE INNOVATORS 36

Page 34: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Dimensions on

the software live cycle

37

Software

Proces

Design

Organisatie

Infrastructuur

Page 35: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Scope of continuous

delivery

SOFTWARE INNOVATORS 38

Software

Proces

Design

Organisatie

Infrastructuur

D T PA

Page 36: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

CD in DATP

DevOps

1. Extend Development into production

2. Create production feedback into development

3. Embed development into IT operations

4. Embed IT operations into development

SOFTWARE INNOVATORS 39

Software

Proces

Design

Organisatie

Infrastructuur

Source: Top 11 Things You Need to Know About DevOps, by Gene Kim

Page 37: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Continuous delivery

The world of SCRUM and DevOps

Product owner

▫ owns features

▫ owns incidents and problems

Will you make incidents part of the backlog

SOFTWARE INNOVATORS 40

Software

Proces

Design

Organisatie

Infrastructuur

Page 38: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Final thoughts…

SOFTWARE INNOVATORS

Page 39: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Continuous Delivery and the

marriage of Dev and ops

“Agile was instrumental in

Development regaining the trust in the business

but it unintentionally left IT Operations behind.

DevOps is a way for the business to regain trust

in the entire IT organization as a whole.”

Clyde Logue, founder of StreamStep

SOFTWARE INNOVATORS 42

Page 40: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

SOFTWARE INNOVATORS 43Source: http://www.infoq.com/articles/Continuous-Delivery-Maturity-Model

By Andreas Rehn, e.l.

Page 41: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Yes it is comprehensive…

Start by building a small feature

Automate testing it

And deploy throughout the areas of target

SOFTWARE INNOVATORS 44

Think big, start small.

Continuously improve

Page 42: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Some interesting sources …

http://itrevolution.com/blog/▫ THE TOP 11 THINGS YOU NEED TO KNOW ABOUT DEVOPS

http://itrevolution.com/11devops

http://blip.tv/oreilly-velocity-conference/velocity-09-john-

allspaw-10-deploys-per-day-dev-and-ops-cooperation-

at-flickr-2297883

SOFTWARE INNOVATORS 45

“Continuous Delivery”

Jez Humble and

David Farley

Page 43: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

Done = Released

SOFTWARE INNOVATORS

Page 44: Continuous Delivery: implementation considerations...DevOps and Continuous Delivery DEV Agile (SCRUM, ..) High frequently change Ops Strong procedure (ITIL, ASL,…) Stable production

SOFTWARE INNOVATORS 47

Contact

Léon Hagenaars-Keus Edwin van Dillen

[email protected] [email protected]

030 220 22 16 06 22 50 62 33

Web: www.sogyo.nl

Blog: www.software–innovators.nl