aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMD IRSHAD SHEIKH <md.irshad.sheikh@huawei.com>2021-07-26 18:03:45 +0530
committerMD IRSHAD SHEIKH <md.irshad.sheikh@huawei.com>2021-07-26 18:05:07 +0530
commit4ac159ec1a45b1d538baeb1ba01d89980d6acf42 (patch)
treecaae8c8a445fb73ed28de00c4ee9dbaa94458213
parentc86a2571e18029e148c70d06d099287bb26b99f0 (diff)
Added mariadb connectivity and solved certificate issue
Issue-ID: SO-3674 Signed-off-by: MD IRSHAD SHEIKH <md.irshad.sheikh@huawei.com> Change-Id: Idc0ed441d1371b057b7c3a80c8c675c66be95fe7
-rw-r--r--packages/docker/src/main/docker/docker-files/Dockerfile.so-bpmn-infra1
-rwxr-xr-xpackages/docker/src/main/docker/docker-files/scripts/start-app.sh65
2 files changed, 46 insertions, 20 deletions
diff --git a/packages/docker/src/main/docker/docker-files/Dockerfile.so-bpmn-infra b/packages/docker/src/main/docker/docker-files/Dockerfile.so-bpmn-infra
index 86c96174dc..d735827469 100644
--- a/packages/docker/src/main/docker/docker-files/Dockerfile.so-bpmn-infra
+++ b/packages/docker/src/main/docker/docker-files/Dockerfile.so-bpmn-infra
@@ -14,3 +14,4 @@ VOLUME /camunda/app/config
COPY maven/app.war /camunda/webapps/mso.war
COPY scripts/wait-for.sh /camunda
+COPY scripts/start-app.sh /camunda
diff --git a/packages/docker/src/main/docker/docker-files/scripts/start-app.sh b/packages/docker/src/main/docker/docker-files/scripts/start-app.sh
index 74d17fc9b7..54cf95e1cb 100755
--- a/packages/docker/src/main/docker/docker-files/scripts/start-app.sh
+++ b/packages/docker/src/main/docker/docker-files/scripts/start-app.sh
@@ -1,24 +1,41 @@
#!/bin/sh
+#Copying mariadb-java-client for connectivity to mariadb
+unzip /camunda/webapps/mso.war
+cp /camunda/WEB-INF/lib/mariadb-java-client-2.6.2.jar /camunda/lib
+
if [ `id -u` = 0 ]
then
# Install certificates found in the /app/ca-certificates volume, if any.
needUpdate=FALSE
-
- for certificate in `ls -1 /app/ca-certificates`; do
- echo "Installing $certificate in /usr/local/share/ca-certificates"
- cp /app/ca-certificates/$certificate /usr/local/share/ca-certificates/$certificate
- needUpdate=TRUE
- done
+ if [ ${APP} = "bpmn-infra" ]; then
+ for certificate in `ls -1 /camunda/app/ca-certificates`; do
+ echo "Installing $certificate in /usr/local/share/ca-certificates"
+ cp /camunda/app/ca-certificates/$certificate /usr/local/share/ca-certificates/$certificate
+ needUpdate=TRUE
+ done
+ else
+ for certificate in `ls -1 /app/ca-certificates`; do
+ echo "Installing $certificate in /usr/local/share/ca-certificates"
+ cp /app/ca-certificates/$certificate /usr/local/share/ca-certificates/$certificate
+ needUpdate=TRUE
+ done
+ fi
if [ $needUpdate = TRUE ]; then
update-ca-certificates --fresh
fi
- # Re-exec this script as the 'onap' user.
- this=`readlink -f $0`
- exec su so -c "$this"
+ if [ ${APP} = "bpmn-infra" ]; then
+ # Re-exec this script as the 'camunda' user.
+ this=`readlink -f $0`
+ exec su camunda -c "$this"
+ else
+ # Re-exec this script as the 'onap' user.
+ this=`readlink -f $0`
+ exec su so -c "$this"
+ fi
fi
touch /app/app.jar
@@ -98,21 +115,29 @@ read_properties(){
}
-
-if [ -n "${AAF_SSL_CERTS_ENABLED}" ]; then
-read_properties "$(head -n 4 /app/certs/.passphrases)"
+if [ ${APP} = "bpmn-infra" ]; then
+ if [ -n "${AAF_SSL_CERTS_ENABLED}" ]; then
+ read_properties "$(head -n 4 /camunda/app/certs/.passphrases)"
+ fi
+else
+ if [ -n "${AAF_SSL_CERTS_ENABLED}" ]; then
+ read_properties "$(head -n 4 /app/certs/.passphrases)"
+ fi
fi
echo "JVM Arguments: ${jvmargs}"
-java ${jvmargs} -jar app.jar
-rc=$?
+if [ ! ${APP} = "bpmn-infra" ]; then
+ java ${jvmargs} -jar app.jar
+ rc=$?
+ echo "Application exiting with status code $rc"
-echo "Application exiting with status code $rc"
+ if [ ! -z "${EXIT_DELAY}" -a "${EXIT_DELAY}" != 0 ]; then
+ echo "Delaying $APP exit for $EXIT_DELAY seconds"
+ sleep $EXIT_DELAY
+ fi
-if [ ! -z "${EXIT_DELAY}" -a "${EXIT_DELAY}" != 0 ]; then
- echo "Delaying $APP exit for $EXIT_DELAY seconds"
- sleep $EXIT_DELAY
+ exit $rc
+else
+ ./camunda.sh
fi
-
-exit $rc