GNAI-025: Schritt 4 präzisiert — Repo-Dateien per scp auf den PVE-Host kopieren (Hook-SHA verifizieren), dann provisioning ausführen
ci-static / secret-scan (push) Successful in 20s
ci-static / yamllint (push) Successful in 32s
ci-static / ansible-syntax (push) Successful in 29s
ci-static / markdown-links (push) Successful in 20s

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
2026-11-29 04:18:34 +01:00
co-authored by Mistral Vibe
parent e34ed53ba3
commit e434664087
2 changed files with 22 additions and 1 deletions
@@ -103,7 +103,7 @@ drei Inventories.
1. **Operator:** PVE-Host-Kapazität prüfen (`free -h`, Summe memory der CTs vs. RAM); ggf. Profil anpassen. **Erledigt 2026-11-27 (Operator): 32 GiB RAM, 25 % belegt — 8 GiB CT-Profil unkritisch.**
2. **Operator (Workstation):** drei CT-117-Keypairs generieren, `.pub` nach `files/ssh/`, SSH-Aliases `ghostnet-ct117-*` in `~/.ssh/config`.
3. **Operator:** upstream-Commit + compose-SHA-256 pinnen (erledigt 2026-11-27: `872ed5d` / `d5558cd…`); alle Image-Digests via `proxmox/lxc/ct-117-fluxer/scripts/pin-fluxer-images.sh` ermitteln (einmalig, Workstation, `sudo apt install -y skopeo`, kein Passwort) und das ausgegebene YAML in die drei `group_vars/fluxer_hosts.yml` eintragen; SSH-Host-Key-Fingerprint-Platzhalter vormerken. Hinweis: `fluxer-worker` existiert nicht als eigenes Image — der Worker läuft aus dem `fluxer-api`-Image.
4. **Operator (root@pve):** `provision-ct117-fluxer.sh` ausführen (legt CT 117 an, GHOSTNET_AGENT_UID=1000 GHOSTNET_ADMIN_UID=1001), dann `pct exec 117 -- passwd ghost`, pubkeys in die authorized_keys, Fingerprint pinnen.
4. **Operator:** Repo-Dateien per `scp` auf den PVE-Host kopieren ( siehe `scripts/README.md` — baseline hook nach `/usr/local/sbin/`, Provisioning-Skript und die drei `.pub`-Dateien nach `/root/`), dort SHA-256 des Hooks verifizieren (`111f1b70…`), dann als root@pve `GHOSTNET_AGENT_UID=1000 GHOSTNET_ADMIN_UID=1001 bash /root/provision-ct117-fluxer.sh` ausführen (legt CT 117 an); danach `pct exec 117 -- passwd ghost`, pubkeys in die authorized_keys (`pct push`), Fingerprint pinnen.
5. **Agent:** `preflight.yml` auf `agent`-Inventory (read-only) — Identitäts- und Leerstands-Gates.
6. **Agent (nach Operator-Go):** `site.yml --check --diff` auf `production`, dann autorisierter `site.yml`-Lauf; zweiter Lauf muss `changed=0` liefern.
7. **Agent:** CT-102-`keycloak_realm_config` laufen lassen (legt Client `fluxer` an).
@@ -23,3 +23,24 @@ Abschnitt 6 and `../ansible/README.md`.
`fluxer_stack_images:` YAML block for the three
`ansible/inventories/*/group_vars/fluxer_hosts.yml` (GNAI-025 Abschnitt 6,
Schritt 3). Requires `skopeo` and the repo control venv (`.venv`).
## Transfer auf den PVE-Host (von der Workstation)
Die Skripte liegen nur im Repo auf der Workstation; der PVE-Host hat keinen
Repo-Checkout. Einmalig dorthin kopieren (als Operator mit root@pve-Zugang):
```bash
R=/home/ghost/source/repos/ghost.net/infrastructure
scp "$R/proxmox/shared/scripts/ghostnet-lxc-baseline.sh" root@pve:/usr/local/sbin/ghostnet-lxc-baseline.sh
scp "$R/proxmox/lxc/ct-117-fluxer/scripts/provision-ct117-fluxer.sh" root@pve:/root/provision-ct117-fluxer.sh
scp "$R"/proxmox/lxc/ct-117-fluxer/ansible/files/ssh/fluxer-*.pub root@pve:/root/
```
Auf dem PVE-Host (root@pve) vor dem Lauf verifizieren:
```bash
chmod 0755 /usr/local/sbin/ghostnet-lxc-baseline.sh /root/provision-ct117-fluxer.sh
sha256sum /usr/local/sbin/ghostnet-lxc-baseline.sh
# muss sein: 111f1b70e47e3a2f6a1bcce22cb0ec50aacd8fbcff37d87fbcf853a318381b10
GHOSTNET_AGENT_UID=1000 GHOSTNET_ADMIN_UID=1001 bash /root/provision-ct117-fluxer.sh
```