# Einfache CDN-Verwaltung mit Make .PHONY: deploy check health purge-cache warm-cache status reload # Standard deployment deploy: @echo "๐Ÿš€ Deploying Simple CDN..." chmod +x scripts/deploy.sh ./scripts/deploy.sh # Deployment mit Check-Modus (Dry-Run) check: @echo "๐Ÿ” Checking deployment (dry-run)..." ansible-playbook -i inventories/production/hosts.yml playbooks/deploy-simple-cdn.yml --check --diff # Health check aller Nodes health: @echo "๐Ÿฅ Checking CDN health..." ansible cdn_nodes -i inventories/production/hosts.yml -m uri -a "url=https://{{ inventory_hostname }}/health method=GET" # Cache leeren purge-cache: @echo "๐Ÿงน Purging cache on all nodes..." ansible cdn_nodes -i inventories/production/hosts.yml -m shell -a "find /var/cache/nginx/ -type f -delete" @echo "โœ… Cache purged on all nodes" # Cache warming warm-cache: @echo "๐Ÿ”ฅ Warming cache..." chmod +x scripts/warm-cache.sh ./scripts/warm-cache.sh # Status-Report status: @echo "๐Ÿ“Š CDN Status Report..." ansible cdn_nodes -i inventories/production/hosts.yml -m shell -a "echo '=== {{ inventory_hostname }} ===' && /usr/local/bin/cdn-monitor && echo ''" # Nginx neuladen reload: @echo "โš™๏ธ Reloading nginx configuration..." ansible cdn_nodes -i inventories/production/hosts.yml -m systemd -a "name=nginx state=reloaded" # SSL-Zertifikate erneuern renew-ssl: @echo "๐Ÿ” Renewing SSL certificates..." ansible cdn_nodes -i inventories/production/hosts.yml -m shell -a "certbot renew --quiet" # Interaktive Verwaltung manage: @echo "๐Ÿ”ง Starting interactive management..." ansible-playbook -i inventories/production/hosts.yml playbooks/manage-cdn.yml # Hilfe help: @echo "๐Ÿ“– Available commands:" @echo " make deploy - Deploy CDN" @echo " make check - Test deployment (dry-run)" @echo " make health - Check all nodes health" @echo " make purge-cache - Clear all cache" @echo " make warm-cache - Warm cache with popular URLs" @echo " make status - Show detailed status" @echo " make reload - Reload nginx config" @echo " make renew-ssl - Renew SSL certificates" @echo " make manage - Interactive management"