diff options
Diffstat (limited to 'xci/infra/bifrost/infra-provision.sh')
-rw-r--r-- | xci/infra/bifrost/infra-provision.sh | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/xci/infra/bifrost/infra-provision.sh b/xci/infra/bifrost/infra-provision.sh index 17eb4158..b0617733 100644 --- a/xci/infra/bifrost/infra-provision.sh +++ b/xci/infra/bifrost/infra-provision.sh @@ -30,14 +30,16 @@ ansible-playbook ${XCI_ANSIBLE_PARAMS} \ -e vm_domain_type=${VM_DOMAIN_TYPE} \ -e baremetal_json_file=/tmp/baremetal.json \ -e xci_distro=${XCI_DISTRO} \ - ${BIFROST_ROOT_DIR}/playbooks/xci-create-virtual.yml + -e pdf_file=${PDF} \ + -e idf_file=${IDF} \ + ${BIFROST_ROOT_DIR}/playbooks/xci-setup-nodes.yml ansible-playbook ${XCI_ANSIBLE_PARAMS} \ --private-key=${XCI_PATH}/xci/scripts/vm/id_rsa_for_dib \ --user=devuser \ -i ${XCI_PATH}/xci/playbooks/dynamic_inventory.py \ - ${BIFROST_ROOT_DIR}/playbooks/xci-prepare-virtual.yml + ${BIFROST_ROOT_DIR}/playbooks/xci-prepare-env.yml source ${XCI_CACHE}/repos/bifrost/scripts/bifrost-env.sh @@ -52,28 +54,33 @@ ansible-playbook ${XCI_ANSIBLE_PARAMS} \ -e testing_user=root \ -e test_vm_num_nodes=${NUM_NODES} \ -e test_vm_cpu='host-model' \ - -e inventory_dhcp=false \ + -e inventory_dhcp=${BIFROST_INVENTORY_DHCP} \ -e inventory_dhcp_static_ip=false \ -e enable_inspector=true \ -e inspect_nodes=true \ - -e download_ipa=true \ - -e create_ipa_image=false \ + -e download_ipa=${BIFROST_DOWNLOAD_IPA} \ + -e create_ipa_image=${BIFROST_CREATE_IPA} \ -e write_interfaces_file=true \ -e ipv4_gateway=192.168.122.1 \ -e wait_timeout=3600 \ -e enable_keystone=false \ - -e ironicinspector_source_install=true \ -e ironicinspector_git_branch=${BIFROST_IRONIC_INSPECTOR_VERSION:-master} \ - -e ironicinspectorclient_source_install=true \ -e ironicinspectorclient_git_branch=${BIFROST_IRONIC_INSPECTOR_CLIENT_VERSION:-master} \ - -e ironicclient_source_install=true \ -e ironicclient_git_branch=${BIFROST_IRONIC_CLIENT_VERSION:-master} \ -e ironic_git_branch=${BIFROST_IRONIC_VERSION:-master} \ - -e use_prebuilt_images=${BIFROST_USE_PREBUILT_IMAGES:-false} \ + -e create_image_via_dib=${BIFROST_CREATE_IMAGE_VIA_DIB:-true} \ -e xci_distro=${XCI_DISTRO} \ -e ironic_url="http://192.168.122.2:6385/" \ ${BIFROST_ROOT_DIR}/playbooks/opnfv-virtual.yml + +if [ "${BAREMETAL}" = true ]; then + ansible-playbook ${XCI_ANSIBLE_PARAMS} \ + --user=devuser -i ${XCI_PATH}/xci/playbooks/dynamic_inventory.py \ + -i ${XCI_CACHE}/repos/bifrost/playbooks/inventory/bifrost_inventory.py \ + ${BIFROST_ROOT_DIR}/playbooks/wait-for-baremetal.yml +fi + echo "-----------------------------------------------------------------------" echo "Info: VM nodes are provisioned!" echo "-----------------------------------------------------------------------" |