summaryrefslogtreecommitdiffstats
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
parent14f5c1402e4268b5940a5258814cb198dc8f3bda (diff)
parent184a87be2b62cfeb6c7234b1da09c462e1008a46 (diff)
Merge "xci: Drop OPNFV_RELENG_DEV_PATH variable"
-rw-r--r--Vagrantfile4
-rw-r--r--docs/xci-user-guide.rst7
-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
8 files changed, 17 insertions, 37 deletions
diff --git a/Vagrantfile b/Vagrantfile
index 58b6368e..776d09ba 100644
--- a/Vagrantfile
+++ b/Vagrantfile
@@ -45,7 +45,6 @@ Vagrant.configure(2) do |config|
export VM_MEMORY_SIZE=${VM_MEMORY_SIZE:-2048}
export VM_DOMAIN_TYPE=qemu
export PATH=$PATH:$HOME/.local/bin
- export OPNFV_RELENG_DEV_PATH=/vagrant
[[ ! -e ${HOME}/.ssh/id_rsa ]] && ssh-keygen -q -P '' -f ${HOME}/.ssh/id_rsa
cd xci && ./xci-deploy.sh
SHELL
@@ -81,7 +80,6 @@ Vagrant.configure(2) do |config|
export VM_MEMORY_SIZE=${VM_MEMORY_SIZE:-2048}
export VM_DOMAIN_TYPE=qemu
export PATH=$PATH:$HOME/.local/bin
- export OPNFV_RELENG_DEV_PATH=/vagrant
[[ ! -e ${HOME}/.ssh/id_rsa ]] && ssh-keygen -q -P '' -f ${HOME}/.ssh/id_rsa
cd xci && ./xci-deploy.sh
SHELL
@@ -115,7 +113,6 @@ Vagrant.configure(2) do |config|
export VM_MEMORY_SIZE=${VM_MEMORY_SIZE:-2048}
export VM_DOMAIN_TYPE=qemu
export PATH=$PATH:$HOME/.local/bin
- export OPNFV_RELENG_DEV_PATH=/vagrant
[[ ! -e ${HOME}/.ssh/id_rsa ]] && ssh-keygen -q -P '' -f ${HOME}/.ssh/id_rsa
cd xci && ./xci-deploy.sh
SHELL
@@ -143,7 +140,6 @@ Vagrant.configure(2) do |config|
export VM_MEMORY_SIZE=${VM_MEMORY_SIZE:-2048}
export VM_DOMAIN_TYPE=qemu
export PATH=$PATH:$HOME/.local/bin
- export OPNFV_RELENG_DEV_PATH=/vagrant
# workaround for https://github.com/openSUSE/vagrant/pull/22
sudo bash -c 'echo "127.0.0.1 localhost" >> /etc/hosts'
[[ ! -e ${HOME}/.ssh/id_rsa ]] && ssh-keygen -q -P '' -f ${HOME}/.ssh/id_rsa
diff --git a/docs/xci-user-guide.rst b/docs/xci-user-guide.rst
index 11321383..7a411257 100644
--- a/docs/xci-user-guide.rst
+++ b/docs/xci-user-guide.rst
@@ -313,13 +313,6 @@ executing the script. The current user variables can be seen from
`user-vars <https://git.opnfv.org/releng-xci/tree/xci/config/user-vars>`_
file located in releng-xci repository.
-The variables can also be set directly within the file before executing
-the sandbox script. If you do this, you need to set ``$OPNFV_RELENG_DEV_PATH``
-environment variable where the releng-xci repo is located on your host which
-you modified the files in.
-
-| ``export OPNFV_RELENG_DEV_PATH=/path/to/releng-xci/``
-
Pinned Versions
---------------
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':