X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=prototypes%2Fbifrost%2Fscripts%2Ftest-bifrost-deployment.sh;h=773697efea9a40948238b5a0ca370b08792b6e2b;hb=609bf2f9c9c6885b0a1c6acf292e33d80bf1c3f7;hp=807d823e0d5a6fe1dfbf77ee8e47193596ce71e7;hpb=23f9930c322b13a1996b6e927b126bfb3d0acf8a;p=releng.git diff --git a/prototypes/bifrost/scripts/test-bifrost-deployment.sh b/prototypes/bifrost/scripts/test-bifrost-deployment.sh old mode 100644 new mode 100755 index 807d823e0..773697efe --- a/prototypes/bifrost/scripts/test-bifrost-deployment.sh +++ b/prototypes/bifrost/scripts/test-bifrost-deployment.sh @@ -1,3 +1,4 @@ +#!/bin/bash # SPDX-license-identifier: Apache-2.0 ############################################################################## # Copyright (c) 2016 Ericsson AB and others. @@ -6,7 +7,6 @@ # which accompanies this distribution, and is available at # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## -#!/bin/bash set -eux set -o pipefail @@ -18,6 +18,7 @@ ENABLE_VENV="false" USE_DHCP="false" USE_VENV="false" BUILD_IMAGE=true +PROVISION_WAIT_TIMEOUT=${PROVISION_WAIT_TIMEOUT:-2400} # Set defaults for ansible command-line options to drive the different # tests. @@ -34,6 +35,7 @@ TEST_VM_NUM_NODES=3 export TEST_VM_NODE_NAMES="jumphost.opnfvlocal controller00.opnfvlocal compute00.opnfvlocal" export VM_DOMAIN_TYPE="kvm" export VM_CPU=4 +export VM_DISK=100 TEST_PLAYBOOK="test-bifrost-infracloud.yaml" USE_INSPECTOR=true USE_CIRROS=false @@ -56,6 +58,13 @@ export ELEMENTS_PATH=/usr/share/diskimage-builder/elements:/opt/puppet-infraclou export DIB_DEV_USER_PWDLESS_SUDO=yes export DIB_DEV_USER_PASSWORD=devuser +# settings for distro: trusty/ubuntu-minimal, 7/centos-minimal +export DIB_OS_RELEASE=${DIB_OS_RELEASE:-trusty} +export DIB_OS_ELEMENT=${DIB_OS_ELEMENT:-ubuntu-minimal} + +# for centos 7: "openssh-server,vim,less,bridge-utils,iputils,rsyslog,curl" +export DIB_OS_PACKAGES=${DIB_OS_PACKAGES:-"openssh-server,vlan,vim,less,bridge-utils,language-pack-en,iputils-ping,rsyslog,curl"} + # Source Ansible # NOTE(TheJulia): Ansible stable-1.9 source method tosses an error deep # under the hood which -x will detect, so for this step, we need to suspend @@ -70,17 +79,17 @@ set -x -o nounset cd $BIFROST_HOME/playbooks # Syntax check of dynamic inventory test path -${ANSIBLE} -vvvv \ - -i inventory/localhost \ - test-bifrost-create-vm.yaml \ - --syntax-check \ - --list-tasks -${ANSIBLE} -vvvv \ - -i inventory/localhost \ - ${TEST_PLAYBOOK} \ - --syntax-check \ - --list-tasks \ - -e testing_user=${TESTING_USER} +for task in syntax-check list-tasks; do + ${ANSIBLE} -vvvv \ + -i inventory/localhost \ + test-bifrost-create-vm.yaml \ + --${task} + ${ANSIBLE} -vvvv \ + -i inventory/localhost \ + ${TEST_PLAYBOOK} \ + --${task} \ + -e testing_user=${TESTING_USER} +done # Create the test VMS ${ANSIBLE} -vvvv \ @@ -106,7 +115,8 @@ ${ANSIBLE} -vvvv \ -e download_ipa=${DOWNLOAD_IPA} \ -e create_ipa_image=${CREATE_IPA_IMAGE} \ -e write_interfaces_file=${WRITE_INTERFACES_FILE} \ - -e ipv4_gateway=192.168.122.1 + -e ipv4_gateway=192.168.122.1 \ + -e wait_timeout=${PROVISION_WAIT_TIMEOUT} EXITCODE=$? if [ $EXITCODE != 0 ]; then