# Complete VM Tasks - Status & Instructions ## Current Status **Automation Scripts Created:** - ✅ `scripts/complete-all-vm-tasks.sh` - Master script to complete all TODO tasks - ✅ `scripts/check-vm-readiness.sh` - Check if VMs are ready - ✅ `scripts/monitor-and-complete.sh` - Auto-monitor and complete when ready **VM Status:** - ⏳ VMs are installing Ubuntu (not reachable yet) - ⏳ Waiting for VMs to complete installation and become SSH-ready ## What Will Be Completed When VMs are ready, the script will automatically: ### For Each VM (100, 101, 102, 103): 1. **Install QEMU Guest Agent** - Installs `qemu-guest-agent` package - Enables and starts the service - Enables agent in Proxmox configuration 2. **Install Service-Specific Software:** - **VM 100 (cloudflare-tunnel)**: Install cloudflared - **VM 101 (k3s-master)**: Install K3s Kubernetes - **VM 102 (git-server)**: Install Gitea - **VM 103 (observability)**: Install Prometheus + Grafana 3. **Verify Services** - Check services are running - Display service status and access URLs ## How to Run ### Option 1: Automatic Monitoring (Recommended) The monitoring script will automatically detect when VMs are ready and run the tasks: ```bash ./scripts/monitor-and-complete.sh ``` This runs in the background and will: - Check VM readiness every 30 seconds - Automatically run `complete-all-vm-tasks.sh` when all VMs are ready - Wait up to 1 hour for VMs to become ready ### Option 2: Manual Check and Run 1. **Check VM readiness:** ```bash ./scripts/check-vm-readiness.sh ``` 2. **When all VMs show as ready, run:** ```bash export SSH_KEY="$HOME/.ssh/id_rsa" ./scripts/complete-all-vm-tasks.sh ``` ## Prerequisites - ✅ SSH keys configured (`~/.ssh/id_rsa`) - ✅ VMs must have Ubuntu installed and booted - ✅ VMs must be reachable on their IP addresses: - VM 100: 192.168.1.60 - VM 101: 192.168.1.188 - VM 102: 192.168.1.121 - VM 103: 192.168.1.82 - ✅ SSH access with user `ubuntu` (or set `SSH_USER`) ## Expected Timeline - **VM Installation**: 15-30 minutes (Ubuntu installation) - **Task Completion**: 10-20 minutes (once VMs are ready) - **Total**: ~30-50 minutes from VM start ## What Happens After After the script completes: 1. **All services installed and running** 2. **Guest agents enabled** for proper Proxmox integration 3. **Manual configuration needed:** - Cloudflare Tunnel: Authenticate and configure tunnel - Gitea: Complete initial web UI setup - Grafana: Change default password - K3s: Deploy namespaces and services ## Troubleshooting ### VMs Not Reachable **Check VM status in Proxmox:** - Ensure VMs are started - Check console to see installation progress - Verify network configuration ### SSH Connection Failed **Verify:** - SSH key is correct: `ls -la ~/.ssh/id_rsa` - VM has completed Ubuntu installation - Network connectivity to VM IPs - SSH service is running on VMs ### Script Fails Partway **Re-run the script:** - It will skip already-completed tasks - Check logs for specific errors - Manually verify service status on affected VMs ## Next Steps After Completion 1. **Verify all services:** ```bash # Check each service curl http://192.168.1.60:... # Cloudflare Tunnel kubectl get nodes # K3s (from VM 101) curl http://192.168.1.121:3000 # Gitea curl http://192.168.1.82:9090 # Prometheus curl http://192.168.1.82:3000 # Grafana ``` 2. **Complete manual configuration:** - See individual service setup guides - Configure Cloudflare Tunnel - Set up Gitea repositories - Import Grafana dashboards 3. **Continue with deployment:** - Deploy K3s services - Set up GitOps - Configure monitoring alerts