Skip to content

feat(dev): make demo / demo-app / demo-clean for a one-command demo - #734

Merged
cbrgm merged 1 commit into
mainfrom
feat/make-demo
Aug 6, 2026
Merged

cbrgm merged 1 commit into
mainfrom
feat/make-demo

Conversation

@cbrgm

@cbrgm cbrgm commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Background

Part of #644, the arc is one command to spin up SolAr locally with the demo app deployed -> make demo

  1. ✅ make make dev-cluster reliably populate the catalog (fix(dev): make dev-cluster reliably populate the catalog #731)
  2. ✅ single source of truth for the OCM transfer step (refactor(dev): single source of truth for the OCM transfer step #733)
  3. (this PR) make demo-app / make demo / make demo-clean for the full render -> bootstrap flow
  4. a CI smoke test that runs the demo so it cant silently rot

What

Three make targets, backed by two scripts under hack/demo:

  • make demo-app -> seeds the ocm-demo app end to end on an existing dev cluster: transfer -> discover -> release -> render -> bootstrap -> running workload. Idempotent.
  • make demo -> from zero: create the dev cluster if its missing, then demo-app.
  • make demo-clean -> remove the demo resources and the app namespace, keep the cluster and the catalog.

Why

After make dev-cluster we had an empty SolAr and getting the demo app actually deployed was a manual, order-sensitive dance across a few scripts. demo-app walks that whole path in one go.

The important bit for not drifting: demo-app mirrors the exact happy path the e2e suite exercises and reuses the same test/fixtures/e2e manifests (release, target, registry, bindings, regcred, bootstrap). So the demo and the e2e tests share their inputs and cant diverge. CI will guard the ordering in step 4 (pr follows after this one :)).

Topology -> everything runs in solar-system, because thats where dev-cluster's discovery writes the ComponentVersion and where the discovery Registry (zot-scan) and the zot-deploy pull secret already live. So every reference resolves in-namespace, no ReferenceGrants needed. This matches how the e2e suite runs the whole flow in a single namespace. The app itself lands in the Release's targetNamespace (demo).

Re-runs are cheap -> demo-app skips the transfer when the ComponentVersion is already in the catalog.

Testing

Full loop against a local kind cluster (make dev-cluster first):

$ make demo-app
>>> Transferring the ocm-demo component and waiting for discovery...
>>> ...
ocirepository.../solar-bootstrap condition met
helmrelease.../solar-bootstrap condition met

$ kubectl -n solar-system get releases,rendertasks,renderartifacts
release/...-release      ...   Resolved
rendertask/render-rel-...   Target   cluster-1   JobSucceeded
rendertask/render-tgt-cluster-1-0   Target   cluster-1   JobSucceeded
renderartifact/...  solar-system/bootstrap-cluster-1  v0.0.0

$ kubectl -n demo get pods
solar-bootstrap-opendefense-cloud-ocm-demo-...-demo...   1/1   Running     # the demo app is deployed

For the person who reviews this, try to run the following locally:

  • fresh make demo-app -> workload Running
  • make demo-clean -> demo resources + demo namespace gone, catalog + cluster kept
  • re-seed from clean -> workload Running again
  • idempotent re-run with catalog present -> skips the transfer, still reaches Ready
  • make shellcheck clean

e2e suite is untouched

Checklist

  • Tests added/updated (n/a, dev tooling, verified manually end to end against a live kind cluster; reuses the e2e fixtures; CI smoke test lands in the follow-up PR)
  • No breaking changes (new targets only, e2e untouched)
  • Readable commit history (one focused commit)
  • AI code review considered and comments resolved

Part of #644

Summary by CodeRabbit

  • New Features
    • Added commands to launch a complete demo environment, either using an existing development cluster or creating one as needed.
    • Added automated demo setup covering namespaces, credentials, registries, releases, rendering, and readiness checks.
    • Added cleanup support to remove demo resources while preserving the development cluster and shared setup.
    • Added configurable options, progress reporting, timeout handling, and re-seeding guidance for demo workflows.

@coderabbitai

coderabbitai Bot commented Aug 5, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 89e397a0-293d-409c-b8e2-aab96a1b6188

📥 Commits

Reviewing files that changed from the base of the PR and between 87a9f64 and 1524092.

📒 Files selected for processing (3)
  • Makefile
  • hack/demo/demo-app.sh
  • hack/demo/demo-clean.sh
🚧 Files skipped from review as they are similar to previous changes (2)
  • hack/demo/demo-app.sh
  • hack/demo/demo-clean.sh

📝 Walkthrough

Walkthrough

Adds Make targets and executable scripts for a repeatable demo workflow. The workflow creates or reuses a development cluster, seeds application and Flux resources, waits for readiness, prints inspection commands, and removes demo resources without deleting the cluster.

Changes

Demo workflow

Layer / File(s) Summary
Demo Make entry points
Makefile
Adds demo-app, demo, and demo-clean targets. demo creates the development Kind cluster when it does not exist.
Application seeding and readiness
hack/demo/demo-app.sh
Adds configurable, strict-mode setup for discovery, namespaces, credentials, registries, targets, releases, render artifacts, and Flux resources. The script polls required resource states and reports inspection commands.
Demo resource cleanup
hack/demo/demo-clean.sh
Deletes demo Flux and SolAr resources, credentials, and the application namespace while preserving the cluster, discovery setup, and catalog.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Make
  participant DevelopmentCluster
  participant DemoApp
  participant OCM
  participant Kubernetes
  participant Flux
  Make->>DevelopmentCluster: Create or reuse cluster
  Make->>DemoApp: Run demo-app
  DemoApp->>OCM: Transfer discovery and create release resources
  DemoApp->>Kubernetes: Apply demo namespaces and bindings
  Kubernetes-->>DemoApp: Report render artifact
  DemoApp->>Flux: Apply bootstrap resources
  Flux-->>DemoApp: Report resource readiness
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly identifies the three new demo Make targets and their one-command purpose.
Description check ✅ Passed The description covers the change, motivation, testing, reviewer steps, and checklist; the optional Notes section is not needed.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/make-demo

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@Makefile`:
- Around line 167-170: Update the cluster-name check in the Kind reuse logic to
match an exact cluster entry rather than any substring containing
$(KIND_CLUSTER_DEV). Preserve reuse only when the exact development cluster
exists; otherwise invoke the existing dev-cluster target so demo-app receives
the correct context.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 609ee201-bf9f-4fcf-98a3-141c15b5c6c6

📥 Commits

Reviewing files that changed from the base of the PR and between 87a9f64 and a45f3fa.

📒 Files selected for processing (3)
  • Makefile
  • hack/demo/demo-app.sh
  • hack/demo/demo-clean.sh

Comment thread Makefile Outdated
@coveralls

coveralls commented Aug 5, 2026 •

Copy link
Copy Markdown

Coverage Report for CI Build 31086393960

Warning

No base build found for commit 87a9f64 on main.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 82.019%

Details

  • Patch coverage: No coverable lines changed in this PR.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 6468
Covered Lines: 5305
Line Coverage: 82.02%
Coverage Strength: 36.1 hits per line

💛 - Coveralls

demo-app seeds the ocm-demo application end to end on an existing dev cluster:
transfer -> discover -> release -> render -> bootstrap -> running workload. It
walks the same happy path the e2e suite exercises and reuses the same
test/fixtures/e2e manifests, so the demo and the e2e tests cannot drift.

Each script is self-contained and reads top-down: a context-pinned kubectl
wrapper (so call sites are plain kubectl), named wait-condition helpers, phase
functions and a main() that reads as a table of contents.

Everything runs in solar-system, where discovery writes the ComponentVersion and
the discovery Registry and zot-deploy pull secret already live, so all references
resolve in-namespace without ReferenceGrants. The app itself deploys into the
Release's targetNamespace (demo).

demo wraps it for the zero-state case: create the dev cluster if missing, then
demo-app. demo-clean removes the demo resources and the app namespace but keeps
the cluster and the populated catalog, so re-seeding is fast (demo-app skips the
transfer when the ComponentVersion is already present).
@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown
Contributor

Note

GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer.

@olzemal olzemal left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm make demo and demo-clean ran with no errors on my machine as well.

@cbrgm

cbrgm commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Alright, then I can't say works only on my machine anymore and I woul merge this right now :D
I will continue and add a GitHub workflow so we run the demo setup and teardown via CI in a next PR

@cbrgm

cbrgm commented Aug 6, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the review @olzemal

@cbrgm
cbrgm merged commit 386ae19 into main Aug 6, 2026
19 checks passed
@cbrgm
cbrgm deleted the feat/make-demo branch August 6, 2026 09:23
@ghost ghost mentioned this pull request Aug 6, 2026
cbrgm added a commit that referenced this pull request Aug 10, 2026
## Background

Part of #644, the context is one command to spin up SolAr locally with
the demo app deployed -> `make demo`. Small PRs:

1. ✅ make `make dev-cluster` reliably populate the catalog (#731)
2. ✅ single source of truth for the OCM transfer step (#733)
3. ✅ `make demo-app` / `make demo` / `make demo-clean` (#734)
4. **(this PR)** a CI smoke test so the demo flow cant silently rot

This is the last one, it closes out the story

## What

A `Demo Smoke Test` workflow that runs `make demo` (dev-cluster +
demo-app) end to end and asserts the demo application actually comes up.

## Why

The demo shares its inputs with the e2e suite (same `test/fixtures/e2e`
manifests), but the ordering and the make targets live outside the e2e
Go test. Without a check they can drift and nobody notices until someone
tries the demo. This job is the backstop: it walks the real transfer ->
discover -> release -> render -> bootstrap pipeline and fails if the
workload doesnt come up.

`demo-app` already waits for the bootstrap HelmRelease to become Ready
and exits non-zero otherwise, so a green `make demo` is the assertion.
The assert step then polls for the demo pod and waits for it to be
Ready.

It builds SolAr from source rather than reusing the ghcr images, because
`dev-cluster.sh` is wired for local images and adding a ghcr values +
pull-secret path just for a smoke test wasnt worth it.

## Gating

The demo is heavy (builds the images + full cluster), so it follows the
same opt-in pattern as docker/helm/e2e:

- on PRs -> only runs when the `ok-to-demo` label is set
- on `main` -> runs automatically, but only when demo-relevant files
change

## Testing

- `actionlint` clean on the workflow.
- The full flow (`make demo` -> running workload) is verified locally
end to end in #734.
- Self-validating: this PR carries `ok-to-demo`, so the smoke job runs
on it (an earlier revision without the label gating already passed green
in CI).

## Checklist

- [x] Tests added/updated (this *is* the test, a CI smoke check)
- [x] No breaking changes (new workflow only)
- [x] Readable commit history (one focused commit)
- [x] AI code review considered and comments resolved

Part of #644
rebEllieous added a commit that referenced this pull request Aug 24, 2026
🤖 I have created a release *beep* *boop*
---


##
[0.3.0](v0.3.0-rc2...v0.3.0)
(2026-08-24)


* gate release-please app token on both app id and private key
([2c5d19e](2c5d19e))


### Features

- add cron workflow for solar catalog chaining
([6c61cff](6c61cff))
- add solar catalog chaining
([#744](#744))
([7001a5e](7001a5e))
- added status visualisation for the deployment workflow in the FE
([#664](#664))
([88dc1ee](88dc1ee))
- **api:** add ObjectReference type for cross-namespace resource
references
([30cecba](30cecba))
- **ci:** replace release-drafter with release-please
([#632](#632))
([#676](#676))
([64a05d9](64a05d9))
- **controller:** own Component lifecycle in a per-Component reconciler
([#745](#745))
([9ac867e](9ac867e))
- crud for k8s ressources in web ui
([#708](#708))
([83ba01b](83ba01b))
- deploy solar-ui as part of the solar chart
([#743](#743))
([3d1ac1e](3d1ac1e))
- **dev:** add make demo / demo-app / demo-clean for a one-command demo
([1524092](1524092))
- **dev:** make demo / demo-app / demo-clean for a one-command demo
([#734](#734))
([386ae19](386ae19))
- **discovery:** added resource watcher
([6d588b2](6d588b2))
- impl fe list views
([#645](#645))
([78c7fd7](78c7fd7))
- production-ready catalog transfer workflow, e2e tests
([#762](#762))
([4454e47](4454e47))
- pull secrets provision added for deployments to solar via ocm-kit
([#739](#739))
([8e3f8cb](8e3f8cb))
- **ui:** add resource detail pages with shared primitives
([#718](#718))
([e53d22a](e53d22a))
- **ui:** pkce implemented, local setup for remote zitadel in both auth
modes
([#764](#764))
([b531958](b531958))

### Bug Fixes

- apply suggestions from code review
([38d109b](38d109b))
- **ci:** address review findings on release-please migration
([a6dec29](a6dec29))
- **controller:** drop post-delete re-check that could strand a
terminating Component
([0366a34](0366a34))
- **controller:** guard the finalizer add with an optimistic lock
([4dbf867](4dbf867))
- **controller:** read the Component uncached before stripping the
finalizer
([f56ccc9](f56ccc9))
- **deps:** bump go-git to v5.19.2, fix OSV-Scanner findings
([7482013](7482013))
- **deps:** bump go-git to v5.19.2, fix OSV-Scanner on main
([#760](#760))
([b2783df](b2783df))
- **deps:** correct the openpgp importer list in the OSV ignore
([0759c3b](0759c3b))
- **deps:** keep crypto11 replace at v1.6.2 and tidy go.sum
([786d860](786d860))
- **deps:** migrate cenkalti/backoff imports from v5 to v7
([7b9ecdc](7b9ecdc))
- **deps:** point crypto11 replace at renamed eclipse-keypont module
([149f778](149f778))
- **deps:** resolve new CVEs flagged by osv-scanner
([#675](#675))
([c7334a5](c7334a5))
- **deps:** update dependencies (minor)
([26698c0](26698c0))
- **deps:** update dependencies (patch & digest)
([#663](#663))
([f4339d7](f4339d7))
- **deps:** update dependencies (patch & digest)
([#698](#698))
([29fc135](29fc135))
- **deps:** update go version in remaining places
([748b48f](748b48f))
- **deps:** update go-overlay to provide go 1.26.5
([e10b8af](e10b8af))
- **deps:** update go-overlay to provide go 1.26.6
([2c33ecc](2c33ecc))
- **deps:** update golang builder image to 1.26.6
([66a0e2a](66a0e2a))
- **deps:** update kubernetes dependencies
([#682](#682))
([aefbd19](aefbd19))
- **deps:** update kubernetes dependencies
([#728](#728))
([c16821b](c16821b))
- **deps:** update kubernetes dependencies to v0.36.4
([#772](#772))
([19448a6](19448a6))
- **deps:** update module github.com/cenkalti/backoff/v5 to v7
([#671](#671))
([6518ca3](6518ca3))
- **deps:** update module github.com/cenkalti/backoff/v5 to v7
([#674](#674))
([09777c6](09777c6))
- **deps:** update module github.com/cenkalti/backoff/v5 to v7
([#716](#716))
([6d464e2](6d464e2))
- **deps:** update module helm.sh/helm/v4 to v4.2.4
([#750](#750))
([2f5476a](2f5476a))
- **deps:** update module oras.land/oras-go/v2 to v2.6.2 [security]
([#696](#696))
([6b52133](6b52133))
- **dev:** deploy solar-discovery in scan mode so dev-cluster populates
the catalog
([eae09f2](eae09f2))
- **dev:** fail setup-discovery when the port-forward never becomes
ready
([626e436](626e436))
- **dev:** make dev-cluster reliably populate the catalog
([#731](#731))
([0af9386](0af9386))
- **dev:** use the ca-trusting ocmconfig and trap-clean the port-forward
in setup-discovery
([9ff18b6](9ff18b6))
- **discovery:** use errors.Is for http.ErrServerClosed check
([#693](#693))
([be17b8f](be17b8f))
- **discovery:** use strings.Cut to strip digest algorithm prefix
([#694](#694))
([1bf1856](1bf1856))
- document reference
([629555a](629555a))
- dont create renderbinding if renderartifact is terminating
([7168331](7168331))
- e2e test regression introduced with discovery api watch
([#727](#727))
([fa95810](fa95810))
- handle insecure deploy registry for bootstrap chart
([#660](#660))
([fb8de30](fb8de30))
- ignore terminating renderartifacts
([0cfc2fe](0cfc2fe)),
closes
[#619](#619)
- improve handling of terminating renderartifacts
([#730](#730))
([0570216](0570216))
- only run e2e test with the ok-to-e2e label
([391a2c2](391a2c2))
- registry resources
([#700](#700))
([756528e](756528e))
- remove orphaned devenv.nix file
([#705](#705))
([7dc25ca](7dc25ca))
- restructured renderartifact and -binding to solve a known problem
([#724](#724))
([c68104f](c68104f))
- retain deleting renderartifacts when they are still referenced by a
binding
([3603545](3603545))
- rstructured renderartifact and -binding to solve the bug
([c41158a](c41158a))
- tightened security around reference grants for RenderArtifacts, minor
fixes
([bc8c5d7](bc8c5d7))
- **ui:** derive ui-e2e backend URLs from UI_DEV_PORT and tighten auth
tests
([0982234](0982234))
- use local dir for dex certs
([#638](#638))
([8f875c8](8f875c8))

### Miscellaneous Chores

- add missing entries to the path filter of GitHub actions
([#670](#670))
([101e4c0](101e4c0))
- **deps:** update actions/cache action to v6
([#692](#692))
([23dd707](23dd707))
- **deps:** update actions/setup-go action to v7
([#721](#721))
([51c1fd5](51c1fd5))
- **deps:** update actions/setup-python action to v7
([#719](#719))
([76bc61e](76bc61e))
- **deps:** update dependencies (patch & digest)
([#683](#683))
([17728f1](17728f1))
- **deps:** update dependencies (patch & digest)
([#749](#749))
([62e20bf](62e20bf))
- **deps:** update dependencies (patch & digest)
([#771](#771))
([9afef5e](9afef5e))
- **deps:** update dependency @testing-library/jest-dom to v7
([#725](#725))
([b411a26](b411a26))
- **deps:** update dependency go to v1.26.5
([2bf738b](2bf738b))
- **deps:** update dependency go to v1.26.6
([63397b8](63397b8))
- **deps:** update dependency jsdom to v30
([#735](#735))
([2be1ea1](2be1ea1))
- **deps:** update dependency pillow to v12.3.0 [security]
([#699](#699))
([d658e68](d658e68))
- **deps:** update dependency typescript to v7
([#691](#691))
([349cd5f](349cd5f))
- **deps:** update golang version sync to v1.26.5
([#697](#697))
([422b1d4](422b1d4))
- **deps:** update golang:1.26.4 docker digest to 32c0e6e
([#662](#662))
([2833f64](2833f64))
- **deps:** update golang:1.26.4 docker digest to f96cc55
([e1ced04](e1ced04))
- **deps:** update golang:1.26.5 docker digest to 2005724
([#740](#740))
([a087073](a087073))
- **deps:** update golang:1.26.5 docker digest to 3aff665
([#712](#712))
([afe9193](afe9193))
- **dev:** drop the unused OCM vars from dev-cluster.sh
([#737](#737))
([875449e](875449e))
- fix issues surfaced by PR review
([4120973](4120973))
- fix target release view
([e347937](e347937))
- fixes and improvements after pr review
([43e0f6a](43e0f6a))
- improve CI docker caching
([#633](#633))
([213f23c](213f23c))
- improved accessability
([2dacb25](2dacb25))
- make codegen
([355611d](355611d))
- minor updates after PR review
([f2c8463](f2c8463))
- renamed make targets
([a6a901d](a6a901d))
- split up unit and integration tests, added tests
([#684](#684))
([1aca0e4](1aca0e4))
- trust-scope docker layer cache, tidy Dockerfile mounts
([17dac28](17dac28))
- **ui:** tidy up after the Zitadel integration
([2ac8011](2ac8011))
- update dev-kit and configure improved branch-protection
([#738](#738))
([132ab55](132ab55))
- update flake and remove kind version workaround
([#732](#732))
([ec91fc2](ec91fc2))


---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants