From c9a23a661d45f8c31fa6afe5c8592d98b57f4f23 Mon Sep 17 00:00:00 2001 From: Fatih Degirmenci Date: Tue, 21 Mar 2017 22:16:18 +0100 Subject: xci: Updates to releng/bifrost to make it work on Jenkins - get rid of BAREMETAL_DATA_FILE and use BIFROST_INVENTORY_SOURCE so it works both for master and ocata for osa-bifrost. - set BIFROST_INVENTORY_SOURCE file according to branch bifrost is executed from for osa-bifrost. - explicitly set what the SSH public key file is as ansible copies the wrong public key to nodes if bifrost is executed on Jenkins using sudo. - set branches if they are not set so the scripts can be used manually as well. - rename jumphost to xcimaster so people do not mix it with actual jumphost located in Pharos PODs. Change-Id: Iff7631fa99816ad75316b62c5ac20714f67cd86a Signed-off-by: Fatih Degirmenci --- bifrost/scripts/osa-bifrost-deployment.sh | 17 ++++++++++++----- bifrost/scripts/test-bifrost-deployment.sh | 5 ++--- 2 files changed, 14 insertions(+), 8 deletions(-) (limited to 'bifrost/scripts') diff --git a/bifrost/scripts/osa-bifrost-deployment.sh b/bifrost/scripts/osa-bifrost-deployment.sh index c92bd9d4..33ad1088 100755 --- a/bifrost/scripts/osa-bifrost-deployment.sh +++ b/bifrost/scripts/osa-bifrost-deployment.sh @@ -18,10 +18,18 @@ ENABLE_VENV="false" USE_DHCP="false" USE_VENV="false" BUILD_IMAGE=true -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} +# ensure the branch is set +export OPENSTACK_BRANCH=${OPENSTACK_BRANCH:-master} + +# ensure the right inventory files is used based on branch +if [ $OPENSTACK_BRANCH = "master" ]; then + export BIFROST_INVENTORY_SOURCE=${BIFROST_INVENTORY_SOURCE:-'/tmp/baremetal.json'} +else + export BIFROST_INVENTORY_SOURCE=${BIFROST_INVENTORY_SOURCE:-'/tmp/baremetal.csv'} +fi + # Set defaults for ansible command-line options to drive the different # tests. @@ -34,7 +42,7 @@ PROVISION_WAIT_TIMEOUT=${PROVISION_WAIT_TIMEOUT:-3600} # use cirros. TEST_VM_NUM_NODES=6 -export TEST_VM_NODE_NAMES="jumphost controller00 controller01 controller02 compute00 compute01" +export TEST_VM_NODE_NAMES="xcimaster controller00 controller01 controller02 compute00 compute01" export VM_DOMAIN_TYPE="kvm" # 8 vCPU, 60 GB HDD are minimum equipment export VM_CPU=${VM_CPU:-8} @@ -107,8 +115,7 @@ ${ANSIBLE} \ -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 baremetal_json_file=${BAREMETAL_DATA_FILE} + -e test_vm_domain_type=${VM_DOMAIN_TYPE} # Execute the installation and VM startup test. ${ANSIBLE} \ diff --git a/bifrost/scripts/test-bifrost-deployment.sh b/bifrost/scripts/test-bifrost-deployment.sh index 2e33bc16..83cf1cc1 100755 --- a/bifrost/scripts/test-bifrost-deployment.sh +++ b/bifrost/scripts/test-bifrost-deployment.sh @@ -18,9 +18,8 @@ ENABLE_VENV="false" USE_DHCP="false" USE_VENV="false" BUILD_IMAGE=true -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} +BAREMETAL_DATA_FILE=${BAREMETAL_DATA_FILE:-'/tmp/baremetal.json'} # Set defaults for ansible command-line options to drive the different # tests. @@ -34,7 +33,7 @@ PROVISION_WAIT_TIMEOUT=${PROVISION_WAIT_TIMEOUT:-3600} # use cirros. TEST_VM_NUM_NODES=3 -export TEST_VM_NODE_NAMES="jumphost.opnfvlocal controller00.opnfvlocal compute00.opnfvlocal" +export TEST_VM_NODE_NAMES="xcimaster controller00 compute00" export VM_DOMAIN_TYPE="kvm" export VM_CPU=${VM_CPU:-4} export VM_DISK=${VM_DISK:-100} -- cgit 1.2.3-korg