diff --git a/config/supervisord.conf b/config/supervisord.conf index 3b6824c..d75298a 100644 --- a/config/supervisord.conf +++ b/config/supervisord.conf @@ -64,6 +64,14 @@ stopasgroup=true stdout_logfile=%(ENV_TARGET)s/dominion_worker.log stderr_logfile=%(ENV_TARGET)s/dominion_worker.log +[program:orion] +autorestart=false +command=run_orion.sh +stopsignal=KILL +stopasgroup=true +stdout_logfile=%(ENV_TARGET)s/orion.log +stderr_logfile=%(ENV_TARGET)s/orion.log + [program:cusdeb-api] autorestart=false command=run_cusdeb_api.sh diff --git a/functions.sh b/functions.sh index 907fb42..51eb054 100644 --- a/functions.sh +++ b/functions.sh @@ -405,12 +405,14 @@ install_requirements_to_virtenvs() { exec_cmd "${TARGET}/${service}"-env/bin/pip install -r "${TARGET}/${service}"/requirements.txt done - # CusDeb API is used as an external dependency for BlackMagic and Dominion + # CusDeb API is used as an external dependency for BlackMagic, Dominion and Orion exec_cmd "${TARGET}"/blackmagic-env/bin/pip install -r "${TARGET}"/cusdeb-api/requirements.txt exec_cmd "${TARGET}"/dominion-env/bin/pip install -r "${TARGET}"/cusdeb-api/requirements.txt + exec_cmd "${TARGET}"/orion-env/bin/pip install -r "${TARGET}"/cusdeb-api/requirements.txt + # Shirow is used as an external dependency for BlackMagic and Dominion exec_cmd "${TARGET}"/blackmagic-env/bin/pip install -r "${TARGET}"/shirow/requirements.txt diff --git a/runners/run_orion.sh b/runners/run_orion.sh index 7df4e92..b8ab43e 100755 --- a/runners/run_orion.sh +++ b/runners/run_orion.sh @@ -1,15 +1,12 @@ #!/bin/bash pushd "${TARGET}/orion" - PYTHONPATH="${TARGET}/shirow:$(pwd)" - export PYTHONPATH + export PYTHONPATH="${TARGET}/shirow:${TARGET}/cusdeb-api:$(pwd)" + export DJANGO_SETTINGS_MODULE=orion.settings - env PATH="${PATH}:$(pwd)/bin" "${TARGET}"/orion-env/bin/python ./bin/server.py \ + env "${TARGET}"/orion-env/bin/python ./bin/server.py \ --log-file-prefix="${TARGET}"/orion.log \ - --logging=debug \ --port="${ORION_PORT}" \ - --redis-host="${REDIS_HOST}" \ - --redis-port="${REDIS_PORT}" \ - --token-key="${TOKEN_KEY}" \ - --dominion-workspace="${TARGET}"/dominion-workspace + --token-key="${SECRET_KEY}" \ + --logging=debug popd