summaryrefslogtreecommitdiffstats
path: root/bifrost/scripts
diff options
context:
space:
mode:
authorFatih Degirmenci <fatih.degirmenci@ericsson.com>2017-03-20 15:01:52 +0100
committerTrevor Bramwell <tbramwell@linuxfoundation.org>2017-08-11 12:56:12 -0700
commit28f96fe95329934e72ef8df1d4313b1b71250662 (patch)
treede1bd44c731b1c3ae3ebad809de25dfccd15cb8e /bifrost/scripts
parent1ab58d5387f3bc8d2539b7d6b23c297d75783871 (diff)
xci: Enable VM provisioning using bifrost for daily runs
- create script to provision VMs (log upload is not enabled yet) - remove leftover inventory files (baremetal.csv, baremetal.json) - set BIFROST_INVENTORY_SOURCE as needed by stable/ocata - rename playbook used during bifrost and adjust scripts using it - remove puppet-infracloud stuff Change-Id: I1c4412d0725c00ab9a1b3497e358d33998b4e7e6 Signed-off-by: Fatih Degirmenci <fatih.degirmenci@ericsson.com>
Diffstat (limited to 'bifrost/scripts')
-rwxr-xr-xbifrost/scripts/destroy-env.sh3
-rwxr-xr-xbifrost/scripts/osa-bifrost-deployment.sh15
-rwxr-xr-xbifrost/scripts/test-bifrost-deployment.sh5
3 files changed, 13 insertions, 10 deletions
diff --git a/bifrost/scripts/destroy-env.sh b/bifrost/scripts/destroy-env.sh
index 1138da90..7d3db90b 100755
--- a/bifrost/scripts/destroy-env.sh
+++ b/bifrost/scripts/destroy-env.sh
@@ -27,6 +27,9 @@ done
service ironic-conductor stop || true
+echo "removing inventory files created by previous builds"
+rm -rf /tmp/baremetal.*
+
echo "removing ironic database"
if $(which mysql &> /dev/null); then
mysql -u root ironic --execute "drop database ironic;"
diff --git a/bifrost/scripts/osa-bifrost-deployment.sh b/bifrost/scripts/osa-bifrost-deployment.sh
index cca30c2f..bd6e5438 100755
--- a/bifrost/scripts/osa-bifrost-deployment.sh
+++ b/bifrost/scripts/osa-bifrost-deployment.sh
@@ -18,7 +18,8 @@ ENABLE_VENV="false"
USE_DHCP="false"
USE_VENV="false"
BUILD_IMAGE=true
-BAREMETAL_DATA_FILE=${BAREMETAL_DATA_FILE:-'/tmp/baremetal.json'}
+export BAREMETAL_DATA_FILE=${BAREMETAL_DATA_FILE:-'/tmp/baremetal.json'}
+export BIFROST_INVENTORY_SOURCE=${BIFROST_INVENTORY_SOURCE:-'/tmp/baremetal.csv'}
PROVISION_WAIT_TIMEOUT=${PROVISION_WAIT_TIMEOUT:-3600}
# Set defaults for ansible command-line options to drive the different
@@ -39,7 +40,7 @@ export VM_DOMAIN_TYPE="kvm"
export VM_CPU=${VM_CPU:-8}
export VM_DISK=${VM_DISK:-100}
export VM_DISK_CACHE=${VM_DISK_CACHE:-unsafe}
-TEST_PLAYBOOK="test-bifrost-infracloud.yaml"
+TEST_PLAYBOOK="opnfv-virtual.yaml"
USE_INSPECTOR=true
USE_CIRROS=false
TESTING_USER=root
@@ -53,8 +54,6 @@ INVENTORY_DHCP=false
INVENTORY_DHCP_STATIC_IP=false
WRITE_INTERFACES_FILE=true
-# Set BIFROST_INVENTORY_SOURCE
-export BIFROST_INVENTORY_SOURCE=/tmp/baremetal.json
# DIB custom elements path
export ELEMENTS_PATH=/opt/puppet-infracloud/files/elements
@@ -93,11 +92,11 @@ cd $BIFROST_HOME/playbooks
# Syntax check of dynamic inventory test path
for task in syntax-check list-tasks; do
- ${ANSIBLE} -vvvv \
+ ${ANSIBLE} \
-i inventory/localhost \
test-bifrost-create-vm.yaml \
--${task}
- ${ANSIBLE} -vvvv \
+ ${ANSIBLE} \
-i inventory/localhost \
${TEST_PLAYBOOK} \
--${task} \
@@ -105,7 +104,7 @@ for task in syntax-check list-tasks; do
done
# Create the test VMS
-${ANSIBLE} -vvvv \
+${ANSIBLE} \
-i inventory/localhost \
test-bifrost-create-vm.yaml \
-e test_vm_num_nodes=${TEST_VM_NUM_NODES} \
@@ -115,7 +114,7 @@ ${ANSIBLE} -vvvv \
-e baremetal_json_file=${BAREMETAL_DATA_FILE}
# Execute the installation and VM startup test.
-${ANSIBLE} -vvvv \
+${ANSIBLE} \
-i inventory/bifrost_inventory.py \
${TEST_PLAYBOOK} \
-e use_cirros=${USE_CIRROS} \
diff --git a/bifrost/scripts/test-bifrost-deployment.sh b/bifrost/scripts/test-bifrost-deployment.sh
index b7165ffd..3c3b6bac 100755
--- a/bifrost/scripts/test-bifrost-deployment.sh
+++ b/bifrost/scripts/test-bifrost-deployment.sh
@@ -18,7 +18,8 @@ ENABLE_VENV="false"
USE_DHCP="false"
USE_VENV="false"
BUILD_IMAGE=true
-BAREMETAL_DATA_FILE=${BAREMETAL_DATA_FILE:-'/tmp/baremetal.json'}
+export BAREMETAL_DATA_FILE=${BAREMETAL_DATA_FILE:-'/tmp/baremetal.json'}
+export BIFROST_INVENTORY_SOURCE=${BIFROST_INVENTORY_SOURCE:-'/tmp/baremetal.csv'}
PROVISION_WAIT_TIMEOUT=${PROVISION_WAIT_TIMEOUT:-3600}
# Set defaults for ansible command-line options to drive the different
@@ -38,7 +39,7 @@ 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"
+TEST_PLAYBOOK="opnfv-virtual.yaml"
USE_INSPECTOR=true
USE_CIRROS=false
TESTING_USER=root