continuous delivery - scania connected services - nfi testforum 2014

45
Continuous Delivery Daily releases to production Anders Lundsgård Peter Sandberg Engineers, Scania Connected Services Our highest priority is to satisfy the customer through early and continuous delivery of valuable software. from ”the agile manifesto”

Upload: anders-lundsgard

Post on 10-May-2015

1.165 views

Category:

Presentations & Public Speaking


2 download

DESCRIPTION

Presentation about Continuous Delivery at Scania Connected Services by Anders Lundsgård and Peter Sandberg. The presentation was held in Stockholm the 9th of April on NFI Testfourm 2014.

TRANSCRIPT

Page 1: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

Continuous Delivery Daily releases to production

Anders LundsgårdPeter Sandberg

Engineers, Scania Connected Services

Our highest priority is to satisfy the customer through early and continuous delivery of valuable software.

from ”the agile manifesto”

Page 2: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

Continuous DeliveryDeployment

ReleaseQuality

Page 3: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

Do you have the guts to deploy to production 50 times a day!?

Page 4: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

This is Agile!

© Bestoutcome Ltd 2014

Page 5: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

This is Agile!

Weeks

Months!

ProdLast Mile

Page 6: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

http://www.perforce.com/continuous-delivery-report

Page 7: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

Why Continuous Delivery?

Page 8: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

Major measure for Continuous Delivery

CYCLE TIME

”How long would it take your organization to deploy a change [to production] that involves just one single line of code? Do you do this on a repeatable, reliable basis?”

Mary and Tom PoppendieckImplementing Lean Software Development

Page 10: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

Key koncepts for CD

• Test Driven Development• Deployment Pipeline• Continuous Integration• Configuration Management• Feature Toggles• A/B tests• Always On

• Tear the walls

Cultural changes

Technical patterns

Page 11: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

Technical patterns

Page 12: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

QA in Continuous Delivery

Page 13: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

Test Driven Development

Design Code Test

CodeTest

Design

Deploy

Deploy

Code in to VCS Manual work

Prod

Prod

Page 14: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

Test Pyramid

Unit Tests

Integration Tests

GUITests

Manual ”inspection”

Page 15: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

Test Ice Cream?

Unit Tests

Integration Tests

GUI Tests

Manual Regression

Page 16: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

Test movement

Communication via error reports Communication face to face

Tests executed in desktop environment Tests into the Deployment Pipeline

GUI-oriented tests Tests towards service layer

Test specific dev environment Same dev environment as developers

Separated test teams Embedded testers

Page 17: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

Deployment Pipeline

Page 18: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

Deployment Pipeline

Commit Stage Acceptance Stage Load Stage Deploy Stage

Compile Unit Test Analysis Packaging Acc. Deploy

Acc. Tests Exploraty Tests

Load Tests

Perf Tests

Staging Deploy

Prod Deploy

.....

…..

Page 19: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

Deployment Pipeline

Commit Stage Acceptance Stage Load Stage Deploy Stage

Compile Unit Test Analysis Packaging Acc. Deploy

Acc. Tests Exploraty Tests

Load Tests

Perf Tests

Staging Deploy

Prod Deploy

.....

…..

Page 20: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

NO IDE Build, Test or Deploy!!

Page 21: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

Continuous Integration

• Maintain a Single Source Repository• Automate the Build• Make Your Build Self-Testing• Everyone Commits To the Mainline Every Day• Every Commit Should Build the Mainline on an Integration

Machine• Keep the Build Fast• Test in a Clone of the Production Environment• Make it Easy for Anyone to Get the Latest Executable• Everyone can see what's happening• Automate Deployment

Page 22: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

Configuration Management

R&D IT

Config file here and there…

Click here and there …

First script #1 and then script

#2…

Failover this and that…

Register key here and there …

First alias #1 and then alias

#2…

Release plans

Single source of truthVCS

Page 23: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

Feature Branch

Dev Branch #1

Main

Release Branch #1

Dev Branch #2

Page 24: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

Feature Toggle

Main

GUI

Business Logic

Database

Page 25: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

Feature Toggles

Page 26: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

A/B tests

Page 27: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

A/B tests

20%of users

Page 28: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

Always On

Page 29: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

DB

Web1 Web2

Load balancer

1. Add new schema2. Write to both schemas3. Backfill historical data4. Read from new schema5. Remove writes to old schema6. Remove old schema

Page 30: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

Cultural change

1. Tear the walls2. Empower the engineers

Page 31: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

DevOpsOperations people are rewarded for things

not going wrong.Developers are rewarded for getting

releases out.

And those two goals are in conflict.

Jez Humble: co-author of the book: Continuous Delivery

Page 32: Continuous Delivery - Scania Connected Services - NFI Testforum 2014
Page 33: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

If I had an idea last night……I coded it up this morning…

…I got it on the site this afternoon…

and tomorrow I got data.

In a couple of weeks I’ve learned as much as I would

have in over a year in a regular system.

http://www.infoq.com/presentations/Facebook-Moving-Fast-at-Scale

Page 34: Continuous Delivery - Scania Connected Services - NFI Testforum 2014
Page 35: Continuous Delivery - Scania Connected Services - NFI Testforum 2014
Page 36: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

At the end of the day it is the person who writes the code who is

responsible for whether or not it works.

Page 37: Continuous Delivery - Scania Connected Services - NFI Testforum 2014
Page 38: Continuous Delivery - Scania Connected Services - NFI Testforum 2014
Page 39: Continuous Delivery - Scania Connected Services - NFI Testforum 2014
Page 40: Continuous Delivery - Scania Connected Services - NFI Testforum 2014
Page 41: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

Are we making Is Prod

doing well?

Code metrics

Page 42: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

Implemented CD i 2 months!

The Software Revolution Behind LinkedIn’s Gushing Profits

- We wanted to be at the point where… as soon as they were checking in their code… it was qualified and releasable…

- We were able to scale the team to hundreds of developers.

- It was a pretty big risk the business took, to say to its engineering team, you’re going to run across a bridge and burn it behind you.

2011

Kevin Scott

Page 43: Continuous Delivery - Scania Connected Services - NFI Testforum 2014
Page 44: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

Resources

ISBN-13:978-0321601919

www.continuousdelivery.eu

Page 45: Continuous Delivery - Scania Connected Services - NFI Testforum 2014

Contact

• Peter Sandberg– [email protected]

• Anders Lundsgård– [email protected]