summaryrefslogtreecommitdiffstats
path: root/prototypes/bifrost/scripts/test-bifrost-deployment.sh
diff options
context:
space:
mode:
Diffstat (limited to 'prototypes/bifrost/scripts/test-bifrost-deployment.sh')
-rwxr-xr-xprototypes/bifrost/scripts/test-bifrost-deployment.sh16
1 files changed, 11 insertions, 5 deletions
diff --git a/prototypes/bifrost/scripts/test-bifrost-deployment.sh b/prototypes/bifrost/scripts/test-bifrost-deployment.sh
index 90f014c74..b7165ffd1 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
+BAREMETAL_DATA_FILE=${BAREMETAL_DATA_FILE:-'/tmp/baremetal.json'}
PROVISION_WAIT_TIMEOUT=${PROVISION_WAIT_TIMEOUT:-3600}
# Set defaults for ansible command-line options to drive the different
@@ -36,6 +37,7 @@ export TEST_VM_NODE_NAMES="jumphost.opnfvlocal controller00.opnfvlocal compute00
export VM_DOMAIN_TYPE="kvm"
export VM_CPU=${VM_CPU:-4}
export VM_DISK=${VM_DISK:-100}
+export VM_DISK_CACHE=${VM_DISK_CACHE:-unsafe}
TEST_PLAYBOOK="test-bifrost-infracloud.yaml"
USE_INSPECTOR=true
USE_CIRROS=false
@@ -49,10 +51,10 @@ INVENTORY_DHCP_STATIC_IP=false
WRITE_INTERFACES_FILE=true
# Set BIFROST_INVENTORY_SOURCE
-export BIFROST_INVENTORY_SOURCE=/tmp/baremetal.csv
+export BIFROST_INVENTORY_SOURCE=/tmp/baremetal.json
# DIB custom elements path
-export ELEMENTS_PATH=/usr/share/diskimage-builder/elements:/opt/puppet-infracloud/files/elements
+export ELEMENTS_PATH=/opt/puppet-infracloud/files/elements
# settings for console access
export DIB_DEV_USER_PWDLESS_SUDO=yes
@@ -78,6 +80,11 @@ source ${ANSIBLE_INSTALL_ROOT}/ansible/hacking/env-setup
ANSIBLE=$(which ansible-playbook)
set -x -o nounset
+logs_on_exit() {
+ $SCRIPT_HOME/collect-test-info.sh
+}
+trap logs_on_exit EXIT
+
# Change working directory
cd $BIFROST_HOME/playbooks
@@ -101,7 +108,8 @@ ${ANSIBLE} -vvvv \
-e test_vm_num_nodes=${TEST_VM_NUM_NODES} \
-e test_vm_memory_size=${VM_MEMORY_SIZE} \
-e enable_venv=${ENABLE_VENV} \
- -e test_vm_domain_type=${VM_DOMAIN_TYPE}
+ -e test_vm_domain_type=${VM_DOMAIN_TYPE} \
+ -e baremetal_json_file=${BAREMETAL_DATA_FILE}
# Execute the installation and VM startup test.
${ANSIBLE} -vvvv \
@@ -128,6 +136,4 @@ if [ $EXITCODE != 0 ]; then
echo "****************************"
fi
-$SCRIPT_HOME/collect-test-info.sh
-
exit $EXITCODE