summaryrefslogtreecommitdiffstats
path: root/xci/infra/bifrost/infra-provision.sh
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2018-03-20 17:28:50 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-03-20 17:28:50 +0000
commit346df57c53fde3795fbe675477cdb2c1a453b6f7 (patch)
tree9eb7a43cb3613e28f6a99c3f09c50bf6bc87839e /xci/infra/bifrost/infra-provision.sh
parentc7fd1fe87d8ae59757cefc79fe73ef249dd7952c (diff)
parentdd0ac7518cc1dd5790314b72bd671d65435c1912 (diff)
Merge changes from topic 'allow-deployment-overrides'
* changes: xci: infra: bifrost: Avoid installing Ansible twice Add initial support for multiple infra deployers
Diffstat (limited to 'xci/infra/bifrost/infra-provision.sh')
-rw-r--r--xci/infra/bifrost/infra-provision.sh25
1 files changed, 25 insertions, 0 deletions
diff --git a/xci/infra/bifrost/infra-provision.sh b/xci/infra/bifrost/infra-provision.sh
new file mode 100644
index 00000000..f847e66d
--- /dev/null
+++ b/xci/infra/bifrost/infra-provision.sh
@@ -0,0 +1,25 @@
+#-------------------------------------------------------------------------------
+# Start provisioning VM nodes
+#-------------------------------------------------------------------------------
+# This playbook
+# - removes directories that were created by the previous xci run
+# - clones opnfv/releng-xci and openstack/bifrost repositories
+# - combines opnfv/releng-xci and openstack/bifrost scripts/playbooks
+# - destroys VMs, removes ironic db, leases, logs
+# - creates and provisions VMs for the chosen flavor
+#-------------------------------------------------------------------------------
+BIFROST_ROOT_DIR="$(dirname $(realpath ${BASH_SOURCE[0]}))"
+
+echo "Info: Starting provisining VM nodes using openstack/bifrost"
+echo "-------------------------------------------------------------------------"
+# We are using sudo so we need to make sure that env_reset is not present
+sudo sed -i "s/^Defaults.*env_reset/#&/" /etc/sudoers
+cd $BIFROST_ROOT_DIR
+sudo -E bash ./scripts/destroy-env.sh
+cd $BIFROST_ROOT_DIR/playbooks/
+ansible-playbook ${XCI_ANSIBLE_PARAMS} -i "localhost," bootstrap-bifrost.yml
+cd ${XCI_CACHE}/repos/bifrost
+bash ./scripts/bifrost-provision.sh
+echo "-----------------------------------------------------------------------"
+echo "Info: VM nodes are provisioned!"
+echo "-----------------------------------------------------------------------"