Download - Continuous delivery the french way Agile Cambridge 2014

Transcript
Page 1: Continuous delivery the french way Agile Cambridge 2014

Dimitri BAELI - Arnaud PFLIEGER https://github.com/lesfurets

CONTINUOUSDELIVERYTHE FRENCH WAY

Page 2: Continuous delivery the french way Agile Cambridge 2014

LESFURETS.COM22 software engineers3 Devops (automation & operations)1 Architect

Page 3: Continuous delivery the french way Agile Cambridge 2014

LESFURETS.COM1 website, 6 product lines400k lines of code, 30k Unit tests200 Selenium tests10+ Servers1 code base

Page 4: Continuous delivery the french way Agile Cambridge 2014

IN 201211 RELEASES

Mind set:Plan/Estimate/Code/Test/Release monthly

Page 5: Continuous delivery the french way Agile Cambridge 2014

IN 2014143 RELEASES

Mind set:Ship what is READY the next day

Page 6: Continuous delivery the french way Agile Cambridge 2014

IN 2012Scrum sprints ended by a releaseSubversion : trunk + 1 maintenance branchBuild : 15min, Selenium in a grid: 200 in 1hTesting phase : 4-6 days, Deployment in 2hCommit to Prod : from 5d to 4 weeks

Page 7: Continuous delivery the french way Agile Cambridge 2014

IN 2014Lean KanbanDaily releasesGIT : master + feature branchesBuild : 3' (was 15') + Selenium : 10' (was 1h)Release : 5min + 30min monitoringCommit to Prod : coding time + 1 day

Page 8: Continuous delivery the french way Agile Cambridge 2014

A FEW THINGS WE READ

Page 9: Continuous delivery the french way Agile Cambridge 2014

AGILE MANIFESTOPRINCIPLE 3

"Our highest priority is to satisfy the customer through early and continuous delivery ofvaluable software."

Page 10: Continuous delivery the french way Agile Cambridge 2014

PRODUCT DEVELOPMENT FLOWDON REINERTSEN

Work with a flowManage Queues of workLead Time more than work durationReduce per release costs

Page 11: Continuous delivery the french way Agile Cambridge 2014

CONTINUOUS DELIVERYJEZ HUMBLE, DAVID FARLEY

1. Fast builds2. Pre-Commit check (all tests ever ok)3. Simple and fast automated deployments4. Production monitoring and alerting5. Root Cause Analysis

Page 12: Continuous delivery the french way Agile Cambridge 2014

DELIVER EARLY, DELIVER OFTEN

Source: http://paulhammant.com/2013/03/13/facebook-tbd-take-2/

Page 13: Continuous delivery the french way Agile Cambridge 2014

KANBAN : EVOLUTIONARY CHANGEDAVID ANDERSON

Visualize the workLimit the Work in ProcessExplicit RulesContinuous ImprovementLeadership

Page 14: Continuous delivery the french way Agile Cambridge 2014

HOW GOOGLE TEST SOFTWAREJAMES WHITAKER

NoQA : Quality EngineeringSET : build test tools for devsDev QA their own changes

Page 15: Continuous delivery the french way Agile Cambridge 2014

GIT FLOWVINCENT DRIESSEN

A successful git branching modelhttp://nvie.com/posts/a-successful-git-branching-model/

Page 16: Continuous delivery the french way Agile Cambridge 2014

START BYFINISHING !

BECAUSE FRENCH GUYS AREDOING EVERYTHING BACKWARD

Page 17: Continuous delivery the french way Agile Cambridge 2014

CONTINUOUS DELIVERY1. Operations2. Delivery3. Validation4. Continuous integration5. Analysis & Coding : Branch

Page 18: Continuous delivery the french way Agile Cambridge 2014

OPERATIONSTECHNICAL MONITORING AND ALERTING

Page 19: Continuous delivery the french way Agile Cambridge 2014

OPERATIONSFUNCTIONAL MONITORING AND

ALERTING

Page 20: Continuous delivery the french way Agile Cambridge 2014

DELIVERY

Page 21: Continuous delivery the french way Agile Cambridge 2014

