aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexis de Talhouƫt <alexis.de_talhouet@bell.ca>2018-11-20 13:17:09 +0000
committerGerrit Code Review <gerrit@onap.org>2018-11-20 13:17:09 +0000
commitbf70faf7d2051556669de353a0100c02d3f7c52a (patch)
tree4475909a535bd3756b4a32c6b034f5e11e259499
parent043ceb4006aee8bc2750f90522996818d02b0884 (diff)
parentafb0a0916b35b641e42477985a7aa1b2bb6937c3 (diff)
Merge "Store .installed marker in persistent volume"
-rwxr-xr-xkubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh54
-rw-r--r--kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/appc.properties2
-rw-r--r--kubernetes/appc/values.yaml3
3 files changed, 35 insertions, 24 deletions
diff --git a/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh b/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh
index 705f3effb5..6a36fdf37b 100755
--- a/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh
+++ b/kubernetes/appc/resources/config/appc/opt/onap/appc/bin/startODL.sh
@@ -56,28 +56,11 @@ SLEEP_TIME=${SLEEP_TIME:-120}
MYSQL_PASSWD=${MYSQL_PASSWD:-{{.Values.config.mariadbRootPassword}}}
ENABLE_ODL_CLUSTER=${ENABLE_ODL_CLUSTER:-false}
ENABLE_AAF=${ENABLE_AAF:-true}
+DBINIT_DIR=${DBINIT_DIR:-/opt/opendaylight/current/daexim}
appcInstallStartTime=$(date +%s)
#
-# Adding the DMAAP_TOPIC_ENV variable into APPC-ASDC-LISTENER properties
-#
-DMAAP_TOPIC_ENV=${DMAAP_TOPIC_ENV}
-
-if [ -z "$DMAAP_TOPIC_ENV" ]
- then
- echo "DMAAP_TOPIC_ENV shell variable is empty. Adding default value OS-ETE-DFW"
- DMAAP_TOPIC_ENV="OS-ETE-DFW"
- else
- echo "DMAAP_TOPIC_ENV shell variable exists and it's $DMAAP_TOPIC_ENV"
-fi
-
-echo "Adding a value to property appc.asdc.env in appc.properties for appc-asdc-listener feature"
-echo "" >> $APPC_HOME/data/properties/appc.properties
-echo "appc.asdc.env=$DMAAP_TOPIC_ENV" >> $APPC_HOME/data/properties/appc.properties
-echo "" >> $APPC_HOME/data/properties/appc.properties
-
-#
# Wait for database to init properly
#
echo "Waiting for mariadbgalera"
@@ -88,14 +71,39 @@ do
done
echo -e "\nmariadbgalera ready"
-if [ ! -f ${SDNC_HOME}/.installed ]
+if [ ! -d ${DBINIT_DIR} ]
then
- echo "Installing SDNC database"
- ${SDNC_HOME}/bin/installSdncDb.sh
+ mkdir -p ${DBINIT_DIR}
+fi
- echo "Installing APPC database"
- ${APPC_HOME}/bin/installAppcDb.sh
+if [ ! -f ${DBINIT_DIR}/.installed ]
+then
+ sdnc_db_exists=$(mysql -h {{.Values.config.mariadbGaleraSVCName}}.{{.Release.Namespace}} -u root -p{{.Values.config.mariadbRootPassword}} mysql <<-END
+show databases like 'sdnctl';
+END
+)
+ if [ "x${sdnc_db_exists}" == "x" ]
+ then
+ echo "Installing SDNC database"
+ ${SDNC_HOME}/bin/installSdncDb.sh
+ fi
+
+ appc_db_exists=$(mysql -h {{.Values.config.mariadbGaleraSVCName}}.{{.Release.Namespace}} -u root -p{{.Values.config.mariadbRootPassword}} mysql <<-END
+show databases like 'appcctl';
+END
+)
+ if [ "x${appc_db_exists}" == "x" ]
+ then
+ echo "Installing APPC database"
+ ${APPC_HOME}/bin/installAppcDb.sh
+ fi
+ echo "Installed at `date`" > ${DBINIT_DIR}/.installed
+fi
+
+
+if [ ! -f ${SDNC_HOME}/.installed ]
+then
echo "Installing ODL Host Key"
${SDNC_HOME}/bin/installOdlHostKey.sh
diff --git a/kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/appc.properties b/kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/appc.properties
index d0a237acc8..770142ad59 100644
--- a/kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/appc.properties
+++ b/kubernetes/appc/resources/config/appc/opt/onap/appc/data/properties/appc.properties
@@ -128,3 +128,5 @@ appc.OAM.topic.write=testOAM
appc.OAM.client.name=testOAM
appc.OAM.provider.user={{.Values.config.odlUser}}
appc.OAM.provider.pass={{.Values.config.odlPassword}}
+
+appc.asdc.env={{.Values.config.dmaapTopicEnv}}
diff --git a/kubernetes/appc/values.yaml b/kubernetes/appc/values.yaml
index 2c3f300e66..9c5a50110a 100644
--- a/kubernetes/appc/values.yaml
+++ b/kubernetes/appc/values.yaml
@@ -31,7 +31,7 @@ global:
flavor: small
# application image
repository: nexus3.onap.org:10001
-image: onap/appc-image:1.4.0
+image: onap/appc-image:1.4.2-SNAPSHOT-latest
pullPolicy: Always
# flag to enable debugging - application support required
@@ -51,6 +51,7 @@ config:
enableClustering: false
configDir: /opt/onap/appc/data/properties
dmaapTopic: SUCCESS
+ dmaapTopicEnv: AUTO
logstashServiceName: log-ls
logstashPort: 5044
odlPassword: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U