docs: synchroniser la doc avec l'état réel du cluster (revue Ansible + incident Qdrant)

- ops/ansible.md : tableau complet des rôles par playbook (15 storage-01, 6 gpu-01),
  caveat hermes_agent, note lm_studio inutilisé
- ia/hermes-auto-improve.md : NOUVEAU — doc du worker déployé (trigger :9095,
  modes du script, endpoints, PR squash, pièges connus)
- k8s/n8n.md : workflow 3 "Hermes Doc Worker" documenté (22h, /trigger/all,
  boucle de polling), clé API → vault
- incidents.md : Qdrant crash-loop depuis 2026-06-05 (segment funk-docs corrompu,
  invisible dans --state=failed) + procédure de réparation
- ia/rag.md : bandeau RAG HS
- CLAUDE.md : état 2026-06-10, rôle hermes_auto_improve, 3 workflows n8n,
  vault complet (n8n_api_key, Gmail au lieu de Brevo), section auto-improve
- README.md : lien admin/ops/cluster.md corrigé, arborescence complète
  (tools/, admin/, progress/, skills), roadmap à jour
- PROGRESS.md : entrée 2026-05-29 (migration NVMe) qui existait sans être référencée
- ansible : suppression effective des templates daily timer (cleanup b9be63c)

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Alkatrazz 2026-06-10 15:11:53 +02:00
parent ddff71a0fb
commit 40fd7f0868
10 changed files with 270 additions and 42 deletions

View file

