First trial run on CM5

This commit is contained in:
2026-05-13 10:56:35 -04:00
parent 1722fea41f
commit 272d3b3c59
2 changed files with 15 additions and 40 deletions

View File

@@ -1,28 +1,13 @@
#!/usr/bin/env bash
# scripts/setup-cm5.sh — CM5 Provisioning
# Installs necessary dependencies on the CM5 via SSH and syncs the repository.
# Installs necessary dependencies on the CM5.
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
cd "$ROOT"
CM5_HOST="${1:-}"
CM5_USER="${2:-pi}"
if [[ -z "$CM5_HOST" ]]; then
echo "Usage: ./scripts/setup-cm5.sh <CM5_IP_OR_HOSTNAME> [USERNAME]"
echo "Example: ./scripts/setup-cm5.sh 192.168.1.50 pi"
exit 1
fi
echo "=================================================="
echo "1. Installing system dependencies on $CM5_HOST..."
echo " Installing system dependencies on CM5 "
echo "=================================================="
ssh -t "$CM5_USER@$CM5_HOST" << 'EOF'
set -e
sudo apt-get update
sudo apt-get install -y curl lsof iproute2 gawk build-essential pkg-config libssl-dev cmake rsync
@@ -32,20 +17,10 @@ if ! command -v cargo &> /dev/null; then
else
echo "Rust is already installed."
fi
EOF
echo ""
echo "=================================================="
echo "2. Syncing codebase to CM5..."
echo "=================================================="
rsync -avz --exclude 'target' --exclude '.git' --exclude 'data' --exclude 'paper/_output' ./ "$CM5_USER@$CM5_HOST:~/quic_ecs_dt/"
echo ""
echo "=================================================="
echo "✅ CM5 is configured and code is synced!"
echo "CM5 is configured and code is synced!"
echo "=================================================="
echo "To start the server benchmarking script, SSH into the CM5:"
echo " ssh $CM5_USER@$CM5_HOST"
echo " cd ~/quic_ecs_dt"
echo " source ~/.cargo/env"
echo " RUN_SIMULATOR=0 ./scripts/bench-loss.sh"