AUTOMATE

"Infrastructure as code"

Code

Conf

SQL

LocalPre-prod Prod

Page 22: Continuous delivery the french way Agile Cambridge 2014

DEPLOYMENT

0 downtime

Blue/green

Doubled production environmentLoadbalancer

User LoadbalancerProduction 1

Production 2Database

version N

version N+1

Page 23: Continuous delivery the french way Agile Cambridge 2014

VALIDATIONManual testsRegression Testing : ZenoSeleniumCode reviewsShowcase/functional validation

Page 24: Continuous delivery the french way Agile Cambridge 2014

ZENOVISUAL REGRESSION

Page 25: Continuous delivery the french way Agile Cambridge 2014

SELENIUM

Page 26: Continuous delivery the french way Agile Cambridge 2014

SELENIUMPage Object PatternFluent API (FluentLenium like)Selenium in the sky with LXC200 Selenium tests in <10min

Page 27: Continuous delivery the french way Agile Cambridge 2014

CONTINUOUS INTEGRATIONIMPACTS THE CODEBASE

Page 28: Continuous delivery the french way Agile Cambridge 2014

CONTINUOUS INTEGRATIONBRANCHING MODEL

Trunk + Release branchTrunk based (all commits to master + toggle)Feature Branching + Merge when ready

Page 29: Continuous delivery the french way Agile Cambridge 2014

CONTINUOUS INTEGRATION

Deliver ...when it's ready

Page 30: Continuous delivery the french way Agile Cambridge 2014

FEATURE BRANCHING

Page 31: Continuous delivery the french way Agile Cambridge 2014

CONTINUOUS INTEGRATIONON EVERY COMMIT

CompilationAutomated testsContinuous Merge (Octopus)

Page 32: Continuous delivery the french way Agile Cambridge 2014

CONTINUOUS MERGE

octopus

master feature A feature B

octopus

master feature A

feature B

octopus

master feature A

feature Bdisposablecommit

Page 33: Continuous delivery the french way Agile Cambridge 2014

CONTINUOUS MERGEBuild a test environmentDetect conflictsPlug/unplug branches easilyGit Octopus Merge

Page 34: Continuous delivery the french way Agile Cambridge 2014

MANAGING CONFLICTS

Avoid conflicts vs Resolve conflicts

Page 35: Continuous delivery the french way Agile Cambridge 2014

MANAGING CONFLICTS

A LOT OF OPTIONS

Remove the conflicting branch (put aside, comeback later)Find a way to make it mergeMerge branches in conflict (resolve the conflict)Merge in master (+ merge everywhere)

Merge is the worst case (default in trunk based development)

Page 36: Continuous delivery the french way Agile Cambridge 2014

30 BRANCHES AT WORK !

Page 37: Continuous delivery the french way Agile Cambridge 2014

EXCEPTIONS TO THE BRANCHING MODELFeature togglesBig refactorings

Page 38: Continuous delivery the french way Agile Cambridge 2014

FEATURE TOGGLE

When ?

Lots of conflictsLong term branch

Page 39: Continuous delivery the french way Agile Cambridge 2014

BIG REFACTORINGSToo many conflictsLong term task

Special treatmentBlocks the release

Page 40: Continuous delivery the french way Agile Cambridge 2014

THANK YOU TOArnaud: let's see if branching really fails (octopus)Mehdi: I bet it won't work (bet accepted !)Matthieu: Perceptual Diff ? ok let's tryThomas: Docker+RamFS for the Selenium Grid (1h -> 10min)Andreï/Julien: Fluent Selenium Page Object generationEmmanuel: Ok for some bugs in production, but fix them fastGilles: Go, go, go !And all the devteam to jump in deep end so easily

Page 41: Continuous delivery the french way Agile Cambridge 2014

ONE MORE THINGFork us on GitHub

Selenium in the sky with LXCGit Octopus - Continuous MergingAnd more soon ...Follow us cousins of

http://github.com/lesfurets

@BeastieFurets @ctmersselenium-in-the-sky-with-lxc@ctmers

Page 42: Continuous delivery the french way Agile Cambridge 2014

THANK YOU