@ -6,9 +6,9 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
**Funk** — homelab IA composé d'un cluster Kubernetes (Talos) pour les services applicatifs, d'un hôte d'inférence LLM dédié (gpu-01 / llama-server ROCm), et d'un agent autonome (Hermes Agent) sur storage-01. Stack IaC complète : Ansible + talhelper + ArgoCD.
**État actuel (2026-05-29)** :
**État actuel (2026-06-10)** :
- ✅ Hermes Agent opérationnel — multi-profils (funk-ai/system/monitor/brain)
- ✅ RAG opérationnel — Qdrant 339 chunks, `rag-ingest` / `rag-query`, skill funk-ai
- ⚠️ RAG **HS depuis 2026-06-05** — Qdrant en crash-loop (segment `funk-docs` corrompu, voir `admin/incidents.md`) ; `rag-ingest` / `rag-query` indisponibles
- ✅ Monitoring complet — Prometheus + Grafana + AlertManager → webhook Hermes + n8n
- ✅ storage-01 installé — `192.168.10.1` (LAN cluster), `192.168.1.200` (WAN)
- ✅ gpu-01 installé — llama-server GPU (:1234) + CPU (:1236/:1237) opérationnels, kernel 5.14.0-687.5.3
@ -16,7 +16,8 @@ This file provides guidance to Claude Code (claude.ai/code) when working with co
- ✅ Cluster k8s Talos opérationnel (MetalLB + Traefik + wildcard DNS lab.local)
- ✅ postfix_relay — SMTP sortant via Gmail SMTP + App Password (aliyesilkaya93@gmail.com)
- ✅ Open WebUI opérationnel — `openwebui.lab.local`, namespace `ai`, backend LiteLLM
- ✅ n8n opérationnel — `n8n.lab.local`, namespace `ai`, 2 workflows actifs
- ✅ n8n opérationnel — `n8n.lab.local`, namespace `ai`, 3 workflows actifs (alertes, rapport horaire, Hermes Doc Worker)
- ✅ hermes-auto-improve — analyse quotidienne de `admin/` par Hermes à 22h (n8n → trigger :9095), PR sur `hermes/daily-work`
- ⏳ WOL compute nodes non configuré (BIOS) — allumage manuel requis
Journal de progression : `PROGRESS.md``progress/YYYY-MM-DD.md`
@ -84,7 +85,7 @@ Les tags correspondent aux noms de rôles. Tous les rôles sont idempotents.
### Rôles — storage-01
`hermes_user`, `common`, `gateway` (nftables + NAT), `dnsmasq`, `nfs_server`, `qdrant`, `postgresql`, `minio`, `litellm`, `hermes_agent`, `rag`, `node_exporter`, `alertmanager_webhook`, `postfix_relay`
`hermes_user`, `common`, `gateway` (nftables + NAT), `dnsmasq`, `nfs_server`, `qdrant`, `postgresql`, `minio`, `litellm`, `hermes_agent`, `rag`, `node_exporter`, `alertmanager_webhook`, `postfix_relay`, `hermes_auto_improve` (worker doc Hermes + trigger server :9095)
### Rôles — gpu-01
@ -108,8 +109,9 @@ Variables globales (non-secrètes) dans `ansible/group_vars/all/vars.yml` : `adm
Variables chiffrées dans `ansible/group_vars/all/vault.yml` :
- `vault_anthropic_api_key` — clé Anthropic pour le profil brain
- `vault_pg_hermes_password`, `vault_pg_litellm_password`
- `vault_postfix_relay_password` — SMTP Brevo
- `vault_pg_hermes_password`, `vault_pg_litellm_password`, `vault_pg_n8n_password`, `vault_pg_openwebui_password`
- `vault_postfix_relay_password` — App Password Gmail (relay SMTP)
- `vault_n8n_api_key` — clé API n8n (label "claude") pour gérer les workflows via `/api/v1`
---
@ -209,6 +211,8 @@ ask-agent monitor "logs litellm : <résultat étape 1> — erreurs ?"
### RAG — Documentation Funk
> ⚠️ **HS depuis 2026-06-05** — Qdrant en crash-loop (segment `funk-docs` corrompu). Réparation : supprimer la collection corrompue puis relancer `rag-ingest` (reconstructible depuis `admin/`).
Qdrant collection `funk-docs` indexée depuis `admin/` (339 chunks, score min 0.60).
```bash
@ -241,6 +245,17 @@ hermes-skills/
└── brain.md # profil Claude API
```
### hermes-auto-improve — analyse quotidienne de la doc
Worker qui fait analyser `admin/` par Hermes et pousse les rapports sur la branche `hermes/daily-work` (PR squash-only vers `main`). Source dans `tools/hermes-auto-improve/`, déployé par le rôle `hermes_auto_improve` :
- `/usr/local/bin/hermes-auto-improve` — script d'analyse (`--all` = tous les docs, sinon batch de 5 en rotation ; `--daily-pr` = crée/met à jour la PR GitHub)
- `/usr/local/bin/hermes-auto-improve-server` — trigger HTTP `:9095` (`POST /trigger/all`, `/trigger/daily-pr`, `GET /status`)
- Scheduling : workflow n8n « Hermes Doc Worker — Funk-lab » à **22h** (run complet → boucle de polling `/status` → email + PR). Pas de timer systemd.
- Rapports écrits dans `admin/hermes/builtin/`, état dans `/var/lib/hermes-auto-improve/`, log `/var/log/hermes-auto-improve.log`
Doc détaillée : `admin/ia/hermes-auto-improve.md`
---
## Base de connaissance — `admin/`
@ -249,11 +264,12 @@ Documentation admin versionnée, indexée dans le RAG :
```
admin/
├── ia/ # hermes, litellm, llama_server, rocm, rag, alertmanager-webhook
├── ia/ # hermes, litellm, llama_server, rocm, rag, alertmanager-webhook, hermes-auto-improve
├── infra/ # dnsmasq, nfs, réseau, ssh, email
├── install/ # procédures installation storage-01, gpu-01, k8s
├── k8s/ # argocd, talos, monitoring
├── k8s/ # argocd, talos, monitoring, n8n, open-webui, k9s
├── ops/ # ansible, cluster, système
├── hermes/builtin/ # rapports générés par hermes-auto-improve (ne pas éditer)
└── incidents.md # historique des incidents matériel/service avec résolutions
```