X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=boot%2Fvid_install.sh;h=f1bd3ccaed5712f54959a10cbec679f7261d0759;hb=refs%2Fheads%2Fbeijing;hp=a24b5c9cceaf7e5eac678df9191901932b9d7d86;hpb=efaf7672e8e15823f871ea7689cb9aaf83630e19;p=demo.git diff --git a/boot/vid_install.sh b/boot/vid_install.sh index a24b5c9c..f1bd3cca 100644 --- a/boot/vid_install.sh +++ b/boot/vid_install.sh @@ -1,12 +1,12 @@ #!/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) 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" ]] @@ -47,13 +47,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.openecomp.demo/boot/$ARTIFACTS_VERSION/vid_vm_init.sh -o /opt/vid_vm_init.sh -curl -k $NEXUS_REPO/org.openecomp.demo/boot/$ARTIFACTS_VERSION/vid_serv.sh -o /opt/vid_serv.sh +unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip vid_vm_init.sh > /opt/vid_vm_init.sh +unzip -p -j /opt/boot-$ARTIFACTS_VERSION.zip vid_serv.sh > /opt/vid_serv.sh chmod +x /opt/vid_vm_init.sh chmod +x /opt/vid_serv.sh mv /opt/vid_serv.sh /etc/init.d @@ -91,5 +92,5 @@ resolvconf -u # Clone Gerrit repository and run docker containers cd /opt -git clone -b $GERRIT_BRANCH --single-branch http://gerrit.onap.org/r/vid.git +git clone -b $GERRIT_BRANCH --single-branch $CODE_REPO ./vid_vm_init.sh \ No newline at end of file