aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--heat/ONAP/cloud-config/aaf_install.sh18
-rw-r--r--heat/ONAP/cloud-config/aaf_vm_init.sh72
-rw-r--r--heat/ONAP/cloud-config/sample_ca/.gitignore2
-rw-r--r--heat/ONAP/cloud-config/sample_ca/aaf.signer.b6450
4 files changed, 10 insertions, 132 deletions
diff --git a/heat/ONAP/cloud-config/aaf_install.sh b/heat/ONAP/cloud-config/aaf_install.sh
index d358364e..90bc6f63 100644
--- a/heat/ONAP/cloud-config/aaf_install.sh
+++ b/heat/ONAP/cloud-config/aaf_install.sh
@@ -7,11 +7,8 @@ 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)
-echo "$NEXUS_PASSWD" | docker login -u $NEXUS_USERNAME --password-stdin $NEXUS_DOCKER_REPO
+docker login -u $NEXUS_USERNAME -p "$NEXUS_PASSWD" $NEXUS_DOCKER_REPO
if [ -e "/opt/authz" ]; then
cd /opt/authz
@@ -21,17 +18,9 @@ else
git clone https://gerrit.onap.org/r/aaf/authz
cd authz
fi
+cd $CURRENT_DIR
-cd /opt/authz/auth/auth-cass/docker
-if [ "`docker container ls | grep aaf_cass`" = "" ]; then
- # Cassandra Install
- echo Phase 1 Cassandra Install
- /bin/bash ./dinstall.sh
-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_cass:$AAF_DOCKER_VERSION
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
@@ -41,6 +30,5 @@ 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 f2dd8781..de71ba60 100644
--- a/heat/ONAP/cloud-config/aaf_vm_init.sh
+++ b/heat/ONAP/cloud-config/aaf_vm_init.sh
@@ -5,32 +5,25 @@ 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
- NEXUS_DOCKER_REPO=`grep "DOCKER_REPOSITORY=" /opt/authz/auth/docker/d.props`
-else
- NEXUS_DOCKER_REPO="DOCKER_REPOSITORY="
-fi
-
-if [ "$NEXUS_DOCKER_REPO" = "DOCKER_REPOSITORY=" ]; then
- NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt)
-else
- NEXUS_DOCKER_REPO=${NEXUS_DOCKER_REPO#DOCKER_REPOSITORY=}
-fi
+NEXUS_DOCKER_REPO=$(cat /opt/config/nexus_docker_repo.txt)
+sed -i "s/DOCKER_REPOSITORY=.*/DOCKER_REPOSITORY=$NEXUS_DOCKER_REPO/" /opt/authz/auth/docker/d.props
+. /opt/authz/auth/docker/d.props
-echo $NEXUS_DOCKER_REPO
HOSTNAME=`hostname -f`
FQDN=aaf.api.simpledemo.onap.org
HOST_IP=$(cat /opt/config/public_ip.txt)
+CASS_IP=`docker inspect aaf_cass | grep '"IPAddress' | head -1 | cut -d '"' -f 4`
+CASS_HOST="cass.aaf.osaaf.org:"$CASS_IP
+
cd /opt/authz/auth/auth-cass/docker
if [ "`docker container ls | grep aaf_cass`" = "" ]; then
# Cassandra Install
- echo Phase 1 Cassandra Install
+ echo Cassandra Install
bash ./dinstall.sh
fi
@@ -49,61 +42,10 @@ if [ "$LATITUDE" = "" ]; then
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
-SIGNER_B64="$CURRENT_DIR/config/sample_ca/aaf.signer.b64"
-SIGNER_P12="$CURRENT_DIR/config/sample_ca/aaf.signer.p12"
-AAF_P12="$CURRENT_DIR/config/sample_ca/aaf.bootstrap.p12"
-P12_PASSWORD="something easy"
-
-if [ ! -e "$SIGNER_P12" ]; then
- mkdir -p "$CURRENT_DIR/config/sample_ca"
- base64 -d $SIGNER_B64 > $SIGNER_P12
-fi
-
-if [ ! -e "$AAF_P12" ]; then
- mkdir -p $CURRENT_DIR/sample_ca
- cd /opt/authz/conf/CA
- /bin/bash bootstrap.sh $SIGNER_P12 "$P12_PASSWORD"
- if [ ! -e "aaf.bootstrap.p12" ]; then
- echo "Certificates NOT created. Stopping installation"
- exit
- else
- mv aaf.bootstrap.p12 $AAF_P12
- fi
- cd -
-fi
-
-if [ -e "$AAF_P12" ]; then
- sed -i "s/AAF_INITIAL_X509_P12=.*/AAF_INITIAL_X509_P12=${AAF_P12//\//\\/}/g" /opt/authz/auth/docker/d.props
- sed -i "s/AAF_INITIAL_X509_PASSWORD=.*/AAF_INITIAL_X509_PASSWORD=\"$P12_PASSWORD\"/g" /opt/authz/auth/docker/d.props
-fi
-
-if [ -e "$SIGNER_P12" ]; then
- 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)
- SUBJECT=${SUBJECT//\// }
- SUBJECT=${SUBJECT/subject= /}
- # Needs to be reversed, separated by ", "
- for S in $SUBJECT ; do
- if [ "$RSUBJECT" = "" ]; then
- RSUBJECT=$S
- else
- RSUBJECT="$S, $RSUBJECT"
- fi
- done
- 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
-fi
-
cd /opt/authz/auth/docker
# Need new Deployment system properties
bash ./aaf.sh
diff --git a/heat/ONAP/cloud-config/sample_ca/.gitignore b/heat/ONAP/cloud-config/sample_ca/.gitignore
deleted file mode 100644
index cabb364e..00000000
--- a/heat/ONAP/cloud-config/sample_ca/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-aaf.signer.p12
-aaf.bootstrap.p12
diff --git a/heat/ONAP/cloud-config/sample_ca/aaf.signer.b64 b/heat/ONAP/cloud-config/sample_ca/aaf.signer.b64
deleted file mode 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