Skip to content

M9-S2 — Upgrade and operate a customised platform

Section titled “M9-S2 — Upgrade and operate a customised platform”
ModuleM9 — Performance and operations
After this session you canPlan a platform upgrade for a program that carries packages, Functions and extensions, and write the capability’s operations plan.
TimeFacilitated: 49 min · On your own: 49 min
Before you startM1-S2 (the release train), M2-S4 (migrations and rollback), M6-S1 (how a Function is provisioned) and your strand’s capability from M7 or M8. M9-S1’s capacity note. Larkspur Lab.
Go deeperMaintenance operations · Operational runbooks · Functions in a multi-tenant deployment

◆ Orientation (1 min) — The upgrade that touches everything

Section titled “◆ Orientation (1 min) — The upgrade that touches everything”

ACDE taught you to upgrade a release safely: read what changes, upgrade, check, and recover a failed upgrade (ACDE M2-S3). That was a platform with nothing on it. Larkspur now carries four modules installed from packages, one built by hand, integrations with their own credentials, Functions, and the Condition Monitoring capability you built in M7 or M8. A platform upgrade changes the ground under all of it at once. This session gives you the plan that keeps it standing, and the operations plan that lets someone other than you run your capability. You reuse both in the capstone (M11-S5).

▤ Concept (8 min) — What an upgrade touches, and how to plan it

Section titled “▤ Concept (8 min) — What an upgrade touches, and how to plan it”

Read a release through the layers of your program, not through its feature list. For each layer, the question is “what of ours depends on this, and could the release change it?”

LayerWhat the release can changeWhat of Larkspur’s depends on itWhere you learned it
WorkloadsImages, chart values, new or removed componentsValues files, resource sizes, the operator’s proceduresACDE M2-S3
Stored dataMigrations: new core entities, fields on built-in definitions, indexes, backfillsLarge entities (index builds), entities with repeatable blocks, names that collide with new built-in fieldsM2-S4
Built-in definitions and contractsA field’s type on a core entity, an API’s answer, an event’s payload (additions keep $version; incompatible changes add one)Integrations and Functions that read themM2-S2, M2-S3
PackagesThe package format versions an environment accepts, the source-release checkEvery installed package and the promotion pathM1-S2
FunctionsThe function runtime, the provisioner that builds and deploys them, and its own upgrade orderEvery Function, including your capability’sM6-S1
ClientsWeb portal features; the mobile app people have installed may lag the serverPages and views field people use on phonesM3-S5
IntegrationsGateway behaviour, error codes, token handlingApplication users, webhooks, outside systemsACE M5, M6

Most rows need only a check. The rows that need a decision are the ones where a release changes something one of your extensions reads, and the ones where it runs long or heavy work on your data. Those go first in the plan.

An upgrade plan for a customised platform has eight parts. It is written per release, rehearsed in Test (Larkspur Lab), and run in Production on the release train (M1-S2).

  1. Scope. From the release notes and the migration list: what changes in each layer, mapped onto Larkspur (the table above, filled in).
  2. Compatibility. For each extension and integration, a line: “reads X; the release changes X: yes or no; if yes, what we change and when”. Packages: the format versions the new release produces and accepts, and whether any environment will receive a package from a newer one.
  3. Preconditions. A backup of every store and the file provider, taken together with the writers stopped, and a tested restore (M2-S4). The function provisioner and any other separately released component at the version the release requires. A freeze on module releases for the train.
  4. Order. Separately released components the release depends on (such as the function provisioner) first, in the order its notes give; then the platform chart; the migration Job runs as its hook; then checks; Functions re-verified; then Development last (M1-S2’s train).
  5. Checks after. The release’s smoke test (ACDE); the migration log read line by line, including the scripts that log and continue; queues drained and dead letters empty; the indexing backlog after index migrations; every Function back to Provisioned and called once; every module’s acceptance list; the parity spot check on the phone.
  6. Rollback limits, written honestly. helm rollback restores workloads, not data; migrations do not run backwards; the only way back for the data is the backup, losing everything since. State the decision point: until when in the window you would still roll back, and who decides.
  7. Communication. Who is told what, when: the sponsor (downtime and risk), builders (the freeze), users (the window), the operator (the order and the checks).
  8. Record. A decision record for the upgrade (M1-S2), the timings you measured, and what you would change next time.

