summaryrefslogtreecommitdiffstats
path: root/auth/sample/bin/service.sh
diff options
context:
space:
mode:
authorSai Gandham <sai.gandham@att.com>2019-04-17 19:42:30 +0000
committerGerrit Code Review <gerrit@onap.org>2019-04-17 19:42:30 +0000
commit5c01796be69ed71c360dade8a080a4fd22c06447 (patch)
treedd4ca9d606f2cb8d6c16440b984f4b01585c2ffc /auth/sample/bin/service.sh
parent22d821ef35b5ddaf76937ab6a4fe82b088a50a26 (diff)
parentfea400a6e11a41e39911927edf37938b5d13f181 (diff)
Merge "Make OOM workable with Dublin"2.1.11
Diffstat (limited to 'auth/sample/bin/service.sh')
-rw-r--r--auth/sample/bin/service.sh29
1 files changed, 20 insertions, 9 deletions
diff --git a/auth/sample/bin/service.sh b/auth/sample/bin/service.sh
index 54a1cc58..1a289d35 100644
--- a/auth/sample/bin/service.sh
+++ b/auth/sample/bin/service.sh
@@ -21,6 +21,24 @@
# This script is run when starting aaf_config Container.
# It needs to cover the cases where the initial data doesn't exist, and when it has already been configured (don't overwrite)
#
+
+echo "# Properties passed in"
+ for P in `env`; do
+ if [[ "$P" == cadi* ]] || [[ "$P" == aaf* ]] || [[ "$P" == HOSTNAME* ]]; then
+ S="${P/_helm/.helm}"
+ S="${S/_oom/.oom}"
+ echo "$S"
+ fi
+ done
+
+# Set from CAP Based PROPS, if necessary
+aaf_env=${aaf_env:-"${AAF_ENV}"}
+aaf_release=${aaf_release:-"${VERSION}"}
+cadi_latitude=${cadi_latitude:-"${LATITUDE}"}
+cadi_longitude=${cadi_longitude:-"${LONGITUDE}"}
+cadi_x509_issuers=${cadi_x509_issuers:-"${CADI_X509_ISSUERS}"}
+aaf_locate_url=${aaf_locate_url:-"https://${HOSTNAME}:8095"}
+
JAVA=/usr/bin/java
OSAAF=/opt/app/osaaf
@@ -126,15 +144,8 @@ if [ ! -e $LOCAL/org.osaaf.aaf.props ]; then
done
TMP=$(mktemp)
- echo aaf_env=${AAF_ENV} >> ${TMP}
- echo aaf_release=${VERSION} >> ${TMP}
- echo cadi_latitude=${LATITUDE} >> ${TMP}
- echo cadi_longitude=${LONGITUDE} >> ${TMP}
- echo cadi_x509_issuers=${CADI_X509_ISSUERS} >> ${TMP}
- AAF_LOCATE_URL=${aaf_locate_url:="https://${HOSTNAME}:8095"}
- echo aaf_locate_url=${AAF_LOCATE_URL} >> ${TMP}
for P in `env`; do
- if [[ "$P" == aaf_locator* ]]; then
+ if [[ "$P" == aaf_* ]] || [[ "$P" == cadi_* ]]; then
S="${P/_helm/.helm}"
S="${S/_oom/.oom}"
echo "$S" >> ${TMP}
@@ -154,7 +165,7 @@ if [ ! -e $LOCAL/org.osaaf.aaf.props ]; then
CASS_HOST=${CASS_HOST:="aaf-cass"}
CASS_PASS=$($JAVA_CADI digest "${CASSANDRA_PASSWORD:-cassandra}" $LOCAL/org.osaaf.aaf.keyfile)
CASS_NAME=${CASS_HOST/:*/}
- sed -i.backup -e "s/\\(cassandra.clusters=\\).*/\\1${CASSANDRA_CLUSTERS:=$CASS_HOST}/" \
+ sed -i.backup -e "s/\\(cassandra.clusters=\\).*/\\1${CASSANDRA_CLUSTER:=$CASS_HOST}/" \
-e "s/\\(cassandra.clusters.user=\\).*/\\1${CASSANDRA_USER:=cassandra}/" \
-e "s/\\(cassandra.clusters.password=enc:\\).*/\\1$CASS_PASS/" \
-e "s/\\(cassandra.clusters.port=\\).*/\\1${CASSANDRA_PORT:=9042}/" \