Repository navigation
docs: complete the Knative migration guide (PR 2 of REORG-PLAN) - #489
Conversation
ingpaolodettori-dev
left a comment
There was a problem hiding this comment.
Docs-only follow-up to #485. The new sections (async/cron, the configuration table, mocactl, rollback) check out against the code at d283a64: the Knative service.yaml variable list, the VM env templates, setup-vm.sh's three systemd-credential secrets, the install script (Node 22+, MOCACTL_VERSION/MOCACTL_INSTALL_DIR), GET /v1/discovery, the mocactl-quickstart make target, the P6 spec's §2.2 table and §8 scope line, and ADR-0034/0041's "no P6 equivalent yet" wording. The rollback claim holds: both paths reach Redis through @moca/harness → @moca/session-backend. Approving with a few accuracy suggestions inline.
Stacking: the body says this is independent of #488, but this branch includes #488's commit (abcf143 is ee68e35 rebased onto main; git range-diff shows =). I reviewed only d283a64. Merge #488 first, or this PR merges #488's changes along with it.
Answers to "Please check":
SH_SESSION_TOKEN_PUBLIC_KEYS/SH_CONTROL_PLANE_URLon the VM supervisor: both are already handled.supervisor.env.exampleshipsSH_CONTROL_PLANE_URL=http://127.0.0.1:8090(loopback to the control plane), andsetup-vm.shwritesSH_SESSION_TOKEN_PUBLIC_KEYSon the run that generates the keypair. Neither needs operator action, and the row could say so.SH_MODELdoes carry over: see the inline comment.
Author: pdettori (MEMBER, maintainer). 2 commits, both DCO signed off. All 14 checks pass.
| What that means for you: | ||
|
|
||
| - **Stay on the deprecated path for those workloads** until a P6 equivalent is announced, and say | ||
| so in the [migration discussion](https://github.com/rossoctl/moca/discussions): removal waits for |
There was a problem hiding this comment.
suggestion — This is a third link to GitHub Discussions, which are still disabled on rossoctl/moca (has_discussions: false). We raised this on #485 for lines 9 and 182, and #485 merged with them unchanged. Removal is gated on users saying they've moved or that they depend on A/C, so this is the guide's only feedback channel and it currently 404s. Either enable Discussions, or point all three links at a pinned tracking issue.
| remaining users to migrate, and a dependency on A or C is exactly the case that moves the date. | ||
| - **Interactive turns can move first.** The two deployments share only Redis and the session | ||
| schema is the same, so running P6 for `/turn` traffic while async and cron stay on Knative is the | ||
| intended shape of "bring the P6 side up in parallel" above. The repo's smoke tests do not |
There was a problem hiding this comment.
nit — "bring the P6 side up in parallel" is in Bring-up step 1, which is below this section (line ~166), not above. The same goes for "step 4 of Bring-up" in Rolling back.
| | `REDIS_URL` | Unchanged (`supervisor.env.example`: "inherited unchanged"). Point it at the same Redis to keep sessions. | | ||
| | `KAGENTI_SANDBOX_POD` | Not used by the supervisor template. Sandboxes are discovered from relay records: `SH_SANDBOX_DISCOVERY=records` and `SH_REMOTE_SANDBOX=1`. | | ||
| | `KAGENTI_SANDBOX_POOL_SELECTOR` | Still present in the supervisor template (`app=sandbox`), together with `KAGENTI_SANDBOX_CAP`. | | ||
| | `SH_REQUIRE_AUTH`, `SH_EXCHANGE_TOKEN`, `SH_SESSION_TOKEN_PUBLIC_KEYS`, `SH_CONTROL_PLANE_URL` | Same names. On a VM, `setup-vm.sh` generates the secrets (`SH_SESSION_TOKEN_PRIVATE_KEY`, `SH_CREDENTIAL_KEK`, `SH_EXCHANGE_TOKEN`) as systemd credentials; setting one in the env file as well makes the control plane refuse to boot. | |
There was a problem hiding this comment.
nit — Two small precision points. (1) For the supervisor, the boot refusal comes from the workers: supervisor.env.example says setting SH_EXCHANGE_TOKEN there "makes the workers refuse to boot", while the control plane refuses for its own env file. (2) On the VM, SH_SESSION_TOKEN_PUBLIC_KEYS is written by setup-vm.sh and SH_CONTROL_PLANE_URL is preset to loopback in the template, so operators don't carry these two over by hand. That also answers the PR's open question.
| | `KAGENTI_SANDBOX_POD` | Not used by the supervisor template. Sandboxes are discovered from relay records: `SH_SANDBOX_DISCOVERY=records` and `SH_REMOTE_SANDBOX=1`. | | ||
| | `KAGENTI_SANDBOX_POOL_SELECTOR` | Still present in the supervisor template (`app=sandbox`), together with `KAGENTI_SANDBOX_CAP`. | | ||
| | `SH_REQUIRE_AUTH`, `SH_EXCHANGE_TOKEN`, `SH_SESSION_TOKEN_PUBLIC_KEYS`, `SH_CONTROL_PLANE_URL` | Same names. On a VM, `setup-vm.sh` generates the secrets (`SH_SESSION_TOKEN_PRIVATE_KEY`, `SH_CREDENTIAL_KEK`, `SH_EXCHANGE_TOKEN`) as systemd credentials; setting one in the env file as well makes the control plane refuse to boot. | | ||
| | `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, `ANTHROPIC_BASE_URL` | Inference credentials are per user, issued by the control plane. An operator-wide key is opt-in: `SH_ALLOW_OPERATOR_FALLBACK=true` with `SH_DEFAULT_INFERENCE_ENDPOINT` (`control-plane.env.example`; `deploy/vm/README.md`, "The operator-key fallback"). | |
There was a problem hiding this comment.
suggestion — This row doesn't say where the operator's actual key goes, and that's what someone migrating an ANTHROPIC_API_KEY most needs. Per deploy/vm/README.md ("The operator-key fallback"), it becomes the operator-inference-token credential file (SH_OPERATOR_INFERENCE_TOKEN, 0600, loaded via LoadCredential=), never an env line. An Anthropic API key also needs SH_DEFAULT_INFERENCE_ENDPOINT=https://api.anthropic.com plus SH_OPERATOR_INFERENCE_HEADER=x-api-key, or the control plane refuses to boot. ANTHROPIC_BASE_URL has no single equivalent: it maps to SH_DEFAULT_INFERENCE_ENDPOINT for the fallback, and to per-user endpoints otherwise.
| | `SH_REQUIRE_AUTH`, `SH_EXCHANGE_TOKEN`, `SH_SESSION_TOKEN_PUBLIC_KEYS`, `SH_CONTROL_PLANE_URL` | Same names. On a VM, `setup-vm.sh` generates the secrets (`SH_SESSION_TOKEN_PRIVATE_KEY`, `SH_CREDENTIAL_KEK`, `SH_EXCHANGE_TOKEN`) as systemd credentials; setting one in the env file as well makes the control plane refuse to boot. | | ||
| | `ANTHROPIC_API_KEY`, `ANTHROPIC_AUTH_TOKEN`, `ANTHROPIC_BASE_URL` | Inference credentials are per user, issued by the control plane. An operator-wide key is opt-in: `SH_ALLOW_OPERATOR_FALLBACK=true` with `SH_DEFAULT_INFERENCE_ENDPOINT` (`control-plane.env.example`; `deploy/vm/README.md`, "The operator-key fallback"). | | ||
| | `LEAF_RESULT_TTL_SECONDS` | Read only by the async entrypoints (`server.ts`, `leaf-job.ts`); no P6 counterpart while async has no P6 equivalent. | | ||
| | _(none)_ | New and required on VM: `SH_TURNS_PER_WORKER` (no default), `SH_RELAY_ADDR`, `SH_RELAY_TOKEN`, `MOCA_RELAY_EXEC_TOKEN`, `SH_GITHUB_CLIENT_ID`, `SH_PUBLIC_HARNESS_URL`. Optional: `SH_WORKERS`, `SH_ROUTING_POLICY`. | |
There was a problem hiding this comment.
nit — MOCA_RELAY_EXEC_TOKEN is required, but setup-vm.sh generates it into both relay.env and supervisor.env when it's absent, so it isn't something the operator sets. Also, SH_RELAY_TOKEN lives in relay.env and must match each worker's SANDBOX_TOKEN. Naming the file for each variable would help.
| | `LEAF_RESULT_TTL_SECONDS` | Read only by the async entrypoints (`server.ts`, `leaf-job.ts`); no P6 counterpart while async has no P6 equivalent. | | ||
| | _(none)_ | New and required on VM: `SH_TURNS_PER_WORKER` (no default), `SH_RELAY_ADDR`, `SH_RELAY_TOKEN`, `MOCA_RELAY_EXEC_TOKEN`, `SH_GITHUB_CLIENT_ID`, `SH_PUBLIC_HARNESS_URL`. Optional: `SH_WORKERS`, `SH_ROUTING_POLICY`. | | ||
|
|
||
| `SH_MODEL` has no mapping verified here; check the destination README before assuming it carries over. |
There was a problem hiding this comment.
suggestion — SH_MODEL does carry over. harness/src/run-turn.ts:356 reads config?.model ?? env.SH_MODEL ?? 'claude-opus-4-8' in the P6 workers. Compose passes it to the supervisor (docker-compose.yml, covered by compose.test.sh), and the kind-ci overlay sets it on the supervisor. Suggest moving it into the table as "Same name, set on the supervisor (a session's config bundle overrides it)". The same applies to the SH_MODEL_* family.
| deprecated along with the rest of `deploy/knative/`. The P6 equivalents are the Compose and VM | ||
| READMEs above. | ||
|
|
||
| ## Rolling back |
There was a problem hiding this comment.
nit — Rolling back and Status log sit between "What carries over" and Bring-up, so readers meet rollback steps before the bring-up steps they refer to. Consider moving Rolling back after Bring-up / During the window, and the Status log to the end of the page.
Add what docs/migrating-from-knative.md lacked: a cron row in the mapping table, a section for users who depend on async fan-out or the CronJob (no P6 equivalent yet; stated as such, no workaround invented), a configuration mapping limited to verified variables, mocactl guidance, rollback steps and a status log. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
- Name the operator-key path (credential file, endpoint, header) and the file each required relay/supervisor/control-plane variable lives in. - Note which secrets and URLs setup-vm.sh sets for you, and that workers refuse to boot on SH_EXCHANGE_TOKEN in supervisor.env. - Map SH_MODEL and SH_MODEL_PROVIDER (same names, set on the supervisor). - Order sections Bring-up, Rolling back, During the window, Status log, and link the forward/backward references. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
d283a64 to
8c8cb53
Compare
GitHub Discussions are disabled on this repo, so the three feedback links in the migration guide 404ed. Repoint them at the pinned tracking issue. Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
Complete the Knative/KEDA migration guide (PR 2 of the docs reorg)
Extends
docs/migrating-from-knative.md, the single deprecation/migration page from #485. Docs only. Independent of the docs-hygiene PR (#488); it touches only this file.Added
service.yamlvariables mapped to the P6 templates (deploy/vm/env/*.env.example), limited to what is verified;SH_MODELis called out as unmapped.mocactlguidance: point clients at the control plane (discovery), install command, device-flow login, and that the Knative quick start is deprecated.Please check
docs/REORG-PLAN.md.SH_SESSION_TOKEN_PUBLIC_KEYSandSH_CONTROL_PLANE_URLalso need setting on the VM supervisor; I only verified the three systemd-credential secrets.Verification
Prettier run; relative links in the file resolve.
make lintnot run (worktree withoutnode_modules).Assisted-By: Claude (Anthropic AI) noreply@anthropic.com
Update after review
main; this PR now touches onlydocs/migrating-from-knative.mdand is independent of docs: hygiene pass after ADR-0041 (PR 1 of REORG-PLAN) #488.