Fix installation bug on Ubuntu 18.04 93/2293/2
authorJingzhao.Ni <Jingzhao.Ni@arm.com>
Thu, 5 Mar 2020 10:03:22 +0000 (18:03 +0800)
committerJingzhao.Ni <Jingzhao.Ni@arm.com>
Fri, 13 Mar 2020 07:49:00 +0000 (15:49 +0800)
When deploying VMs on Ubuntu 18.04, the compass can not resolve the
host ip address correctly. It will cause the compass4nfv deploying
failed.
In this patch, it gets compass4nfv code from iecedge repository.
Some modification has been done for fixing those issues on specific
branch.

Signed-off-by: Jingzhao.Ni <Jingzhao.Ni@arm.com>
Change-Id: I86faffee4473ed2f6f36594a2b14be44f7b77191

jjb/iec/iec-compass-build.sh

index de560a6..09dd66e 100755 (executable)
@@ -20,36 +20,30 @@ check_env(){
     rm get-pip.py
     hash -r
   fi
     rm get-pip.py
     hash -r
   fi
-}
 
 
-checkout_arm64(){
-  VERSION="dcc6d07"
-  git checkout ${VERSION}
-  sed -i 's:opnfv/:cyb70289/:' build/build-aarch64.yaml
+  # Clean environment
+  sudo docker rm -f `sudo docker ps | grep compass | cut -f1 -d' '` || true
 }
 
 }
 
-check_env
-
-echo "begin build compass"
-git clone https://github.com/opnfv/compass4nfv.git
+build_compass(){
 
 
-cd compass4nfv
+  echo "Clone compass4nfv"
+  git clone -b CompassinAkrainoIEC https://github.com/iecedge/compass4nfv.git
 
 
-if [ "$(uname -m)" = 'aarch64' ]; then
-  echo "Checkout compass4nfv to Arm64 version"
-  checkout_arm64
-fi
+  cd compass4nfv
 
 
-COMPASS_WORK_DIR=$WORKSPACE/../compass-work
+  COMPASS_WORK_DIR=$WORKSPACE/../compass-work
 
 
-mkdir -p $COMPASS_WORK_DIR
-ln -s $COMPASS_WORK_DIR work
+  mkdir -p $COMPASS_WORK_DIR
+  ln -snf $COMPASS_WORK_DIR work
 
 
-sudo docker rm -f `sudo docker ps | grep compass | cut -f1 -d' '` || true
+  ./build.sh
+}
 
 
-curl -sL http://people.linaro.org/~yibo.cai/compass/compass4nfv-arm64-fixup.sh | bash || true
+check_env
 
 
-./build.sh
+# Build compass
+build_compass
 
 # Fix permissions so we can archive log files before pushing to Nexus
 sudo chown $(id -u):$(id -g) -R "${WORKSPACE}"
 
 # Fix permissions so we can archive log files before pushing to Nexus
 sudo chown $(id -u):$(id -g) -R "${WORKSPACE}"