Files
michaelschiemer/.deployment-backup/ansible/netcup-simple-deploy/SERVER-SETUP.md
Michael Schiemer 9b74ade5b0 feat: Fix discovery system critical issues
Resolved multiple critical discovery system issues:

## Discovery System Fixes
- Fixed console commands not being discovered on first run
- Implemented fallback discovery for empty caches
- Added context-aware caching with separate cache keys
- Fixed object serialization preventing __PHP_Incomplete_Class

## Cache System Improvements
- Smart caching that only caches meaningful results
- Separate caches for different execution contexts (console, web, test)
- Proper array serialization/deserialization for cache compatibility
- Cache hit logging for debugging and monitoring

## Object Serialization Fixes
- Fixed DiscoveredAttribute serialization with proper string conversion
- Sanitized additional data to prevent object reference issues
- Added fallback for corrupted cache entries

## Performance & Reliability
- All 69 console commands properly discovered and cached
- 534 total discovery items successfully cached and restored
- No more __PHP_Incomplete_Class cache corruption
- Improved error handling and graceful fallbacks

## Testing & Quality
- Fixed code style issues across discovery components
- Enhanced logging for better debugging capabilities
- Improved cache validation and error recovery

Ready for production deployment with stable discovery system.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-13 12:04:17 +02:00

2.3 KiB

Production Server Setup - Debian 12

Netcup Panel Konfiguration

1. Fresh OS Installation

  1. Netcup Panel → "Server" → Ihr Server
  2. "Betriebssystem" → "Neu installieren"
  3. OS wählen: Debian 12 (Bookworm) 64-bit
  4. Installation starten und warten bis abgeschlossen

2. SSH-Key Konfiguration

  1. SSH-Key hinzufügen:

    ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIA3DqB1B4wa5Eo116bJ1HybFagK3fU0i+wJ6mAHI1L3i production@michaelschiemer.de
    
  2. Im Netcup Panel:

    • "SSH-Keys" → "Neuen SSH-Key hinzufügen"
    • Name: production-michaelschiemer
    • Key: (oben kopieren und einfügen)
    • Key dem Server zuweisen

3. Root-Zugang aktivieren

  1. Console/KVM über Netcup Panel öffnen
  2. Als root einloggen (initial Setup)
  3. SSH-Key für root aktivieren:
    # SSH-Key bereits durch Panel hinzugefügt
    # Root SSH sollte funktionieren
    

4. Deploy User einrichten

# Als root ausführen:
useradd -m -s /bin/bash deploy
usermod -aG sudo deploy

# SSH-Key für deploy user
mkdir -p /home/deploy/.ssh
cp /root/.ssh/authorized_keys /home/deploy/.ssh/
chown -R deploy:deploy /home/deploy/.ssh
chmod 700 /home/deploy/.ssh
chmod 600 /home/deploy/.ssh/authorized_keys

# Sudo ohne Passwort für deploy
echo "deploy ALL=(ALL) NOPASSWD:ALL" > /etc/sudoers.d/deploy

Warum Debian 12?

Production-Vorteile:

  • Stabilität: Bewährte LTS-Pakete, längere Support-Zyklen
  • Performance: Geringerer Ressourcenverbrauch als Ubuntu
  • Security: Conservative Updates, weniger experimentelle Features
  • Docker-Optimiert: Perfekt für containerisierte Deployments
  • Minimale Basis: Nur essentielle Pakete, weniger Attack Surface

Server-Spezifikationen:

  • RAM: Minimum 2GB (empfohlen 4GB+)
  • Storage: Minimum 20GB SSD
  • CPU: 1+ vCPU (empfohlen 2+ vCPU)
  • Network: Stable internet, static IP

Nach Installation testen:

# SSH-Connectivity Test
ssh -i ~/.ssh/production deploy@94.16.110.151

# System Info
ssh -i ~/.ssh/production deploy@94.16.110.151 'uname -a && lsb_release -a'

Nächste Schritte:

Nach erfolgreichem Server-Setup:

  1. SSH-Connectivity bestätigen
  2. Ansible Ping-Test durchführen
  3. Deployment-Playbook ausführen

🔑 SSH-Key Fingerprint: SHA256:7FBYrZpDcYcKXpeM8OHoGZZBHwxNORoOFWuzP2MpDpQ