M9-S2 — Upgrade and operate a customised platform
Section titled “M9-S2 — Upgrade and operate a customised platform”| Module | M9 — Performance and operations |
| After this session you can | Plan a platform upgrade for a program that carries packages, Functions and extensions, and write the capability’s operations plan. |
| Time | Facilitated: 49 min · On your own: 49 min |
| Before you start | M1-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 deeper | Maintenance 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”The layers an upgrade touches
Section titled “The layers an upgrade touches”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?”
| Layer | What the release can change | What of Larkspur’s depends on it | Where you learned it |
|---|---|---|---|
| Workloads | Images, chart values, new or removed components | Values files, resource sizes, the operator’s procedures | ACDE M2-S3 |
| Stored data | Migrations: new core entities, fields on built-in definitions, indexes, backfills | Large entities (index builds), entities with repeatable blocks, names that collide with new built-in fields | M2-S4 |
| Built-in definitions and contracts | A 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 them | M2-S2, M2-S3 |
| Packages | The package format versions an environment accepts, the source-release check | Every installed package and the promotion path | M1-S2 |
| Functions | The function runtime, the provisioner that builds and deploys them, and its own upgrade order | Every Function, including your capability’s | M6-S1 |
| Clients | Web portal features; the mobile app people have installed may lag the server | Pages and views field people use on phones | M3-S5 |
| Integrations | Gateway behaviour, error codes, token handling | Application users, webhooks, outside systems | ACE 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.
The upgrade plan
Section titled “The upgrade 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).
- Scope. From the release notes and the migration list: what changes in each layer, mapped onto Larkspur (the table above, filled in).
- 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.
- 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.
- 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).
- 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.
- Rollback limits, written honestly.
helm rollbackrestores 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. - Communication. Who is told what, when: the sponsor (downtime and risk), builders (the freeze), users (the window), the operator (the order and the checks).
- Record. A decision record for the upgrade (M1-S2), the timings you measured, and what you would change next time.
What makes a customised upgrade go wrong
Section titled “What makes a customised upgrade go wrong”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.
The operations plan
Section titled “The operations plan”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.
| Section | What it says, for Condition Monitoring |
|---|---|
| What it is and who owns it | One paragraph, the owner (M1-S2), the modules and components it consists of (entities, Function or engine change, application user, webhook, package) |
| How it works | A diagram of the flow: readings in, evaluation, work orders and notifications out, and where each step leaves evidence (the trace map) |
| Signals and normal values | The 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) |
| Alerts | Which signal, which threshold, who is called, and the first thing they check |
| Runbooks | The 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 |
| Dependencies | Outside services and stubs, credentials (who rotates them, when, and how), the components it shares with the rest of the program |
| Capacity | Its fan-out per reading and the limit from M9-S1’s arithmetic, with the date the program reaches it |
| Backup and restore | What of it lives where (records, files, Function code, credentials outside the platform) and how it comes back after a restore |
| Upgrade notes | What it reads from the platform that a release could change: the lines it contributes to every upgrade plan’s compatibility list |
| Security notes | Its threat model’s remaining risks and their controls (M5-S4), and what an operator must never do |
| Hand-offs | Who 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.
✓ Practice (4 min) — Plan the order
Section titled “✓ Practice (4 min) — Plan the order”Put the steps of Larkspur’s production upgrade in the order the plan sets.
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.
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?
Check your answer
The correct answer is C. Open the explanation under each option to see why.
Which item belongs in the upgrade plan’s compatibility section rather than its checks?
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
-
Record the running release:
helm list -n larkspur(chart and app version). -
List what is installed: in the portal, Administration › Packages › Installed, with versions; which modules were built by hand.
-
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.
-
List the application users and what each is used for (from M1-S1’s inventory, updated with your strand’s Larkspur Telemetry).
-
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). -
Read the last upgrade’s per-script timings from the migration Job log (M2-S4).
Write the upgrade plan
- Fill the layers table for the target release, mapped onto Larkspur.
- Write the compatibility list: one line for every extension, integration and script that calls the platform, with its owner. Include your capability.
- Write the preconditions, the order and the checks, using the eight parts.
- Write the rollback limits and the decision point, with the backup’s age and the data that would be lost.
- Estimate the window from step 5 and 6, and write the communication lines.
Write the operations plan
- Fill every section of the operations plan for Condition Monitoring.
- 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.
- Set two alerts with thresholds taken from your M9-S1 measurements.
- 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 see | What to do |
|---|---|
| You have no vendor release notes | Use 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 lab | Note 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 value | Measure it in Larkspur Lab now, at rest and under the M9-S1 symptoms, and write both. |
| The operations plan is getting long | Keep 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.
✓ Practice (5 min) — Operate it
Section titled “✓ Practice (5 min) — Operate it”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?
Check your answer
The correct answer is B. Open the explanation under each option to see why.
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?
Check your answer
The correct answer is C. Open the explanation under each option to see why.
Your operations plan for Condition Monitoring says “if alarms stop, ask Rami”. Why is that not acceptable?
Check your answer
The correct answer is A. Open the explanation under each option to see why.
Which change makes Larkspur’s next upgrade safer rather than merely faster?
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.