# Schema Central - Infrastructure Araucaria
> Derniere mise a jour : 2026-02-19
> Domaine : arauco.online | Reseau : 192.168.99.0/24
## Vue d'ensemble
```mermaid
flowchart TB
subgraph external ["Acces Externe"]
ddns["DDNS Namecheap
arauco.online"]
router["Routeur Swisscom
Gateway 192.168.99.1"]
end
subgraph lan ["Reseau LAN 192.168.99.0/24"]
subgraph araucaria ["araucaria - Hote KVM
eth0/br0: .50 | eth1: .51"]
dnsmasq["dnsmasq :53
DNS local"]
kvm["KVM / virsh
libvirt"]
ssh_host["SSH :1220"]
lvm["LVM vgarauco0
5.31 TB total"]
end
subgraph chillka ["chillka - .55
2 vCPU | 2 GB RAM | 500 GB"]
gitea["Gitea :3000
git.arauco.online"]
samba["Samba :139/445"]
http_chillka["HTTP :80"]
end
subgraph npagnun ["npagnun - .35
2 vCPU | 8 GB RAM | 200 GB"]
keycloak["Keycloak :8080/8443
keycloak.arauco.local"]
kc_mgmt["KC Management :9000"]
pg_kc["PostgreSQL 15
:5432 interne"]
end
subgraph huitral ["huitral - .22
2 vCPU | 8 GB RAM | 300 GB"]
ha_h["Home Assistant
reseau host"]
medusa_be["Medusa Backend :9000"]
medusa_sf["Medusa Storefront :8000"]
redis_h["Redis :6379"]
vikunja_h["Vikunja :3456"]
pg_vik["PostgreSQL 16
:5432 interne"]
dertopogo["der-topogo :3000"]
nginx_test["nginx test :8080"]
end
subgraph lautaro ["lautaro - .108 - Raspberry Pi
Non accessible"]
ha_l["Home Assistant :8123"]
end
subgraph dormant ["Volumes LVM dormants"]
lemolemo["lemolemo .33
10 GB"]
toki["toki .44
10 GB"]
copihue["copihue .11"]
huinca["huinca .66
70 GB"]
kura["kura
5 GB"]
end
end
ddns -->|"arauco.online"| router
router -->|"NAT 2222 -> :1220"| ssh_host
router --- lan
kvm -->|"virsh / br0"| chillka
kvm -->|"virsh / br0"| npagnun
kvm -->|"virsh / br0"| huitral
lvm -.->|"vgarauco0-*"| dormant
dnsmasq -.->|"DNS"| chillka
dnsmasq -.->|"DNS"| npagnun
dnsmasq -.->|"DNS"| huitral
dnsmasq -.->|"DNS"| lautaro
keycloak -->|"JDBC"| pg_kc
medusa_be --> redis_h
vikunja_h --> pg_vik
```
---
## Index des schemas detailles
### Reseau
| Schema | Fichier | Description |
|--------|---------|-------------|
| Topologie reseau | [topologie_reseau.mmd](micro/reseau/topologie_reseau.mmd) | IPs, interfaces, DNS, routage, acces externe |
| Caddy Reverse Proxy | [caddy_reverse_proxy.mmd](micro/reseau/caddy_reverse_proxy.mmd) | Reverse proxy Caddy, TLS Let's Encrypt, routes sous-domaines |
### Machines virtuelles
| Schema | Fichier | Description |
|--------|---------|-------------|
| araucaria (host) | [araucaria_host.mmd](micro/vms/araucaria_host.mmd) | Hote KVM, interfaces, LVM, services, VMs gerees |
| npagnun | [npagnun.mmd](micro/vms/npagnun.mmd) | Ubuntu 24.04, Keycloak + PostgreSQL (Docker) |
| huitral | [huitral.mmd](micro/vms/huitral.mmd) | Debian 12, Docker: Medusa, Vikunja, HA, der-topogo, nginx |
| chillka | [chillka.mmd](micro/vms/chillka.mmd) | Gitea, Samba, HTTP, SSH |
| lautaro | [lautaro.mmd](micro/vms/lautaro.mmd) | Raspberry Pi, Home Assistant (non accessible) |
### IAM / Identite
| Schema | Fichier | Description |
|--------|---------|-------------|
| Keycloak IAM | [keycloak_iam.mmd](micro/iam/keycloak_iam.mmd) | OIDC, realms, clients, RBAC, flux d'authentification |
| Auth Chiruca | [chiruca_auth.mmd](micro/iam/chiruca_auth.mmd) | Flux auth realm chiruca, Google IdP, clients OIDC (HA, Vikunja, der-topogo) |
### Applications
| Schema | Fichier | Description |
|--------|---------|-------------|
| Korradi.dev | [korradi_stack.mmd](micro/applications/korradi_stack.mmd) | Stack applicatif: Next.js, Fastify, Widget SDK, Traefik |
| Home Assistant | [homeassistant.mmd](micro/applications/homeassistant.mmd) | Domotique, OIDC Keycloak, cameras, integrations HACS |
| Vikunja | [vikunja.mmd](micro/applications/vikunja.mmd) | Gestion taches, OIDC Keycloak, CalDAV, integration HA |
| Lucien-sens-bon | [lucien_sens_bon.mmd](micro/applications/lucien_sens_bon.mmd) | E-commerce MedusaJS, auth JWT/Cookie native |
| Der-topogo | [der_topogo.mmd](micro/applications/der_topogo.mmd) | Site consulting, Payload CMS, OIDC Keycloak planifie |
### Flux AuthN/AuthZ (diagrammes de sequence)
| Schema | Fichier | Description |
|--------|---------|-------------|
| Auth Lucien-sens-bon | [lsb_auth_seq.mmd](micro/flux/lsb_auth_seq.mmd) | Flux JWT client + cookie admin, auth native MedusaJS |
| Auth Der-topogo | [dt_auth_seq.mmd](micro/flux/dt_auth_seq.mmd) | Flux Payload CMS natif + OIDC Keycloak planifie |
| Auth Home Assistant | [ha_auth_seq.mmd](micro/flux/ha_auth_seq.mmd) | Flux OIDC Keycloak via HACS, Google IdP, code unique |
| Auth Vikunja | [vk_auth_seq.mmd](micro/flux/vk_auth_seq.mmd) | Flux OIDC Keycloak natif, auto-creation compte, CalDAV |
---
## Visualisation web
Le serveur local permet de naviguer et visualiser tous les schemas dans le navigateur :
```bash
cd schemas/server
npm install
npm start
# -> http://localhost:3030
```
---
## Ajouter un nouveau schema
1. Creer un fichier `.mmd` dans le sous-dossier appropriate (`micro/vms/`, `micro/iam/`, etc.)
2. Le serveur web le detectera automatiquement (hot-reload)
3. Mettre a jour ce fichier `SCHEMA_CENTRAL.md` pour ajouter une entree dans l'index
### Convention de nommage
- `micro/vms/.mmd` pour une machine virtuelle
- `micro/reseau/.mmd` pour le reseau
- `micro/iam/.mmd` pour l'identite / acces
- `micro/applications/.mmd` pour une application
- `micro/flux/_auth_seq.mmd` pour un diagramme de sequence auth
---
## Workflow Git
Le depot est heberge sur Gitea (`git.arauco.online`) avec une branche principale `main`.
### Recuperer les changements du serveur
| Commande | Telecharge | Integre dans la branche locale |
|----------|------------|-------------------------------|
| `git fetch origin` | Oui | Non |
| `git pull origin main` | Oui | Oui |
- **`git fetch`** : recupere les commits distants sans modifier la branche locale. Permet d'inspecter avant d'integrer.
- **`git pull`** : equivalent a `git fetch` + `git merge`. Integre directement.
### Verifier l'etat de synchronisation
```bash
git fetch origin && git status
```
Messages possibles :
| Message | Signification |
|---------|--------------|
| `up to date with 'origin/main'` | Tout est synchronise |
| `ahead of 'origin/main' by X commits` | Commits locaux non pousses |
| `behind 'origin/main' by X commits` | Le serveur a des commits a recuperer |
| `have diverged` | Les deux cotes ont des commits differents |
> `git fetch` avant `git status` est necessaire pour avoir l'info a jour du serveur.
### Comparer apres un fetch
```bash
git log HEAD..origin/main # commits en avance sur le serveur
git diff HEAD..origin/main # diff complet
git diff --name-only HEAD..origin/main # fichiers modifies uniquement
git diff --stat HEAD..origin/main # resume insertions/suppressions
git diff HEAD..origin/main -- # diff sur un fichier specifique
```
### Integrer les changements
| Commande | Effet |
|----------|-------|
| `git merge origin/main` | Cree un commit de fusion, historique fidele avec branches visibles |
| `git rebase origin/main` | Rejoue les commits locaux par-dessus origin/main, historique lineaire |
**Regle** : `rebase` pour mettre a jour une branche locale non poussee, `merge` pour integrer du travail deja partage/publie. Ne jamais rebase des commits deja pousses.
---
## Donnees de reference
| Machine | IP | RAM | Stockage LVM | Etat |
|---------|-----|-----|-------------|------|
| araucaria (host) | .50 (br0), .51 (eth1) | - | vgarauco0 5.31 TB | actif |
| chillka | .55 | 2 GB | 500 GB | running |
| npagnun | .35 | 8 GB | 200 GB (vol nudo) | running |
| huitral | .22 | 8 GB | 300 GB | running |
| lautaro | .108 | - | - | non accessible |
| lemolemo | .33 | - | 10 GB | dormant |
| toki | .44 | - | 10 GB | dormant |
| copihue | .11 | - | - | dormant |
| huinca | .66 | - | 70 GB | dormant |
| kura | - | - | 5 GB | dormant |