Three failure modes cover most bad upgrades of customised platforms, and each has a defence in the plan.

  • An extension read something the release changed. The integration still parses a field as a date-time after the release turned it into a date; the Function reads a payload field that moved. The release looks healthy; the extension fails quietly later. Defence: the compatibility list, and running every extension’s own check after the upgrade, not just the platform’s.
  • Heavy migrations on big data. Index builds and backfills that took seconds in Test take an hour on Production’s volumes, and search lags long after. Defence: time them in Test with the per-script timings, scale by record counts (M2-S4), and size the window from that.
  • A rollback that was never possible. A plan that says “if it fails, roll back” without a tested restore is a plan to lose data or to stay broken. Defence: the precondition and the decision point.

An upgrade plan is about one change. An operations plan is about every day: it is what lets someone other than its builder run a capability. Write one for every capability the program adds, starting with Condition Monitoring, and keep it with the module’s governance documents.

SectionWhat it says, for Condition Monitoring
What it is and who owns itOne paragraph, the owner (M1-S2), the modules and components it consists of (entities, Function or engine change, application user, webhook, package)
How it worksA diagram of the flow: readings in, evaluation, work orders and notifications out, and where each step leaves evidence (the trace map)
Signals and normal valuesThe metrics and logs that say it is healthy: reading rate, reaction runs and failures for its reaction, Function call duration, the outbound webhook’s failures, queue depth of the consumers it loads (M9-S1)
AlertsWhich signal, which threshold, who is called, and the first thing they check
RunbooksThe procedures for its likely failures, written as ACDE taught: the readings stop; alarms are not raised; the outside receiver rejects the webhook; the Function will not provision; a burst backs up a queue
DependenciesOutside services and stubs, credentials (who rotates them, when, and how), the components it shares with the rest of the program
CapacityIts fan-out per reading and the limit from M9-S1’s arithmetic, with the date the program reaches it
Backup and restoreWhat of it lives where (records, files, Function code, credentials outside the platform) and how it comes back after a restore
Upgrade notesWhat it reads from the platform that a release could change: the lines it contributes to every upgrade plan’s compatibility list
Security notesIts threat model’s remaining risks and their controls (M5-S4), and what an operator must never do
Hand-offsWho to call for what: the builder owner, the operator, the outside system’s owner

The test of an operations plan is simple: hand it to a colleague who did not build the capability, break the capability in Larkspur Lab, and see whether they fix it with the plan alone.

◇ Worked scenario (2 min) — The token rotation that stopped

Section titled “◇ Worked scenario (2 min) — The token rotation that stopped”

Two weeks after Larkspur’s production moved to the 1.10 line, the security officer notices that the monthly rotation of integration tokens did not happen. Nothing failed loudly. Decide at each step before reading on.

Step 1: what does the rotation do? A small script owned by Procurement, run by the release process under the Larkspur Release application user, reads every application user’s expiry date through the API, and regenerates the tokens of those that expire within thirty days.

Step 2: what did the upgrade change that the script reads? The 1.10 line’s migrations include one that changes the application user’s expiry date from a date-time to a date. The script parsed the value as a full timestamp; with a bare date it now computed “invalid date”, compared it with “now”, found nothing expiring, and exited successfully with nothing to do.

Step 3: why did no check catch it? The upgrade’s compatibility list covered the four modules and the Condition Monitoring capability, but not the release scripts, because they “are not part of the platform”. The upgrade checks ran the platform’s smoke test and the modules’ acceptance; none of them exercised the rotation, which only runs monthly.

