diff options
Diffstat (limited to 'boot/aai_install.sh')
-rw-r--r-- | boot/aai_install.sh | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/boot/aai_install.sh b/boot/aai_install.sh index d4a04ed4..9ee49d7f 100644 --- a/boot/aai_install.sh +++ b/boot/aai_install.sh @@ -5,7 +5,10 @@ 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) +AAI_INSTANCE=$(cat /opt/config/aai_instance.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" ]] @@ -46,9 +49,10 @@ then fi # Download dependencies -add-apt-repository -y ppa:openjdk-r/ppa +echo "deb http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >> /etc/apt/sources.list.d/java.list +echo "deb-src http://ppa.launchpad.net/openjdk-r/ppa/ubuntu $(lsb_release -c -s) main" >> /etc/apt/sources.list.d/java.list apt-get update -apt-get install -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate make +apt-get install --allow-unauthenticated -y apt-transport-https ca-certificates wget openjdk-8-jdk git ntp ntpdate make # Download scripts from Nexus curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/aai_vm_init.sh -o /opt/aai_vm_init.sh @@ -89,7 +93,20 @@ echo "nameserver "$DNS_IP_ADDR >> /etc/resolvconf/resolv.conf.d/head resolvconf -u # Run docker containers -mkdir -p /opt/openecomp/aai/logs -mkdir -p /opt/openecomp/aai/data cd /opt +git clone -b $GERRIT_BRANCH --single-branch $CODE_REPO + +if [[ $AAI_INSTANCE == "aai_instance_1" ]] +then + mkdir -p /opt/aai/logroot/AAI-RESOURCES + mkdir -p /opt/aai/logroot/AAI-TRAVERSAL + mkdir -p /opt/aai/logroot/AAI-ML + mkdir -p /opt/aai/logroot/AAI-SDB + mkdir -p /opt/aai/logroot/AAI-DRMS + mkdir -p /opt/aai/logroot/AAI-UI + chown -R 999:999 /opt/aai/logroot/AAI-RESOURCES /opt/aai/logroot/AAI-TRAVERSAL + + sleep 300 +fi + ./aai_vm_init.sh
\ No newline at end of file |