@rizom/ops 0.2.0-alpha.371 → 0.2.0-alpha.372
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -1
- package/dist/brains-ops.js +2 -2
- package/dist/deploy.js +33 -21
- package/dist/entries/deploy.d.ts +1 -0
- package/dist/image-inventory.d.ts +4 -0
- package/dist/image-types.d.ts +7 -0
- package/dist/images.d.ts +8 -10
- package/dist/index.js +173 -161
- package/package.json +1 -1
- package/templates/rover-pilot/.github/workflows/build.yml +2 -2
- package/templates/rover-pilot/.github/workflows/deploy.yml +3 -0
- package/templates/rover-pilot/README.md +1 -1
- package/templates/rover-pilot/deploy/scripts/verify-runtime-image.ts +18 -0
- package/templates/rover-pilot/docs/operator-playbook.md +15 -2
package/package.json
CHANGED
|
@@ -4,11 +4,11 @@ on:
|
|
|
4
4
|
workflow_dispatch:
|
|
5
5
|
inputs:
|
|
6
6
|
brain_version:
|
|
7
|
-
description:
|
|
7
|
+
description: Build one Brain version with the full fleet package union
|
|
8
8
|
required: false
|
|
9
9
|
type: string
|
|
10
10
|
site_packages:
|
|
11
|
-
description: "
|
|
11
|
+
description: "Extra exact site/theme package pins for an explicit build. All builds include the full fleet package union; conflicting pins are rejected."
|
|
12
12
|
required: false
|
|
13
13
|
type: string
|
|
14
14
|
overwrite:
|
|
@@ -30,7 +30,7 @@ The repo also checks in its deploy contract:
|
|
|
30
30
|
|
|
31
31
|
`.env.schema` is the single source of truth for required and sensitive deploy vars.
|
|
32
32
|
Use separate GitHub tokens: `CONTENT_REPO_ADMIN_TOKEN` for operator-side content repo creation/checks, and `GIT_SYNC_TOKEN` for runtime directory-sync git access.
|
|
33
|
-
The fleet publishes one `brain-${brainVersion}` image per effective Brain version
|
|
33
|
+
The fleet publishes one immutable `brain-${brainVersion}` image per effective Brain version. New images install the exact site/theme package union across the entire fleet, so smoke-to-fleet promotion reuses the tested image. Build and Deploy verify installed package versions before reusing existing images.
|
|
34
34
|
When an effective brain version (`pilot.yaml.brainVersion`, or a cohort override) changes and you push, CI builds every missing version image, refreshes generated user env files, and redeploys affected users. Every external site and theme package keeps its own exact version pin; change that package set only together with a fresh Brain version so published tags remain immutable.
|
|
35
35
|
When a push changes only deploy contract files, CI prints `No affected user configs; skipping deploy.` and stops before Kamal.
|
|
36
36
|
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { loadPilotRegistry } from "@rizom/ops";
|
|
2
|
+
import {
|
|
3
|
+
requireEnv,
|
|
4
|
+
runtimeImageTag,
|
|
5
|
+
sitePackagesFor,
|
|
6
|
+
verifyRuntimeImage,
|
|
7
|
+
} from "@rizom/ops/deploy";
|
|
8
|
+
|
|
9
|
+
const handle = requireEnv("HANDLE");
|
|
10
|
+
const registry = await loadPilotRegistry(process.cwd());
|
|
11
|
+
const user = registry.users.find((entry) => entry.handle === handle);
|
|
12
|
+
if (!user) throw new Error(`Unknown fleet handle: ${handle}`);
|
|
13
|
+
|
|
14
|
+
await verifyRuntimeImage(`ghcr.io/${requireEnv("GITHUB_REPOSITORY")}`, {
|
|
15
|
+
tag: runtimeImageTag(user.brainVersion),
|
|
16
|
+
brainVersion: user.brainVersion,
|
|
17
|
+
sitePackages: sitePackagesFor(user.siteOverride),
|
|
18
|
+
});
|
|
@@ -19,7 +19,7 @@ The deploy scripts and workflows should read from that contract instead of inven
|
|
|
19
19
|
The fleet has one image topology:
|
|
20
20
|
|
|
21
21
|
- one immutable `brain-${brainVersion}` image is published for each effective Brain version
|
|
22
|
-
-
|
|
22
|
+
- every new image contains the union of exact site/theme package pins across the whole fleet, regardless of current Brain versions
|
|
23
23
|
- conflicting versions of one package fail image resolution before build
|
|
24
24
|
- generated `users/<handle>/.env` carries `BRAIN_VERSION=<brainVersion>`
|
|
25
25
|
- build and deploy derive the same effective image tag from the resolved registry
|
|
@@ -28,7 +28,7 @@ The fleet has one image topology:
|
|
|
28
28
|
|
|
29
29
|
When `pilot.yaml.brainVersion` changes and you push:
|
|
30
30
|
|
|
31
|
-
1. build publishes each missing version image with
|
|
31
|
+
1. build publishes each missing version image with the full fleet package union, and verifies existing images against their assigned instances
|
|
32
32
|
2. reconcile refreshes generated `users/<handle>/.env`
|
|
33
33
|
3. deploy runs for handles whose generated config changed
|
|
34
34
|
4. generated file commits happen once in a final aggregation step after the deploy matrix finishes
|
|
@@ -37,6 +37,19 @@ Every external site and theme package has its own exact version pin. A cohort or
|
|
|
37
37
|
pilot brain-version bump never changes those package versions implicitly; update each
|
|
38
38
|
pin deliberately from reviewed package and image evidence.
|
|
39
39
|
|
|
40
|
+
Smoke-first upgrades build the full fleet package union before promotion. Moving
|
|
41
|
+
other cohorts onto the tested Brain version then reuses that same immutable image.
|
|
42
|
+
Explicit Build dispatches also include the fleet union; `site_packages` only adds
|
|
43
|
+
extra pins and cannot replace or conflict with declared pins.
|
|
44
|
+
|
|
45
|
+
Deploy verifies the actual installed Brain and selected instance's site/theme
|
|
46
|
+
versions on the CI runner after image readiness and before provisioning or
|
|
47
|
+
container replacement. It reads manifests in a read-only, network-disabled
|
|
48
|
+
container without starting the Brain or mounting fleet data. Missing packages,
|
|
49
|
+
wrong versions, or verification failures block deployment, even on manual runs.
|
|
50
|
+
Never bypass this gate or overwrite a deployed tag to recover an older incomplete
|
|
51
|
+
image; review artifact recovery separately.
|
|
52
|
+
|
|
40
53
|
When a push changes only deploy contract files and no generated `users/<handle>/.env` or `users/<handle>/brain.yaml` files, the deploy workflow exits through its explicit no-op path and prints `No affected user configs; skipping deploy.`
|
|
41
54
|
|
|
42
55
|
They are scaffolded from `@rizom/ops`, then versioned in this repo like any other deploy contract.
|