summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Platania <platania@research.att.com>2018-04-16 09:49:01 -0400
committerMarco Platania <platania@research.att.com>2018-04-16 09:55:59 -0400
commita310c917999db3edfb2eba58485d674ae8b35547 (patch)
tree89b24a19b735be2c44a52b80e5b19f4747a070f8
parent6429a03bbf50b7844f53e1549770571e22193af7 (diff)
Install AAF with Heat (WIP)
Change-Id: I65a9ded45dbaf238cbef4a3b29b6ecfc7171e670 Issue-ID: INT-444 Signed-off-by: Marco Platania <platania@research.att.com>
-rw-r--r--boot/aaf_install.sh6
-rw-r--r--boot/aaf_vm_init.sh18
-rw-r--r--heat/ONAP/onap_openstack.env2
-rw-r--r--heat/ONAP/onap_openstack.yaml4
-rw-r--r--heat/ONAP/onap_openstack_light.yaml4
-rw-r--r--heat/ONAP/onap_openstack_template.env2
6 files changed, 34 insertions, 2 deletions
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
diff --git a/heat/ONAP/onap_openstack.env b/heat/ONAP/onap_openstack.env
index db18ee2f..329b677c 100644
--- a/heat/ONAP/onap_openstack.env
+++ b/heat/ONAP/onap_openstack.env
@@ -155,7 +155,7 @@ parameters:
cli_docker: v1.1.0
music_docker: latest
oof_docker: latest
- aaf_docker: latest
+ aaf_docker: 2.1.0-SNAPSHOT
nbi_docker: latest
dcae_docker: 1.1.2
diff --git a/heat/ONAP/onap_openstack.yaml b/heat/ONAP/onap_openstack.yaml
index b40f6fbd..4445dd38 100644
--- a/heat/ONAP/onap_openstack.yaml
+++ b/heat/ONAP/onap_openstack.yaml
@@ -2130,6 +2130,8 @@ resources:
__docker_version__: { get_param: aaf_docker }
__cloud_env__: { get_param: cloud_env }
__external_dns__: { get_param: external_dns }
+ __aaf_repo__: { get_param: aaf_repo }
+ __gerrit_branch__: { get_param: aaf_branch }
template: |
#!/bin/bash
@@ -2144,6 +2146,8 @@ resources:
echo "__docker_version__" > /opt/config/docker_version.txt
echo "__cloud_env__" > /opt/config/cloud_env.txt
echo "__external_dns__" > /opt/config/external_dns.txt
+ echo "__aaf_repo__" > /opt/config/remote_repo.txt
+ echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
# Download and run install script
curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/aaf_install.sh -o /opt/aaf_install.sh
diff --git a/heat/ONAP/onap_openstack_light.yaml b/heat/ONAP/onap_openstack_light.yaml
index 19819566..17266b25 100644
--- a/heat/ONAP/onap_openstack_light.yaml
+++ b/heat/ONAP/onap_openstack_light.yaml
@@ -2008,6 +2008,8 @@ resources:
__docker_version__: { get_param: aaf_docker }
__cloud_env__: { get_param: cloud_env }
__external_dns__: { get_param: external_dns }
+ __aaf_repo__: { get_param: aaf_repo }
+ __gerrit_branch__: { get_param: aaf_branch }
template: |
#!/bin/bash
@@ -2022,6 +2024,8 @@ resources:
echo "__docker_version__" > /opt/config/docker_version.txt
echo "__cloud_env__" > /opt/config/cloud_env.txt
echo "__external_dns__" > /opt/config/external_dns.txt
+ echo "__aaf_repo__" > /opt/config/remote_repo.txt
+ echo "__gerrit_branch__" > /opt/config/gerrit_branch.txt
# Download and run install script
curl -k __nexus_repo__/org.onap.demo/boot/__artifacts_version__/aaf_install.sh -o /opt/aaf_install.sh
diff --git a/heat/ONAP/onap_openstack_template.env b/heat/ONAP/onap_openstack_template.env
index f3254c23..475efd7c 100644
--- a/heat/ONAP/onap_openstack_template.env
+++ b/heat/ONAP/onap_openstack_template.env
@@ -133,6 +133,7 @@ parameters:
clamp_branch: master
vnfsdk_branch: master
music_branch: master
+ aaf_branch: master
aai_docker: ${AAI_RESOURCES_DOCKER}
aai_sparky_docker: ${AAI_RESOURCES_DOCKER}
@@ -222,3 +223,4 @@ parameters:
clamp_repo: http://gerrit.onap.org/r/clamp.git
vnfsdk_repo: http://gerrit.onap.org/r/vnfsdk/refrepo.git
music_repo: http://gerrit.onap.org/r/music.git
+ aaf_repo: http://gerrit.onap.org/r/aaf/authz.git \ No newline at end of file