From 479b73d878468eb980bc436368263b42344147be Mon Sep 17 00:00:00 2001 From: Ittay Stern Date: Thu, 12 Dec 2019 16:55:01 +0200 Subject: Let straightforward `vidkeystorepassword` setting in values.yaml The value of vidkeystorepassword is plugged as environment variable VID_KEYSTORE_PASSWORD. (see commit 7a3e2594; change-id: Ibf52542344ecf79fb947858329f37018731d2270) Now CATALINA_OPTS will be evaluated when container is started, with the actual value of VID_KEYSTORE_PASSWORD env variable. This fixes the issue where CATALINA_OPTS is evaluated at Docker build time, with a static VID_KEYSTORE_PASSWORD value. Issue-ID: VID-494 Issue-ID: VID-650 Change-Id: Ife2a2e92b3745691cc45590d1afd1688d918048f Signed-off-by: Ittay Stern --- deliveries/src/main/docker/docker-files/Dockerfile | 2 -- deliveries/src/main/scripts/localize.sh | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'deliveries/src/main') diff --git a/deliveries/src/main/docker/docker-files/Dockerfile b/deliveries/src/main/docker/docker-files/Dockerfile index 62feb8c3c..f6070d8b1 100755 --- a/deliveries/src/main/docker/docker-files/Dockerfile +++ b/deliveries/src/main/docker/docker-files/Dockerfile @@ -82,8 +82,6 @@ ENV VID_CONTACT_US_LINK="https://todo_contact_us_link.com" \ # Custom options ENV JAVA_OPTS="-Xmx1536m -Xms1536m" -ENV CATALINA_OPTS="-Dvid.keystore.password=${VID_KEYSTORE_PASSWORD} -Dvid.keyalias=vid@vid.onap.org -Dvid.keystore.filename=${VID_KEYSTORE_FILENAME} -Dcom.att.eelf.logging.file=logback.xml -Dcom.att.eelf.logging.path=/tmp" - ADD maven/config/server.xml ${VID_TOMCAT_PATH} ADD maven/scripts/*.sh /tmp/vid/ diff --git a/deliveries/src/main/scripts/localize.sh b/deliveries/src/main/scripts/localize.sh index aca557f36..918027913 100755 --- a/deliveries/src/main/scripts/localize.sh +++ b/deliveries/src/main/scripts/localize.sh @@ -20,4 +20,10 @@ TEMPLATES_BASE_DIR=/usr/local/tomcat/webapps/vid/WEB-INF fillTemplateProperties ${TEMPLATES_BASE_DIR} +# Set CATALINA_OPTS if not defined previously +# Enables late-evaluation of env variables, such as VID_KEYSTORE_PASSWORD +: "${CATALINA_OPTS:=-Dvid.keystore.password=${VID_KEYSTORE_PASSWORD} -Dvid.keyalias=vid@vid.onap.org -Dvid.keystore.filename=${VID_KEYSTORE_FILENAME} -Dcom.att.eelf.logging.file=logback.xml -Dcom.att.eelf.logging.path=/tmp}" +echo "CATALINA_OPTS: ${CATALINA_OPTS}" +export CATALINA_OPTS + catalina.sh run -- cgit 1.2.3-korg