diff --git a/monitoring/Dockerfile b/monitoring/Dockerfile index 3ca0f72cd6..225320623e 100644 --- a/monitoring/Dockerfile +++ b/monitoring/Dockerfile @@ -22,6 +22,7 @@ RUN rm -rf __pycache__ ADD ./interfaces /app/interfaces ADD ./monitoring /app/monitoring COPY ./monitoring/health_check.sh /app/health_check.sh +RUN chmod 766 /app/health_check.sh WORKDIR /app/monitoring # Additional preparations for uss_qualifier/webapp diff --git a/monitoring/mock_uss/run_locally_tracer.sh b/monitoring/mock_uss/run_locally_tracer.sh index 30df772b0d..33abfaa2e7 100755 --- a/monitoring/mock_uss/run_locally_tracer.sh +++ b/monitoring/mock_uss/run_locally_tracer.sh @@ -20,13 +20,15 @@ POLL='--rid-isa-poll-interval=15 --scd-operation-poll-interval=15 --scd-constrai TRACER_OPTIONS="$AREA $LOGS $MONITOR $POLL" +PORT=${PORT:-8078} AUTH="DummyOAuth(http://host.docker.internal:8085/token,tracer)" -DSS="http://host.docker.internal:8082" +DSS=${MOCK_USS_DSS_URL:-"http://host.docker.internal:8082"} PUBLIC_KEY="/var/test-certs/auth2.pem" AUD=${MOCK_USS_TOKEN_AUDIENCE:-localhost,host.docker.internal} -container_name="mock_uss_tracer" -PORT=8078 +RID_VERSION=${MOCK_USS_RID_VERSION:-"F3411-19"} +CONTAINER_NAME=${MOCK_CONTAINER_NAME:-"mock_uss_tracer"} + BASE_URL="http://${MOCK_USS_TOKEN_AUDIENCE:-host.docker.internal}:${PORT}" if [ "$CI" == "true" ]; then @@ -35,10 +37,10 @@ else docker_args="-it" fi -docker container rm -f ${container_name} || echo "No pre-existing ${container_name} container to remove" +docker container rm -f "${CONTAINER_NAME}" || echo "No pre-existing ${CONTAINER_NAME} container to remove" # shellcheck disable=SC2086 -docker run ${docker_args} --name ${container_name} \ +docker run ${docker_args} --name "${CONTAINER_NAME}" \ -u "$(id -u):$(id -g)" \ -e MOCK_USS_AUTH_SPEC="${AUTH}" \ -e MOCK_USS_DSS_URL="${DSS}" \ @@ -47,6 +49,7 @@ docker run ${docker_args} --name ${container_name} \ -e MOCK_USS_BASE_URL="${BASE_URL}" \ -e MOCK_USS_TRACER_OPTIONS="${TRACER_OPTIONS}" \ -e MOCK_USS_SERVICES="tracer" \ + -e MOCK_USS_RID_VERSION="${RID_VERSION}" \ -p ${PORT}:5000 \ -v "${SCRIPT_DIR}/../../build/test-certs:/var/test-certs:ro" \ -v "$(pwd)/$OUTPUT_DIR:/app/monitoring/mock_uss/$OUTPUT_DIR" \ diff --git a/monitoring/mock_uss/run_locally_tracer_v22a.sh b/monitoring/mock_uss/run_locally_tracer_v22a.sh new file mode 100755 index 0000000000..b648783232 --- /dev/null +++ b/monitoring/mock_uss/run_locally_tracer_v22a.sh @@ -0,0 +1,12 @@ +#!/usr/bin/env bash + +SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd ) +if [ -z "${DO_NOT_BUILD_MONITORING}" ]; then + "${SCRIPT_DIR}/../build.sh" || exit 1 +fi + +MOCK_CONTAINER_NAME="mock_uss_tracer_v22a" \ +MOCK_USS_RID_VERSION="F3411-22a" \ +MOCK_USS_DSS_URL="http://host.docker.internal:8082" \ +PORT=8088 \ +"${SCRIPT_DIR}/run_locally_tracer.sh" "$@" \ No newline at end of file diff --git a/monitoring/mock_uss/templates/tracer/base.html b/monitoring/mock_uss/templates/tracer/base.html index 33c6d52b91..be39709f89 100644 --- a/monitoring/mock_uss/templates/tracer/base.html +++ b/monitoring/mock_uss/templates/tracer/base.html @@ -12,7 +12,7 @@