112 lines
5.8 KiB
Markdown
112 lines
5.8 KiB
Markdown
# Homelab Kubernetes Pipeline
|
|
|
|
<!-- Generated from README.md.tmpl by scripts/render-docs. Edit README.md.tmpl and homelab.yml, then regenerate. -->
|
|
|
|
Jeannie manages three mutually exclusive Kubernetes profiles, keeps recovery
|
|
and build services on the Debian laptop, and delivers apps through Argo CD.
|
|
The K3s profile runs natively on the Orange Pi 5 Plus; the hybrid and
|
|
all-Pimox kubeadm profiles remain available.
|
|
|
|
## Quick Start
|
|
|
|
From the Debian operations laptop, select the profile and its kubeconfig
|
|
explicitly. For the enrolled native Orange Pi cluster:
|
|
|
|
```bash
|
|
cd ~/my-homelab-configs
|
|
export LAB_CLUSTER_PROFILE=k3s
|
|
export LAB_CLUSTER_RUNTIME=k3s
|
|
export TF_VAR_cluster_runtime=k3s
|
|
export KUBECONFIG="$HOME/.kube/opi5-k3s-config"
|
|
./jeannie cluster-context check
|
|
./jeannie cluster-runtime check
|
|
```
|
|
|
|
On a fresh native installation, run `./jeannie cluster`, review and
|
|
enroll its identity, then run `./jeannie platform all` followed by
|
|
`./jeannie apps`. For the accidental laptop K3s installation, use the
|
|
[resumable transition](docs/deployment.md#move-laptop-k3s-to-the-orange-pi)
|
|
instead. Do not start a second deployment while that transition is running.
|
|
|
|
| Profile | Control plane | Workers | Kubeconfig under `~/.kube/` |
|
|
| --- | --- | --- | --- |
|
|
| `debian` | Debian laptop `.73`, kubeadm | Pimox VMs 9010/9011 | `config` |
|
|
| `pimox` | Pimox VM 9001 at `.65`, kubeadm | Pimox VMs 9010/9011 | `pimox-config` |
|
|
| `k3s` | Orange Pi host `.80`, native K3s | Same host | `opi5-k3s-config` |
|
|
|
|
Native K3s requires the declared Kubernetes-profile Pimox VMs stopped. The VM profiles require host K3s
|
|
stopped; `debian` also requires VM 9001 stopped, and `pimox` requires the laptop
|
|
control plane stopped. Pipelines refuse conflicting or unverifiable runtimes.
|
|
The inventory still defaults to `pimox`; explicit selection prevents surprises.
|
|
|
|
## Documentation Hub
|
|
|
|
The detailed technical specifications have been moved to the `/docs` directory:
|
|
|
|
- [Architecture & Infrastructure](docs/architecture.md) - Cluster layout, Networking, and Edge path.
|
|
- [Deployment Guide](docs/deployment.md) - Prerequisites, bootstrap flow, and validation.
|
|
- [AI Operations](docs/ai-ops.md) - Jeannie AI tools, Evals, and Safety cases.
|
|
- [Application Ops](docs/app-ops.md) - App delivery, Gitea, and Website management.
|
|
- [Status overview](docs/status-overview.md) and [focused doctor](docs/doctor-overview.md) - Fast checks and item-level diagnosis.
|
|
- [Network sandbox](docs/network-sandbox.md) and [AI lab](docs/ai-lab.md) - Independent learning environments.
|
|
- [Service Catalog](docs/service-catalog.md) - Declared inventory of hosts and services.
|
|
- [Repository Code Map](docs/code-map.md) - Graphify findings and the code behind deployment guards.
|
|
|
|
## Inventory
|
|
|
|
The canonical non-secret inventory is [homelab.yml](homelab.yml). Keep LAN IPs, Tailscale IPs, public hostnames, ports, storage paths, and service ownership there.
|
|
|
|
`./jeannie` reads `homelab.yml` at startup and exports matching OpenTofu variables.
|
|
`scripts/render-docs` renders the documentation and the static service catalog page.
|
|
|
|
## Current Operating Model
|
|
|
|
- Debian remains the operations host: Jeannie, Docker builds, external Gitea,
|
|
GitOps mirror, local registry endpoint, Ollama, OmniRoute, and the AI tool
|
|
wrappers run there outside Kubernetes.
|
|
- The Orange Pi native K3s control plane has bootstrapped and reported `Ready`.
|
|
Platform installation and application rollout are separate milestones; a
|
|
Ready node does not establish that every service or data migration completed.
|
|
- Pimox remains installed alongside native K3s on the Orange Pi. The two modes
|
|
use the hardware at different times, preserving VM disks and existing data.
|
|
- Pimox VMs are treated as rebuildable capacity. Jeannie owns the golden image,
|
|
VM clone lifecycle, KVM CPU pinning for the Orange Pi big cores, qemu guest
|
|
readiness waits, containerd registry trust, and stale node cleanup.
|
|
- The canonical local image endpoint is the Debian LAN IP and registry NodePort
|
|
(`192.168.100.73:30500` by default). Containerd pulls through that endpoint
|
|
through forwarding to the selected registry node, including the Orange Pi.
|
|
- Identity checks pin API endpoint, CA fingerprint and `kube-system` UID.
|
|
Cluster, platform and app state live under separate per-profile directories;
|
|
scheduling feasibility uses requests, selectors, volumes and host ports.
|
|
|
|
## AI Stack
|
|
|
|
The Debian-hosted AI stack is intentionally split between a containerized
|
|
gateway and host-level tools:
|
|
|
|
- `./jeannie deploy-ai-stack` starts OmniRoute with Docker Compose
|
|
under `/data/homelab-ai-stack`, seeds OpenRouter/NVIDIA keys from local files,
|
|
creates the no-auth/free provider connections, validates real chat
|
|
completions, and writes `models.env`.
|
|
- `./jeannie deploy-ai-tools` wires bare-metal `goose`, `holmes`, and
|
|
`hermes` wrappers to OmniRoute through `ai-tools.env` and a Holmes config.
|
|
- `./jeannie ai-check` verifies the local knowledge index, wrappers,
|
|
OmniRoute endpoint, and validated model routes.
|
|
- `./jeannie doctor-k8s` performs read-only Kubernetes collection and
|
|
can ask Holmes for triage through OmniRoute. Ollama remains useful for small
|
|
local tasks; the configured OmniRoute route determines whether agentic
|
|
triage uses a local or external provider.
|
|
|
|
Run `./jeannie up` and `./jeannie nuke` only from the Debian homelab server.
|
|
|
|
# Learning labs
|
|
|
|
The [neural network from scratch lab](labs/neural-network-from-scratch/README.md)
|
|
walks through a NumPy classifier, backpropagation, and a training-loss plot.
|
|
The opt-in Kubernetes labs cover [OpenTelemetry and Tempo](apps/opentelemetry-lab/README.md),
|
|
[Gateway API and FastAPI](apps/gateway-lab/README.md),
|
|
[secrets and certificates](apps/secrets-lab/README.md), and
|
|
[progressive delivery](apps/progressive-lab/README.md). The independent
|
|
[network sandbox](docs/network-sandbox.md) and [AI lab](docs/ai-lab.md)
|
|
provide isolated experiments outside the cluster rollout.
|