Repository navigation
docs(operate): the single-VM page moves to the docs, with a teardown - #911
Conversation
Step 5 of the docs migration, second path: deploy/vm/README.md becomes docs/operate/harness/single-vm.md; the README keeps its title, banner and a pointer. - New "Tear it down" section: there is no uninstall script, so it reverses what setup-vm.sh installs -- the four units and the control plane's credential drop-ins, the inet moca_sandbox nftables table (the firewall unit has no stop action), the sh-redis and sh-sandbox-N containers and the moca-sandbox network, the moca-redis volume and the file credential store (the data, with a back-up warning), and /etc/serverless-harness; optionally the harness user, the checkout and the images. podman-restart.service stays enabled, as other containers may need it. - The banner uses the Preview template, its known limits pointing at "What round one does not claim"; its old "no upgrade or backup guide" was stale (the page has "Upgrading an existing VM"). P6 is glossed on first use. - setup-vm.sh's operator messages, the env example and research-smoke.sh name the docs page instead of the README, and the two deploy tests that read the README's text (the research prompt block, Redis persistence) read the page. Every line of the old README is on the page but the stale banner and the reworded first sentence. Assisted-By: Claude (Anthropic AI) <[email protected]> Signed-off-by: Paolo Dettori <[email protected]>
ingpaolodettori-dev
left a comment
There was a problem hiding this comment.
Review — docs: the single-VM page moves to the docs, with a teardown
Docs move of deploy/vm/README.md into docs/operate/harness/single-vm.md (step 2 of the path series, on top of #910), plus a new Tear it down section and the comment/link updates in deploy/vm/ and the docs that pointed at the README's sections.
Verified
- Nothing lost: all 728 non-blank lines of the old README appear in the new page or the 8-line README, apart from 4 lines that changed deliberately (the Preview banner now links What round one does not claim; the P6/P4 glosses; two P4 link paths). Every old
##section is in the page, in the same order. - Teardown checked against the scripts (new content, so worth checking): four unit names match
deploy/vm/systemd/,/etc/systemd/system/sh-control-plane.service.dis the drop-in dirsetup-vm.shwrites (:876),nft delete table inet moca_sandboxmatches the tablesetup-vm.shcreates,sh-redis/moca-redis/moca-sandbox/docker.io/valkey/valkey:9-alpineare the names and image it uses, two sandboxes isSH_SANDBOX_COUNT's default (:70),/var/lib/moca-control-planeisSH_CREDENTIAL_DIR's default (:775),/etc/serverless-harnessisSH_ENV_DIR(:68), andpodman-restart.serviceis enabled at :517. - The two updated shell suites pass locally at this head:
deploy/vm/tests/research-smoke.test.sh(reads the prompt from the page now: "the single-VM docs page holds exactly one text block", and the prompt matchesresearch_prompt) anddeploy/vm/tests/setup-vm.test.sh(Redis-persistence grep now targets the page). - Checks:
make check-links→ 232 files, 0 broken;scripts/check-docs-publish.sh→ 79 published files, clean. CI: 14 green, 2 pending (check,deploy-scripts);docs,lintand the site build are green. - Base:
3e7065c9is current main (the #910 merge), so thecompose.md/operate/index.mdedits land on the moved pages correctly.
One record-keeping point (not blocking). docs/REORG-PLAN.md:426 still says deploy/vm/README.md "keep; extract config/ops content", where #910's follow-up updated the compose row to record its move; and :457 still names the README's "Configuration not in shipped env files" as a source for reference/configuration.md, which is now § Configuration not in the shipped env files on the new page.
Author: pdettori (MEMBER — maintainer). Agent/IDE config: none. Commits: 1, signed off. CI: 14 passing, 2 pending.
| Its index is in Redis on `127.0.0.1:6379`, unauthenticated, so anyone with a shell or an | ||
| unrestricted SSH forward on the VM can rewrite it. Restrict non-operator SSH accounts ("Reaching | ||
| it"). | ||
| **How to install, run, upgrade and tear down a single-VM deployment** is on the documentation site: |
There was a problem hiding this comment.
suggestion: the sections this file used to hold are now only on the new page, but several plain-text references elsewhere still send readers to deploy/vm/README.md for them (they are not links, so check-links cannot see them):
deploy/k8s/README.md:118— "The GitHub OAuth app"deploy/microvm/P4-ON-P6.md:764— "Redis persistence" (and :90/:92 send readers to the README as the install path)docs/demos/vm-two-user-acceptance.md:49— "The GitHub OAuth app"docs/demos/vm-multi-user-demo.md:76— "Bring it up" and "The GitHub OAuth app";:170— "A research turn";:356— "The prompt isdeploy/vm/README.md's"docs/harness/how-to/use-mocactl.md:349— "The control plane"
This PR already fixed the same class of reference in deploy/vm/env/*.example, setup-vm.sh and research-smoke.sh, so these look like the remaining set. Pointing them at docs/operate/harness/single-vm.md keeps the pointer page from being a dead end.
There was a problem hiding this comment.
Fixed in 2870260, all six:
deploy/k8s/README.md:118now links Single VM.deploy/microvm/P4-ON-P6.md:90, :92 and :764 now namedocs/operate/harness/single-vm.md(the install path, and "Redis persistence").docs/demos/vm-two-user-acceptance.md:49anddocs/demos/vm-multi-user-demo.md(:25, :76, :170, :356) now link the page, with#a-research-turn-curl-and-git-in-the-sandbox/#the-github-oauth-appwhere they name a section.docs/harness/how-to/use-mocactl.md:349now links Single VM.
I also pointed the root README's Status table at the Compose and Single VM pages. After this, git grep deploy/vm/README outside the design records finds only the REORG-PLAN history.
| `v0.5.1` (`docs/demos/vm-two-user-acceptance.md`, #407). On the credential side `multi` no longer | ||
| refuses async turns from this release, provided the control plane carries the grant ring and the | ||
| inference listener; `setup-vm.sh` configures neither, so enabling `multi` is three deliberate | ||
| edits to `/etc/moca/control-plane.env` and a `systemctl restart moca-control-plane`: |
There was a problem hiding this comment.
suggestion (pre-existing, but this is the page's home now): this line names /etc/moca/control-plane.env and systemctl restart moca-control-plane, while the page's own The control plane section and deploy/vm/setup-vm.sh use /etc/serverless-harness/control-plane.env (SH_ENV_DIR, setup-vm.sh:68) and sh-control-plane.service (the unit in deploy/vm/systemd/, enabled at :1229). An operator following this bullet edits a file that does not exist and restarts a unit that does not exist. Worth correcting in this move.
There was a problem hiding this comment.
Fixed in 2870260: "three deliberate edits to /etc/serverless-harness/control-plane.env and a systemctl restart sh-control-plane.service". That matches SH_ENV_DIR (setup-vm.sh:68), the unit in deploy/vm/systemd/ and the rest of the page. It's the contradiction the docs audit listed as #11, so it's good to have it gone.
…file and unit, REORG-PLAN)
- The plain-text pointers to deploy/vm/README.md's sections, which
check-links cannot see, now name the Single VM page (linked, with the
section's anchor where it is a link): deploy/k8s/README.md ("The
GitHub OAuth app"), deploy/microvm/P4-ON-P6.md (the install path and
"Redis persistence"), the two VM demos ("Bring it up", "The GitHub
OAuth app", "A research turn", the prompt), and Use mocactl ("The
control plane"). The root README's Status table links the Compose and
Single VM pages too.
- single-vm.md: enabling MOCA_TENANCY=multi named /etc/moca/control-
plane.env and moca-control-plane, neither of which exists; it is
/etc/serverless-harness/control-plane.env (SH_ENV_DIR) and
sh-control-plane.service, as the rest of the page and setup-vm.sh say.
- REORG-PLAN.md: the deploy/vm row records the move, and the
configuration reference's source names the page's section.
Assisted-By: Claude (Anthropic AI) <[email protected]>
Signed-off-by: Paolo Dettori <[email protected]>
|
On the record-keeping point: done in 2870260.
Both are same-width cells, so it's a two-line diff with no table reflow. From a clean clone: 232 files, 0 broken links; publish check 79 files; site build 57 pages. |
Summary
This is step 5 of the docs migration, second path: the single VM, following #910 (Compose).
deploy/vm/README.mdbecomesdocs/operate/harness/single-vm.mdunder Deploy and operate › Harness. The README keeps its title, banner and a pointer, which is the conventionCONTRIBUTING-DOCS.mdnow states.setup-vm.shinstalls, each taken from the script:systemctl disable --nowfor the four units (sh-supervisor,sh-control-plane,sh-relay,moca-sandbox-firewall), then remove the unit files andsh-control-plane.service.d(the credential drop-ins), anddaemon-reload.nft delete table inet moca_sandbox. The firewall unit is a oneshot with no stop action, so disabling it leaves the table in place.podman rm -f sh-redis sh-sandbox-0 … sh-sandbox-<SH_SANDBOX_COUNT-1>, thenpodman network rm moca-sandbox.moca-redisvolume (sessions) and the file credential store (SH_CREDENTIAL_DIR, by default/var/lib/moca-control-plane)./etc/serverless-harness: env files, relay token, control-plane keys andmoca-sandbox.nft.harnessuser (which the operator created), the checkout and the images.podman-restart.serviceis left enabled, since other containers may rely on it.setup-vm.sh's runtime messages ("Redis persistence", "The control plane"),control-plane.env.exampleandresearch-smoke.shnow name the docs page instead of the README.research-smoke.test.sh(the research-prompt block) andsetup-vm.test.sh(Redis persistence documented) used to read the README's text; they now read the page.docs/, and anchors into moved sections, follow the move.Content check. Every line of the old README is on the page, except the stale banner and the reworded first sentence.
Not verified: I haven't run the teardown on a VM. It's derived from reading
setup-vm.sh. It would be worth one pass on a scratch host before relying on it, and I'd fold any correction into the page.Testing
deploy/vm/tests/setup-vm.test.sh: all tests passed.deploy/vm/tests/research-smoke.test.sh: all tests passed, also under macOS bash 3.2.make check-links: 232 files, 0 broken links;scripts/check-docs-publish.sh: 79 files;scripts/check-docs-site.sh: 57 pages, no broken links or anchors.bash -npasses on the edited scripts.Assisted-By: Claude Code