From b713be161431729305701f80b3b6f53d2f07f62a Mon Sep 17 00:00:00 2001 From: ertopogo Date: Fri, 20 Feb 2026 19:36:00 +0100 Subject: Initial commit: schemas infrastructure Arauco avec serveur web --- micro/applications/korradi_stack.mmd | 87 ++++++++++++++++++++++++++++++++++++ micro/iam/keycloak_iam.mmd | 79 ++++++++++++++++++++++++++++++++ micro/reseau/topologie_reseau.mmd | 78 ++++++++++++++++++++++++++++++++ micro/vms/araucaria_host.mmd | 70 +++++++++++++++++++++++++++++ micro/vms/chillka.mmd | 34 ++++++++++++++ micro/vms/huitral.mmd | 68 ++++++++++++++++++++++++++++ micro/vms/lautaro.mmd | 32 +++++++++++++ micro/vms/npagnun.mmd | 44 ++++++++++++++++++ 8 files changed, 492 insertions(+) create mode 100644 micro/applications/korradi_stack.mmd create mode 100644 micro/iam/keycloak_iam.mmd create mode 100644 micro/reseau/topologie_reseau.mmd create mode 100644 micro/vms/araucaria_host.mmd create mode 100644 micro/vms/chillka.mmd create mode 100644 micro/vms/huitral.mmd create mode 100644 micro/vms/lautaro.mmd create mode 100644 micro/vms/npagnun.mmd (limited to 'micro') diff --git a/micro/applications/korradi_stack.mmd b/micro/applications/korradi_stack.mmd new file mode 100644 index 0000000..bbdf355 --- /dev/null +++ b/micro/applications/korradi_stack.mmd @@ -0,0 +1,87 @@ +%%{init: {'theme': 'base', 'flowchart': {'nodeSpacing': 40, 'rankSpacing': 50}}}%% +flowchart TB + subgraph infra ["Infrastructure - Docker / Traefik"] + traefik["Traefik
Reverse Proxy
SSL termination"] + compose["docker-compose.yml
infra/"] + end + + subgraph frontend ["Frontend - apps/portal"] + nextjs["Next.js 15
React 19 + TypeScript"] + r3f["React Three Fiber
Scenes 3D"] + tailwind["Tailwind CSS
+ Radix + shadcn/ui"] + zustand["Zustand
State management"] + tanstack["TanStack Query
Data fetching"] + intl["next-intl
i18n"] + end + + subgraph backend ["Backend - services/event-hub"] + fastify["Fastify
API REST + tRPC"] + socketio["Socket.IO
Temps reel / WebSocket"] + zod["Zod
Validation schemas"] + end + + subgraph sdk ["Packages - packages/widget-sdk"] + widget_sdk["Widget SDK
Embeds + iframes sandboxes"] + events["Systeme d evenements
postMessage"] + end + + subgraph identity ["Identite - IAM"] + keycloak["Keycloak
npagnun:8080
OIDC / JWT"] + end + + subgraph data ["Donnees (prevu)"] + postgres["PostgreSQL
Prisma ORM"] + redis["Redis
Cache + sessions"] + end + + subgraph monitoring ["Observabilite (prevu)"] + otel["OpenTelemetry"] + sentry["Sentry
Error tracking"] + posthog["PostHog
Analytics"] + end + + subgraph tooling ["Tooling"] + turbo["TurboRepo
Monorepo"] + pnpm["PNPM
Package manager"] + end + + traefik --> nextjs + traefik --> fastify + nextjs --> zustand + nextjs --> tanstack + nextjs --> r3f + nextjs --> tailwind + nextjs --> intl + tanstack -->|"API calls"| fastify + fastify --> socketio + fastify --> zod + fastify -->|"Prisma"| postgres + fastify --> redis + nextjs -->|"OIDC"| keycloak + fastify -->|"Token verify"| keycloak + widget_sdk --> events + widget_sdk -->|"iframe"| nextjs + turbo --> frontend + turbo --> backend + turbo --> sdk + + classDef infraStyle fill:#2a3a4a,stroke:#6a8aaa,color:#b0d0e8 + classDef feStyle fill:#1e3a5f,stroke:#4a90d9,color:#a8d0f0 + classDef beStyle fill:#1e4a2e,stroke:#4a9a6a,color:#a8e0c0 + classDef sdkStyle fill:#3a1e5f,stroke:#8a6ad9,color:#c8b0f0 + classDef iamStyle fill:#4a1e3a,stroke:#d94a8a,color:#f0a8c8 + classDef storStyle fill:#4a3a1e,stroke:#d9a84a,color:#f0d8a8 + classDef dormStyle fill:#2a2a2a,stroke:#666,color:#999 + classDef toolStyle fill:#3a3a1e,stroke:#9a9a4a,color:#e0e0a8 + + class traefik,compose infraStyle + class nextjs,r3f,tailwind,zustand,tanstack,intl feStyle + class fastify,socketio,zod beStyle + class widget_sdk,events sdkStyle + class keycloak iamStyle + class postgres,redis storStyle + class otel,sentry,posthog dormStyle + class turbo,pnpm toolStyle + + style data stroke-dasharray: 5 5 + style monitoring stroke-dasharray: 5 5 diff --git a/micro/iam/keycloak_iam.mmd b/micro/iam/keycloak_iam.mmd new file mode 100644 index 0000000..ff7f0c7 --- /dev/null +++ b/micro/iam/keycloak_iam.mmd @@ -0,0 +1,79 @@ +%%{init: {'theme': 'base', 'flowchart': {'nodeSpacing': 60, 'rankSpacing': 60, 'padding': 20}}}%% +flowchart LR + + subgraph client ["Cote Client"] + direction TB + user_b["Navigateur
Utilisateur"] + bearer["Token JWT
dans le header"] + user_b --> bearer + end + + subgraph keycloak ["Keycloak - npagnun 192.168.99.35"] + direction TB + + subgraph endpoints ["Endpoints"] + direction LR + http[":8080 HTTP"] + https[":8443 HTTPS"] + health[":9000 Health"] + end + + subgraph config ["Configuration"] + direction LR + realms["Realms
master + custom"] + clients_kc["Clients OIDC
portal, event-hub"] + users["Users
& Groups"] + roles["Roles RBAC
& Permissions"] + end + + subgraph auth_flow ["Flux OIDC"] + direction LR + step1["1. /auth/realms/.../protocol/openid-connect/auth"] + step2["2. Login form + consent"] + step3["3. Callback avec code"] + step4["4. Exchange code -> tokens"] + step1 --> step2 --> step3 --> step4 + end + end + + subgraph db ["Base de donnees"] + postgres["PostgreSQL 15
:5432 Docker interne
DB: keycloak
User: keycloak"] + end + + subgraph applications ["Applications"] + direction TB + portal["Portal Korradi
Next.js"] + eventhub["Event Hub
Fastify"] + widget["Widget SDK"] + end + + subgraph model ["Modele de donnees"] + direction LR + org["Organisation"] --> sp["Spaces"] --> ctx["Contexts"] --> wdg["Widgets"] + end + + user_b -->|"Login request"| endpoints + step4 -->|"access_token
+ refresh_token"| user_b + bearer -->|"Authorization: Bearer ..."| applications + + keycloak --> postgres + + portal -->|"Token verify"| keycloak + eventhub -->|"Token verify"| keycloak + widget -->|"Token verify"| keycloak + + roles -.->|"RBAC / ABAC"| model + + classDef iamStyle fill:#4a1e3a,stroke:#d94a8a,color:#f0a8c8 + classDef storStyle fill:#4a3a1e,stroke:#d9a84a,color:#f0d8a8 + classDef appStyle fill:#1e4a2e,stroke:#4a9a6a,color:#a8e0c0 + classDef userStyle fill:#1e3a5f,stroke:#4a90d9,color:#a8d0f0 + classDef modelStyle fill:#3a1e5f,stroke:#8a6ad9,color:#c8b0f0 + classDef flowStyle fill:#3a2a1e,stroke:#aa7a4a,color:#e8c8a0 + + class user_b,bearer userStyle + class http,https,health,realms,clients_kc,users,roles iamStyle + class step1,step2,step3,step4 flowStyle + class postgres storStyle + class portal,eventhub,widget appStyle + class org,sp,ctx,wdg modelStyle diff --git a/micro/reseau/topologie_reseau.mmd b/micro/reseau/topologie_reseau.mmd new file mode 100644 index 0000000..95d9364 --- /dev/null +++ b/micro/reseau/topologie_reseau.mmd @@ -0,0 +1,78 @@ +%%{init: {'theme': 'base', 'flowchart': {'nodeSpacing': 50, 'rankSpacing': 60}}}%% +flowchart LR + subgraph internet ["Internet"] + direction TB + ddns["DDNS Namecheap
arauco.online
git.arauco.online
www.arauco.online"] + upstream["Forwarders DNS
8.8.8.8 / 8.8.4.4 / 1.1.1.1"] + end + + subgraph swisscom ["Routeur Swisscom"] + gw["Gateway 192.168.99.1"] + nat["NAT ext:2222
-> .51:1220"] + end + + subgraph host_if ["araucaria - Interfaces"] + direction TB + eth0["eth0 .50/24
master br0
00:25:90:e7:47:e4"] + eth1["eth1 .51/24
SSH externe
00:25:90:e7:47:e5"] + br0["br0 Bridge .50/24"] + virbr0["virbr0 .122.1/24
DOWN"] + eth0 --- br0 + end + + subgraph dns_conf ["dnsmasq Config"] + dns_svc[":53 sur br0
domain=local
cache=1000
log=/var/log/dnsmasq.log"] + end + + subgraph records ["Enregistrements DNS"] + direction TB + r_araucaria[".50 arauco.online
.50 www.arauco.online
.51 araucaria-eth1"] + r_chillka[".55 git.arauco.online
.55 chillka.local"] + r_npagnun[".35 npagnun.local
.35 keycloak.arauco.local"] + r_huitral[".22 huitral.local"] + r_other[".33 lemolemo | .44 toki
.11 copihue | .66 huinca"] + end + + subgraph ptr ["PTR Records"] + direction TB + ptr1["50.99.168.192
araucaria.local"] + ptr2["51.99.168.192
araucaria-eth1.local"] + end + + subgraph vm_if ["Interfaces VM br0"] + direction TB + vnet1["vnet1 chillka
52:54:00:0f:28:80"] + vnet7["vnet7 npagnun
52:54:00:5e:06:1e"] + vnet8["vnet8 huitral
52:54:00:ce:24:7f"] + end + + subgraph routes ["Routes"] + direction TB + rt1["default via .1 eth0"] + rt2["default via .1 eth1"] + rt3[".0/24 br0 src .50"] + rt4[".0/24 eth1 src .51"] + end + + ddns --> nat + nat -->|"2222->1220"| eth1 + upstream --> dns_svc + dns_svc --> records + dns_svc --> ptr + br0 --- vnet1 + br0 --- vnet7 + br0 --- vnet8 + + classDef netStyle fill:#1e3a5f,stroke:#4a90d9,color:#a8d0f0 + classDef dnsStyle fill:#1e4a4a,stroke:#4a9a9a,color:#a8e0e0 + classDef extStyle fill:#2a3a4a,stroke:#6a8aaa,color:#b0d0e8 + classDef routeStyle fill:#3a3a1e,stroke:#9a9a4a,color:#e0e0a8 + classDef dormStyle fill:#2a2a2a,stroke:#666,color:#999 + + class ddns,upstream,nat,gw extStyle + class eth0,br0,eth1 netStyle + class virbr0 dormStyle + class dns_svc,r_araucaria,r_chillka,r_npagnun,r_huitral,r_other dnsStyle + class ptr1,ptr2 dnsStyle + class vnet1,vnet7,vnet8 netStyle + class rt1,rt2,rt3,rt4 routeStyle diff --git a/micro/vms/araucaria_host.mmd b/micro/vms/araucaria_host.mmd new file mode 100644 index 0000000..2c9835d --- /dev/null +++ b/micro/vms/araucaria_host.mmd @@ -0,0 +1,70 @@ +%%{init: {'theme': 'base', 'flowchart': {'nodeSpacing': 50, 'rankSpacing': 60}}}%% +flowchart TB + subgraph net ["Reseau"] + direction LR + eth0["eth0
192.168.99.50/24"] + br0["br0 Bridge
192.168.99.50/24"] + eth1["eth1
192.168.99.51/24"] + virbr0["virbr0
192.168.122.1/24
DOWN"] + eth0 -->|"master"| br0 + end + + subgraph svc ["Services actifs"] + direction LR + ssh["SSH :1220
ext 2222 via eth1"] + dnsmasq["dnsmasq :53
sur br0"] + kvm_svc["KVM / virsh"] + ddns_s["DDNS
/opt/ddns/"] + end + + subgraph machines ["Machines Virtuelles"] + direction LR + + subgraph vm_chillka ["chillka - ID:2 running"] + direction TB + vm_c_spec["2 vCPU | 2 GB RAM"] + vm_c_net["vnet1 br0
52:54:00:0f:28:80"] + vm_c_disk["vda: vgarauco0-chillka
500 GB"] + end + + subgraph vm_npagnun ["npagnun - ID:8 running"] + direction TB + vm_n_spec["2 vCPU | 8 GB RAM"] + vm_n_net["vnet7 br0
52:54:00:5e:06:1e"] + vm_n_disk["vda: vgarauco0-nudo
200 GB"] + end + + subgraph vm_huitral ["huitral - ID:9 running"] + direction TB + vm_h_spec["2 vCPU | 8 GB RAM"] + vm_h_net["vnet8 br0
52:54:00:ce:24:7f"] + vm_h_disk["vda: vgarauco0-huitral
300 GB"] + end + end + + subgraph storage ["LVM vgarauco0"] + direction LR + lv_info["5.31 TB total
4.24 TB libre"] + lv_actifs["Actifs:
chillka 500GB
huitral 300GB
nudo 200GB"] + lv_dormants["Dormants:
huinca 70GB
lemolemo 10GB
toki 10GB
kura 5GB"] + end + + kvm_svc --> machines + br0 --> vm_c_net + br0 --> vm_n_net + br0 --> vm_h_net + + classDef netStyle fill:#1e3a5f,stroke:#4a90d9,color:#a8d0f0 + classDef svcStyle fill:#1e4a2e,stroke:#4a9a6a,color:#a8e0c0 + classDef vmStyle fill:#3a1e5f,stroke:#8a6ad9,color:#c8b0f0 + classDef storStyle fill:#4a3a1e,stroke:#d9a84a,color:#f0d8a8 + classDef dormStyle fill:#2a2a2a,stroke:#666,color:#999 + + class eth0,br0,eth1 netStyle + class virbr0 dormStyle + class ssh,dnsmasq,kvm_svc,ddns_s svcStyle + class vm_c_spec,vm_n_spec,vm_h_spec vmStyle + class vm_c_net,vm_n_net,vm_h_net netStyle + class vm_c_disk,vm_n_disk,vm_h_disk storStyle + class lv_info,lv_actifs storStyle + class lv_dormants dormStyle diff --git a/micro/vms/chillka.mmd b/micro/vms/chillka.mmd new file mode 100644 index 0000000..be24eb0 --- /dev/null +++ b/micro/vms/chillka.mmd @@ -0,0 +1,34 @@ +%%{init: {'theme': 'base', 'flowchart': {'nodeSpacing': 40, 'rankSpacing': 50}}}%% +flowchart TB + subgraph vm ["chillka - 192.168.99.55
2 vCPU | 2 GB RAM
LVM: vgarauco0-chillka (500 GB) | User: toshiro"] + + subgraph services ["Services systeme"] + gitea["Gitea
Port: 3000
systemd: gitea.service
Depot: /var/data/git/repositories"] + ssh["SSH
Port: 22"] + samba["Samba (SMB)
Ports: 139, 445
Partage de fichiers"] + http["Serveur HTTP
Port: 80"] + end + + subgraph dns_local ["DNS local"] + resolved["systemd-resolved
127.0.0.53:53
127.0.0.54:53"] + end + end + + subgraph external ["Acces reseau"] + clients["Clients LAN
192.168.99.0/24"] + dns["DNS:
chillka.local -> .55
git.arauco.online -> .55"] + end + + clients -->|":3000 HTTP"| gitea + clients -->|":22 SSH"| ssh + clients -->|":139/:445 SMB"| samba + clients -->|":80 HTTP"| http + dns -.-> vm + + classDef svcStyle fill:#1e4a2e,stroke:#4a9a6a,color:#a8e0c0 + classDef netStyle fill:#1e3a5f,stroke:#4a90d9,color:#a8d0f0 + classDef dnsStyle fill:#1e4a4a,stroke:#4a9a9a,color:#a8e0e0 + + class gitea,ssh,samba,http svcStyle + class clients netStyle + class dns,resolved dnsStyle diff --git a/micro/vms/huitral.mmd b/micro/vms/huitral.mmd new file mode 100644 index 0000000..466ccbd --- /dev/null +++ b/micro/vms/huitral.mmd @@ -0,0 +1,68 @@ +%%{init: {'theme': 'base', 'flowchart': {'nodeSpacing': 40, 'rankSpacing': 50}}}%% +flowchart LR + subgraph medusa_net ["lucien-sens-bon"] + direction TB + medusa_be["medusa-backend
:9000"] + medusa_sf["medusa-storefront
:8000"] + redis["redis:alpine
:6379"] + medusa_be --> redis + end + + subgraph vikunja_net ["vikunja"] + direction TB + vikunja["vikunja
:3456"] + vikunja_db["postgres:16
:5432 int"] + vikunja --> vikunja_db + end + + subgraph topogo_net ["der-topogo"] + topogo["der-topogo-app
:3000"] + end + + subgraph test_net ["test-site"] + nginx["nginx:alpine
:8080->80"] + end + + subgraph host_net ["reseau host"] + ha["Home Assistant
stable"] + end + + subgraph volumes ["Volumes Docker"] + direction TB + v1["app_media"] + v2["caddy_config"] + v3["caddy_data"] + end + + subgraph info ["huitral .22 Debian12
2vCPU 8GB 300GB"] + direction TB + dns_info["DNS: huitral.local"] + end + + subgraph clients_g ["Clients LAN .0/24"] + clients["Navigateurs
Applications"] + end + + topogo --- v1 + topogo --- v2 + topogo --- v3 + + clients -->|":9000"| medusa_be + clients -->|":8000"| medusa_sf + clients -->|":6379"| redis + clients -->|":3456"| vikunja + clients -->|":3000"| topogo + clients -->|":8080"| nginx + clients -->|"host"| ha + + classDef svcStyle fill:#1e4a2e,stroke:#4a9a6a,color:#a8e0c0 + classDef storStyle fill:#4a3a1e,stroke:#d9a84a,color:#f0d8a8 + classDef netStyle fill:#1e3a5f,stroke:#4a90d9,color:#a8d0f0 + classDef configStyle fill:#2a3a4a,stroke:#6a8aaa,color:#b0d0e8 + classDef haStyle fill:#1e4a4a,stroke:#4a9a9a,color:#a8e0e0 + + class medusa_be,medusa_sf,vikunja,topogo,nginx svcStyle + class redis,vikunja_db storStyle + class v1,v2,v3 storStyle + class clients,dns_info netStyle + class ha haStyle diff --git a/micro/vms/lautaro.mmd b/micro/vms/lautaro.mmd new file mode 100644 index 0000000..525de49 --- /dev/null +++ b/micro/vms/lautaro.mmd @@ -0,0 +1,32 @@ +%%{init: {'theme': 'base', 'flowchart': {'nodeSpacing': 40, 'rankSpacing': 50}}}%% +flowchart TB + subgraph rpi ["lautaro - 192.168.99.108
Raspberry Pi | Debian armv7l
NON ACCESSIBLE - Donnees documentees"] + + subgraph docker_env ["Docker Engine"] + ha["Home Assistant
Port: 8123
network_mode: host"] + end + + subgraph config ["Configuration"] + compose["~/homeassistant/
docker-compose.yml"] + ha_config["configuration.yaml
secrets.yaml"] + end + end + + subgraph external ["Acces reseau"] + clients["Clients LAN
192.168.99.0/24"] + end + + ha --- compose + ha --- ha_config + clients -->|":8123"| ha + + classDef haStyle fill:#1e4a4a,stroke:#4a9a9a,color:#a8e0e0 + classDef configStyle fill:#2a3a4a,stroke:#6a8aaa,color:#b0d0e8 + classDef netStyle fill:#1e3a5f,stroke:#4a90d9,color:#a8d0f0 + classDef dormStyle fill:#2a2a2a,stroke:#666,color:#999 + + class ha haStyle + class compose,ha_config configStyle + class clients netStyle + + style rpi stroke-dasharray: 5 5 diff --git a/micro/vms/npagnun.mmd b/micro/vms/npagnun.mmd new file mode 100644 index 0000000..2c0202c --- /dev/null +++ b/micro/vms/npagnun.mmd @@ -0,0 +1,44 @@ +%%{init: {'theme': 'base', 'flowchart': {'nodeSpacing': 40, 'rankSpacing': 50}}}%% +flowchart LR + subgraph kc_net ["keycloak_keycloak-network 172.18.0.0/16"] + direction TB + keycloak["keycloak
quay.io/keycloak:latest
:8080 :8443 :9000"] + postgres["keycloak-postgres
postgres:15
:5432 interne
DB: keycloak"] + keycloak -->|"JDBC"| postgres + end + + subgraph bridge_net ["bridge 172.17.0.0/16"] + direction TB + hello1["goofy_napier
hello-world Exited"] + hello2["determined_volhard
hello-world Exited"] + end + + subgraph config ["Config npagnun"] + direction TB + compose["/opt/keycloak/
docker-compose.yml"] + iso["ISO ubuntu-24.04
monte sur sda"] + vm_info["npagnun .35
Ubuntu 24.04
2vCPU 8GB
LVM: nudo 200GB"] + end + + subgraph access ["Acces reseau"] + direction TB + dns["keycloak.arauco.local
npagnun.local
-> 192.168.99.35"] + clients["Clients LAN .0/24"] + end + + clients -->|":8080 HTTP"| keycloak + clients -->|":8443 HTTPS"| keycloak + clients -->|":9000 health"| keycloak + dns -.-> keycloak + + classDef iamStyle fill:#4a1e3a,stroke:#d94a8a,color:#f0a8c8 + classDef storStyle fill:#4a3a1e,stroke:#d9a84a,color:#f0d8a8 + classDef netStyle fill:#1e3a5f,stroke:#4a90d9,color:#a8d0f0 + classDef configStyle fill:#2a3a4a,stroke:#6a8aaa,color:#b0d0e8 + classDef dormStyle fill:#2a2a2a,stroke:#666,color:#999 + + class keycloak,kc_mgmt iamStyle + class postgres storStyle + class dns,clients netStyle + class compose,iso,vm_info configStyle + class hello1,hello2 dormStyle -- cgit v1.2.3