X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=blobdiff_plain;f=prototypes%2Fbifrost%2Fscripts%2Ftest-bifrost-deployment.sh;h=90f014c743b4bbc2c242e01f92dfb3c1d8bb6081;hb=3ed69deabb7d20ccdf2dfbbacb5ab48f3c9e044f;hp=66affe9a71091e1e3d46e3f3fcbb38bc0ce945c1;hpb=e977155378fcbbd0826fa4a192b25273648d3782;p=releng.git diff --git a/prototypes/bifrost/scripts/test-bifrost-deployment.sh b/prototypes/bifrost/scripts/test-bifrost-deployment.sh index 66affe9a7..90f014c74 100755 --- a/prototypes/bifrost/scripts/test-bifrost-deployment.sh +++ b/prototypes/bifrost/scripts/test-bifrost-deployment.sh @@ -18,6 +18,7 @@ ENABLE_VENV="false" USE_DHCP="false" USE_VENV="false" BUILD_IMAGE=true +PROVISION_WAIT_TIMEOUT=${PROVISION_WAIT_TIMEOUT:-3600} # Set defaults for ansible command-line options to drive the different # tests. @@ -33,13 +34,13 @@ BUILD_IMAGE=true 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 +export VM_CPU=${VM_CPU:-4} +export VM_DISK=${VM_DISK:-100} TEST_PLAYBOOK="test-bifrost-infracloud.yaml" USE_INSPECTOR=true USE_CIRROS=false TESTING_USER=root -VM_MEMORY_SIZE="8192" +VM_MEMORY_SIZE=${VM_MEMORY_SIZE:-8192} DOWNLOAD_IPA=true CREATE_IPA_IMAGE=false INSPECT_NODES=true @@ -57,6 +58,16 @@ 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/centos7 +export DIB_OS_RELEASE=${DIB_OS_RELEASE:-trusty} +export DIB_OS_ELEMENT=${DIB_OS_ELEMENT:-ubuntu-minimal} + +# for centos 7: "vim,less,bridge-utils,iputils,rsyslog,curl" +export DIB_OS_PACKAGES=${DIB_OS_PACKAGES:-"vlan,vim,less,bridge-utils,language-pack-en,iputils-ping,rsyslog,curl"} + +# Additional dib elements +export EXTRA_DIB_ELEMENTS=${EXTRA_DIB_ELEMENTS:-"openssh-server"} + # 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 @@ -71,17 +82,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 \ @@ -107,7 +118,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