From 76d00b1e49b8d244ffc27ef91852e918982319d6 Mon Sep 17 00:00:00 2001 From: Rahul Varghese Date: Fri, 1 May 2026 09:23:03 +0530 Subject: [PATCH] Restructure stack catalog for OCI distribution Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- .github/workflows/ci.yml | 37 -- .github/workflows/docs.yml | 35 ++ .github/workflows/release.yml | 12 + .github/workflows/scorecard.yml | 35 ++ .github/workflows/verify.yml | 29 ++ README.md | 102 ++++-- blueprints/edge-worker-platform/README.md | 16 + .../edge-worker-platform/blueprint.yaml | 15 + .../edge-worker-platform/examples/README.md | 3 + blueprints/nextjs-cloudflare/README.md | 16 + blueprints/nextjs-cloudflare/blueprint.yaml | 16 + .../nextjs-cloudflare/examples/README.md | 3 + .../cloudflare-pages-terraform/README.md | 23 ++ .../compositions.yaml | 0 .../examples/README.md | 5 + .../tests/README.md | 5 + .../README.md | 23 ++ .../compositions.yaml | 0 .../examples/README.md | 5 + .../tests/README.md | 5 + compositions/cloudflare-pages-turbo/README.md | 23 ++ .../cloudflare-pages-turbo}/compositions.yaml | 0 .../cloudflare-pages-turbo/examples/README.md | 5 + .../cloudflare-pages-turbo/tests/README.md | 5 + compositions/cloudflare-pages/README.md | 23 ++ .../cloudflare-pages}/compositions.yaml | 0 .../cloudflare-pages/examples/README.md | 5 + compositions/cloudflare-pages/tests/README.md | 5 + .../cloudflare-worker-turbo/README.md | 23 ++ .../compositions.yaml | 0 .../examples/README.md | 5 + .../cloudflare-worker-turbo/tests/README.md | 5 + compositions/cloudflare-worker/README.md | 23 ++ .../cloudflare-worker}/compositions.yaml | 0 .../cloudflare-worker/examples/README.md | 5 + .../cloudflare-worker/tests/README.md | 5 + compositions/helm-chart/README.md | 23 ++ .../helm-chart}/compositions.yaml | 0 compositions/helm-chart/examples/README.md | 5 + compositions/helm-chart/tests/README.md | 5 + compositions/helm-values/README.md | 23 ++ .../helm-values}/compositions.yaml | 0 compositions/helm-values/examples/README.md | 5 + compositions/helm-values/tests/README.md | 5 + compositions/terraform/README.md | 23 ++ .../terraform}/compositions.yaml | 0 compositions/terraform/examples/README.md | 5 + compositions/terraform/tests/README.md | 5 + compositions/turbo-package/README.md | 23 ++ .../turbo-package}/compositions.yaml | 0 compositions/turbo-package/examples/README.md | 5 + compositions/turbo-package/tests/README.md | 5 + compositions/workspace/README.md | 23 ++ .../workspace}/compositions.yaml | 0 compositions/workspace/examples/README.md | 5 + compositions/workspace/tests/README.md | 5 + docs/authoring.md | 21 ++ docs/concepts.md | 32 ++ docs/getting-started.md | 29 ++ docs/roadmap.md | 8 + docs/using-this-stack-from-oci.md | 123 +++++++ docs/verification.md | 45 +++ examples/full-enterprise/README.md | 3 + examples/full-enterprise/intent.yaml | 24 ++ examples/monorepo-platform/README.md | 3 + examples/monorepo-platform/intent.yaml | 22 ++ examples/simple-nextjs/README.md | 3 + examples/simple-nextjs/intent.yaml | 19 + registry/index.json | 329 ++++++++++++++++++ scripts/generate-readme.sh | 89 +++++ scripts/score.sh | 196 +++++++++++ scripts/verify.sh | 16 + stack.yaml | 6 +- 73 files changed, 1584 insertions(+), 66 deletions(-) delete mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/docs.yml create mode 100644 .github/workflows/scorecard.yml create mode 100644 .github/workflows/verify.yml create mode 100644 blueprints/edge-worker-platform/README.md create mode 100644 blueprints/edge-worker-platform/blueprint.yaml create mode 100644 blueprints/edge-worker-platform/examples/README.md create mode 100644 blueprints/nextjs-cloudflare/README.md create mode 100644 blueprints/nextjs-cloudflare/blueprint.yaml create mode 100644 blueprints/nextjs-cloudflare/examples/README.md create mode 100644 compositions/cloudflare-pages-terraform/README.md rename {cloudflare-pages-terraform => compositions/cloudflare-pages-terraform}/compositions.yaml (100%) create mode 100644 compositions/cloudflare-pages-terraform/examples/README.md create mode 100644 compositions/cloudflare-pages-terraform/tests/README.md create mode 100644 compositions/cloudflare-pages-turbo-terraform/README.md rename {cloudflare-pages-turbo-terraform => compositions/cloudflare-pages-turbo-terraform}/compositions.yaml (100%) create mode 100644 compositions/cloudflare-pages-turbo-terraform/examples/README.md create mode 100644 compositions/cloudflare-pages-turbo-terraform/tests/README.md create mode 100644 compositions/cloudflare-pages-turbo/README.md rename {cloudflare-pages-turbo => compositions/cloudflare-pages-turbo}/compositions.yaml (100%) create mode 100644 compositions/cloudflare-pages-turbo/examples/README.md create mode 100644 compositions/cloudflare-pages-turbo/tests/README.md create mode 100644 compositions/cloudflare-pages/README.md rename {cloudflare-pages => compositions/cloudflare-pages}/compositions.yaml (100%) create mode 100644 compositions/cloudflare-pages/examples/README.md create mode 100644 compositions/cloudflare-pages/tests/README.md create mode 100644 compositions/cloudflare-worker-turbo/README.md rename {cloudflare-worker-turbo => compositions/cloudflare-worker-turbo}/compositions.yaml (100%) create mode 100644 compositions/cloudflare-worker-turbo/examples/README.md create mode 100644 compositions/cloudflare-worker-turbo/tests/README.md create mode 100644 compositions/cloudflare-worker/README.md rename {cloudflare-worker => compositions/cloudflare-worker}/compositions.yaml (100%) create mode 100644 compositions/cloudflare-worker/examples/README.md create mode 100644 compositions/cloudflare-worker/tests/README.md create mode 100644 compositions/helm-chart/README.md rename {helm-chart => compositions/helm-chart}/compositions.yaml (100%) create mode 100644 compositions/helm-chart/examples/README.md create mode 100644 compositions/helm-chart/tests/README.md create mode 100644 compositions/helm-values/README.md rename {helm-values => compositions/helm-values}/compositions.yaml (100%) create mode 100644 compositions/helm-values/examples/README.md create mode 100644 compositions/helm-values/tests/README.md create mode 100644 compositions/terraform/README.md rename {terraform => compositions/terraform}/compositions.yaml (100%) create mode 100644 compositions/terraform/examples/README.md create mode 100644 compositions/terraform/tests/README.md create mode 100644 compositions/turbo-package/README.md rename {turbo-package => compositions/turbo-package}/compositions.yaml (100%) create mode 100644 compositions/turbo-package/examples/README.md create mode 100644 compositions/turbo-package/tests/README.md create mode 100644 compositions/workspace/README.md rename {workspace => compositions/workspace}/compositions.yaml (100%) create mode 100644 compositions/workspace/examples/README.md create mode 100644 compositions/workspace/tests/README.md create mode 100644 docs/authoring.md create mode 100644 docs/concepts.md create mode 100644 docs/getting-started.md create mode 100644 docs/roadmap.md create mode 100644 docs/using-this-stack-from-oci.md create mode 100644 docs/verification.md create mode 100644 examples/full-enterprise/README.md create mode 100644 examples/full-enterprise/intent.yaml create mode 100644 examples/monorepo-platform/README.md create mode 100644 examples/monorepo-platform/intent.yaml create mode 100644 examples/simple-nextjs/README.md create mode 100644 examples/simple-nextjs/intent.yaml create mode 100644 registry/index.json create mode 100755 scripts/generate-readme.sh create mode 100755 scripts/score.sh create mode 100755 scripts/verify.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 79a7469..0000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: CI - -on: - pull_request: - push: - branches: - - main - -permissions: - contents: read - packages: read - -jobs: - validate-package: - name: Validate package - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: Initialize orun workspace - uses: sourceplane/kiox-action@v2.1.2 - - - name: Derive package version - shell: bash - run: | - version="$(awk '/^ version: /{print $2}' stack.yaml)" - test -n "${version}" - echo "STACK_VERSION=${version}" >> "${GITHUB_ENV}" - - - name: Build release archive - run: | - kiox -- orun publish ghcr.io/sourceplane/sumo-platform-ops-stack:${STACK_VERSION} \ - --dry-run \ - --root . \ - --version "${STACK_VERSION}" diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 0000000..61441a8 --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,35 @@ +name: Docs + +on: + pull_request: + paths: + - "README.md" + - "docs/**" + - "blueprints/**" + - "compositions/**" + - "scripts/generate-readme.sh" + push: + branches: + - main + paths: + - "README.md" + - "docs/**" + - "blueprints/**" + - "compositions/**" + - "scripts/generate-readme.sh" + +permissions: + contents: read + +jobs: + docs-check: + name: Check generated catalog docs + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Make helper scripts executable + run: chmod +x scripts/*.sh + + - name: Check composition docs + run: ./scripts/generate-readme.sh --check diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f6121bf..3cdd006 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,6 +21,9 @@ jobs: - name: Initialize orun workspace uses: sourceplane/kiox-action@v2.1.2 + - name: Make helper scripts executable + run: chmod +x scripts/*.sh + - name: Log in to GHCR uses: docker/login-action@v3 with: @@ -37,6 +40,9 @@ jobs: test "${stack_version}" = "${tag_version}" echo "STACK_VERSION=${stack_version}" >> "${GITHUB_ENV}" + - name: Verify catalog + run: ./scripts/verify.sh + - name: Publish OCI package run: | kiox -- orun publish ghcr.io/sourceplane/sumo-platform-ops-stack:${STACK_VERSION} \ @@ -55,3 +61,9 @@ jobs: gh release create "${GITHUB_REF_NAME}" \ --title "${GITHUB_REF_NAME}" \ --generate-notes + + - name: Upload registry index + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh release upload "${GITHUB_REF_NAME}" registry/index.json --clobber + diff --git a/.github/workflows/scorecard.yml b/.github/workflows/scorecard.yml new file mode 100644 index 0000000..39aeef0 --- /dev/null +++ b/.github/workflows/scorecard.yml @@ -0,0 +1,35 @@ +name: Scorecard + +on: + pull_request: + paths: + - "compositions/**" + - "blueprints/**" + - "registry/**" + - "scripts/score.sh" + - ".github/workflows/scorecard.yml" + push: + branches: + - main + paths: + - "compositions/**" + - "blueprints/**" + - "registry/**" + - "scripts/score.sh" + - ".github/workflows/scorecard.yml" + +permissions: + contents: read + +jobs: + scorecard: + name: Check generated scorecard + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Make helper scripts executable + run: chmod +x scripts/*.sh + + - name: Check registry index + run: ./scripts/score.sh --check diff --git a/.github/workflows/verify.yml b/.github/workflows/verify.yml new file mode 100644 index 0000000..c19600f --- /dev/null +++ b/.github/workflows/verify.yml @@ -0,0 +1,29 @@ +name: Verify + +on: + pull_request: + push: + branches: + - main + +permissions: + contents: read + packages: read + +jobs: + verify-stack: + name: Verify stack catalog + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Initialize orun workspace + uses: sourceplane/kiox-action@v2.1.2 + + - name: Make helper scripts executable + run: chmod +x scripts/*.sh + + - name: Verify catalog + run: ./scripts/verify.sh diff --git a/README.md b/README.md index a530ed4..4b70895 100644 --- a/README.md +++ b/README.md @@ -1,38 +1,86 @@ -# sumo-platform-ops-stack +# Sumo Platform Ops Stack -Versioned OCI-hosted platform compositions for Sourceplane repos. +Versioned OCI catalog for reusable Orun compositions, blueprints, examples, and release metadata. -This repository is the source of truth for the packaged Orun stack consumed by platform repositories such as `example-platform-repo`. It publishes the composition package to GHCR and keeps execution contracts versioned independently from the application and infrastructure repos that use them. +This repository is the source of truth for the stack published to: -## Package layout +`oci://ghcr.io/sourceplane/sumo-platform-ops-stack:` -The repository root is the composition package root: +## Use the OCI package in `intent.yaml` -- `stack.yaml` defines the exported stack metadata and OCI registry target -- `/compositions.yaml` defines one `Composition` contract per component type -- `.github/workflows/ci.yml` validates the package on pull requests and pushes to `main` -- `.github/workflows/release.yml` publishes tagged releases to `ghcr.io/sourceplane/sumo-platform-ops-stack` +Pin the catalog as a composition source in the consumer repository: -## Exported composition types +```yaml +compositions: + sources: + - name: sumo-platform-ops + kind: oci + ref: oci://ghcr.io/sourceplane/sumo-platform-ops-stack:0.10.0 +``` -- `terraform` -- `helm-values` -- `helm-chart` -- `cloudflare-worker` -- `cloudflare-worker-turbo` -- `cloudflare-pages` -- `cloudflare-pages-turbo` -- `cloudflare-pages-terraform` -- `cloudflare-pages-turbo-terraform` -- `turbo-package` -- `workspace` +Keep the `orun` runtime pinned separately in `kiox.yaml`, then plan or run against that intent. The full consumer workflow is in [docs/using-this-stack-from-oci.md](docs/using-this-stack-from-oci.md). -## Releasing +## Catalog layout -1. Update `stack.yaml` with the next package version. -2. Merge the change to `main`. -3. Push a matching git tag in the form `vX.Y.Z`. +```text +sumo-platform-ops-stack/ +├── stack.yaml +├── README.md +├── docs/ +├── blueprints/ +├── compositions/ +├── examples/ +├── scripts/ +├── registry/ +└── .github/workflows/ +``` -The release workflow validates that the git tag matches `stack.yaml`, then publishes the package to: +## Compositions -`oci://ghcr.io/sourceplane/sumo-platform-ops-stack:` +| Composition | Category | Purpose | +| --- | --- | --- | +| `cloudflare-pages` | hosting | Direct-upload Cloudflare Pages delivery | +| `cloudflare-pages-turbo` | hosting | Pages delivery from pnpm and Turbo monorepos | +| `cloudflare-pages-terraform` | platform | Terraform-managed Cloudflare Pages projects | +| `cloudflare-pages-turbo-terraform` | platform | Monorepo Pages delivery plus Terraform reconciliation | +| `cloudflare-worker` | edge | Cloudflare Worker validation and deploy jobs | +| `cloudflare-worker-turbo` | edge | Worker delivery from pnpm and Turbo monorepos | +| `terraform` | infrastructure | Terraform fmt, init, and validate jobs | +| `helm-chart` | kubernetes | Helm chart verification | +| `helm-values` | kubernetes | Helm values validation | +| `turbo-package` | developer-experience | Shared package verification in Turbo workspaces | +| `workspace` | developer-experience | Workspace-backed provider smoke jobs | + +Every composition now lives under `compositions//` so docs, examples, tests, and future registry metadata can grow beside the contract instead of around a flat root. + +## Blueprints + +| Blueprint | Uses | Focus | +| --- | --- | --- | +| `nextjs-cloudflare` | `workspace`, `turbo-package`, `cloudflare-pages-turbo`, `cloudflare-pages-terraform` | Edge-hosted Next.js monorepos with Terraform-managed Pages | +| `edge-worker-platform` | `workspace`, `terraform`, `cloudflare-worker`, `helm-values` | Worker-first delivery with infra and environment overlays | + +## Trust signals + +- `scripts/verify.sh` validates docs metadata and runs the stack OCI dry-run publish path. +- `scripts/score.sh` generates `registry/index.json` with maturity scores and grades. +- GitHub workflows split verification, docs checks, scorecard generation, and releases into separate pipelines. +- Current scores are intentionally conservative until each composition has runnable examples and deeper smoke coverage. + +## Docs + +- [Getting started](docs/getting-started.md) +- [Core concepts](docs/concepts.md) +- [Authoring guide](docs/authoring.md) +- [Verification model](docs/verification.md) +- [Roadmap](docs/roadmap.md) +- [Using this stack from OCI](docs/using-this-stack-from-oci.md) + +## Release flow + +1. Update `stack.yaml`. +2. Run `./scripts/verify.sh`. +3. Merge to `main`. +4. Push a matching tag like `v0.10.0`. + +The release workflow publishes the OCI package, creates the GitHub release, and uploads the generated registry index. diff --git a/blueprints/edge-worker-platform/README.md b/blueprints/edge-worker-platform/README.md new file mode 100644 index 0000000..5f46f23 --- /dev/null +++ b/blueprints/edge-worker-platform/README.md @@ -0,0 +1,16 @@ +# edge-worker-platform + +Blueprint for worker-first services that still need shared infra validation and deploy-time overlays. + +## Uses + +- `workspace` +- `terraform` +- `cloudflare-worker` +- `helm-values` + +## Good fit for + +- API and edge routing services +- teams standardizing on Cloudflare Workers +- repos that keep infra and delivery config colocated diff --git a/blueprints/edge-worker-platform/blueprint.yaml b/blueprints/edge-worker-platform/blueprint.yaml new file mode 100644 index 0000000..c30c1ac --- /dev/null +++ b/blueprints/edge-worker-platform/blueprint.yaml @@ -0,0 +1,15 @@ +apiVersion: catalog.orun.dev/v1alpha1 +kind: Blueprint +metadata: + name: edge-worker-platform +spec: + summary: Edge-worker delivery with workspace verification, Terraform foundations, and deploy overlays. + uses: + - workspace + - terraform + - cloudflare-worker + - helm-values + outcomes: + - Worker validation and deployment + - Infra validation + - Environment configuration overlays diff --git a/blueprints/edge-worker-platform/examples/README.md b/blueprints/edge-worker-platform/examples/README.md new file mode 100644 index 0000000..4f4be71 --- /dev/null +++ b/blueprints/edge-worker-platform/examples/README.md @@ -0,0 +1,3 @@ +# edge-worker-platform examples + +Use the starter intent in `examples/monorepo-platform/` as the consumer-side starting point for this blueprint. diff --git a/blueprints/nextjs-cloudflare/README.md b/blueprints/nextjs-cloudflare/README.md new file mode 100644 index 0000000..d3a482c --- /dev/null +++ b/blueprints/nextjs-cloudflare/README.md @@ -0,0 +1,16 @@ +# nextjs-cloudflare + +Opinionated blueprint for teams running a pnpm and Turbo monorepo with Cloudflare Pages managed through Terraform. + +## Uses + +- `workspace` +- `turbo-package` +- `cloudflare-pages-turbo` +- `cloudflare-pages-terraform` + +## Good fit for + +- frontend-heavy platform repos +- monorepo standardization +- teams that want Pages infrastructure managed declaratively diff --git a/blueprints/nextjs-cloudflare/blueprint.yaml b/blueprints/nextjs-cloudflare/blueprint.yaml new file mode 100644 index 0000000..8d4aab9 --- /dev/null +++ b/blueprints/nextjs-cloudflare/blueprint.yaml @@ -0,0 +1,16 @@ +apiVersion: catalog.orun.dev/v1alpha1 +kind: Blueprint +metadata: + name: nextjs-cloudflare +spec: + summary: Next.js monorepo delivery on Cloudflare with Terraform-managed Pages resources. + uses: + - workspace + - turbo-package + - cloudflare-pages-turbo + - cloudflare-pages-terraform + outcomes: + - Shared workspace validation + - Monorepo package verification + - Git-backed Pages provisioning + - Edge-hosted frontend delivery diff --git a/blueprints/nextjs-cloudflare/examples/README.md b/blueprints/nextjs-cloudflare/examples/README.md new file mode 100644 index 0000000..08f1b5f --- /dev/null +++ b/blueprints/nextjs-cloudflare/examples/README.md @@ -0,0 +1,3 @@ +# nextjs-cloudflare examples + +Use the starter intent in `examples/simple-nextjs/` as the consumer-side entry point for this blueprint. diff --git a/compositions/cloudflare-pages-terraform/README.md b/compositions/cloudflare-pages-terraform/README.md new file mode 100644 index 0000000..9864681 --- /dev/null +++ b/compositions/cloudflare-pages-terraform/README.md @@ -0,0 +1,23 @@ +# cloudflare-pages-terraform + +`cloudflare-pages-terraform` is an exported Orun composition in the Sumo Platform Ops catalog. + +## Purpose + +Verify static site builds locally and reconcile a Git-backed Cloudflare Pages project with Terraform + +## Contract + +- **Type:** `cloudflare-pages-terraform` +- **Path:** `compositions/cloudflare-pages-terraform` +- **Definition:** `compositions.yaml` + +## Catalog status + +This folder is intentionally self-contained so examples, smoke coverage, and future registry metadata can live beside the composition contract. + +## Next steps + +- add runnable example assets under `examples/` +- add composition-specific smoke coverage under `tests/` +- keep the contract description in `compositions.yaml` aligned with the repo scorecard diff --git a/cloudflare-pages-terraform/compositions.yaml b/compositions/cloudflare-pages-terraform/compositions.yaml similarity index 100% rename from cloudflare-pages-terraform/compositions.yaml rename to compositions/cloudflare-pages-terraform/compositions.yaml diff --git a/compositions/cloudflare-pages-terraform/examples/README.md b/compositions/cloudflare-pages-terraform/examples/README.md new file mode 100644 index 0000000..e69b0c3 --- /dev/null +++ b/compositions/cloudflare-pages-terraform/examples/README.md @@ -0,0 +1,5 @@ +# Examples for cloudflare-pages-terraform + +Put consumer-facing example assets for `cloudflare-pages-terraform` here. + +The scorecard only counts example assets beyond this placeholder README. diff --git a/compositions/cloudflare-pages-terraform/tests/README.md b/compositions/cloudflare-pages-terraform/tests/README.md new file mode 100644 index 0000000..2b6a975 --- /dev/null +++ b/compositions/cloudflare-pages-terraform/tests/README.md @@ -0,0 +1,5 @@ +# Tests for cloudflare-pages-terraform + +Put composition-specific smoke tests or validation fixtures for `cloudflare-pages-terraform` here. + +The scorecard only counts test assets beyond this placeholder README. diff --git a/compositions/cloudflare-pages-turbo-terraform/README.md b/compositions/cloudflare-pages-turbo-terraform/README.md new file mode 100644 index 0000000..4f8028e --- /dev/null +++ b/compositions/cloudflare-pages-turbo-terraform/README.md @@ -0,0 +1,23 @@ +# cloudflare-pages-turbo-terraform + +`cloudflare-pages-turbo-terraform` is an exported Orun composition in the Sumo Platform Ops catalog. + +## Purpose + +Verify a static app with Turbo locally and reconcile a Git-backed Cloudflare Pages project with Terraform + +## Contract + +- **Type:** `cloudflare-pages-turbo-terraform` +- **Path:** `compositions/cloudflare-pages-turbo-terraform` +- **Definition:** `compositions.yaml` + +## Catalog status + +This folder is intentionally self-contained so examples, smoke coverage, and future registry metadata can live beside the composition contract. + +## Next steps + +- add runnable example assets under `examples/` +- add composition-specific smoke coverage under `tests/` +- keep the contract description in `compositions.yaml` aligned with the repo scorecard diff --git a/cloudflare-pages-turbo-terraform/compositions.yaml b/compositions/cloudflare-pages-turbo-terraform/compositions.yaml similarity index 100% rename from cloudflare-pages-turbo-terraform/compositions.yaml rename to compositions/cloudflare-pages-turbo-terraform/compositions.yaml diff --git a/compositions/cloudflare-pages-turbo-terraform/examples/README.md b/compositions/cloudflare-pages-turbo-terraform/examples/README.md new file mode 100644 index 0000000..80fdd5f --- /dev/null +++ b/compositions/cloudflare-pages-turbo-terraform/examples/README.md @@ -0,0 +1,5 @@ +# Examples for cloudflare-pages-turbo-terraform + +Put consumer-facing example assets for `cloudflare-pages-turbo-terraform` here. + +The scorecard only counts example assets beyond this placeholder README. diff --git a/compositions/cloudflare-pages-turbo-terraform/tests/README.md b/compositions/cloudflare-pages-turbo-terraform/tests/README.md new file mode 100644 index 0000000..69706c9 --- /dev/null +++ b/compositions/cloudflare-pages-turbo-terraform/tests/README.md @@ -0,0 +1,5 @@ +# Tests for cloudflare-pages-turbo-terraform + +Put composition-specific smoke tests or validation fixtures for `cloudflare-pages-turbo-terraform` here. + +The scorecard only counts test assets beyond this placeholder README. diff --git a/compositions/cloudflare-pages-turbo/README.md b/compositions/cloudflare-pages-turbo/README.md new file mode 100644 index 0000000..e17f370 --- /dev/null +++ b/compositions/cloudflare-pages-turbo/README.md @@ -0,0 +1,23 @@ +# cloudflare-pages-turbo + +`cloudflare-pages-turbo` is an exported Orun composition in the Sumo Platform Ops catalog. + +## Purpose + +Build a static app with Turbo and direct-upload it to Cloudflare Pages + +## Contract + +- **Type:** `cloudflare-pages-turbo` +- **Path:** `compositions/cloudflare-pages-turbo` +- **Definition:** `compositions.yaml` + +## Catalog status + +This folder is intentionally self-contained so examples, smoke coverage, and future registry metadata can live beside the composition contract. + +## Next steps + +- add runnable example assets under `examples/` +- add composition-specific smoke coverage under `tests/` +- keep the contract description in `compositions.yaml` aligned with the repo scorecard diff --git a/cloudflare-pages-turbo/compositions.yaml b/compositions/cloudflare-pages-turbo/compositions.yaml similarity index 100% rename from cloudflare-pages-turbo/compositions.yaml rename to compositions/cloudflare-pages-turbo/compositions.yaml diff --git a/compositions/cloudflare-pages-turbo/examples/README.md b/compositions/cloudflare-pages-turbo/examples/README.md new file mode 100644 index 0000000..60ff5c4 --- /dev/null +++ b/compositions/cloudflare-pages-turbo/examples/README.md @@ -0,0 +1,5 @@ +# Examples for cloudflare-pages-turbo + +Put consumer-facing example assets for `cloudflare-pages-turbo` here. + +The scorecard only counts example assets beyond this placeholder README. diff --git a/compositions/cloudflare-pages-turbo/tests/README.md b/compositions/cloudflare-pages-turbo/tests/README.md new file mode 100644 index 0000000..f9bf735 --- /dev/null +++ b/compositions/cloudflare-pages-turbo/tests/README.md @@ -0,0 +1,5 @@ +# Tests for cloudflare-pages-turbo + +Put composition-specific smoke tests or validation fixtures for `cloudflare-pages-turbo` here. + +The scorecard only counts test assets beyond this placeholder README. diff --git a/compositions/cloudflare-pages/README.md b/compositions/cloudflare-pages/README.md new file mode 100644 index 0000000..41c5eaa --- /dev/null +++ b/compositions/cloudflare-pages/README.md @@ -0,0 +1,23 @@ +# cloudflare-pages + +`cloudflare-pages` is an exported Orun composition in the Sumo Platform Ops catalog. + +## Purpose + +Build static site assets and direct-upload them to Cloudflare Pages with Wrangler + +## Contract + +- **Type:** `cloudflare-pages` +- **Path:** `compositions/cloudflare-pages` +- **Definition:** `compositions.yaml` + +## Catalog status + +This folder is intentionally self-contained so examples, smoke coverage, and future registry metadata can live beside the composition contract. + +## Next steps + +- add runnable example assets under `examples/` +- add composition-specific smoke coverage under `tests/` +- keep the contract description in `compositions.yaml` aligned with the repo scorecard diff --git a/cloudflare-pages/compositions.yaml b/compositions/cloudflare-pages/compositions.yaml similarity index 100% rename from cloudflare-pages/compositions.yaml rename to compositions/cloudflare-pages/compositions.yaml diff --git a/compositions/cloudflare-pages/examples/README.md b/compositions/cloudflare-pages/examples/README.md new file mode 100644 index 0000000..48c559a --- /dev/null +++ b/compositions/cloudflare-pages/examples/README.md @@ -0,0 +1,5 @@ +# Examples for cloudflare-pages + +Put consumer-facing example assets for `cloudflare-pages` here. + +The scorecard only counts example assets beyond this placeholder README. diff --git a/compositions/cloudflare-pages/tests/README.md b/compositions/cloudflare-pages/tests/README.md new file mode 100644 index 0000000..bfe24a1 --- /dev/null +++ b/compositions/cloudflare-pages/tests/README.md @@ -0,0 +1,5 @@ +# Tests for cloudflare-pages + +Put composition-specific smoke tests or validation fixtures for `cloudflare-pages` here. + +The scorecard only counts test assets beyond this placeholder README. diff --git a/compositions/cloudflare-worker-turbo/README.md b/compositions/cloudflare-worker-turbo/README.md new file mode 100644 index 0000000..54c5b52 --- /dev/null +++ b/compositions/cloudflare-worker-turbo/README.md @@ -0,0 +1,23 @@ +# cloudflare-worker-turbo + +`cloudflare-worker-turbo` is an exported Orun composition in the Sumo Platform Ops catalog. + +## Purpose + +Verify a Cloudflare Worker app and deploy it from the production branch + +## Contract + +- **Type:** `cloudflare-worker-turbo` +- **Path:** `compositions/cloudflare-worker-turbo` +- **Definition:** `compositions.yaml` + +## Catalog status + +This folder is intentionally self-contained so examples, smoke coverage, and future registry metadata can live beside the composition contract. + +## Next steps + +- add runnable example assets under `examples/` +- add composition-specific smoke coverage under `tests/` +- keep the contract description in `compositions.yaml` aligned with the repo scorecard diff --git a/cloudflare-worker-turbo/compositions.yaml b/compositions/cloudflare-worker-turbo/compositions.yaml similarity index 100% rename from cloudflare-worker-turbo/compositions.yaml rename to compositions/cloudflare-worker-turbo/compositions.yaml diff --git a/compositions/cloudflare-worker-turbo/examples/README.md b/compositions/cloudflare-worker-turbo/examples/README.md new file mode 100644 index 0000000..46f652c --- /dev/null +++ b/compositions/cloudflare-worker-turbo/examples/README.md @@ -0,0 +1,5 @@ +# Examples for cloudflare-worker-turbo + +Put consumer-facing example assets for `cloudflare-worker-turbo` here. + +The scorecard only counts example assets beyond this placeholder README. diff --git a/compositions/cloudflare-worker-turbo/tests/README.md b/compositions/cloudflare-worker-turbo/tests/README.md new file mode 100644 index 0000000..5c4f2c3 --- /dev/null +++ b/compositions/cloudflare-worker-turbo/tests/README.md @@ -0,0 +1,5 @@ +# Tests for cloudflare-worker-turbo + +Put composition-specific smoke tests or validation fixtures for `cloudflare-worker-turbo` here. + +The scorecard only counts test assets beyond this placeholder README. diff --git a/compositions/cloudflare-worker/README.md b/compositions/cloudflare-worker/README.md new file mode 100644 index 0000000..a6c0b8d --- /dev/null +++ b/compositions/cloudflare-worker/README.md @@ -0,0 +1,23 @@ +# cloudflare-worker + +`cloudflare-worker` is an exported Orun composition in the Sumo Platform Ops catalog. + +## Purpose + +Verify a Cloudflare Worker app and deploy it from the production branch + +## Contract + +- **Type:** `cloudflare-worker` +- **Path:** `compositions/cloudflare-worker` +- **Definition:** `compositions.yaml` + +## Catalog status + +This folder is intentionally self-contained so examples, smoke coverage, and future registry metadata can live beside the composition contract. + +## Next steps + +- add runnable example assets under `examples/` +- add composition-specific smoke coverage under `tests/` +- keep the contract description in `compositions.yaml` aligned with the repo scorecard diff --git a/cloudflare-worker/compositions.yaml b/compositions/cloudflare-worker/compositions.yaml similarity index 100% rename from cloudflare-worker/compositions.yaml rename to compositions/cloudflare-worker/compositions.yaml diff --git a/compositions/cloudflare-worker/examples/README.md b/compositions/cloudflare-worker/examples/README.md new file mode 100644 index 0000000..612dba3 --- /dev/null +++ b/compositions/cloudflare-worker/examples/README.md @@ -0,0 +1,5 @@ +# Examples for cloudflare-worker + +Put consumer-facing example assets for `cloudflare-worker` here. + +The scorecard only counts example assets beyond this placeholder README. diff --git a/compositions/cloudflare-worker/tests/README.md b/compositions/cloudflare-worker/tests/README.md new file mode 100644 index 0000000..77c9978 --- /dev/null +++ b/compositions/cloudflare-worker/tests/README.md @@ -0,0 +1,5 @@ +# Tests for cloudflare-worker + +Put composition-specific smoke tests or validation fixtures for `cloudflare-worker` here. + +The scorecard only counts test assets beyond this placeholder README. diff --git a/compositions/helm-chart/README.md b/compositions/helm-chart/README.md new file mode 100644 index 0000000..cf96fe5 --- /dev/null +++ b/compositions/helm-chart/README.md @@ -0,0 +1,23 @@ +# helm-chart + +`helm-chart` is an exported Orun composition in the Sumo Platform Ops catalog. + +## Purpose + +Helm chart validation jobs for chart components + +## Contract + +- **Type:** `helm-chart` +- **Path:** `compositions/helm-chart` +- **Definition:** `compositions.yaml` + +## Catalog status + +This folder is intentionally self-contained so examples, smoke coverage, and future registry metadata can live beside the composition contract. + +## Next steps + +- add runnable example assets under `examples/` +- add composition-specific smoke coverage under `tests/` +- keep the contract description in `compositions.yaml` aligned with the repo scorecard diff --git a/helm-chart/compositions.yaml b/compositions/helm-chart/compositions.yaml similarity index 100% rename from helm-chart/compositions.yaml rename to compositions/helm-chart/compositions.yaml diff --git a/compositions/helm-chart/examples/README.md b/compositions/helm-chart/examples/README.md new file mode 100644 index 0000000..20b416a --- /dev/null +++ b/compositions/helm-chart/examples/README.md @@ -0,0 +1,5 @@ +# Examples for helm-chart + +Put consumer-facing example assets for `helm-chart` here. + +The scorecard only counts example assets beyond this placeholder README. diff --git a/compositions/helm-chart/tests/README.md b/compositions/helm-chart/tests/README.md new file mode 100644 index 0000000..7923997 --- /dev/null +++ b/compositions/helm-chart/tests/README.md @@ -0,0 +1,5 @@ +# Tests for helm-chart + +Put composition-specific smoke tests or validation fixtures for `helm-chart` here. + +The scorecard only counts test assets beyond this placeholder README. diff --git a/compositions/helm-values/README.md b/compositions/helm-values/README.md new file mode 100644 index 0000000..9d01276 --- /dev/null +++ b/compositions/helm-values/README.md @@ -0,0 +1,23 @@ +# helm-values + +`helm-values` is an exported Orun composition in the Sumo Platform Ops catalog. + +## Purpose + +Helm values validation jobs for deployment files + +## Contract + +- **Type:** `helm-values` +- **Path:** `compositions/helm-values` +- **Definition:** `compositions.yaml` + +## Catalog status + +This folder is intentionally self-contained so examples, smoke coverage, and future registry metadata can live beside the composition contract. + +## Next steps + +- add runnable example assets under `examples/` +- add composition-specific smoke coverage under `tests/` +- keep the contract description in `compositions.yaml` aligned with the repo scorecard diff --git a/helm-values/compositions.yaml b/compositions/helm-values/compositions.yaml similarity index 100% rename from helm-values/compositions.yaml rename to compositions/helm-values/compositions.yaml diff --git a/compositions/helm-values/examples/README.md b/compositions/helm-values/examples/README.md new file mode 100644 index 0000000..3fc29f9 --- /dev/null +++ b/compositions/helm-values/examples/README.md @@ -0,0 +1,5 @@ +# Examples for helm-values + +Put consumer-facing example assets for `helm-values` here. + +The scorecard only counts example assets beyond this placeholder README. diff --git a/compositions/helm-values/tests/README.md b/compositions/helm-values/tests/README.md new file mode 100644 index 0000000..1e8ab54 --- /dev/null +++ b/compositions/helm-values/tests/README.md @@ -0,0 +1,5 @@ +# Tests for helm-values + +Put composition-specific smoke tests or validation fixtures for `helm-values` here. + +The scorecard only counts test assets beyond this placeholder README. diff --git a/compositions/terraform/README.md b/compositions/terraform/README.md new file mode 100644 index 0000000..c26791b --- /dev/null +++ b/compositions/terraform/README.md @@ -0,0 +1,23 @@ +# terraform + +`terraform` is an exported Orun composition in the Sumo Platform Ops catalog. + +## Purpose + +Terraform validation jobs for infra components + +## Contract + +- **Type:** `terraform` +- **Path:** `compositions/terraform` +- **Definition:** `compositions.yaml` + +## Catalog status + +This folder is intentionally self-contained so examples, smoke coverage, and future registry metadata can live beside the composition contract. + +## Next steps + +- add runnable example assets under `examples/` +- add composition-specific smoke coverage under `tests/` +- keep the contract description in `compositions.yaml` aligned with the repo scorecard diff --git a/terraform/compositions.yaml b/compositions/terraform/compositions.yaml similarity index 100% rename from terraform/compositions.yaml rename to compositions/terraform/compositions.yaml diff --git a/compositions/terraform/examples/README.md b/compositions/terraform/examples/README.md new file mode 100644 index 0000000..ce8d586 --- /dev/null +++ b/compositions/terraform/examples/README.md @@ -0,0 +1,5 @@ +# Examples for terraform + +Put consumer-facing example assets for `terraform` here. + +The scorecard only counts example assets beyond this placeholder README. diff --git a/compositions/terraform/tests/README.md b/compositions/terraform/tests/README.md new file mode 100644 index 0000000..77abfdf --- /dev/null +++ b/compositions/terraform/tests/README.md @@ -0,0 +1,5 @@ +# Tests for terraform + +Put composition-specific smoke tests or validation fixtures for `terraform` here. + +The scorecard only counts test assets beyond this placeholder README. diff --git a/compositions/turbo-package/README.md b/compositions/turbo-package/README.md new file mode 100644 index 0000000..dcd8a25 --- /dev/null +++ b/compositions/turbo-package/README.md @@ -0,0 +1,23 @@ +# turbo-package + +`turbo-package` is an exported Orun composition in the Sumo Platform Ops catalog. + +## Purpose + +Verify a shared package in a pnpm and Turbo monorepo + +## Contract + +- **Type:** `turbo-package` +- **Path:** `compositions/turbo-package` +- **Definition:** `compositions.yaml` + +## Catalog status + +This folder is intentionally self-contained so examples, smoke coverage, and future registry metadata can live beside the composition contract. + +## Next steps + +- add runnable example assets under `examples/` +- add composition-specific smoke coverage under `tests/` +- keep the contract description in `compositions.yaml` aligned with the repo scorecard diff --git a/turbo-package/compositions.yaml b/compositions/turbo-package/compositions.yaml similarity index 100% rename from turbo-package/compositions.yaml rename to compositions/turbo-package/compositions.yaml diff --git a/compositions/turbo-package/examples/README.md b/compositions/turbo-package/examples/README.md new file mode 100644 index 0000000..606136a --- /dev/null +++ b/compositions/turbo-package/examples/README.md @@ -0,0 +1,5 @@ +# Examples for turbo-package + +Put consumer-facing example assets for `turbo-package` here. + +The scorecard only counts example assets beyond this placeholder README. diff --git a/compositions/turbo-package/tests/README.md b/compositions/turbo-package/tests/README.md new file mode 100644 index 0000000..3d99e1d --- /dev/null +++ b/compositions/turbo-package/tests/README.md @@ -0,0 +1,5 @@ +# Tests for turbo-package + +Put composition-specific smoke tests or validation fixtures for `turbo-package` here. + +The scorecard only counts test assets beyond this placeholder README. diff --git a/compositions/workspace/README.md b/compositions/workspace/README.md new file mode 100644 index 0000000..fb52f7c --- /dev/null +++ b/compositions/workspace/README.md @@ -0,0 +1,23 @@ +# workspace + +`workspace` is an exported Orun composition in the Sumo Platform Ops catalog. + +## Purpose + +Workspace-backed provider smoke jobs + +## Contract + +- **Type:** `workspace` +- **Path:** `compositions/workspace` +- **Definition:** `compositions.yaml` + +## Catalog status + +This folder is intentionally self-contained so examples, smoke coverage, and future registry metadata can live beside the composition contract. + +## Next steps + +- add runnable example assets under `examples/` +- add composition-specific smoke coverage under `tests/` +- keep the contract description in `compositions.yaml` aligned with the repo scorecard diff --git a/workspace/compositions.yaml b/compositions/workspace/compositions.yaml similarity index 100% rename from workspace/compositions.yaml rename to compositions/workspace/compositions.yaml diff --git a/compositions/workspace/examples/README.md b/compositions/workspace/examples/README.md new file mode 100644 index 0000000..74023c0 --- /dev/null +++ b/compositions/workspace/examples/README.md @@ -0,0 +1,5 @@ +# Examples for workspace + +Put consumer-facing example assets for `workspace` here. + +The scorecard only counts example assets beyond this placeholder README. diff --git a/compositions/workspace/tests/README.md b/compositions/workspace/tests/README.md new file mode 100644 index 0000000..2d79e13 --- /dev/null +++ b/compositions/workspace/tests/README.md @@ -0,0 +1,5 @@ +# Tests for workspace + +Put composition-specific smoke tests or validation fixtures for `workspace` here. + +The scorecard only counts test assets beyond this placeholder README. diff --git a/docs/authoring.md b/docs/authoring.md new file mode 100644 index 0000000..a151908 --- /dev/null +++ b/docs/authoring.md @@ -0,0 +1,21 @@ +# Authoring guide + +## Add a composition + +1. Create `compositions//compositions.yaml`. +2. Describe the contract in `spec.description`, `spec.inputSchema`, and `spec.jobs`. +3. Run `./scripts/generate-readme.sh` to scaffold the local README, examples, and tests placeholders. +4. Run `./scripts/score.sh` and `./scripts/verify.sh`. + +## Add a blueprint + +1. Create `blueprints//blueprint.yaml`. +2. Document the composition set in `blueprints//README.md`. +3. Add example references or starter intent snippets if the blueprint introduces a new adoption path. + +## Keep the catalog clean + +- Prefer atomic compositions over variant explosions. +- Use blueprints for recommended assemblies. +- Add runnable example assets to improve the generated maturity score. +- Keep the OCI consumption story pinned to released versions, not floating refs. diff --git a/docs/concepts.md b/docs/concepts.md new file mode 100644 index 0000000..9de366b --- /dev/null +++ b/docs/concepts.md @@ -0,0 +1,32 @@ +# Concepts + +## Stack catalog + +This repository is a catalog, not an application repo. It publishes versioned execution contracts that other repositories consume through OCI. + +## Compositions + +`compositions/` contains atomic Orun `Composition` contracts. These are the stable type-level building blocks exported by the stack package. + +## Blueprints + +`blueprints/` groups recommended multi-composition patterns for common adoption paths. Blueprints are human-facing catalog assets that explain how multiple compositions fit together. + +## Examples + +`examples/` contains starter intents that show how a consumer repo can reference the OCI package and structure discovery roots. + +## Registry index + +`registry/index.json` is generated catalog metadata for future search, score, and registry sync workflows. + +## Trust model + +The stack separates verification into: + +- contract validation +- docs hygiene +- score generation +- tagged release publication + +That split keeps discovery and trust signals visible without coupling them to a single flat workflow. diff --git a/docs/getting-started.md b/docs/getting-started.md new file mode 100644 index 0000000..21b8c4b --- /dev/null +++ b/docs/getting-started.md @@ -0,0 +1,29 @@ +# Getting started + +`sumo-platform-ops-stack` is a versioned Orun stack catalog. Consumer repositories pin it as an OCI composition source, then declare local `component.yaml` manifests that use the exported composition types. + +## 1. Pin the runtime + +Use `kiox.yaml` to pin the `orun` CLI version you want in the consuming repository. + +## 2. Pin the catalog + +Declare this stack in `intent.yaml`: + +```yaml +compositions: + sources: + - name: sumo-platform-ops + kind: oci + ref: oci://ghcr.io/sourceplane/sumo-platform-ops-stack:0.10.0 +``` + +## 3. Discover local components + +Point `discovery.roots` at the application, infra, and deploy directories that own `component.yaml` files. + +## 4. Plan and apply + +Run `orun validate`, `orun plan`, or `orun run` against that intent. The stack stays versioned independently from the consuming repository. + +For the full repo-consumer workflow, see [using-this-stack-from-oci.md](using-this-stack-from-oci.md). diff --git a/docs/roadmap.md b/docs/roadmap.md new file mode 100644 index 0000000..712f81d --- /dev/null +++ b/docs/roadmap.md @@ -0,0 +1,8 @@ +# Roadmap + +- Add runnable composition-level examples beyond starter placeholders. +- Add stronger smoke tests for every exported composition. +- Publish richer registry metadata for search and registry sync. +- Add download and adoption metrics once the consumer footprint grows. +- Introduce more opinionated blueprints for full SaaS and internal platform topologies. +- Add scheduled verification so scores can track freshness over time. diff --git a/docs/using-this-stack-from-oci.md b/docs/using-this-stack-from-oci.md new file mode 100644 index 0000000..93fcee8 --- /dev/null +++ b/docs/using-this-stack-from-oci.md @@ -0,0 +1,123 @@ +# Using this stack from OCI + +This repository is meant to be consumed from other repositories as a versioned OCI-hosted Orun stack. The goal is simple: + +- keep `component.yaml` ownership local to the consumer repo +- keep execution contracts centralized and versioned in this catalog +- let `intent.yaml` pin which catalog release the repo uses + +## What this stack publishes + +The published OCI artifact contains the composition contracts under `compositions/` plus the surrounding catalog metadata that explains how to use them. + +Today the exported composition types are: + +- `cloudflare-pages` +- `cloudflare-pages-turbo` +- `cloudflare-pages-terraform` +- `cloudflare-pages-turbo-terraform` +- `cloudflare-worker` +- `cloudflare-worker-turbo` +- `terraform` +- `helm-chart` +- `helm-values` +- `turbo-package` +- `workspace` + +## The split to keep in mind + +There are two separate things to pin in a consumer repo: + +1. `kiox.yaml` pins the `orun` runtime image. +2. `intent.yaml` pins the composition catalog release. + +That separation matters because upgrading the CLI and upgrading the stack contracts are different lifecycle decisions. + +## Minimal `intent.yaml` + +Use an OCI composition source in the consumer repository: + +```yaml +apiVersion: sourceplane.io/v1 +kind: Intent +metadata: + name: my-platform + +compositions: + sources: + - name: sumo-platform-ops + kind: oci + ref: oci://ghcr.io/sourceplane/sumo-platform-ops-stack:0.10.0 + +discovery: + roots: + - apps + - infra + - deploy + +environments: + development: {} + production: {} +``` + +The important line is the OCI source: + +```yaml +ref: oci://ghcr.io/sourceplane/sumo-platform-ops-stack:0.10.0 +``` + +Pin a released version instead of `latest` so plans stay reproducible. + +## Local component ownership + +The consuming repository should keep `component.yaml` files next to the code or infrastructure they own. + +Example: + +```yaml +apiVersion: sourceplane.io/v1 +kind: Component +metadata: + name: marketing-site + +spec: + type: cloudflare-pages + domain: edge + subscribe: + environments: [development, production] + inputs: + siteDir: . + installCommand: pnpm install --frozen-lockfile + buildCommand: pnpm run build + outputDir: dist + projectName: marketing-site + nodeVersion: "20" + productionBranch: main +``` + +The component stays repo-local. Only the execution contract for `cloudflare-pages` comes from the OCI package. + +## Recommended adoption path + +1. Start with atomic compositions like `terraform`, `cloudflare-pages`, or `workspace`. +2. Adopt monorepo-aware types like `turbo-package` or `cloudflare-pages-turbo` when the repo needs them. +3. Use the blueprints in this repo as guidance for multi-composition rollouts. + +## Upgrade flow + +1. Update the OCI ref in `intent.yaml`. +2. Lock or re-resolve composition sources if the consumer workflow uses source locking. +3. Run `orun validate` and `orun plan`. +4. Promote the catalog upgrade through environments like any other platform change. + +## Why this repo now uses a catalog structure + +The old flat layout worked for a small prototype, but it would become noisy as the stack grows. The current layout separates: + +- `compositions/` for atomic contracts +- `blueprints/` for recommended assemblies +- `examples/` for starter consumer intents +- `registry/` for generated catalog metadata +- `docs/` for consumer and contributor guidance + +That makes the stack easier to search, test, score, version, and eventually sync into a broader registry experience. diff --git a/docs/verification.md b/docs/verification.md new file mode 100644 index 0000000..4adcbe2 --- /dev/null +++ b/docs/verification.md @@ -0,0 +1,45 @@ +# Verification model + +The repository uses a split verification model so the stack can scale as a catalog. + +## Verify workflow + +`verify.yml` runs `./scripts/verify.sh`, which: + +- checks generated composition docs are up to date +- checks the generated registry index is current +- runs the same OCI dry-run publish path used by release automation + +## Docs workflow + +`docs.yml` enforces catalog scaffolding generated by `./scripts/generate-readme.sh`. + +## Scorecard workflow + +`scorecard.yml` rebuilds `registry/index.json` and fails if the checked-in catalog scorecard is stale. + +## Release workflow + +`release.yml` validates the tag against `stack.yaml`, regenerates the scorecard, publishes the OCI package, and attaches the registry index to the GitHub release. + +## Score model + +The generated scorecard currently evaluates: + +| Signal | Points | +| --- | ---: | +| Has composition README | 10 | +| Has example assets | 15 | +| Has test assets | 25 | +| Verified by repo automation | 20 | +| Semantic versioned stack | 10 | +| Has usable docs | 10 | +| Has scorecard/security workflow | 10 | + +Grades: + +- `A+` trusted +- `A` strong +- `B` stable +- `C` experimental +- `D` legacy diff --git a/examples/full-enterprise/README.md b/examples/full-enterprise/README.md new file mode 100644 index 0000000..a35e20d --- /dev/null +++ b/examples/full-enterprise/README.md @@ -0,0 +1,3 @@ +# full-enterprise + +Starter intent for a larger platform repo that wants to split discovery across apps, packages, infra, charts, and deploy overlays while consuming this stack through OCI. diff --git a/examples/full-enterprise/intent.yaml b/examples/full-enterprise/intent.yaml new file mode 100644 index 0000000..9f81567 --- /dev/null +++ b/examples/full-enterprise/intent.yaml @@ -0,0 +1,24 @@ +apiVersion: sourceplane.io/v1 +kind: Intent +metadata: + name: full-enterprise + +compositions: + sources: + - name: sumo-platform-ops + kind: oci + ref: oci://ghcr.io/sourceplane/sumo-platform-ops-stack:0.10.0 + +discovery: + roots: + - apps + - packages + - infra + - charts + - deploy + - website + +environments: + development: {} + staging: {} + production: {} diff --git a/examples/monorepo-platform/README.md b/examples/monorepo-platform/README.md new file mode 100644 index 0000000..1a97a14 --- /dev/null +++ b/examples/monorepo-platform/README.md @@ -0,0 +1,3 @@ +# monorepo-platform + +Starter intent for a consumer repo that wants a workspace-centric monorepo using shared packages, edge apps, and infrastructure roots. diff --git a/examples/monorepo-platform/intent.yaml b/examples/monorepo-platform/intent.yaml new file mode 100644 index 0000000..d1a05d0 --- /dev/null +++ b/examples/monorepo-platform/intent.yaml @@ -0,0 +1,22 @@ +apiVersion: sourceplane.io/v1 +kind: Intent +metadata: + name: monorepo-platform + +compositions: + sources: + - name: sumo-platform-ops + kind: oci + ref: oci://ghcr.io/sourceplane/sumo-platform-ops-stack:0.10.0 + +discovery: + roots: + - apps + - packages + - infra + - deploy + +environments: + development: {} + staging: {} + production: {} diff --git a/examples/simple-nextjs/README.md b/examples/simple-nextjs/README.md new file mode 100644 index 0000000..6d19708 --- /dev/null +++ b/examples/simple-nextjs/README.md @@ -0,0 +1,3 @@ +# simple-nextjs + +Starter intent for a consumer repo that wants to pin the stack from OCI and discover app plus infra components for a Next.js-style frontend deployment. diff --git a/examples/simple-nextjs/intent.yaml b/examples/simple-nextjs/intent.yaml new file mode 100644 index 0000000..dc45a73 --- /dev/null +++ b/examples/simple-nextjs/intent.yaml @@ -0,0 +1,19 @@ +apiVersion: sourceplane.io/v1 +kind: Intent +metadata: + name: simple-nextjs + +compositions: + sources: + - name: sumo-platform-ops + kind: oci + ref: oci://ghcr.io/sourceplane/sumo-platform-ops-stack:0.10.0 + +discovery: + roots: + - apps + - infra + +environments: + development: {} + production: {} diff --git a/registry/index.json b/registry/index.json new file mode 100644 index 0000000..1f782bf --- /dev/null +++ b/registry/index.json @@ -0,0 +1,329 @@ +{ + "stack": { + "name": "sumo-platform-ops-stack", + "title": "Sumo Platform Ops Stack", + "version": "0.10.0", + "oci": "oci://ghcr.io/sourceplane/sumo-platform-ops-stack:0.10.0" + }, + "catalog": { + "compositions": [ + { + "name": "cloudflare-pages", + "kind": "composition", + "path": "compositions/cloudflare-pages", + "description": "Build static site assets and direct-upload them to Cloudflare Pages with Wrangler", + "category": "hosting", + "verified": false, + "score": 60, + "grade": "C", + "tags": [ + "cloudflare", + "hosting", + "pages" + ], + "signals": { + "readme": true, + "exampleAssets": 0, + "testAssets": 0, + "verifyWorkflow": true, + "releaseWorkflow": true, + "scorecardWorkflow": true, + "semver": true, + "docsGood": true + } + }, + { + "name": "cloudflare-pages-terraform", + "kind": "composition", + "path": "compositions/cloudflare-pages-terraform", + "description": "Verify static site builds locally and reconcile a Git-backed Cloudflare Pages project with Terraform", + "category": "platform", + "verified": false, + "score": 60, + "grade": "C", + "tags": [ + "cloudflare", + "pages", + "platform", + "terraform" + ], + "signals": { + "readme": true, + "exampleAssets": 0, + "testAssets": 0, + "verifyWorkflow": true, + "releaseWorkflow": true, + "scorecardWorkflow": true, + "semver": true, + "docsGood": true + } + }, + { + "name": "cloudflare-pages-turbo", + "kind": "composition", + "path": "compositions/cloudflare-pages-turbo", + "description": "Build a static app with Turbo and direct-upload it to Cloudflare Pages", + "category": "hosting", + "verified": false, + "score": 60, + "grade": "C", + "tags": [ + "cloudflare", + "hosting", + "pages", + "turbo" + ], + "signals": { + "readme": true, + "exampleAssets": 0, + "testAssets": 0, + "verifyWorkflow": true, + "releaseWorkflow": true, + "scorecardWorkflow": true, + "semver": true, + "docsGood": true + } + }, + { + "name": "cloudflare-pages-turbo-terraform", + "kind": "composition", + "path": "compositions/cloudflare-pages-turbo-terraform", + "description": "Verify a static app with Turbo locally and reconcile a Git-backed Cloudflare Pages project with Terraform", + "category": "platform", + "verified": false, + "score": 60, + "grade": "C", + "tags": [ + "cloudflare", + "pages", + "platform", + "terraform", + "turbo" + ], + "signals": { + "readme": true, + "exampleAssets": 0, + "testAssets": 0, + "verifyWorkflow": true, + "releaseWorkflow": true, + "scorecardWorkflow": true, + "semver": true, + "docsGood": true + } + }, + { + "name": "cloudflare-worker", + "kind": "composition", + "path": "compositions/cloudflare-worker", + "description": "Verify a Cloudflare Worker app and deploy it from the production branch", + "category": "edge", + "verified": false, + "score": 60, + "grade": "C", + "tags": [ + "cloudflare", + "edge", + "worker" + ], + "signals": { + "readme": true, + "exampleAssets": 0, + "testAssets": 0, + "verifyWorkflow": true, + "releaseWorkflow": true, + "scorecardWorkflow": true, + "semver": true, + "docsGood": true + } + }, + { + "name": "cloudflare-worker-turbo", + "kind": "composition", + "path": "compositions/cloudflare-worker-turbo", + "description": "Verify a Cloudflare Worker app and deploy it from the production branch", + "category": "edge", + "verified": false, + "score": 60, + "grade": "C", + "tags": [ + "cloudflare", + "edge", + "turbo", + "worker" + ], + "signals": { + "readme": true, + "exampleAssets": 0, + "testAssets": 0, + "verifyWorkflow": true, + "releaseWorkflow": true, + "scorecardWorkflow": true, + "semver": true, + "docsGood": true + } + }, + { + "name": "helm-chart", + "kind": "composition", + "path": "compositions/helm-chart", + "description": "Helm chart validation jobs for chart components", + "category": "kubernetes", + "verified": false, + "score": 60, + "grade": "C", + "tags": [ + "chart", + "helm", + "kubernetes" + ], + "signals": { + "readme": true, + "exampleAssets": 0, + "testAssets": 0, + "verifyWorkflow": true, + "releaseWorkflow": true, + "scorecardWorkflow": true, + "semver": true, + "docsGood": true + } + }, + { + "name": "helm-values", + "kind": "composition", + "path": "compositions/helm-values", + "description": "Helm values validation jobs for deployment files", + "category": "kubernetes", + "verified": false, + "score": 60, + "grade": "C", + "tags": [ + "helm", + "kubernetes", + "values" + ], + "signals": { + "readme": true, + "exampleAssets": 0, + "testAssets": 0, + "verifyWorkflow": true, + "releaseWorkflow": true, + "scorecardWorkflow": true, + "semver": true, + "docsGood": true + } + }, + { + "name": "terraform", + "kind": "composition", + "path": "compositions/terraform", + "description": "Terraform validation jobs for infra components", + "category": "infrastructure", + "verified": false, + "score": 60, + "grade": "C", + "tags": [ + "infrastructure", + "terraform" + ], + "signals": { + "readme": true, + "exampleAssets": 0, + "testAssets": 0, + "verifyWorkflow": true, + "releaseWorkflow": true, + "scorecardWorkflow": true, + "semver": true, + "docsGood": true + } + }, + { + "name": "turbo-package", + "kind": "composition", + "path": "compositions/turbo-package", + "description": "Verify a shared package in a pnpm and Turbo monorepo", + "category": "developer-experience", + "verified": false, + "score": 60, + "grade": "C", + "tags": [ + "developer-experience", + "package", + "turbo" + ], + "signals": { + "readme": true, + "exampleAssets": 0, + "testAssets": 0, + "verifyWorkflow": true, + "releaseWorkflow": true, + "scorecardWorkflow": true, + "semver": true, + "docsGood": true + } + }, + { + "name": "workspace", + "kind": "composition", + "path": "compositions/workspace", + "description": "Workspace-backed provider smoke jobs", + "category": "developer-experience", + "verified": false, + "score": 60, + "grade": "C", + "tags": [ + "developer-experience", + "workspace" + ], + "signals": { + "readme": true, + "exampleAssets": 0, + "testAssets": 0, + "verifyWorkflow": true, + "releaseWorkflow": true, + "scorecardWorkflow": true, + "semver": true, + "docsGood": true + } + } + ], + "blueprints": [ + { + "name": "edge-worker-platform", + "kind": "blueprint", + "path": "blueprints/edge-worker-platform", + "description": "Edge-worker delivery with workspace verification, Terraform foundations, and deploy overlays.", + "uses": [ + "workspace", + "terraform", + "cloudflare-worker", + "helm-values", + "Worker validation and deployment", + "Infra validation", + "Environment configuration overlays" + ], + "verified": true, + "score": 80, + "grade": "A" + }, + { + "name": "nextjs-cloudflare", + "kind": "blueprint", + "path": "blueprints/nextjs-cloudflare", + "description": "Next.js monorepo delivery on Cloudflare with Terraform-managed Pages resources.", + "uses": [ + "workspace", + "turbo-package", + "cloudflare-pages-turbo", + "cloudflare-pages-terraform", + "Shared workspace validation", + "Monorepo package verification", + "Git-backed Pages provisioning", + "Edge-hosted frontend delivery" + ], + "verified": true, + "score": 80, + "grade": "A" + } + ] + } +} diff --git a/scripts/generate-readme.sh b/scripts/generate-readme.sh new file mode 100755 index 0000000..3a6f27d --- /dev/null +++ b/scripts/generate-readme.sh @@ -0,0 +1,89 @@ +#!/usr/bin/env bash +set -euo pipefail + +repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +check_mode="${1:-}" + +python3 - "$repo_root" "$check_mode" <<'PY' +from pathlib import Path +import re +import sys + +root = Path(sys.argv[1]) +check_mode = sys.argv[2] == "--check" +dirty: list[str] = [] + + +def extract(pattern: str, text: str) -> str: + match = re.search(pattern, text, re.MULTILINE) + if not match: + raise SystemExit(f"missing pattern: {pattern!r}") + return match.group(1).strip() + + +def write_or_check(path: Path, content: str) -> None: + normalized = content.rstrip() + "\n" + current = path.read_text() if path.exists() else None + if current == normalized: + return + dirty.append(str(path.relative_to(root))) + if not check_mode: + path.parent.mkdir(parents=True, exist_ok=True) + path.write_text(normalized) + + +for contract in sorted((root / "compositions").glob("*/compositions.yaml")): + text = contract.read_text() + name = extract(r"^ name:\s*(.+)$", text) + description = extract(r"^ description:\s*(.+)$", text) + comp_dir = contract.parent + + readme = f"""# {name} + +`{name}` is an exported Orun composition in the Sumo Platform Ops catalog. + +## Purpose + +{description} + +## Contract + +- **Type:** `{name}` +- **Path:** `{comp_dir.relative_to(root)}` +- **Definition:** `compositions.yaml` + +## Catalog status + +This folder is intentionally self-contained so examples, smoke coverage, and future registry metadata can live beside the composition contract. + +## Next steps + +- add runnable example assets under `examples/` +- add composition-specific smoke coverage under `tests/` +- keep the contract description in `compositions.yaml` aligned with the repo scorecard +""" + + examples_readme = f"""# Examples for {name} + +Put consumer-facing example assets for `{name}` here. + +The scorecard only counts example assets beyond this placeholder README. +""" + + tests_readme = f"""# Tests for {name} + +Put composition-specific smoke tests or validation fixtures for `{name}` here. + +The scorecard only counts test assets beyond this placeholder README. +""" + + write_or_check(comp_dir / "README.md", readme) + write_or_check(comp_dir / "examples" / "README.md", examples_readme) + write_or_check(comp_dir / "tests" / "README.md", tests_readme) + +if check_mode and dirty: + print("Generated composition docs are stale:") + for item in dirty: + print(f" - {item}") + raise SystemExit(1) +PY diff --git a/scripts/score.sh b/scripts/score.sh new file mode 100755 index 0000000..3a7185a --- /dev/null +++ b/scripts/score.sh @@ -0,0 +1,196 @@ +#!/usr/bin/env bash +set -euo pipefail + +repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +check_mode="${1:-}" + +python3 - "$repo_root" "$check_mode" <<'PY' +from pathlib import Path +import json +import re +import sys + +root = Path(sys.argv[1]) +check_mode = sys.argv[2] == "--check" + +stack_text = (root / "stack.yaml").read_text() +stack_name = re.search(r"(?m)^ name:\s*(.+)$", stack_text).group(1).strip() +stack_title = re.search(r"(?m)^ title:\s*(.+)$", stack_text).group(1).strip() +stack_version = re.search(r"(?m)^ version:\s*(.+)$", stack_text).group(1).strip() +semver = bool(re.fullmatch(r"\d+\.\d+\.\d+", stack_version)) + +verify_exists = (root / ".github/workflows/verify.yml").exists() +release_exists = (root / ".github/workflows/release.yml").exists() +scorecard_exists = (root / ".github/workflows/scorecard.yml").exists() + + +def extract(pattern: str, text: str) -> str: + match = re.search(pattern, text, re.MULTILINE) + if not match: + raise SystemExit(f"missing pattern: {pattern!r}") + return match.group(1).strip() + + +def category_for(name: str) -> str: + if "terraform" in name and "cloudflare-pages" in name: + return "platform" + if "cloudflare-pages" in name: + return "hosting" + if "cloudflare-worker" in name: + return "edge" + if name.startswith("terraform"): + return "infrastructure" + if name.startswith("helm"): + return "kubernetes" + return "developer-experience" + + +def tags_for(name: str) -> list[str]: + tags = set(name.split("-")) + tags.add(category_for(name)) + if "cloudflare" in name: + tags.add("cloudflare") + if "turbo" in name: + tags.add("turbo") + return sorted(tags) + + +def grade_for(score: int) -> str: + if score >= 90: + return "A+" + if score >= 80: + return "A" + if score >= 65: + return "B" + if score >= 50: + return "C" + return "D" + + +def docs_good(readme: Path) -> bool: + return readme.exists() and len(readme.read_text().strip()) >= 240 + + +def count_assets(directory: Path) -> int: + if not directory.exists(): + return 0 + return sum(1 for path in directory.rglob("*") if path.is_file() and path.name.lower() != "readme.md") + + +compositions = [] +for contract in sorted((root / "compositions").glob("*/compositions.yaml")): + text = contract.read_text() + name = extract(r"^ name:\s*(.+)$", text) + description = extract(r"^ description:\s*(.+)$", text) + comp_dir = contract.parent + readme = comp_dir / "README.md" + example_assets = count_assets(comp_dir / "examples") + test_assets = count_assets(comp_dir / "tests") + + score = 0 + if readme.exists(): + score += 10 + if example_assets: + score += 15 + if test_assets: + score += 25 + if verify_exists and release_exists: + score += 20 + if semver: + score += 10 + if docs_good(readme): + score += 10 + if scorecard_exists: + score += 10 + + grade = grade_for(score) + compositions.append( + { + "name": name, + "kind": "composition", + "path": str(comp_dir.relative_to(root)), + "description": description, + "category": category_for(name), + "verified": score >= 80, + "score": score, + "grade": grade, + "tags": tags_for(name), + "signals": { + "readme": readme.exists(), + "exampleAssets": example_assets, + "testAssets": test_assets, + "verifyWorkflow": verify_exists, + "releaseWorkflow": release_exists, + "scorecardWorkflow": scorecard_exists, + "semver": semver, + "docsGood": docs_good(readme), + }, + } + ) + + +blueprints = [] +for blueprint in sorted((root / "blueprints").glob("*/blueprint.yaml")): + text = blueprint.read_text() + name = extract(r"^ name:\s*(.+)$", text) + summary = extract(r"^ summary:\s*(.+)$", text) + uses = re.findall(r"(?m)^ -\s*(.+)$", text) + bp_dir = blueprint.parent + readme = bp_dir / "README.md" + example_assets = count_assets(bp_dir / "examples") + + score = 0 + if readme.exists(): + score += 10 + if len(uses) >= 2: + score += 20 + if example_assets: + score += 15 + if verify_exists and release_exists: + score += 20 + if semver: + score += 10 + if docs_good(readme): + score += 10 + if scorecard_exists: + score += 10 + + blueprints.append( + { + "name": name, + "kind": "blueprint", + "path": str(bp_dir.relative_to(root)), + "description": summary, + "uses": uses, + "verified": score >= 80, + "score": score, + "grade": grade_for(score), + } + ) + + +index = { + "stack": { + "name": stack_name, + "title": stack_title, + "version": stack_version, + "oci": f"oci://ghcr.io/sourceplane/{stack_name}:{stack_version}", + }, + "catalog": { + "compositions": compositions, + "blueprints": blueprints, + }, +} + +rendered = json.dumps(index, indent=2, sort_keys=False) + "\n" +index_path = root / "registry/index.json" +current = index_path.read_text() if index_path.exists() else None + +if check_mode: + if current != rendered: + print("registry/index.json is stale") + raise SystemExit(1) +else: + index_path.parent.mkdir(parents=True, exist_ok=True) + index_path.write_text(rendered) +PY diff --git a/scripts/verify.sh b/scripts/verify.sh new file mode 100755 index 0000000..84e0157 --- /dev/null +++ b/scripts/verify.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash +set -euo pipefail + +repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +cd "$repo_root" + +./scripts/generate-readme.sh --check +./scripts/score.sh --check + +stack_version="$(awk '/^ version: /{print $2}' stack.yaml)" +test -n "$stack_version" + +kiox -- orun publish "ghcr.io/sourceplane/sumo-platform-ops-stack:${stack_version}" \ + --dry-run \ + --root . \ + --version "$stack_version" diff --git a/stack.yaml b/stack.yaml index 3761b62..d5721e1 100644 --- a/stack.yaml +++ b/stack.yaml @@ -3,14 +3,16 @@ kind: Stack metadata: name: sumo-platform-ops-stack title: Sumo Platform Ops Stack - version: 0.9.3 - description: Versioned OCI-hosted platform compositions for Sourceplane repositories. + version: 0.10.0 + description: Versioned OCI-hosted catalog of platform compositions and blueprints for Sourceplane repositories. owner: sourceplane tags: - terraform - helm - cloudflare - platform + - catalog + - blueprints registry: host: ghcr.io namespace: sourceplane