Step 4: the fix and the lesson. The script parses dates as dates and fails loudly on a value it cannot parse; a test run is added to the upgrade checks (“run every scheduled integration once in dry-run mode”). And the compatibility list gains a rule: anything of ours that calls the platform (modules, extensions, integrations, scripts, reports exported to other systems) has a line, owner included. The security officer’s question becomes a row in the next upgrade plan’s checks, not an incident report.

PracticePut the items in the right order.

Put the steps of Larkspur’s production upgrade in the order the plan sets.

  1. Explanation for A

    Belongs in position 4 of 5

    Fourth: a successful Job is not proof; the log and the checks show what actually happened. See The upgrade plan.

  2. Explanation for B

    Belongs in position 3 of 5

    Third: the chart upgrade runs the migrations that change the stored data forward. See M2-S4: migrations.

  3. Explanation for C

    Belongs in position 5 of 5

    Last: Development follows Production, so no package travels from a newer release to an older one. See M1-S2: the release train.

  4. Explanation for D

    Belongs in position 1 of 5

    First: the backup is the only way back for the data, so it is a precondition of the window. See The upgrade plan.

  5. Explanation for E

    Belongs in position 2 of 5

    Second: components with their own release go first, in the order the release notes give. See The upgrade plan.

Check your answer

The correct order is D → E → B → A → C. Open the explanation under each item to see why it sits where it does.

PracticeChoose one answer.

An hour into the production window, after the migrations ran, a module’s acceptance check fails. The plan says “roll back if acceptance fails”. What does helm rollback give you?

  1. Explanation for A

    ✗ Incorrect

    Not this one: migrations have already changed the data and do not run backwards. See The upgrade plan.

  2. Explanation for B

    ✗ Incorrect

    Not this one: Helm rolls back the workloads; it simply cannot undo the data changes. See M2-S4: migrations.

  3. Explanation for C

    ✓ Correct

    Correct: rollback restores workloads, not data, which is why the plan states its decision point. See The upgrade plan.

Check your answer

The correct answer is C. Open the explanation under each option to see why.

PracticeChoose one answer.

Which item belongs in the upgrade plan’s compatibility section rather than its checks?

  1. Explanation for A

    ✓ Correct

    Correct: compatibility maps what each extension and integration reads onto what the release changes. See The upgrade plan.

  2. Explanation for B

    ✗ Incorrect

    Not this one: that is a check run after the upgrade. See The upgrade plan.

  3. Explanation for C

    ✗ Incorrect

    Not this one: a backup taken before the window is a precondition, not a compatibility line. See The upgrade plan.

Check your answer

The correct answer is A. Open the explanation under each option to see why.

⛏ Lab (28 min) — Larkspur’s upgrade plan and the capability’s operations plan

Section titled “⛏ Lab (28 min) — Larkspur’s upgrade plan and the capability’s operations plan”

Goal. An upgrade plan for moving Larkspur to the next patch release of the 1.10 line, built from evidence in Larkspur Lab, and the operations plan of your strand’s Condition Monitoring capability.

Before you start. Larkspur Lab with your strand’s capability installed (M7-S4 or M8-S4); your larkspur-governance.md (M1-S2), m2-s4-persistence.md and m9-s1-diagnosis.md. The release notes and migration list of the target release from your vendor’s pack (for the exercise, the 1.10 line’s migration list in the docs stands in for them). Two files: upgrade-plan.md and ops-plan-condition-monitoring.md.

Evidence for the upgrade plan

  1. Record the running release: helm list -n larkspur (chart and app version).

  2. List what is installed: in the portal, Administration › Packages › Installed, with versions; which modules were built by hand.

  3. List the Functions and their states in Administration › Applications › Functions.

    Screenshot pending The Functions list in Larkspur Lab's administration, with the capability's Function shown as Provisioned What to notice: the state column is the first upgrade check for every Function; anything other than Provisioned after an upgrade is a finding.

  4. List the application users and what each is used for (from M1-S1’s inventory, updated with your strand’s Larkspur Telemetry).

  5. Read the record counts of the five largest entities: db.getCollectionNames().map(c => [c, db[c].estimatedDocumentCount()]).sort((a,b) => b[1]-a[1]).slice(0,5).

  6. Read the last upgrade’s per-script timings from the migration Job log (M2-S4).

