aboutsummaryrefslogtreecommitdiffstats
path: root/heat/ONAP/cloud-config
diff options
context:
space:
mode:
authorInstrumental <jonathan.gathman@att.com>2018-09-07 02:13:01 -0500
committerInstrumental <jonathan.gathman@att.com>2018-09-07 08:30:41 -0500
commit6e61988164b6c1dfa47413164688f06779440c61 (patch)
tree9e0518ae4955b5910fd4cce85fc8e614ea23e4b6 /heat/ONAP/cloud-config
parent2380377cffe9385c16228a8a3bceb1320ac6e718 (diff)
AAF replace latest with HEAT Version
Also, adjust X509 Issuers to match CasaBlanca needs Issue-ID: AAF-420 Change-Id: Iac79f7c8463c161b8bd26b2e6af4581ae746c8ff Signed-off-by: Instrumental <jonathan.gathman@att.com>
Diffstat (limited to 'heat/ONAP/cloud-config')
-rw-r--r--heat/ONAP/cloud-config/aaf_install.sh18
-rw-r--r--heat/ONAP/cloud-config/aaf_vm_init.sh28
2 files changed, 24 insertions, 22 deletions
diff --git a/heat/ONAP/cloud-config/aaf_install.sh b/heat/ONAP/cloud-config/aaf_install.sh
index c2389d03..d358364e 100644
--- a/heat/ONAP/cloud-config/aaf_install.sh
+++ b/heat/ONAP/cloud-config/aaf_install.sh
@@ -6,6 +6,7 @@ export MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort
NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt)
NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt)
NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt)
+AAF_DOCKER_VERSION=$(cat /opt/config/docker_version.txt)
HOSTNAME=`hostname -f`
FQDN=aaf.api.simpledemo.onap.org
HOST_IP=$(cat /opt/config/local_ip.txt)
@@ -31,15 +32,14 @@ fi
CASS_IP=`docker inspect aaf_cass | grep '"IPAddress' | head -1 | cut -d '"' -f 4`
CASS_HOST="cass.aaf.osaaf.org:"$CASS_IP
-docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_config:latest
-docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_core:latest
-docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_cm:latest
-docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_fs:latest
-docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_gui:latest
-docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_hello:latest
-docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_locate:latest
-docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_oauth:latest
-docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_service:latest
+docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_config:$AAF_DOCKER_VERSION
+docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_cm:$AAF_DOCKER_VERSION
+docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_fs:$AAF_DOCKER_VERSION
+docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_gui:$AAF_DOCKER_VERSION
+docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_hello:$AAF_DOCKER_VERSION
+docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_locate:$AAF_DOCKER_VERSION
+docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_oauth:$AAF_DOCKER_VERSION
+docker pull $NEXUS_DOCKER_REPO/onap/aaf/aaf_service:$AAF_DOCKER_VERSION
cd $CURRENT_DIR
/bin/bash ./aaf_vm_init.sh
diff --git a/heat/ONAP/cloud-config/aaf_vm_init.sh b/heat/ONAP/cloud-config/aaf_vm_init.sh
index 3941a30f..f2dd8781 100644
--- a/heat/ONAP/cloud-config/aaf_vm_init.sh
+++ b/heat/ONAP/cloud-config/aaf_vm_init.sh
@@ -2,6 +2,12 @@
CURRENT_DIR=$(pwd)
+if [ ! -e /opt/authz/auth/docker/d.props ]; then
+ cp /opt/authz/auth/docker/d.props.init /opt/authz/auth/docker/d.props
+fi
+. /opt/authz/auth/docker/d.props
+
+
NEXUS_USERNAME=$(cat /opt/config/nexus_username.txt)
NEXUS_PASSWD=$(cat /opt/config/nexus_password.txt)
if [ -e /opt/authz/auth/docker/d.props ]; then
@@ -28,12 +34,6 @@ if [ "`docker container ls | grep aaf_cass`" = "" ]; then
bash ./dinstall.sh
fi
-if [ ! -e /opt/authz/auth/docker/d.props ]; then
- cp /opt/authz/auth/docker/d.props.init /opt/authz/auth/docker/d.props
-fi
-
-VERSION=$(grep VERSION /opt/authz/auth/docker/d.props)
-VERSION=${VERSION#VERSION=}
CASS_IP=`docker inspect aaf_cass | grep '"IPAddress' | head -1 | cut -d '"' -f 4`
CASS_HOST="cass.aaf.osaaf.org:"$CASS_IP
if [ ! -e /opt/authz/auth/docker/cass.props ]; then
@@ -42,15 +42,17 @@ fi
sed -i "s/CASS_HOST=.*/CASS_HOST="$CASS_HOST"/g" /opt/authz/auth/docker/cass.props
# TODO Pull from Config Dir
-CADI_LATITUDE=37.781
-CADI_LONGITUDE=-122.261
+if [ "$LATITUDE" = "" ]; then
+ LATITUDE=37.781
+ LONGITUDE=-122.261
+ sed -i "s/LATITUDE=.*/LATITUDE=$LATITUDE/g" /opt/authz/auth/docker/d.props
+ sed -i "s/LONGITUDE=.*/LONGITUDE=$LONGITUDE/g" /opt/authz/auth/docker/d.props
+fi
sed -i "s/DOCKER_REPOSITORY=.*/DOCKER_REPOSITORY=$NEXUS_DOCKER_REPO/g" /opt/authz/auth/docker/d.props
sed -i "s/VERSION=.*/VERSION=$VERSION/g" /opt/authz/auth/docker/d.props
sed -i "s/HOSTNAME=.*/HOSTNAME=$HOSTNAME/g" /opt/authz/auth/docker/d.props
sed -i "s/HOST_IP=.*/HOST_IP=$HOST_IP/g" /opt/authz/auth/docker/d.props
-sed -i "s/LATITUDE=.*/LATITUDE=$CADI_LATITUDE/g" /opt/authz/auth/docker/d.props
-sed -i "s/LONGITUDE=.*/LONGITUDE=$CADI_LONGITUDE/g" /opt/authz/auth/docker/d.props
SIGNER_B64="$CURRENT_DIR/config/sample_ca/aaf.signer.b64"
SIGNER_P12="$CURRENT_DIR/config/sample_ca/aaf.signer.p12"
@@ -81,8 +83,8 @@ if [ -e "$AAF_P12" ]; then
fi
if [ -e "$SIGNER_P12" ]; then
- if [ -e "/opt/config/cadi_x509_issuers.txt" ]; then
- ISSUERS=$(cat "/opt/config/cadi_x509_issuers.txt")":"
+ if [ "$CADI_X509_ISSUERS" != "" ]; then
+ CADI_X509_ISSUERS="$CADI_X509_ISSUERS:"
fi
# Pick the REAL subject off the P12
SUBJECT=$(echo "$P12_PASSWORD" | openssl pkcs12 -info -clcerts -in $SIGNER_P12 -nokeys -passin stdin | grep subject)
@@ -96,7 +98,7 @@ if [ -e "$SIGNER_P12" ]; then
RSUBJECT="$S, $RSUBJECT"
fi
done
- ISSUERS="$ISSUERS$RSUBJECT"
+ ISSUERS="$CADI_X509_ISSUERS$RSUBJECT"
sed -i "s/CADI_X509_ISSUERS=.*/CADI_X509_ISSUERS=\"$ISSUERS\"/g" /opt/authz/auth/docker/d.props
sed -i "s/AAF_SIGNER_P12=.*/AAF_SIGNER_P12=${SIGNER_P12//\//\\/}/g" /opt/authz/auth/docker/d.props
sed -i "s/AAF_SIGNER_PASSWORD=.*/AAF_SIGNER_PASSWORD=\"$P12_PASSWORD\"/g" /opt/authz/auth/docker/d.props