diff --git a/Summarize.md b/Summarize.md index ccab691..da5a218 100644 --- a/Summarize.md +++ b/Summarize.md @@ -8,59 +8,66 @@ ### Aenderungen in dieser Session -#### Projektinitialisierung & Infrastruktur-Definition +#### 1. Projektinitialisierung & Infrastruktur-Definition **Was wurde gemacht:** -1. **SSH Deployment Key erstellt** - - Ed25519-Schluessel unter `.keys/deploy_ed25519` generiert - - Public Key muss auf dem Entwicklungsserver und in Forgejo hinterlegt werden - - Key-Kommentar: `insight-deploy@xinion.lan` +1. **SSH Keys erstellt** + - Deploy-Key (`.keys/deploy_ed25519`) fuer Server-Zugriff + - CI/CD-Key (`.keys/cicd_ed25519`) fuer Forgejo Actions Pipeline 2. **Infrastruktur-Definition erstellt** (`docs/INFRASTRUCTURE.md`) - ProxmoxVE VM-Spezifikation: Ubuntu 24.04 LTS, 4 vCPU, 8 GB RAM, 60 GB SSD - Docker-Netzwerk-Architektur mit 3 isolierten Netzwerken - - Komplette Service-Landschaft definiert (Traefik, Core, Frontend, PostgreSQL, PgBouncer, Redis, step-ca) - - Observability-Stack definiert (Prometheus, Grafana, Loki, Tempo, Promtail, cAdvisor) + - Komplette Service-Landschaft definiert - Schritt-fuer-Schritt VM-Setup Anleitung 3. **Zugangsdaten-Dokument erstellt** (`docs/ACCESS.md`) - - Git Repository Zugangsdaten - - SSH-Key Dokumentation und Verwendung - - Server-Zugangsdaten (Platzhalter fuer IP) - - Alle Service-Ports dokumentiert - - Deployment-Pfad dokumentiert - - Wichtige Befehle (MacBook & Server) + - Server-IP: 172.20.10.59 (insight-dev-01) + - Git-Server: 172.20.10.11 (GAIA-GIT) + - Alle SSH-Keys, Ports, Befehle dokumentiert -4. **Projektstruktur aufgesetzt** - - Verzeichnisstruktur gemaess Briefing angelegt - - packages/core-service/ (NestJS Backend) - - packages/frontend/ (React + Vite) - - config/ (Traefik, Prometheus, step-ca) - - .forgejo/workflows/ (CI/CD) +4. **Projektstruktur aufgesetzt** (packages/core-service, packages/frontend, config, .forgejo) -5. **Basis-Konfigurationsdateien erstellt** - - `.gitignore` - alle relevanten Ausschluesse - - `.env.example` - alle Umgebungsvariablen dokumentiert (ohne Werte) - - `README.md` - vollstaendiges Onboarding-Dokument +5. **Basis-Konfigurationsdateien** (.gitignore, .env.example, README.md) + +#### 2. Forgejo Git-Server Konfiguration + +**Was wurde auf dem Git-Server (172.20.10.11) gemacht:** + +1. **Docker Engine 29.3 installiert** (fuer Forgejo Actions Runner) +2. **Forgejo Actions aktiviert** (`[actions] ENABLED = true` in app.ini) +3. **Container Registry aktiviert** (`[packages] ENABLED = true` in app.ini) +4. **Forgejo Runner v6.3.1 installiert und registriert** + - Runner-Name: `insight-runner` + - Labels: `ubuntu-latest` (docker://node:20) + - Laeuft als Systemd-Service (`forgejo-runner.service`) +5. **Repository Secrets angelegt:** + - `SSH_DEPLOY_KEY` - CI/CD Private Key + - `DEPLOY_HOST` - 172.20.10.59 + - `DEPLOY_USER` - deploy + - `REGISTRY_USER` - gitadmin + - `REGISTRY_PASSWORD` - Forgejo Access Token +6. **Branch Protection eingerichtet:** + - `main`: Kein direkter Push, 1 Approval erforderlich + - `develop`: Kein direkter Push, 1 Approval erforderlich +7. **Forgejo Setup-Anleitung erstellt** (`docs/FORGEJO_SETUP.md`) --- ### Naechste Schritte -- [ ] VM in ProxmoxVE erstellen und konfigurieren -- [ ] SSH Deploy Key auf Server und in Forgejo hinterlegen +- [ ] SSH Deploy Keys auf insight-dev-01 Server hinterlegen - [ ] `docker-compose.yml` erstellen (alle Basis-Services) - [ ] `docker-compose.observability.yml` erstellen - [ ] NestJS Core-Service implementieren (Auth, Users, Tenants) - [ ] Prisma-Schemas erstellen (core + tenant) - [ ] React Frontend-Shell implementieren -- [ ] CI/CD Pipelines in Forgejo Actions definieren +- [ ] CI/CD Pipelines (.forgejo/workflows/) definieren --- ### Offene Fragen / Abhaengigkeiten -- Server-IP wird erst bei VM-Erstellung vergeben -- DNS-Eintraege (insight-dev.xinion.lan) muessen konfiguriert werden -- Forgejo Deploy Key muss manuell hinterlegt werden +- DNS-Eintrag `insight-dev.xinion.lan` muss auf 172.20.10.59 zeigen +- Deploy Keys muessen auf insight-dev-01 in authorized_keys hinterlegt werden diff --git a/docs/ACCESS.md b/docs/ACCESS.md index 6de0010..dfd8b48 100644 --- a/docs/ACCESS.md +++ b/docs/ACCESS.md @@ -63,12 +63,12 @@ ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAINlPo+AvDMTMZC0G49o+kuU98/aC85N90QU3a+FaTjoG ### 2.3 SSH-Verbindung zum Server ```bash # Verbindung zum Entwicklungsserver: -ssh -i .keys/deploy_ed25519 deploy@ +ssh -i .keys/deploy_ed25519 deploy@172.20.10.59 # Mit SSH-Config (empfohlen): # Eintrag in ~/.ssh/config: Host insight-dev - HostName + HostName 172.20.10.59 User deploy IdentityFile ~/git.xinion.lan/INSIGHT-MVP/.keys/deploy_ed25519 StrictHostKeyChecking accept-new @@ -89,7 +89,7 @@ Host insight-dev |------------------|-----------------------------------------| | **Hostname** | `insight-dev-01` | | **OS** | Ubuntu 24.04 LTS | -| **IP** | _wird bei VM-Erstellung vergeben_ | +| **IP** | `172.20.10.59` | | **SSH-Port** | 22 | | **SSH-User** | `deploy` | | **SSH-Key** | `.keys/deploy_ed25519` | @@ -99,7 +99,7 @@ Host insight-dev ### Schnellzugriff nach VM-Setup ```bash # SSH auf den Server -ssh -i .keys/deploy_ed25519 deploy@ +ssh -i .keys/deploy_ed25519 deploy@172.20.10.59 # Status aller Container pruefen docker compose ps @@ -134,7 +134,7 @@ docker compose restart core | Service | Port | Zugriff | |-----------------|-------|----------------------------------| -| Grafana | 3001 | SSH-Tunnel: `ssh -L 3001:localhost:3001 deploy@` | +| Grafana | 3001 | SSH-Tunnel: `ssh -L 3001:localhost:3001 deploy@172.20.10.59` | | Prometheus | 9090 | Nur intern | | Loki | 3100 | Nur intern | | Tempo | 3200 | Nur intern | @@ -197,7 +197,20 @@ Laufende Anwendung --- -## 8. Wichtige Befehle +## 8. Git-Server (Forgejo) + +| Parameter | Wert | +|------------------|-----------------------------------------| +| **Hostname** | `git.xinion.lan` | +| **IP** | `172.20.10.11` | +| **SSH-User** | `sysadmin` | +| **SSH-Port** | 22 | +| **Web-UI** | `https://git.xinion.lan` | +| **Forgejo-User** | `gitadmin` | + +--- + +## 9. Wichtige Befehle ### Vom MacBook aus ```bash @@ -205,10 +218,10 @@ Laufende Anwendung git push origin develop # SSH auf Server -ssh -i .keys/deploy_ed25519 deploy@ +ssh -i .keys/deploy_ed25519 deploy@172.20.10.59 # Grafana oeffnen (SSH-Tunnel) -ssh -L 3001:localhost:3001 -i .keys/deploy_ed25519 deploy@ +ssh -L 3001:localhost:3001 -i .keys/deploy_ed25519 deploy@172.20.10.59 # Dann im Browser: http://localhost:3001 ```