From fb93b8d2f9ebb5e165b260fea67ee19e4dc876a3 Mon Sep 17 00:00:00 2001 From: Shwetank Dave Date: Wed, 4 Apr 2018 13:23:47 -0400 Subject: [PATCH] [AAI-804] Updating dockerfile and start script. Issue-ID: AAI-804 Change-Id: I45c9beeca2d6e27d8aec787e76e3bb50780bead9 Signed-off-by: Shwetank Dave --- bundleconfig-local/etc/logback.xml | 212 +++++++++++++++++++++++++++++++++++++ src/main/bin/start.sh | 6 +- src/main/docker/Dockerfile | 3 + 3 files changed, 220 insertions(+), 1 deletion(-) create mode 100644 bundleconfig-local/etc/logback.xml diff --git a/bundleconfig-local/etc/logback.xml b/bundleconfig-local/etc/logback.xml new file mode 100644 index 0000000..a108f9c --- /dev/null +++ b/bundleconfig-local/etc/logback.xml @@ -0,0 +1,212 @@ + + + + + + + + + + + + + + + + + + + + + + + + + ${errorLogPattern} + + + + + + + + + + + ${logDirectory}/${generalLogName}.log + + ${logDirectory}/${generalLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + ${errorLogPattern} + + + + + + INFO + + 256 + + + + + + + + ${logDirectory}/${auditLogName}.log + + ${logDirectory}/${auditLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + ${auditMetricPattern} + + + + 256 + + + + + ${logDirectory}/${metricsLogName}.log + + ${logDirectory}/${metricsLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + + ${auditMetricPattern} + + + + + + 256 + + + + + ${logDirectory}/${debugLogName}.log + + ${logDirectory}/${debugLogName}.%d{yyyy-MM-dd}.log.zip + + 60 + + + ${errorLogPattern} + + + + + 256 + + false + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/main/bin/start.sh b/src/main/bin/start.sh index 2f14a98..3d6036f 100644 --- a/src/main/bin/start.sh +++ b/src/main/bin/start.sh @@ -1,6 +1,8 @@ #!/bin/sh BASEDIR="/opt/app/search-data-service" +AJSC_HOME="$BASEDIR" +AJSC_CONF_HOME="$AJSC_HOME/bundleconfig/" if [ -z "$CONFIG_HOME" ]; then echo "CONFIG_HOME must be set in order to start up process" @@ -27,7 +29,9 @@ keytool -importkeystore -noprompt -deststorepass $PASS -destkeypass $PASS -srcke ## import into cacerts sudo keytool -importkeystore -noprompt -deststorepass changeit -destkeypass changeit -destkeystore /$JAVA_HOME/jre/lib/security/cacerts -srckeystore $BASEDIR/config/auth/onap.p12 -srcstoretype PKCS12 -srcstorepass $PASS -alias tomcat -PROPS="$PROPS -Dlogback.configurationFile=$BASEDIR/bundleconfig/etc/logback.xml" +PROPS="-DAJSC_HOME=$AJSC_HOME" +PROPS="$PROPS -DAJSC_CONF_HOME=$AJSC_CONF_HOME" +PROPS="$PROPS -Dlogging.config=$BASEDIR/bundleconfig/etc/logback.xml" PROPS="$PROPS -DCONFIG_HOME=$CONFIG_HOME" PROPS="$PROPS -DKEY_STORE_PASSWORD=$KEY_STORE_PASSWORD" JVM_MAX_HEAP=${MAX_HEAP:-1024} diff --git a/src/main/docker/Dockerfile b/src/main/docker/Dockerfile index 1fccaf4..ad402b2 100644 --- a/src/main/docker/Dockerfile +++ b/src/main/docker/Dockerfile @@ -13,9 +13,12 @@ RUN export JAVA_HOME # Build up the deployment folder structure RUN mkdir -p $MICRO_HOME +RUN mkdir -p $MICRO_HOME/bundleconfig/etc ADD search-data-service* $MICRO_HOME/ RUN mkdir -p $BIN_HOME COPY *.sh $BIN_HOME +COPY bundleconfig-local $MICRO_HOME/bundleconfig +COPY bundleconfig-local/etc/logback.xml $MICRO_HOME/bundleconfig/etc RUN chmod 755 $BIN_HOME/* RUN ln -s /logs $MICRO_HOME/logs -- 2.16.6