X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=jjb%2Fcompass4nfv%2Fcompass-deploy.sh;h=9d4ae5175c284bfaffe15f7e405a43b1129ae997;hb=66799d851d0a64563a59bb2d92840d46a527a79d;hp=025984990a6dad3a0332f69ad111eeea9a0fd37e;hpb=7e4c2cef13b5b6371c877f008ef3234f76f2d44b;p=releng.git diff --git a/jjb/compass4nfv/compass-deploy.sh b/jjb/compass4nfv/compass-deploy.sh index 025984990..9d4ae5175 100644 --- a/jjb/compass4nfv/compass-deploy.sh +++ b/jjb/compass4nfv/compass-deploy.sh @@ -6,50 +6,68 @@ echo "Starting the deployment on baremetal environment using $INSTALLER_TYPE. Th echo "--------------------------------------------------------" echo -# source the properties file so we get OPNFV vars -source $BUILD_DIRECTORY/latest.properties +echo 1 > /proc/sys/vm/drop_caches + +export CONFDIR=$WORKSPACE/deploy/conf +if [[ "$BRANCH" = 'stable/danube' ]]; then + # source the properties file so we get OPNFV vars + source $BUILD_DIRECTORY/latest.properties + # echo the info about artifact that is used during the deployment + echo "Using ${OPNFV_ARTIFACT_URL/*\/} for deployment" -# echo the info about artifact that is used during the deployment -echo "Using ${OPNFV_ARTIFACT_URL/*\/} for deployment" + if [[ ! "$JOB_NAME" =~ (verify|merge) ]]; then + # for none-merge deployments + # checkout the commit that was used for building the downloaded artifact + # to make sure the ISO and deployment mechanism uses same versions + echo "Checking out $OPNFV_GIT_SHA1" + git checkout $OPNFV_GIT_SHA1 --quiet + fi -if [[ ! "$JOB_NAME" =~ (verify|merge) ]]; then - # for none-merge deployments - # checkout the commit that was used for building the downloaded artifact - # to make sure the ISO and deployment mechanism uses same versions - echo "Checking out $OPNFV_GIT_SHA1" - git checkout $OPNFV_GIT_SHA1 --quiet + export ISO_URL=file://$BUILD_DIRECTORY/compass.iso +else + export ISO_URL=file://$BUILD_DIRECTORY/compass.tar.gz fi -echo 1 > /proc/sys/vm/drop_caches +cd $WORKSPACE -export CONFDIR=$WORKSPACE/deploy/conf -export ISO_URL=file://$BUILD_DIRECTORY/compass.iso +export OS_VERSION=${COMPASS_OS_VERSION} +export OPENSTACK_VERSION=${COMPASS_OPENSTACK_VERSION} if [[ "${DEPLOY_SCENARIO}" =~ "-ocl" ]]; then export NETWORK_CONF_FILE=network_ocl.yml elif [[ "${DEPLOY_SCENARIO}" =~ "-onos" ]]; then export NETWORK_CONF_FILE=network_onos.yml +elif [[ "${DEPLOY_SCENARIO}" =~ "-openo" ]]; then + export NETWORK_CONF_FILE=network_openo.yml +elif [[ "${DEPLOY_SCENARIO}" =~ "-dpdk" ]]; then + export NETWORK_CONF_FILE=network_dpdk.yml else export NETWORK_CONF_FILE=network.yml fi +if [[ "$NODE_NAME" =~ "intel-pod8" ]]; then + export OS_MGMT_NIC=em4 +fi + if [[ "$NODE_NAME" =~ "-virtual" ]]; then export NETWORK_CONF=$CONFDIR/vm_environment/$NODE_NAME/${NETWORK_CONF_FILE} export DHA_CONF=$CONFDIR/vm_environment/${DEPLOY_SCENARIO}.yml + if [[ "${DEPLOY_SCENARIO}" =~ "-moon-noha" ]]; then + export VIRT_NUMBER=3 + elif [[ "${DEPLOY_SCENARIO}" =~ "-noha" ]]; then + export VIRT_NUMBER=2 + fi else export INSTALL_NIC=eth1 export NETWORK_CONF=$CONFDIR/hardware_environment/$NODE_NAME/${NETWORK_CONF_FILE} export DHA_CONF=$CONFDIR/hardware_environment/$NODE_NAME/${DEPLOY_SCENARIO}.yml fi -cd $WORKSPACE +export DHA=${DHA_CONF} +export NETWORK=${NETWORK_CONF} + +source ./ci/deploy_ci.sh -export OS_VERSION=${COMPASS_OS_VERSION} -export OPENSTACK_VERSION=${COMPASS_OPENSTACK_VERSION} -if [[ "${COMPASS_OS_VERSION_OPTION}" = "xenial" ]] && [[ "${OPENSTACK_VERSION}" = "mitaka" ]]; then - export OPENSTACK_VERSION=${OPENSTACK_VERSION}_${OS_VERSION} -fi -./deploy.sh --dha ${DHA_CONF} --network ${NETWORK_CONF} if [ $? -ne 0 ]; then echo "depolyment failed!" deploy_ret=1 @@ -59,7 +77,4 @@ echo echo "--------------------------------------------------------" echo "Done!" -ssh_options="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no" -sshpass -p root scp 2>/dev/null $ssh_options root@${INSTALLER_IP}:/var/ansible/run/openstack_${COMPASS_OPENSTACK_VERSION}-opnfv2/ansible.log ./ &> /dev/null - exit $deploy_ret