Adds the shared kernel modules (oikos/policy.py, oikos/relations.py, oikos/ledger.py) that let every surface — CLI, MCP, context-card generator — agree on risk classification and ontology graph walks from one implementation. homelab CLI: `service <name> explain|health|docs|log|actions|history` (Service Console v0), `change preflight <service>`, `node <name> relations`. Restart and client add/remove now append change-ledger entries (ledger/*.jsonl, committed alongside the change they record). mcp/server.py mirrors explain/preflight/get_relations/get_change_history as MCP tools, card-first so agent orientation is one call instead of several search_docs/get_page round-trips. oikos/gen-topology.py now also emits a compact context card per host and service (oikos/cards/*.md) — identity, blast radius, safe actions + risk class, doc pointer, recent ledger history. runbooks/*.md: service health check, config change + deploy, client enrollment, incident investigation, and the five node lifecycle transitions (provision/activate/migrate/deprecate/destroy), each with machine-readable frontmatter (risk class, inputs, verification, docs-update checklist). Wired into HERMES.md so agents load these instead of rediscovering topology per-task. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
37 lines
1.6 KiB
Markdown
37 lines
1.6 KiB
Markdown
---
|
|
name: lifecycle-activate-node
|
|
risk_class: config_mutation
|
|
inputs: [node_name]
|
|
verification: "homelab service <name> health (if it hosts a service); homelab doctor (if it's a client)"
|
|
docs_update_checklist: [doc_page_complete]
|
|
transition: "provisioning -> active"
|
|
---
|
|
|
|
# Lifecycle: activate a node
|
|
|
|
Per [oikos/ontology.yaml](../oikos/ontology.yaml). Requires: age key
|
|
enrolled if it needs secrets, mesh joined if it needs off-LAN reach,
|
|
ingress live if public, health check answering, doc page complete,
|
|
ledger entry.
|
|
|
|
1. If the node is a `homelab` client: finish enrollment per
|
|
[client-enrollment.md](client-enrollment.md) (`--finalize-pubkey`,
|
|
mesh join, `homelab doctor` green).
|
|
2. If it hosts a public service: add the `services:` entry in
|
|
`inventory.yaml` (backend, url, doc_page, config_repo, risk_notes —
|
|
see the Week-1 service contract fields) and wire the Caddy route in
|
|
`dtoro/caddy-conf`.
|
|
3. Confirm the health check answers: `homelab service <name> health` or
|
|
a direct `curl`.
|
|
4. Flip `state: provisioning` → `state: active` (or delete the `state:`
|
|
field — `active` is the default) in `inventory.yaml`.
|
|
5. Complete the doc page (stub → full narrative: role, specs, how it's
|
|
configured, dependencies).
|
|
6. Record the activation: `oikos/ledger.py append host:<name> activate
|
|
config_mutation --result ok` (or let the CLI wrapper do this once
|
|
Week 3's runbook automation lands).
|
|
|
|
Regenerate derived data: `python3 mcp/build_host_files.py && python3
|
|
oikos/gen-topology.py` so `hosts/<name>.yaml`, the topology diagram, and
|
|
the context card all reflect the new state.
|