feat(demo): top-level presentation cockpit + live-run fixes - #1
Merged
Conversation
added 6 commits
August 24, 2026 15:20
Add a root ./demo.sh that drives all seven demos from one terminal in deck order (1,2,6,3,4,5,7): interactive menu, --all, --clean, --ide=clion. It runs each demo's own examples/demo-0X/demo.sh with the TTY inherited, so per-demo pause/callout behaviour is unchanged and the seven remain usable standalone. Add a code_ref helper to scripts/lib/_helpers.sh: prints a clickable file:line and, when DEMO_IDE=clion, opens it in CLion via the JetBrains Toolbox launcher (opt-in). Wire code_ref callouts into all seven demos pointing at the key source for each.
The top-level runner belongs beside the demos it drives. Relocate demo.sh → examples/demo.sh and adjust its paths: source helpers via ../scripts/lib and invoke each demo as ./<dir>/demo.sh (it now cd's within examples/). Behaviour is unchanged.
…down, demo-03 dashboard - demo-01: compute the naive-vs-ubi-micro size multiplier from actual image bytes instead of the stale hard-coded ~26× (now ~22× for UBI 10). - Add should_build/image_exists helpers; DEMO_NO_BUILD=1 reuses existing images. Wire into demos 1,2,3,4,5,6 so on-stage runs skip rebuilds (demo-07's gates run in-build, so it still builds — fast on cache). - Stack demos (3,4): honor DEMO_ORCHESTRATED to tear down quietly without the 'Ctrl-C to leave running' prompt (that Ctrl-C killed the whole run-all). Standalone runs keep an 'explore Grafana then Enter' pause. - Cockpit: default DEMO_NO_BUILD=1 (add --rebuild to force); set DEMO_ORCHESTRATED during run-all; clearer deck-order transitions. - Add provisioned Grafana dashboard for demo-03 (gRPC rate/latency, TCP conns, traces, logs) + copy-pasteable PromQL/TraceQL in the callout.
Add DEMO_KEEP_STACK (cockpit --keep-stack / menu 'k' toggle): stack demos (3, 4) leave the LGTM stack running instead of tearing down, so the next run skips bring-up. demo-04 gains --keep to match demo-03. Because demos 3 and 4 both bind Grafana on :3000, the cockpit frees the OTHER stack demo before starting one while keep-stack is on. Also fix -h: use an absolute self-path so a path-prefixed invocation still prints help after the cd.
The 'Demo overview' dashboard the deck references never loaded: the observability compose mounted ./grafana/dashboards, but relative paths resolve against the compose PROJECT dir — the demo's dir when included — so the mount was empty, and no provider config told Grafana to load it. - Add a dashboard provider yaml (grafana/otel-provisioning) that scans the mounted tutorial/ dir into a 'Tutorial' folder. - Mount both the dashboards dir and the provider via env vars (OBS_DASHBOARDS_DIR / OBS_PROVIDER_FILE) with standalone-correct defaults; demos 3 and 4 export absolute paths so the mount works when included. Verified: tutorial-overview and tutorial-demo-03 now appear in the Tutorial folder; datasource UIDs (prometheus/tempo/loki) resolve; no provisioning errors.
…tack free_other_stack called the other stack demo's --clean, but demo-04's --clean also runs 'podman rmi cpp-tut/demo-04:latest' — so running Demo 4 then Demo 3 with keep-stack deleted the demo-04 image and forced a ~15 min recompile on the next run. Add a --stack-down flag (compose down -v only, image kept) and use it from free_other_stack instead of --clean.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a single presentation driver (
examples/demo.sh) to run all seven demos from one terminal, plus fixes surfaced during live rehearsal.What's included
examples/demo.sh): interactive menu +--allin deck order (1,2,6,3,4,5,7), driving each demo's owndemo.shwith the TTY inherited so the seven stay usable standalone. Flags:--rebuild,--keep-stack,--ide=clion,--no-pause,--clean.code_refhelper: clickablefile:linecallouts wired into all seven demos; opens in CLion whenDEMO_IDE=clion.DEMO_NO_BUILD): on-stage runs skip rebuilds when images exist.DEMO_KEEP_STACK/ menuk): stack demos (3, 4) leave the LGTM stack up for instant re-runs; cockpit frees the other stack demo first (they share :3000) via--stack-down(image-preserving).Bug fixes
free_other_stackno longer deletes images when freeing the other stack.Testing
Full
--all --no-pauserun passes (exit 0) with all seven demos; demo-04 span/metric/log probe confirms traces/metrics/logs land; dashboards + datasource UIDs verified; all images pre-cached.