Scripts update to run rubbos on compass4nfv env
[bottlenecks.git] / rubbos / rubbos_scripts / 1-1-1 / scripts / env_preparation.sh
old mode 100644 (file)
new mode 100755 (executable)
index e49bc6b..6ecf483
@@ -8,20 +8,27 @@
 # http://www.apache.org/licenses/LICENSE-2.0
 ##############################################################################
 
-set -e
+set -ex
 
-RELENG_REPO= https://gerrit.opnfv.org/gerrit/releng
-RELENG_REPO_DIR=/home/opnfv/repos/releng
-RELENG_BRANCH=master # branch, tag, sha1 or refspec
+RELENG_REPO=https://gerrit.opnfv.org/gerrit/releng
+RELENG_REPO_DIR=/tmp/opnfvrepo/releng
+#RELENG_BRANCH=master # branch, tag, sha1 or refspec
 
 INSTALLER_TYPE=fuel
 INSTALLER_IP=10.20.0.2
 
-POD_NAME=opnfv-jump-2
+NODE_NAME=opnfv-jump-2
 EXTERNAL_NET=net04_ext
 
 echo "INFO: Creating openstack credentials .."
 
+if [ -d $RELENG_REPO_DIR ]; then
+    rm -rf ${RELENG_REPO_DIR}
+fi
+mkdir -p ${RELENG_REPO_DIR}
+git config --global http.sslVerify false
+git clone ${RELENG_REPO} ${RELENG_REPO_DIR}
+
 # Create openstack credentials
 $RELENG_REPO_DIR/utils/fetch_os_creds.sh \
     -d /tmp/openrc \
@@ -39,4 +46,5 @@ if [ "$INSTALLER_TYPE" == "fuel" ]; then
     fi
 fi
 
-export EXTERNAL_NET INSTALLER_TYPE POD_NAME
+export EXTERNAL_NET INSTALLER_TYPE NODE_NAME
+set +ex