summaryrefslogtreecommitdiffstats
path: root/xci
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2017-11-30 11:16:54 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-11-30 11:16:54 +0000
commit64a4b2881141b758f479a18eefb3747026e3b41b (patch)
tree7596e9816017b18350906ee3868d6183693b3b85 /xci
parent14f5c1402e4268b5940a5258814cb198dc8f3bda (diff)
parent184a87be2b62cfeb6c7234b1da09c462e1008a46 (diff)
Merge "xci: Drop OPNFV_RELENG_DEV_PATH variable"
Diffstat (limited to 'xci')
-rw-r--r--xci/README.rst3
-rw-r--r--xci/playbooks/configure-localhost.yml4
-rw-r--r--xci/playbooks/configure-opnfvhost.yml4
-rw-r--r--xci/playbooks/provision-vm-nodes.yml4
-rw-r--r--xci/var/opnfv.yml2
-rwxr-xr-xxci/xci-deploy.sh26
6 files changed, 17 insertions, 26 deletions
diff --git a/xci/README.rst b/xci/README.rst
index 9ce293cd..d7555d46 100644
--- a/xci/README.rst
+++ b/xci/README.rst
@@ -203,7 +203,6 @@ on each run.
To enable it, you need to export the different DEV_PATH vars:
-- export OPNFV_RELENG_DEV_PATH=/opt/releng-xci/
- export OPENSTACK_BIFROST_DEV_PATH=/opt/bifrost/
- export OPENSTACK_OSA_DEV_PATH=/opt/openstack-ansible/
@@ -226,8 +225,6 @@ dependent roles in ansible-role-requirements.yml file.
If you run into this situation, then your best bet is to replace the XCI
ansible-role-requirements.yml file with the upstream one from
http://git.openstack.org/cgit/openstack/openstack-ansible/plain/ansible-role-requirements.yml.
-You also need to set OPNFV_RELENG_DEV_PATH as explained above in order for this file to be
-used throughout the deployment.
===========================================
Limitations, Known Issues, and Improvements
diff --git a/xci/playbooks/configure-localhost.yml b/xci/playbooks/configure-localhost.yml
index e242a7ee..a0837117 100644
--- a/xci/playbooks/configure-localhost.yml
+++ b/xci/playbooks/configure-localhost.yml
@@ -40,12 +40,10 @@
file: ../var/{{ ansible_os_family }}.yml
- name: Synchronize local development releng-xci repository to XCI paths
synchronize:
- src: "{{ OPNFV_RELENG_DEV_PATH }}"
+ src: "{{ XCI_PATH }}"
dest: "{{ OPNFV_RELENG_PATH }}"
recursive: yes
delete: yes
- when:
- - OPNFV_RELENG_DEV_PATH != ""
- hosts: localhost
connection: local
diff --git a/xci/playbooks/configure-opnfvhost.yml b/xci/playbooks/configure-opnfvhost.yml
index 58272ce6..0f288459 100644
--- a/xci/playbooks/configure-opnfvhost.yml
+++ b/xci/playbooks/configure-opnfvhost.yml
@@ -30,12 +30,10 @@
file: ../var/{{ ansible_os_family }}.yml
- name: Synchronize local development releng-xci repository to XCI paths
synchronize:
- src: "{{ OPNFV_RELENG_DEV_PATH }}"
+ src: "{{ XCI_PATH }}"
dest: "{{ OPNFV_RELENG_PATH }}"
recursive: yes
delete: yes
- when:
- - OPNFV_RELENG_DEV_PATH != ""
- name: Synchronize local development openstack-ansible repository to XCI paths
synchronize:
src: "{{ OPENSTACK_OSA_DEV_PATH }}"
diff --git a/xci/playbooks/provision-vm-nodes.yml b/xci/playbooks/provision-vm-nodes.yml
index b9c13999..aa55f6ce 100644
--- a/xci/playbooks/provision-vm-nodes.yml
+++ b/xci/playbooks/provision-vm-nodes.yml
@@ -44,12 +44,10 @@
- OPENSTACK_BIFROST_DEV_PATH != ""
- name: Synchronize local development releng-xci repository to XCI paths
synchronize:
- src: "{{ OPNFV_RELENG_DEV_PATH }}"
+ src: "{{ XCI_PATH }}"
dest: "{{ OPNFV_RELENG_PATH }}"
recursive: yes
delete: yes
- when:
- - OPNFV_RELENG_DEV_PATH != ""
- name: Copy extra vars to releng-xci and bifrost
synchronize:
src: "{{ XCI_EXTRA_VARS_PATH }}"
diff --git a/xci/var/opnfv.yml b/xci/var/opnfv.yml
index 5378d13e..287f8849 100644
--- a/xci/var/opnfv.yml
+++ b/xci/var/opnfv.yml
@@ -10,7 +10,6 @@
OPNFV_RELENG_GIT_URL: "{{ lookup('env','OPNFV_RELENG_GIT_URL') }}"
OPNFV_RELENG_PATH: "{{ lookup('env','OPNFV_RELENG_PATH') }}"
XCI_DEVEL_ROOT: "{{ lookup('env','XCI_DEVEL_ROOT') }}"
-OPNFV_RELENG_DEV_PATH: "{{ lookup('env','OPNFV_RELENG_DEV_PATH') }}"
OPNFV_RELENG_VERSION: "{{ lookup('env','OPNFV_RELENG_VERSION') }}"
OPENSTACK_BIFROST_GIT_URL: "{{ lookup('env','OPENSTACK_BIFROST_GIT_URL') }}"
OPENSTACK_BIFROST_PATH: "{{ lookup('env','OPENSTACK_BIFROST_PATH') }}"
@@ -27,6 +26,7 @@ XCI_ANSIBLE_PIP_VERSION: "{{ lookup('env','XCI_ANSIBLE_PIP_VERSION') }}"
XCI_FLAVOR: "{{ lookup('env','XCI_FLAVOR') }}"
XCI_FLAVOR_ANSIBLE_FILE_PATH: "{{ lookup('env','XCI_FLAVOR_ANSIBLE_FILE_PATH') }}"
XCI_LOOP: "{{ lookup('env','XCI_LOOP') }}"
+XCI_PATH: "{{ lookup('env', 'XCI_PATH') }}/"
LOG_PATH: "{{ lookup('env','LOG_PATH') }}"
OPNFV_HOST_IP: "{{ lookup('env','OPNFV_HOST_IP') }}"
OPNFV_SSH_HOST_KEYS_PATH: "{{ lookup('env', 'OPNFV_SSH_HOST_KEYS_PATH') }}"
diff --git a/xci/xci-deploy.sh b/xci/xci-deploy.sh
index a7435e75..3a4616ce 100755
--- a/xci/xci-deploy.sh
+++ b/xci/xci-deploy.sh
@@ -50,15 +50,15 @@ fi
# override any of them.
#-------------------------------------------------------------------------------
# find where are we
-export XCI_PATH="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
+export XCI_PATH="$(git rev-parse --show-toplevel)"
# source user vars
-source $XCI_PATH/config/user-vars
+source $XCI_PATH/xci/config/user-vars
# source pinned versions
-source $XCI_PATH/config/pinned-versions
+source $XCI_PATH/xci/config/pinned-versions
# source flavor configuration
-source "$XCI_PATH/config/${XCI_FLAVOR}-vars"
+source "$XCI_PATH/xci/config/${XCI_FLAVOR}-vars"
# source xci configuration
-source $XCI_PATH/config/env-vars
+source $XCI_PATH/xci/config/env-vars
if [[ -z $(echo $PATH | grep "$HOME/.local/bin") ]]; then
export PATH="$HOME/.local/bin:$PATH"
@@ -67,7 +67,7 @@ fi
#-------------------------------------------------------------------------------
# Sanitize local development environment variables
#-------------------------------------------------------------------------------
-user_local_dev_vars=(OPNFV_RELENG_DEV_PATH OPENSTACK_OSA_DEV_PATH OPENSTACK_BIFROST_DEV_PATH)
+user_local_dev_vars=(OPENSTACK_OSA_DEV_PATH OPENSTACK_BIFROST_DEV_PATH)
for local_user_var in ${user_local_dev_vars[@]}; do
[[ -n ${!local_user_var:-} ]] && export $local_user_var=${!local_user_var%/}/
done
@@ -136,15 +136,15 @@ fi
#-------------------------------------------------------------------------------
echo "Info: Cloning OPNFV scenario repositories"
echo "-------------------------------------------------------------------------"
-cd $XCI_PATH/playbooks
+cd $XCI_PATH/xci/playbooks
ansible-playbook ${XCI_ANSIBLE_VERBOSITY} -i inventory get-opnfv-scenario-requirements.yml
echo "-------------------------------------------------------------------------"
#-------------------------------------------------------------------------------
# Get scenario variables overrides
#-------------------------------------------------------------------------------
-if [[ -f $XCI_PATH/scenarios/${OPNFV_SCENARIO:-_no_scenario_}/xci_overrides ]]; then
- source $XCI_PATH/scenarios/$OPNFV_SCENARIO/xci_overrides
+if [[ -f $XCI_PATH/xci/scenarios/${OPNFV_SCENARIO:-_no_scenario_}/xci_overrides ]]; then
+ source $XCI_PATH/xci/scenarios/$OPNFV_SCENARIO/xci_overrides
fi
#-------------------------------------------------------------------------------
@@ -161,9 +161,9 @@ 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 $XCI_PATH/../bifrost/
+cd $XCI_PATH/bifrost/
sudo -E bash ./scripts/destroy-env.sh
-cd $XCI_PATH/playbooks
+cd $XCI_PATH/xci/playbooks
ansible-playbook ${XCI_ANSIBLE_VERBOSITY} -i inventory provision-vm-nodes.yml
cd ${OPENSTACK_BIFROST_PATH}
bash ./scripts/bifrost-provision.sh
@@ -184,7 +184,7 @@ echo
echo "Info: Configuring localhost for openstack-ansible"
echo "-----------------------------------------------------------------------"
-cd $XCI_PATH/playbooks
+cd $XCI_PATH/xci/playbooks
ansible-playbook ${XCI_ANSIBLE_VERBOSITY} -i inventory configure-localhost.yml
echo "-----------------------------------------------------------------------"
echo "Info: Configured localhost host for openstack-ansible"
@@ -324,7 +324,7 @@ echo "Info: OpenStack installation is successfully completed!"
#-------------------------------------------------------------------------------
echo "Info: Openstack login details"
echo "-----------------------------------------------------------------------"
-OS_USER_CONFIG=$XCI_PATH/file/$XCI_FLAVOR/openstack_user_config.yml
+OS_USER_CONFIG=$XCI_PATH/xci/file/$XCI_FLAVOR/openstack_user_config.yml
python -c \
"import yaml
if '$XCI_FLAVOR' is 'aio':