Continuously delivering software to big brands (fullscreen edition)

48
@paul_boocock [email protected] Continuously Delivering Software to Big Brands

Transcript of Continuously delivering software to big brands (fullscreen edition)

Page 1: Continuously delivering software to big brands (fullscreen edition)

@paul_boocock [email protected]

Continuously Delivering Software to Big Brands

Page 2: Continuously delivering software to big brands (fullscreen edition)

Step 1.Introduce myself!

Step 2.Talk about the fundamentals

Step 3.How do we do it at Codeweavers?

Continuously Delivering Software to Big Brands

Page 3: Continuously delivering software to big brands (fullscreen edition)

• Some Northern fella…

Academy Leader

Who am I?

Page 4: Continuously delivering software to big brands (fullscreen edition)

Delivering software to a production environment is often one of the most riskiest and stressful parts of

the software lifecycle.

Delivering Software

How can we:•Reduce Risk?•Eliminate Tedious Work?•Increase Confidence?

For many organisations, releasing software is:•Manually Intensive•Error Prone•Risky

Page 5: Continuously delivering software to big brands (fullscreen edition)

Big Brands

Page 6: Continuously delivering software to big brands (fullscreen edition)

How long would it take your business to safely deploy a change that involves one line of code to the

production environment?

Within Six Months?

Question

Page 7: Continuously delivering software to big brands (fullscreen edition)

How long would it take your business to safely deploy a change that involves one line of code to the

production environment?

Within Three Months?

Question

Page 8: Continuously delivering software to big brands (fullscreen edition)

How long would it take your business to safely deploy a change that involves one line of code to the

production environment?

Within One Month?

Question

Page 9: Continuously delivering software to big brands (fullscreen edition)

How long would it take your business to safely deploy a change that involves one line of code to the

production environment?

Within One Week?

Question

Page 10: Continuously delivering software to big brands (fullscreen edition)

How long would it take your business to safely deploy a change that involves one line of code to the

production environment?

Within One Day?

Question

Page 11: Continuously delivering software to big brands (fullscreen edition)

How long would it take your business to safely deploy a change that involves one line of code to the

production environment?

Within One Hour?

Question

Page 12: Continuously delivering software to big brands (fullscreen edition)

How long would it take your business to safely deploy a change that involves one line of code to the

production environment?

Within 30 Minutes?

Question

Page 13: Continuously delivering software to big brands (fullscreen edition)

How long would it take your business to safely deploy a change that involves one line of code to the

production environment?

Within 15 Minutes?

Question

Page 14: Continuously delivering software to big brands (fullscreen edition)

How long would it take your business to safely deploy a change that involves one line of code to the

production environment?

How Low?!?

Question

Page 15: Continuously delivering software to big brands (fullscreen edition)

How long would it take your business to safely deploy a change that involves one line of code to the

production environment?

This is known as your Cycle Time

Question

Page 16: Continuously delivering software to big brands (fullscreen edition)

Lowering Cycle Time is something to strive for

Can be achieved through automationCreating a reliable, predictable, visible and largely automated process with well understood risks.

Cycle Time

Page 17: Continuously delivering software to big brands (fullscreen edition)

Technologies

Page 18: Continuously delivering software to big brands (fullscreen edition)

The foundation of what we will talk about today

Vital to have a solid CI environment before movingonto continuous delivery

Continuous Integration

Page 19: Continuously delivering software to big brands (fullscreen edition)

Source ControlCommit Frequently

Automatic BuildsAutomated Tests

Staging Environment

Continuous Integration

Build FastBuild Every Commit

Make it visible

Page 20: Continuously delivering software to big brands (fullscreen edition)
Page 21: Continuously delivering software to big brands (fullscreen edition)
Page 22: Continuously delivering software to big brands (fullscreen edition)

Source ControlCommit Frequently

Automatic BuildsAutomated Tests

Staging Environment

Continuous Integration

Build FastBuild Every Commit

Make it visible

Page 23: Continuously delivering software to big brands (fullscreen edition)

Unable to commit when build is brokenRun all tests before committingNever go home on a broken buildBe ready to revertDon’t comment out failing testsTake responsibility

The Essentials

Page 24: Continuously delivering software to big brands (fullscreen edition)

CI Build Process

Total Build Time: ~4 Minutes

Page 25: Continuously delivering software to big brands (fullscreen edition)

