kedge/scripts/failover-test.sh
Tyler King 6058e62348 Initial commit: Kedge network automation platform
Go-based network automation with YANG models, gRPC, Ansible,
Terraform, and Kubernetes integration.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-26 12:09:30 -05:00

26 lines
696 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
# Run WAN failover simulation.
# Usage: ./failover-test.sh
echo "=== Kedge Failover Test ==="
echo "1. Checking WireGuard status..."
wg show wg0 || echo "WARNING: WireGuard interface wg0 not found"
echo ""
echo "2. Checking Kedge DaemonSet health..."
curl -sf http://localhost:9090/healthz && echo " OK" || echo " FAILED"
echo ""
echo "3. Checking Kedge metrics..."
curl -sf http://localhost:9090/metrics | grep -c "kedge_" || echo "No kedge metrics found"
echo ""
echo "4. Running mesh health playbook..."
cd "$(dirname "$0")/../ansible"
ansible-playbook -i inventory/hosts.yml playbooks/mesh-health.yml
echo ""
echo "=== Failover test complete ==="