+ All Categories
Home > Documents > continuous updates static · Continuous updates pattern: Local rollback Problem: update went...

continuous updates static · Continuous updates pattern: Local rollback Problem: update went...

Date post: 04-Jul-2020
Category:
Upload: others
View: 1 times
Download: 0 times
Share this document with a friend
76
DevOps Patterns & Antipatterns for Continuous Software Updates “What can possibly go wrong?!”
Transcript
Page 1: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

DevOps Patterns & Antipatterns for Continuous Software Updates“What can possibly go wrong?!”

Page 2: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Why software updates?

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 3: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have
Page 4: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have
Page 5: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 6: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

“As every company become a software company,Security vulnerabilities are the new oil spills”

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 7: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Identify Fix Deploy

Page 8: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

IdentifyImmediately

FixOS upgrade

Deployyears

Page 9: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Identify2 months

FixStruts upgrade

Deploy2 months

Page 10: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 11: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 12: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

IdentifyAs fast as possible

FixAs fast as possible

DeployAs fast as possible

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 13: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

2019

A C C E L E R A T E

State of DevOps

Sponsored by

Page 14: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have
Page 15: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have
Page 16: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 17: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

This is not a new idea!

XP: short feedbackScrum: reducing cycle time

to absolute minimumTPS: Decide as late as

possible and Deliver as fast as possibleKanban: Incremental

change

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 18: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have
Page 19: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

shownotes

http://jfrog.com/shownotes

Slides

Video

Links

Comments, Ratings

Raffle

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 20: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have
Page 21: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 22: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 23: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have
Page 24: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have
Page 25: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Do we want it?

Let’s update!

Are there any high

risks?

How about no

Do we trust the

update?

Update available

No

Yes

Yes

Yes

NoNo

Page 26: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 27: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

number of artifacts as a symptom of complexity

@jbaruch @jfrog #LiquidSoftware www.liquidsoftware.com

IoT

Serverless

Docker

Infrastructure as Code

Continuous Delivery

Continuous Integration

Agile

Microservices

2000

Today

Page 28: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

The problem is not the code, it’s the data. Big data.

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 29: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

#emptyenvelopefromchina

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 30: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 31: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Do we want it?

Let’s update!

Are there any high

risks?

Can we verify the update?

How about no

Do we trust the

update?

Update available

No

Yes

Yes

YesYes

NoNoNo

Time consuming verification

Page 32: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have
Page 33: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Features that we

want

Acceptance tests costs

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 34: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have
Page 35: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Do we want it?

Let’s update!

Are there any high

risks?

Update available

No

Yes

No one asked you

(auto update)

Your browserTwitter in your browserTwitter on your smartphoneYour smartphone OS?!

Page 36: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

What can possibly go wrong?

Page 37: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 38: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have
Page 39: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Continuous updates pattern:

Local rollback

Problem: update went catastrophically wrong and an over the-air patch can’t reach the deviceSolution: Have a previous

version saved on the device prior to update. Rollback in case problem occurred

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 40: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have
Page 41: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have
Page 42: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have
Page 43: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Continuous updates pattern:

OTA software updates

Problem: physical recalls are costly. Extremely costly. Also, you can’t force an upgrade.Solution: Implement over

the air software updates, preferably, continuous updates.

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 44: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

continuous OTA updates are like normal OTA updates,

but better

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 45: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have
Page 46: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have
Page 47: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have
Page 48: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Continuous updates pattern:

continuous updates

Problem: In batch updates important features wait for non-important features.Solution: Implement

continuous updates.

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 49: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 50: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have
Page 51: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Nub’s horror

New feature updateUses templating with $ symbolApple’s staging servers return prices

without $ symbolSome Apple’s production servers return prices with $ symbolAs a result, some users suffer crashesIt took time to understand what went

wrongIt took time to get the fix through Apple

review

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 52: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Continuous updates pattern:Canary releases

Problem: Releasing a bug affects ALL the users.Solution: Release to a

small number of users first and observe. If a problem occurs, stop the release, revert or update the affected users.

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 53: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Continuous updates pattern:

observability

Problem: Some problems are hard to trace relying on user feedback onlySolution: Implement

tracing, monitoring and logging

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 54: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Continuous updates pattern:

Rollbacks

Problem: Fixes might take time, users suffer in a meanwhileSolution: Implement

rollback, the ability to deploy a previous version without delay

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 55: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Continuous updates pattern:

feature flags

Problem: Rollbacks are not always supported by the deployment target platformSolution: Embed 2 versions

of the features in the app itself and trigger them with API calls

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 56: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have
Page 57: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

You thought your problems are hard?

Things under your control Server-side Updates IoT (Mobile, Automotive, Edge) Updates

The availability of the target ✓ ✕The state of the target ✓ ✕The version on the target ✓ ✕The access to the target ✓ ✕

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 58: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have
Page 59: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

KNIGHT-MARE

New system reused old APIs1 out of 8 servers was not

updatedNew clients sent requests to

machine contained old code Engineers undeployed working code from updated servers, increasing the load on the not-updated serverNo monitoring, no alerting, no debugging

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 60: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Continuous updates pattern:

Automated deployment

Problem: People suck at repetitive tasks.Solution: Automate

everything.

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 61: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Continuous updates pattern:

frequent updates

Problem: Seldom deployments generate anxiety and stress, leading to errors.Solution: Update

frequently to develop skill and habit.

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 62: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Continuous updates pattern:state awareness

Problem: Target state can affect the update process and the behavior of the system after the update.Solution: Know and

consider target state when updating.Reverting might require revering the state.

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 63: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 64: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have
Page 65: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Real life pattern:

be kind

Problem: You shame someone publicly; week later shit happens to you.Solution: Don’t be a

shmuck.

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 66: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Cloud-dark

New rules are deployed frequently to battle attacks Deployment of a single

misconfigured ruleIncluded regex to spike

CPU to 100%“Affected region: Earth”

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 67: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Continuous updates pattern:Canary releases

Problem: Releasing a bug affects ALL the users.Solution: Release to a

small number of users first effectively reducing the blast radius and observe. If a problem occurs, stop the release, revert or update the affected users.

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 68: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 69: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have
Page 70: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Continuous updates pattern:

zero downtime updates

Problem: You will probably loose all your users if you shut down for 5 weeks (and counting) to perform an update.Solution: Perform zero-

downtime OTA small and fequent continuous updates.

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 71: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Continuous updates

FrequentAutomaticTestedCanaryState-awareObservability*Local Rollbacks

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 72: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Do we want it?

Let’s update!

Are there any high

risks?

Do we trust the

update?

Update available

No

Yes

Yes

Yes

Sure, why not?(auto update)

Page 73: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Our goal is to transition from bulk and rare software updates to extremely tiny and extremely frequent software updates;so tiny and so frequent that they provide an illusion of software flowing from development to the update target.

We call it the Liquid Software vision.

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 74: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 75: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Corner cases?

@jbaruch #LiquidSoftware http://jfrog.com/shownotes

Page 76: continuous updates static · Continuous updates pattern: Local rollback Problem: update went catastrophically wrong and an over the-air patch can’t reach the device Solution: Have

Q&A and twitter ads

@jbaruch

#LiquidSoftware

http://liquidsoftware.com

http://jfrog.com/shownotes


Recommended