Send both ubuntu versions to Robot VM
[demo.git] / boot / robot_install.sh
index caf5bef..b17e9fc 100644 (file)
@@ -7,6 +7,11 @@ 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)
+HEAT_CODE_REPO=http://gerrit.onap.org/r/demo.git
+
+# Short-term fix to get around MSO to SO name change
+cp /opt/config/so_ip_addr.txt /opt/config/mso_ip_addr.txt
 
 # Add host name to /etc/host to avoid warnings in openstack images
 if [[ $CLOUD_ENV != "rackspace" ]]
@@ -47,9 +52,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/robot_vm_init.sh -o /opt/robot_vm_init.sh
@@ -93,7 +99,8 @@ resolvconf -u
 mkdir -p /opt/eteshare/logs
 mkdir -p /opt/eteshare/config
 cd /opt
-git clone -b $GERRIT_BRANCH --single-branch http://gerrit.onap.org/r/testsuite/properties.git testsuite/properties
+git clone -b $GERRIT_BRANCH --single-branch $CODE_REPO testsuite/properties
+git clone -b $GERRIT_BRANCH --single-branch $HEAT_CODE_REPO demo
 
 # Rename network interface in openstack Ubuntu 16.04 images. Then, reboot the VM to pick up changes
 if [[ $CLOUD_ENV != "rackspace" ]]