summaryrefslogtreecommitdiffstats
path: root/xci
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2017-09-18 20:16:43 +0100
committerMarkos Chandras <mchandras@suse.de>2017-09-21 21:51:42 +0100
commiteead93830fc0d20996287439d765770d69bc533c (patch)
tree2268679c590107ac5188915588133fd1353116af /xci
parent9b0b4e1979633c4320dc0dea0707910c36cb056d (diff)
xci: Move VM provisioning to xci-deploy.sh
The bifrost-provision.sh script will provision machines using Ansible playbooks. If we run this script in an Ansible playbook, that means that we will run Ansible with Ansible and this can only lead to further confusion when debugging issues. As such, since we already have a script to provision machines, lets use it directly from the xci-deploy.sh script. This also reverts 3f04e1fd72b14420788af64b14c35a5f74727f82 which added virtualenv support in bifrost since that causes more problems than it fixes for the time being. Change-Id: Id82b7c06a2af28b66f64f1966227888227ec276f Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'xci')
-rw-r--r--xci/playbooks/provision-vm-nodes.yml11
-rwxr-xr-xxci/xci-deploy.sh9
2 files changed, 9 insertions, 11 deletions
diff --git a/xci/playbooks/provision-vm-nodes.yml b/xci/playbooks/provision-vm-nodes.yml
index 0419dcfc..3d88c5cb 100644
--- a/xci/playbooks/provision-vm-nodes.yml
+++ b/xci/playbooks/provision-vm-nodes.yml
@@ -90,14 +90,3 @@
command: "/bin/bash ./scripts/destroy-env.sh"
args:
chdir: "{{ OPENSTACK_BIFROST_PATH }}"
-
-- hosts: localhost
- connection: local
- vars_files:
- - ../var/{{ ansible_os_family }}.yml
- - ../var/opnfv.yml
- tasks:
- - name: create and provision VM nodes for the flavor {{ XCI_FLAVOR }}
- command: "/bin/bash ./scripts/bifrost-provision.sh"
- args:
- chdir: "{{ OPENSTACK_BIFROST_PATH }}"
diff --git a/xci/xci-deploy.sh b/xci/xci-deploy.sh
index 6a661349..19f2c18a 100755
--- a/xci/xci-deploy.sh
+++ b/xci/xci-deploy.sh
@@ -115,7 +115,13 @@ fi
echo "Info: Starting provisining VM nodes using openstack/bifrost"
echo "-------------------------------------------------------------------------"
cd $XCI_PATH/playbooks
+# NOTE(hwoarang) we need newer ansible to work on the following playbook
+sudo pip uninstall -y ansible || true
+sudo -H pip uninstall -y ansible || true
+sudo pip install ansible==${XCI_ANSIBLE_PIP_VERSION}
ansible-playbook -i inventory provision-vm-nodes.yml
+cd ${OPENSTACK_BIFROST_PATH}
+bash ./scripts/bifrost-provision.sh
echo "-----------------------------------------------------------------------"
echo "Info: VM nodes are provisioned!"
source $OPENSTACK_BIFROST_PATH/env-vars
@@ -130,8 +136,11 @@ echo
# - creates log directory
# - copies flavor files such as playbook, inventory, and var file
#-------------------------------------------------------------------------------
+
echo "Info: Configuring localhost for openstack-ansible"
echo "-----------------------------------------------------------------------"
+# NOTE(hwoarang) we need newer ansible to work on the OSA playbooks
+sudo pip install --force-reinstall ansible==${XCI_ANSIBLE_PIP_VERSION}
cd $XCI_PATH/playbooks
ansible-playbook -i inventory configure-localhost.yml
echo "-----------------------------------------------------------------------"