Skip to content

Portable Linux node installer shared by managed runtime modes (OSS-379) - #529

Merged
athNdev merged 2 commits into
mainfrom
codex/node-installer
Nov 18, 2026
Merged

athNdev merged 2 commits into
mainfrom
codex/node-installer

Conversation

@athNdev

@athNdev athNdev commented Nov 18, 2026

Copy link
Copy Markdown
Owner

Summary

One portable, mode-agnostic guest installer shared by all managed Carbon Panel runtime modes (host-native private daemon, QCOW2 VM, unprivileged LXC). No provider-specific integration; this is also the supported fallback wherever an image format is unqualified. The shared ADR 0019 enrollment/control contract (PR516/517/518) is consumed, not forked — no proto, generated code, DB migration or enrollment-server file is touched.

What it does

  • Unique first-boot identity — one Ed25519 key + UUID node ID per state dir; idempotent; mismatch is an integrity failure, never key regeneration.
  • Scoped secret-free enrollment bundle — CSR_PRE + approved SPKI/fingerprint + salt/digest, filling the generated CreateEnrollmentRequest/ClaimEnrollmentRequest. S stays in a 0600 state file and appears in exactly one claim; a fresh challenge-bound signature over the exact ADR context is required and replay is refused.
  • Persistent volume import/backup/recovery — bind-only import, verified snapshot into a new dir, verified copy-back that never deletes unrelated data.
  • Repeatable artifact upgrade/rollback — manifest + per-file SHA-256 + optional Ed25519 signature verified before promotion; two slots + atomic state file; undo verified before rollback; journal recovery for interrupted promotion.
  • Secret-free metadata — bundle/create-request/identity JSON assert-tested free of S, private key and raw key bytes.
  • Dry-run-by-default wrapper; all paths caller-supplied; no global host config, service, socket, network or app release.

Exported interface for sibling lanes

  • Go package internal/nodeinstall (functions + sentinel refusal errors).
  • CLI scripts/install-node.sh <verb> [flags] [--apply] over cmd/carbon-node-installer.

Verification

  • go test ./... — full suite green.
  • go vet + gofmt — clean on touched packages.
  • python scripts/test_node_installer_fixture.py — 5/5 offline end-to-end fixtures; wrapper parsed with tree-sitter-bash.
  • go run ./cmd/knowledge-lint -root . — clean, 38/38 queries, 65 concepts.
  • No live host, hypervisor/LXC import/boot, production enrollment handler or artifact publication is claimed (M3 disposable fixtures only).

Scope

OSS-379 artifact lane. No merge, release or registry push. Coordinates with other mode lanes only through exported interfaces.

…S-379)

One guest-side installer for host-native, QCOW2 VM and unprivileged LXC modes;
no provider-specific integration and no fork of the shared ADR 0019 contract.

- internal/nodeinstall: first-boot identity, scoped secret-free enrollment
  bundle using the generated CreateEnrollmentRequest/ClaimEnrollmentRequest,
  challenge-bound claim with replay refusal, artifact integrity/upgrade/
  rollback with journal recovery, and persistent volume import/backup/recovery.
- cmd/carbon-node-installer + scripts/install-node.sh: dry-run-by-default CLI
  over caller-owned directories; no global host config, service or socket use.
- docs + knowledge concept; offline Go (9) and Python (5) fixtures.

Verification: go test/vet touched and full suite, 5/5 Python fixtures,
tree-sitter-bash syntax, gofmt, knowledge-lint 38/38. No live host or release.
…SS-379)

Post-merge alignment with native-daemon PR527 findings:
- internal/nodeinstall/daemon.go: in-memory disposable daemon renderer with one
  source of options (config.json only; unit carries --config-file), per-user
  rootless launcher and explicit root rootful service with a non-empty capability
  bound. Fail-closed spec validation keeps all paths caller-owned.
- DaemonRenderer/SetDaemonRenderer seam lets the native lane's canonical
  renderer replace the local one without changing callers, CLI or fixtures.
- render-daemon CLI verb (read-only) plus 4 Go and 1 Python offline fixture.

CI Backend Lint & Vet (run 44268893350) errcheck findings fixed explicitly:
deferred closes wrapped, intentional error-path cleanup ignores made explicit,
and test writeJSON errors asserted.

Verification: pinned golangci-lint v2.13.2 under Go 1.26.11 new-issues=0,
go vet ./... exit 0, go test ./... exit 0, 6/6 Python fixtures, knowledge-lint
38/38, gofmt clean. No live host, release or registry write.
@athNdev
athNdev merged commit ee80004 into main Nov 18, 2026
12 checks passed
@athNdev
athNdev deleted the codex/node-installer branch November 18, 2026 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant