5 echo "Starting the deployment on baremetal environment using $INSTALLER_TYPE. This could take some time..."
6 echo "--------------------------------------------------------"
9 # source the properties file so we get OPNFV vars
10 source $BUILD_DIRECTORY/latest.properties
12 # echo the info about artifact that is used during the deployment
13 echo "Using ${OPNFV_ARTIFACT_URL/*\/} for deployment"
15 if [[ ! "$JOB_NAME" =~ (verify|merge) ]]; then
16 # for none-merge deployments
17 # checkout the commit that was used for building the downloaded artifact
18 # to make sure the ISO and deployment mechanism uses same versions
19 echo "Checking out $OPNFV_GIT_SHA1"
20 git checkout $OPNFV_GIT_SHA1 --quiet
23 echo 1 > /proc/sys/vm/drop_caches
25 export CONFDIR=$WORKSPACE/deploy/conf
26 export ISO_URL=file://$BUILD_DIRECTORY/compass.iso
28 if [[ "${DEPLOY_SCENARIO}" =~ "-ocl" ]]; then
29 export NETWORK_CONF_FILE=network_ocl.yml
31 export NETWORK_CONF_FILE=network.yml
34 if [[ "$NODE_NAME" =~ "-virtual" ]]; then
35 export NETWORK_CONF=$CONFDIR/vm_environment/$NODE_NAME/${NETWORK_CONF_FILE}
36 export DHA_CONF=$CONFDIR/vm_environment/${DEPLOY_SCENARIO}.yml
38 export INSTALL_NIC=eth1
39 export NETWORK_CONF=$CONFDIR/hardware_environment/$NODE_NAME/${NETWORK_CONF_FILE}
40 export DHA_CONF=$CONFDIR/hardware_environment/$NODE_NAME/${DEPLOY_SCENARIO}.yml
45 export OS_VERSION=${COMPASS_OS_VERSION}
46 export OPENSTACK_VERSION=${COMPASS_OPENSTACK_VERSION}
47 ./deploy.sh --dha ${DHA_CONF} --network ${NETWORK_CONF}
49 echo "depolyment failed!"
54 echo "--------------------------------------------------------"
57 ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
58 sshpass -p root scp 2>/dev/null $ssh_options root@${INSTALLER_IP}:/var/ansible/run/openstack_${COMPASS_OPENSTACK_VERSION}-opnfv2/ansible.log ./ &> /dev/null