X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=boot%2Faai_install.sh;h=e9ff3bfcb2ef31cf203f0661f681385acf260b8b;hb=refs%2Fheads%2Fbeijing;hp=bc62db9f7b9d6748ba0e0e16c6e6e12ded0b8a3c;hpb=6c850ae66f515d6990d2d94e02a5bc7be17d3a9f;p=demo.git diff --git a/boot/aai_install.sh b/boot/aai_install.sh index bc62db9f..e9ff3bfc 100644 --- a/boot/aai_install.sh +++ b/boot/aai_install.sh @@ -1,13 +1,13 @@ #!/bin/bash # Read configuration files -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" ]] @@ -48,13 +48,14 @@ 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 -curl -k $NEXUS_REPO/org.onap.demo/boot/$ARTIFACTS_VERSION/aai_serv.sh -o /opt/aai_serv.sh +unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip aai_vm_init.sh > /opt/aai_vm_init.sh +unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip aai_serv.sh > /opt/aai_serv.sh chmod +x /opt/aai_vm_init.sh chmod +x /opt/aai_serv.sh mv /opt/aai_serv.sh /etc/init.d @@ -92,7 +93,7 @@ resolvconf -u # Run docker containers cd /opt -git clone -b $GERRIT_BRANCH --single-branch http://gerrit.onap.org/r/aai/test-config +git clone -b $GERRIT_BRANCH --single-branch $CODE_REPO if [[ $AAI_INSTANCE == "aai_instance_1" ]] then