Write the upgrade plan

  1. Fill the layers table for the target release, mapped onto Larkspur.
  2. Write the compatibility list: one line for every extension, integration and script that calls the platform, with its owner. Include your capability.
  3. Write the preconditions, the order and the checks, using the eight parts.
  4. Write the rollback limits and the decision point, with the backup’s age and the data that would be lost.
  5. Estimate the window from step 5 and 6, and write the communication lines.

Write the operations plan

  1. Fill every section of the operations plan for Condition Monitoring.
  2. Write two runbooks in full: “readings stop arriving” and “alarm readings raise no work order”, each with symptoms, first checks (with commands from the workbench), causes and fixes.
  3. Set two alerts with thresholds taken from your M9-S1 measurements.
  4. Swap plans with a colleague (or, on your own, set it aside for an hour): read theirs as the person who must run it, and write the one question their plan does not answer.

Check.

  • The upgrade plan has all eight parts, and its scope cites the release’s migrations mapped onto Larkspur’s entities.
  • The compatibility list includes every application user’s integration and your capability, each with an owner.
  • The rollback section names the backup as the only way back for the data, and a decision point.
  • The operations plan fills every section, with real metric names and workbench commands.
  • Both runbooks lead from a symptom to a check to a fix.
  • One unanswered question from the swap, and your answer to it.

Pass condition. All six checks hold.

If something goes wrong

What you seeWhat to do
You have no vendor release notesUse the 1.10 line’s migration list from the docs as the release’s content; the exercise is the mapping, not the release.
A Function is not Provisioned in your labNote it as a finding: the plan’s checks would have caught it. M6-S1 explains the states.
You do not know a metric’s normal valueMeasure it in Larkspur Lab now, at rest and under the M9-S1 symptoms, and write both.
The operations plan is getting longKeep each section to what an operator needs at three in the morning; link the design documents for the rest.
Model answer

Upgrade plan, in outline.

Scope. Workloads: new images; no values changes listed. Data: the release adds a migration that stamps stable ids on repeatable-block rows (Maintenance Plans’ Checklist: 1,200 plans, seconds) and, if coming from 1.8, the collated index migrations on every entity (Work Orders, 300,000 in production: minutes). Built-in definitions: the application user’s expiry date becomes a date. Packages: environments must be upgraded Test, Production, Development. Functions: re-verify Provisioned after the upgrade. Clients: no change to what the phone draws.

Compatibility. ERP export (Sara Qasim): reads purchase-order totals, unchanged. Token rotation script (Procurement): reads application users’ expiry date, changed: fix the parsing before the window. Condition Monitoring (you): reads work-order events and asset classes, unchanged; its Function’s runtime is rebuilt on the provisioner’s upgrade, so call it once after. Larkspur Telemetry feed: unchanged.

Preconditions. A backup of every lk- database and the file volume, together, with writers stopped; a restore rehearsed in Larkspur Lab last week; the provisioner at the version the notes require; module freeze for the train.

Order. Provisioner, chart (migrations as hook), checks, Functions, Development.

Checks. Smoke test; migration log read line by line, including the scripts that only log; queues drained; indexing backlog gone; every Function Provisioned and called once; each module’s acceptance list; the phone spot check; the token rotation run once in dry-run mode.

Rollback. Rollback restores workloads only. Data: last night’s backup, losing the window’s work. Decision point: if the migration Job has not completed within 45 minutes or acceptance fails on a module with no fix available in the window, restore; Leila Amari decides, on Rami’s recommendation.

Window and communication. About one hour (index builds scaled from the lab’s timings), announced a week ahead to users, the freeze to builders two weeks ahead, the order to the operator in writing.

