From a310c917999db3edfb2eba58485d674ae8b35547 Mon Sep 17 00:00:00 2001 From: Marco Platania Date: Mon, 16 Apr 2018 09:49:01 -0400 Subject: Install AAF with Heat (WIP) Change-Id: I65a9ded45dbaf238cbef4a3b29b6ecfc7171e670 Issue-ID: INT-444 Signed-off-by: Marco Platania --- boot/aaf_install.sh | 6 ++++++ boot/aaf_vm_init.sh | 18 +++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) (limited to 'boot') diff --git a/boot/aaf_install.sh b/boot/aaf_install.sh index 14363269..4c7c8d7a 100644 --- a/boot/aaf_install.sh +++ b/boot/aaf_install.sh @@ -5,7 +5,9 @@ NEXUS_REPO=$(cat /opt/config/nexus_repo.txt) ARTIFACTS_VERSION=$(cat /opt/config/artifacts_version.txt) DNS_IP_ADDR=$(cat /opt/config/dns_ip_addr.txt) CLOUD_ENV=$(cat /opt/config/cloud_env.txt) +GERRIT_BRANCH=$(cat /opt/config/gerrit_branch.txt) MTU=$(/sbin/ifconfig | grep MTU | sed 's/.*MTU://' | sed 's/ .*//' | sort -n | head -1) +CODE_REPO=$(cat /opt/config/remote_repo.txt) # Add host name to /etc/host to avoid warnings in openstack images if [[ $CLOUD_ENV != "rackspace" ]] @@ -91,4 +93,8 @@ resolvconf -u # Clone Gerrit repository and run docker containers cd /opt +git clone -b $GERRIT_BRANCH --single-branch $CODE_REPO +chmod +x /opt/authz/auth/auth-cass/docker/dinstall.sh +chmod +x /opt/authz/auth/docker/drun.sh +chmod +x /opt/authz/auth/docker/d.props ./aaf_vm_init.sh \ No newline at end of file diff --git a/boot/aaf_vm_init.sh b/boot/aaf_vm_init.sh index d0f23953..7bc868a8 100644 --- a/boot/aaf_vm_init.sh +++ b/boot/aaf_vm_init.sh @@ -3,4 +3,20 @@ 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) -DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt) \ No newline at end of file +DOCKER_IMAGE_VERSION=$(cat /opt/config/docker_version.txt) + +docker login -u $NEXUS_USERNAME -p $NEXUS_PASSWD $NEXUS_DOCKER_REPO + +cd /opt/authz +git pull + +sed -i "s/DOCKER_REPOSITORY=.*/DOCKER_REPOSITORY="$NEXUS_DOCKER_REPO"/g" /opt/authz/auth/docker/d.props +sed -i "s/VERSION=.*/VERSION="$DOCKER_IMAGE_VERSION"/g" /opt/authz/auth/docker/d.props + +cd /opt/authz/auth/auth-cass/docker +./dinstall.sh + +sleep 2 + +cd /opt/authz/auth/docker +./drun.sh \ No newline at end of file -- cgit 1.2.3-korg