cc983963d4
* Compile & copy wg probe * Node status agent WIP * Enable debug logging * Agent submits results - add clap to agent - agent runs network probe - /submit endpoint on NS API * Build clients with timeouts * Update logging and dev scripts * Replace /blaclisted endpoint * Testruns fully functional - task that queues testruns periodically - testruns read/write in DB * Probe scores fully working - testruns are assigned on API - submit updates testruns correctly on NS API side - agent registers with API - agent submits results correctly * Clippy fixes * PR feedback * Clippy again * PR feedback * Run clippy earlier in CI * Make refresh delay configurable in server & agent
50 lines
1.0 KiB
Bash
Executable File
50 lines
1.0 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
set -eu
|
|
|
|
export RUST_LOG=${RUST_LOG:-debug}
|
|
|
|
crate_root=$(dirname $(realpath "$0"))
|
|
gateway_probe_src=$(dirname $(dirname "$crate_root"))/nym-vpn-client/nym-vpn-core
|
|
echo "gateway_probe_src=$gateway_probe_src"
|
|
echo "crate_root=$crate_root"
|
|
|
|
export NODE_STATUS_AGENT_PROBE_PATH="$crate_root/nym-gateway-probe"
|
|
|
|
# build & copy over GW probe
|
|
function copy_gw_probe() {
|
|
pushd $gateway_probe_src
|
|
cargo build --release --package nym-gateway-probe
|
|
cp target/release/nym-gateway-probe "$crate_root"
|
|
$crate_root/nym-gateway-probe --version
|
|
popd
|
|
}
|
|
|
|
function build_agent() {
|
|
cargo build --package nym-node-status-agent --release
|
|
}
|
|
|
|
function swarm() {
|
|
local workers=$1
|
|
echo "Running $workers in parallel"
|
|
|
|
build_agent
|
|
|
|
for ((i=1; i<=$workers; i++)); do
|
|
../target/release/nym-node-status-agent run-probe &
|
|
done
|
|
|
|
wait
|
|
|
|
echo "All agents completed"
|
|
}
|
|
|
|
export NODE_STATUS_AGENT_SERVER_ADDRESS="http://127.0.0.1"
|
|
export NODE_STATUS_AGENT_SERVER_PORT="8000"
|
|
|
|
copy_gw_probe
|
|
|
|
swarm 30
|
|
|
|
# cargo run -- run-probe
|