Operations plan, in outline. Owner: Omar Haddad (business), Rami Aziz (technical). Flow diagram with evidence points. Signals: reading rate per minute (normal 50 per pump), the evaluator reaction’s runs and failures in Reaction Logs and osos_tenant_reactions_total, the Function’s call duration, webhook failures in the run history, the reaction service’s queue depth. Alerts: no readings for 10 minutes during working hours (call the integration owner; check the telemetry user’s token and the feed); reaction failures above 2 % for 15 minutes (call Rami; check the Function’s state). Runbooks as asked, each starting from the trace map. Dependencies: the sensor feed, the CMMS receiver, the telemetry token (rotated quarterly by Procurement’s script). Capacity: one reaction run and one Function call per reading; the limit and date from M9-S1. Backup: records in lk-data; the Function’s code in its package; the webhook’s secret outside the platform. Upgrade notes: reads the record-created event’s payload and the asset class’s thresholds. Security notes: the threat model’s open risks. Hand-offs: builder, operator, the CMMS owner.

PracticeChoose one answer.

The upgrade completed, the smoke test passed, and every module’s acceptance passed. Three days later an integration’s nightly run quietly does nothing. Which part of the plan should have caught it?

  1. Explanation for A

    ✗ Incorrect

    Not this one: the smoke test proves the platform works, not each integration’s logic. See What makes a customised upgrade go wrong.

  2. Explanation for B

    ✓ Correct

    Correct: extensions that read changed data fail quietly unless the plan maps them and exercises them. See What makes a customised upgrade go wrong.

  3. Explanation for C

    ✗ Incorrect

    Not this one: acceptance passed; the problem was never tested, so nothing triggered a rollback. See The upgrade plan.

Check your answer

The correct answer is B. Open the explanation under each option to see why.

PracticeChoose one answer.

In Test, the release’s index migrations took 40 seconds on 2,000 work orders. Production has 300,000. How do you size the window?

  1. Explanation for A

    ✗ Incorrect

    Not this one: index builds and backfills scan every record they touch. See What makes a customised upgrade go wrong.

  2. Explanation for B

    ✗ Incorrect

    Not this one: a habit is not a derivation; scale the measured timings. See What makes a customised upgrade go wrong.

  3. Explanation for C

    ✓ Correct

    Correct: measure in Test, scale by Production’s volumes, and plan the window from the result. See What makes a customised upgrade go wrong.

Check your answer

The correct answer is C. Open the explanation under each option to see why.

PracticeChoose one answer.

Your operations plan for Condition Monitoring says “if alarms stop, ask Rami”. Why is that not acceptable?

  1. Explanation for A

    ✓ Correct

    Correct: the test of the plan is a colleague fixing the capability with the plan alone. See The operations plan.

  2. Explanation for B

    ✗ Incorrect

    Not this one: alerts go to whoever the plan names; the problem is what it gives them. See The operations plan.

  3. Explanation for C

    ✗ Incorrect

    Not this one: the capability is the program’s, and so is running it. See The operations plan.

Check your answer

The correct answer is A. Open the explanation under each option to see why.

PracticeChoose one answer.

Which change makes Larkspur’s next upgrade safer rather than merely faster?

  1. Explanation for A

    ✗ Incorrect

    Not this one: the rehearsal is where incompatibilities and timings are found. See The upgrade plan.

  2. Explanation for B

    ✓ Correct

    Correct: a tested restore is what makes the plan’s way back real. See The upgrade plan.

  3. Explanation for C

    ✗ Incorrect

    Not this one: the platform runs its own migration chain; the plan does not change that. See M2-S4: migrations.

Check your answer

The correct answer is B. Open the explanation under each option to see why.

↺ Recap (1 min) — After Module 9 you can

Section titled “↺ Recap (1 min) — After Module 9 you can”

After this module you can diagnose performance across the engines and plan capacity from the program’s fan-out, plan a platform upgrade for a customised program with its compatibility list, order, checks and honest rollback limits, and write an operations plan that lets someone else run a capability.

Next. In M10 you turn what you know into rules for others: the engineering and no-code standard every team follows, and the review method you will use on another team’s design.