Skip to content

Commit ae8b6fe

Browse files
authored
Make it dreamy to run robusta-runner locally (#894)
1 parent 97e7e5e commit ae8b6fe

File tree

2 files changed

+25
-6
lines changed

2 files changed

+25
-6
lines changed

mirrord.json

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"target": {
3+
"path": "deployment/robusta-runner",
4+
"namespace": "default"
5+
},
6+
"feature": {
7+
"env": {
8+
"include": "nothing"
9+
},
10+
"fs": {
11+
"mode": "local"
12+
},
13+
"network": {
14+
"incoming": {
15+
"mode": "steal",
16+
"port_mapping": [[ 6000, 5000 ]]
17+
}
18+
}
19+
}
20+
}

run_runner_locally.sh

+5-6
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ set -e
66

77
# Settings you might want to change
88
export PYTHON_BINARY=python3.9
9-
export PORT=5000
9+
export PORT=6000 # if you change this, update port_mapping in mirrord.json too
10+
export LOG_LEVEL=INFO
11+
export TRACE_INCOMING_REQUESTS=false
1012

1113
# Internal constants
1214
export RED='\033[0;31m'
@@ -42,7 +44,7 @@ ln -fsw $(pwd)/playbooks/pyproject.toml ./deployment/playbooks/defaults
4244

4345
echo "Checking if runner can listen on port ${PORT}"
4446
if lsof -Pi :${PORT} -sTCP:LISTEN -t >/dev/null ; then
45-
echo -e "${RED}Error: Port ${PORT} is already in use. Exiting.${NC}"
47+
echo -e "${RED}Error: Port ${PORT} is already in use. Free up the port, or edit this script and change \$PORT. Exiting.${NC}"
4648
exit 1
4749
fi
4850

@@ -65,8 +67,5 @@ export INTERNAL_PLAYBOOKS_ROOT=./src/robusta/core/playbooks/internal
6567
export PLAYBOOKS_ROOT=./deployment/playbooks
6668
export REPO_LOCAL_BASE_DIR=./deployment/git_playbooks
6769
export INSTALLATION_NAMESPACE=default
68-
export TRACE_INCOMING_REQUESTS=true
69-
export LOG_LEVEL=DEBUG
70-
71-
poetry run python3 -m robusta.runner.main
7270

71+
mirrord exec -f mirrord.json -- poetry run python3 -m robusta.runner.main

0 commit comments

Comments
 (0)