+ All Categories
Home > Software > Introduction to continuous delivery

Introduction to continuous delivery

Date post: 08-May-2015
Category:
Upload: olympicsoftware
View: 337 times
Download: 2 times
Share this document with a friend
31
Introduction to Continuous Delivery André Meurer @themeurer Head of Software Engineering @ Olympic
Transcript
Page 1: Introduction to continuous delivery

Introduction to Continuous Delivery

André Meurer@themeurer

Head of Software Engineering @ Olympic

Page 2: Introduction to continuous delivery

How long would it take to get aone line code change

into production using the current process?

Page 3: Introduction to continuous delivery

Idea

Funding

Analysis

Test

Deploy

Water-scrum-fall

Page 4: Introduction to continuous delivery

The last mile

Page 5: Introduction to continuous delivery

The “tail period” or “last mile”

• Time from code freeze to release– Beta & regression testing– Code integration & integration testing– Documentation– Bug fixing– Deployments

Page 6: Introduction to continuous delivery

Continuous Delivery is aboutreducing risk of releases

and making deployments boring

Page 7: Introduction to continuous delivery

Reduce risk of releases

Page 8: Introduction to continuous delivery

Fast, automated feedback on the production readiness of your application every time there is a

change

Constant flow of small increments into production

Software always production ready

Page 9: Introduction to continuous delivery

Key Principles

• Constant flow of small incremental changes into prod• Software always production ready• Automate almost everything• Build, deploy, test, release, repeat• Use humans for high value stuff• Manual testing, approvals• Keep everything in source control• If it hurts, do it more often, and bring the pain forward• Done means released in production• Continuous improvement – don’t try to do it all at once

Page 10: Introduction to continuous delivery

Build the right thing

• Every business idea is just a hypotesis• Most features are rarely or never used• Don’t ask customers what they want: try it out• Release a minimum viable product• Can respond quickly to market demands• Hypotesis – MVP – Analyse – Repeat

Page 11: Introduction to continuous delivery

Failure will happen

Page 12: Introduction to continuous delivery

check in

ci fast

ci slow

regression tests

performance tests

deployment

check in

ci fast

ci slow

regression tests

performance tests

deployment

check in

ci fast

ci slow

regression tests

performance tests

deployment

check in

ci fast

ci slow

regression tests

performance tests

deployment

check in

ci fast

ci slow

regression tests

performance tests

deployment

Faster feedback

Delivery Pipeline

Page 13: Introduction to continuous delivery

Testing & promoting

Page 14: Introduction to continuous delivery

Continuous integration

• Early integration• Everyone’s changes integrated frequently in the same place• Build & test at every check-in• Rapid feedback• It’s a practice, not a tool

Page 15: Introduction to continuous delivery
Page 16: Introduction to continuous delivery

The software testing pyramid

GUI

Acceptance tests

Unit & component tests

More business-facingLess stableMore realistic

Lower costEasier maintenance

More stableFaster feedback

Exploratory/manual

Page 17: Introduction to continuous delivery

The software testing cupcake anti-pattern

Page 18: Introduction to continuous delivery

Trunk based development

• Check-in or merge into trunk at least once per day• Feature branches should be short lived• Branches discourage refactoring

– People don’t know what code other team members are touching, so they are hesitant to refactor for risk of impact

• Branches delay integration and hide risk• Merging wastes time and is tedious

Page 19: Introduction to continuous delivery

Inside out development

• Build from the bottom– DB – Business Logic – UI

• Feature not accessible until full development is complete• Small slices/stories to enable fast feedback

Page 20: Introduction to continuous delivery

Feature toggles/switches

• Deploy incomplete features switched off– Be aware of feature switch madness– Switches need to be deleted as the feature is in production

• Control who can see the new feature– Test it with a small group of users– Ensure it handles the load– Gradually increase group of users if appropriate

• Separate deployments from releases

Page 21: Introduction to continuous delivery

Feature switches

Dev

Smaller

Many

Short

Operations

Business

Larger

Few

Long

Granularity

Numbers

Lifetime

Page 22: Introduction to continuous delivery

Branch by abstraction

• Parallel routes• Make architectural changes

– Interface to create abstraction– Abstraction layers with two working implementations– Swap bit by bit of the code to the new architecture until complete– Old implementation can be removed once no longer used

• DB changes– No breaking schema changes until code is ready to deal with new

schema

Page 23: Introduction to continuous delivery

Roll Forward

• Rollback strategy is complex & risky• Easier to fix something and get it through the pipeline

Page 24: Introduction to continuous delivery

Canary Releases

• Release features to smaller groups/clusters• Test/verify stability/performance/etc.• Roll out to more/rest of users

Page 25: Introduction to continuous delivery

Blue Green deployments

• Two instances of the production environment– Current PROD (blue)– Upgrade environment (green)

• Start routing small groups/clusters of people to Green environment

• Swap them

Page 26: Introduction to continuous delivery

Quality

• QA inspects quality• Everyone is responsible for quality• QA represents the user

Page 27: Introduction to continuous delivery

IT ops team close to dev team

• Sit together: Dev, QA, and Ops• Have sysadmin as part of the development team • Deploy to all environments the same way we deploy to

production

Page 28: Introduction to continuous delivery

Delivery Pipeline Tools

• Orchestration/CI– Team City– Jenkins– Bamboo

• Delivery Manager– LiveRebel– OctopusDeploy

• Infrastructure Automation– Chef– Puppet– Bcfg2– CFEngine

Page 29: Introduction to continuous delivery

Where do I start?

• Why do you want to do it?• It will take time, start now• CI is first step• Get the architecture right• Culture of continuous improvement • It will need investment

Page 30: Introduction to continuous delivery

It’s a journey

• Fundamental change to the way most organisations ship software

• Releases tied to business needs, not IT constraints• Minimise lead time from idea to live (concept to cash)• IT no longer the bottleneck• Buy-in from client is critical


Recommended