4.4 KiB
Repository Code Map
Refreshed with graphify update . on November 2, 2026. The generated local map
is graphify-out/graph.json, with graph.html and GRAPH_REPORT.md alongside
it. That directory is intentionally gitignored; this guide records the useful
paths without committing generated caches.
Graphify is a navigation aid. The paths below were checked against source;
dynamic imports and shell dispatch are not a complete call graph. The refresh
reported three extracted nodes without source_file metadata, and community
names were derived from hubs rather than refreshed with an LLM.
| Responsibility | Entry point | Relationship to the pipeline |
|---|---|---|
| CLI and API | jeannie, API server | API allowlisted commands use the same CLI; internal tasks and recursive remote dispatch stay excluded. |
| Profile inventory | env.sh, homelab.yml | One shared loader exports profile defaults and Terraform variables; pipeline sources it. |
| Runtime exclusion | cluster-runtime-guard.py | Host services, private K3s workloads, API listeners and VM states gate deployment/start; a shared lock serializes pipelines. |
| Identity and state | cluster-context.py | Endpoint, CA and namespace UID bind each profile; guarded tools use separate scoped backends. |
| Runtime bootstrap | cluster/main.tf | Selects kubeadm or native K3s; the native remote bootstrap explicitly executes Bash and requires the declared hypervisor capability. |
| Scheduling estimate | scheduling-preflight.py | Estimate, pod_requests and manifests_from_plan connect planned workloads to live capacity, placement and rollout constraints. |
| Application storage | registry-storage-reconcile.py | prepare_local, publish_remote and remote_manifest stage, verify and preserve registry data before placement changes. |
| Native transition | cluster-transition.py, k3s-stop.sh | A private phase journal sequences retirement, offline storage copy, bootstrap, independent identity enrollment, platform and apps. |
| Layer orchestration | pipeline.sh | Applies guards, discovery/adoption, bounded transport retries and readiness checks around OpenTofu and Argo operations. |
| Documentation | render-docs, templates | README and modular guides are generated from templates; the service catalog comes from inventory. |
| Blog | blog.php, diagram model, generator, English copy | A curated model and inventory generate the public SVG; language dictionaries supply narrative copy. |
Native transition flow
flowchart TD
A[Review transition plan] --> B[Verify pinned laptop identity]
B --> C[Stop laptop K3s workloads and archive state]
C --> D[Stop VMs and copy verified registry offline]
D --> E[Bootstrap K3s on Orange Pi]
E --> F[Compare API identity with direct SSH reads]
F --> G[Enroll new profile identity]
G --> H[Scheduling estimate and platform apply]
H --> I[Registry placement and app delivery]
Failures retain the journal and original data. Resume the same transition command after fixing the cause. Only registry data is copied; other old laptop PVC data requires a separate restore. A Ready node proves bootstrap readiness, not completion of every platform or application rollout.
Documentation maintenance
Edit README.md.tmpl and docs/templates/*.md.tmpl, then run
scripts/render-docs. Keep architecture, deployment, app operations and AI
operations in their own guides; duplicated copies previously left contradictory
instructions in the generated documentation. Update the diagram model, then run
python3 scripts/render-website-architecture.py; CI checks for stale output.
Website source changes take effect after the normal image build and
Argo delivery path; editing PHP does not publish the live site.
Useful local navigation commands:
graphify update .
graphify explain 'cluster-transition.py'
graphify explain 'publish_remote'
graphify query 'scheduling-preflight' --budget 1200