Use this prompt to have an AI agent install UltraBalancer:
Copy
Ask AI
Install UltraBalancer load balancer on Ubuntu 22.04 server:1. Install Rust toolchain and dependencies2. Clone https://github.com/bas3line/ultrabalancer.git 3. Build with cargo build --release4. Install to /usr/local/bin/ultrabalancer5. Verify with ultrabalancer --versionPlease execute these commands and show me the output.
Create a UltraBalancer configuration file at /etc/ultrabalancer/config.yaml:- Listen on port 80- Backend servers: 192.168.1.10:8080, 192.168.1.11:8080, 192.168.1.12:8080- Use round-robin algorithm- Enable health checks every 5 seconds- Maximum 3 failures before marking server downGenerate the complete YAML configuration file.
Create a systemd service for UltraBalancer:1. Create service file at /etc/systemd/system/ultrabalancer.service2. Run as user 'ultrabalancer'3. Use config file /etc/ultrabalancer/config.yaml4. Auto-restart on failure5. Enable on boot6. Start the service and show statusExecute all steps.
Create a Docker Compose setup for UltraBalancer:1. Use image: ghcr.io/bas3line/ultrabalancer:latest2. Map port 80 to container port 80803. Mount config.yaml file4. Include 3 nginx backend containers5. Create custom network6. Start with docker-compose up -dGenerate the docker-compose.yml file and start the services.
Create Kubernetes manifests for UltraBalancer:1. ConfigMap with configuration2. Deployment with 2 replicas 3. Service (LoadBalancer type)4. Health check probes5. Apply all manifestsGenerate all YAML files and apply to cluster.
Test UltraBalancer is working:1. Check health endpoint: curl localhost/health2. Check metrics: curl localhost/metrics 3. Send 10 test requests4. Verify requests are distributed across backendsShow all outputs.
Test UltraBalancer failover:1. Check current health status2. Kill one backend server3. Wait 10 seconds4. Check health status again (should show degraded)5. Send 10 requests (should only go to healthy backends)6. Restart the backend7. Verify it recoversShow all outputs and verify failover works.
Add a new backend server to UltraBalancer:1. Edit /etc/ultrabalancer/config.yaml2. Add new backend: 192.168.1.20:8080 with weight 1003. Reload service: sudo systemctl reload ultrabalancer4. Verify backend is healthy5. Test traffic distributionShow updated config and verification.
Switch Algorithm
Copy
Ask AI
Change load balancing algorithm to least-connections:1. Edit config file2. Change algorithm field 3. Restart service4. Send test requests5. Verify new distributionShow before/after metrics.
Setup Monitoring
Copy
Ask AI
Setup Prometheus monitoring for UltraBalancer:1. Install Prometheus2. Configure scrape endpoint3. Restart Prometheus 4. Verify metrics collection5. Create basic dashboardShow Prometheus config and verify data collection.
Production Hardening
Copy
Ask AI
Harden UltraBalancer for production:1. Create dedicated user2. Set file permissions3. Configure resource limits4. Setup log rotation5. Configure firewall rules6. Enable systemd hardeningApply all hardening steps and verify.
Use this comprehensive prompt for full deployment:
Copy
Ask AI
Deploy UltraBalancer on Ubuntu 22.04 production server:Repository: https://github.com/bas3line/ultrabalancerRequirements:- Build from source using Rust/Cargo- Install to /usr/local/bin- Config: /etc/ultrabalancer/config.yaml- Listen on port 80- Backends: 10.0.1.10:8080 (weight 200), 10.0.1.11:8080 (weight 100)- Use least-connections algorithm- Health checks every 5 seconds- Run as systemd service- Start on boot- Run as unprivileged userSteps:1. Install dependencies2. Build and install3. Create user and directories4. Create configuration5. Create systemd service6. Configure firewall7. Start and verifyShow output of: ultrabalancer --version, curl localhost/health, curl localhost/metrics