The build and tests should be fast – go parallel if possibleTest coverage should be high – aim for 75%+If it breaks we cannot continue

Prevents defects getting to production

Early Feedback

Page 26: Continuously delivering software to big brands (fullscreen edition)

Every commit should be safe enough to be deployed to productionUsually leads to better code quality and maintainabilityCan use feature toggles if required but try to avoid

Every commit can be released

Page 27: Continuously delivering software to big brands (fullscreen edition)

Manual DeploymentHas to be manually tested to ensure everything works

Leads to tense release day

Prone to human error

Take hours assuming everything goes well

Deployment

Page 28: Continuously delivering software to big brands (fullscreen edition)

The alternative…Automate your deploys

Only human element is to pick the environment and press deploy

Will lead to a repeatable and reliable deployment process

No reliance on the deploy expert at work

Deployment

Page 29: Continuously delivering software to big brands (fullscreen edition)

Isn’t just the way we deploy, it’s essential to our business

• Commit and build• Deploy to staging environment• Deploy to live

Continuous Delivery

Page 30: Continuously delivering software to big brands (fullscreen edition)

Every commit should be deployableSo deploy them!Get early feedback on feature from clientsEnsure any issues can be found earlier

Deploy Frequently

Day CommitsStaging Deploy

Production Deploy

Friday  72 181 14Thursday  126 115 23Wednesday  134 86 25Tuesday  94 37 11Monday  131 62 27

Page 31: Continuously delivering software to big brands (fullscreen edition)

Deliverables are not done until they are at least in production

Kanban board reflects this

Only done when delivering value to the customer

Done when released

Page 32: Continuously delivering software to big brands (fullscreen edition)

Ensure that everybody is involved in deploying their codeTake ownership of your own work

Fail early / feedback fast so you can fix it quickly

No one person responsible for deploymentRemove the barriers in your teams

Everybody is responsible

Page 33: Continuously delivering software to big brands (fullscreen edition)

So with all these features in place, how does it all stitch together?

Developer Journey – From Story to Live

Page 34: Continuously delivering software to big brands (fullscreen edition)

Move on to next MMF(Minimum Marketable Feature)

Developer Journey – From Story to Live

Page 35: Continuously delivering software to big brands (fullscreen edition)

Write some code!

Developer Journey – From Story to Live

Page 36: Continuously delivering software to big brands (fullscreen edition)

Commit Frequently

Developer Journey – From Story to Live

Page 37: Continuously delivering software to big brands (fullscreen edition)

Monitor the build on CI (~4 Minutes)CruiseControl.NET & Nant scripts automate this

Developer Journey – From Story to Live

Page 38: Continuously delivering software to big brands (fullscreen edition)

If successful deploy to staging (~2 Minutes)

Developer Journey – From Story to Live

Page 39: Continuously delivering software to big brands (fullscreen edition)

If successful deploy to production (~4 Minutes)

Developer Journey – From Story to Live

Page 40: Continuously delivering software to big brands (fullscreen edition)

And we’re live! If everything goes smoothly, from commit to production in 15 minutes

Developer Journey – From Story to Live

Page 41: Continuously delivering software to big brands (fullscreen edition)

Keep things visible

Page 42: Continuously delivering software to big brands (fullscreen edition)

Keep things visible

Page 43: Continuously delivering software to big brands (fullscreen edition)

Started tracking Cycle Time in 2016 to see how long it takes a code change to go live

Currently averages at 7.32 hours from commit to live

Cycle Time

Page 44: Continuously delivering software to big brands (fullscreen edition)

What does it give us?Iterate & deliver quicklyReduces bottlenecks in the delivery pipelineIncreases visibilityWork Sustainably

Page 45: Continuously delivering software to big brands (fullscreen edition)

Continuous Delivery helps towards working with Sustainable Pace

Sustainable Pace

Page 46: Continuously delivering software to big brands (fullscreen edition)

What does it give us?Iterate & delivery quicklyReduce bottlenecksIncreases visibilityWork Sustainably

And occasionally…Break things (but we can fix them quickly!)

Page 47: Continuously delivering software to big brands (fullscreen edition)

What do our clients get from it?

Page 48: Continuously delivering software to big brands (fullscreen edition)

Continuous DeliveryJez Humble & David FarleyISBN13: 978-0-321-60191-9

The Bible