fix: Gitea Traefik routing and connection pool optimization
Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Failing after 10m14s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Has been skipped
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
Security Vulnerability Scan / Check for Dependency Changes (push) Failing after 11m25s
Security Vulnerability Scan / Composer Security Audit (push) Has been cancelled
Some checks failed
🚀 Build & Deploy Image / Determine Build Necessity (push) Failing after 10m14s
🚀 Build & Deploy Image / Build Runtime Base Image (push) Has been skipped
🚀 Build & Deploy Image / Build Docker Image (push) Has been skipped
🚀 Build & Deploy Image / Run Tests & Quality Checks (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Staging (push) Has been skipped
🚀 Build & Deploy Image / Auto-deploy to Production (push) Has been skipped
Security Vulnerability Scan / Check for Dependency Changes (push) Failing after 11m25s
Security Vulnerability Scan / Composer Security Audit (push) Has been cancelled
- Remove middleware reference from Gitea Traefik labels (caused routing issues) - Optimize Gitea connection pool settings (MAX_IDLE_CONNS=30, authentication_timeout=180s) - Add explicit service reference in Traefik labels - Fix intermittent 504 timeouts by improving PostgreSQL connection handling Fixes Gitea unreachability via git.michaelschiemer.de
This commit is contained in:
114
deployment/docs/status/pipeline-test-status.md
Normal file
114
deployment/docs/status/pipeline-test-status.md
Normal file
@@ -0,0 +1,114 @@
|
||||
# CI/CD Pipeline Test Status
|
||||
|
||||
**Datum:** 2025-01-XX
|
||||
**Status:** ⚠️ Teilweise abgeschlossen - Push fehlgeschlagen
|
||||
|
||||
## Durchgeführte Schritte
|
||||
|
||||
### ✅ Phase 0: Gitea Caching aktivieren
|
||||
- **Status:** ✅ Abgeschlossen
|
||||
- **Änderungen:** `deployment/stacks/gitea/docker-compose.yml` angepasst
|
||||
- **Cache-Konfiguration:** Redis aktiviert (statt Memory)
|
||||
- **Playbook erstellt:** `deployment/ansible/playbooks/restart-gitea-with-cache.yml`
|
||||
- **Nächster Schritt:** Dateien auf Server synchronisieren und Gitea neu starten
|
||||
|
||||
### ✅ Phase 1: Prerequisites prüfen
|
||||
- **Status:** ✅ Abgeschlossen
|
||||
- **Prerequisites Script:** Ausgeführt
|
||||
- **Gitea Runner:** Registriert, aber nicht gestartet (korrekt, da Token konfiguriert ist)
|
||||
- **Gitea Secrets:** Laut Dokumentation bereits konfiguriert
|
||||
|
||||
### ⚠️ Phase 2: Staging Pipeline Test
|
||||
- **Status:** ⚠️ Teilweise abgeschlossen
|
||||
- **Test-Commit:** ✅ Erstellt (`test: CI/CD pipeline staging test`)
|
||||
- **Push:** ❌ Fehlgeschlagen (504 Error)
|
||||
- **Fehler:** `fatal: unable to access 'https://git.michaelschiemer.de/admin/michaelschiemer.git/': The requested URL returned error: 504`
|
||||
|
||||
## Bekannte Probleme
|
||||
|
||||
### 1. Git Push 504 Error
|
||||
|
||||
**Symptom:**
|
||||
```
|
||||
fatal: unable to access 'https://git.michaelschiemer.de/admin/michaelschiemer.git/': The requested URL returned error: 504
|
||||
```
|
||||
|
||||
**Mögliche Ursachen:**
|
||||
1. **Gitea-Überlastung:** Runner ohne Token bombardiert Gitea mit Requests
|
||||
2. **Server-Überlastung:** Server ist temporär überlastet
|
||||
3. **Netzwerk-Problem:** Verbindungsprobleme zum Server
|
||||
|
||||
**Lösungsansätze:**
|
||||
1. **Gitea Caching aktivieren:** Redis-Cache sollte Performance verbessern
|
||||
2. **Runner Status prüfen:** Sicherstellen, dass Runner nur mit Token läuft
|
||||
3. **Gitea Logs prüfen:** Server-Logs auf Fehler prüfen
|
||||
4. **Retry:** Push später erneut versuchen
|
||||
|
||||
### 2. Gitea Runner ohne Token
|
||||
|
||||
**Problem:** Runner ohne Registration Token läuft in Dauerschleife und bombardiert Gitea mit Requests, was zu Timeouts führt.
|
||||
|
||||
**Lösung:**
|
||||
- ✅ Runner ist registriert (`data/.runner` existiert)
|
||||
- ✅ Registration Token ist in `.env` konfiguriert
|
||||
- ⏸️ Runner Container sind gestoppt (korrekt, bis Deployment abgeschlossen)
|
||||
|
||||
**Runner starten (nach Cache-Aktivierung):**
|
||||
```bash
|
||||
cd deployment/gitea-runner
|
||||
docker compose up -d
|
||||
```
|
||||
|
||||
## Nächste Schritte
|
||||
|
||||
### 1. Gitea Caching aktivieren (Priorität: Hoch)
|
||||
|
||||
Die geänderte `docker-compose.yml` muss auf den Server synchronisiert werden:
|
||||
|
||||
```bash
|
||||
cd deployment/ansible
|
||||
ansible-playbook -i inventory/production.yml \
|
||||
playbooks/sync-stacks.yml \
|
||||
--vault-password-file secrets/.vault_pass
|
||||
```
|
||||
|
||||
Dann Gitea neu starten:
|
||||
|
||||
```bash
|
||||
cd deployment/ansible
|
||||
ansible-playbook -i inventory/production.yml \
|
||||
playbooks/restart-gitea-with-cache.yml \
|
||||
--vault-password-file secrets/.vault_pass
|
||||
```
|
||||
|
||||
### 2. Git Push erneut versuchen
|
||||
|
||||
Nach erfolgreicher Cache-Aktivierung und Gitea-Neustart:
|
||||
|
||||
```bash
|
||||
cd /home/michael/dev/michaelschiemer
|
||||
git push origin staging
|
||||
```
|
||||
|
||||
### 3. Pipeline beobachten
|
||||
|
||||
Nach erfolgreichem Push:
|
||||
- Gitea Actions UI: `https://git.michaelschiemer.de/michael/michaelschiemer/actions`
|
||||
- Jobs beobachten: `changes`, `test`, `build`, `deploy-staging`
|
||||
- Deployment verifizieren
|
||||
|
||||
### 4. Production Pipeline Test
|
||||
|
||||
Nach erfolgreichem Staging-Test:
|
||||
- Test-Commit auf `main` Branch erstellen
|
||||
- Push zu `main`
|
||||
- Production Pipeline beobachten
|
||||
- Deployment verifizieren
|
||||
|
||||
## Referenz
|
||||
|
||||
- [Gitea Cache Aktivierung](./gitea-cache-activation.md)
|
||||
- [Pipeline Test Checklist](../guides/pipeline-test-checklist.md)
|
||||
- [Pipeline Testing Guide](../guides/pipeline-testing-guide.md)
|
||||
- [CI/CD Status](./ci-cd-status.md)
|
||||
|
||||
Reference in New Issue
Block a user