Merge "Use a venv with previous ansible version for upgrades"
This commit is contained in:
commit
c630ba24ca
@ -15,6 +15,9 @@
|
|||||||
|
|
||||||
- include: common/previous/setting-nodepool-variables.yml
|
- include: common/previous/setting-nodepool-variables.yml
|
||||||
|
|
||||||
|
# Ensure the repo is setup for previous version
|
||||||
|
- include: common/previous/test-repo-setup.yml
|
||||||
|
|
||||||
- name: Prepare for nova services
|
- name: Prepare for nova services
|
||||||
hosts: nova_all
|
hosts: nova_all
|
||||||
user: root
|
user: root
|
||||||
|
@ -55,7 +55,8 @@ echo "TEST_IDEMPOTENCE: ${TEST_IDEMPOTENCE}"
|
|||||||
function execute_ansible_playbook {
|
function execute_ansible_playbook {
|
||||||
|
|
||||||
export ANSIBLE_CLI_PARAMETERS="${ANSIBLE_PARAMETERS} -e @${ANSIBLE_OVERRIDES}"
|
export ANSIBLE_CLI_PARAMETERS="${ANSIBLE_PARAMETERS} -e @${ANSIBLE_OVERRIDES}"
|
||||||
CMD_TO_EXECUTE="ansible-playbook ${TEST_PLAYBOOK} $@ ${ANSIBLE_CLI_PARAMETERS}"
|
export ANSIBLE_BIN=${ANSIBLE_BIN:-"ansible-playbook"}
|
||||||
|
CMD_TO_EXECUTE="${ANSIBLE_BIN} ${TEST_PLAYBOOK} $@ ${ANSIBLE_CLI_PARAMETERS}"
|
||||||
|
|
||||||
echo "Executing: ${CMD_TO_EXECUTE}"
|
echo "Executing: ${CMD_TO_EXECUTE}"
|
||||||
echo "With:"
|
echo "With:"
|
||||||
@ -71,13 +72,29 @@ function execute_ansible_playbook {
|
|||||||
# Ensure that the Ansible environment is properly prepared
|
# Ensure that the Ansible environment is properly prepared
|
||||||
source "${COMMON_TESTS_PATH}/test-ansible-env-prep.sh"
|
source "${COMMON_TESTS_PATH}/test-ansible-env-prep.sh"
|
||||||
|
|
||||||
# Prepare environment for the initial deploy of previous Nova
|
# Prepare environment for the initial deploy of (previous and current) Nova
|
||||||
# No upgrading or testing is done yet.
|
# No upgrading or testing is done yet.
|
||||||
export ANSIBLE_LOG_PATH="${ANSIBLE_LOG_DIR}/ansible-execute-nova-install.log"
|
export ANSIBLE_LOG_PATH="${ANSIBLE_LOG_DIR}/ansible-execute-nova-install.log"
|
||||||
|
|
||||||
|
# Execute the setup of current infrastructure
|
||||||
|
execute_ansible_playbook
|
||||||
|
|
||||||
|
|
||||||
|
# Prepare environment for the deploy of previous Nova:
|
||||||
|
# No upgrading or testing is done yet.
|
||||||
|
export TEST_PLAYBOOK="${WORKING_DIR}/tests/test-install-previous-nova.yml"
|
||||||
|
export ANSIBLE_LOG_PATH="${ANSIBLE_LOG_DIR}/ansible-execute-previous_nova-install.log"
|
||||||
|
export PREVIOUS_VENV="ansible-previous"
|
||||||
|
export ANSIBLE_BIN="${WORKING_DIR}/.tox/${PREVIOUS_VENV}/bin/ansible-playbook"
|
||||||
|
source ${COMMON_TESTS_PATH}/test-create-previous-venv.sh
|
||||||
|
|
||||||
# Execute the setup of previous Nova
|
# Execute the setup of previous Nova
|
||||||
execute_ansible_playbook
|
execute_ansible_playbook
|
||||||
|
|
||||||
|
# Unset previous branch overrides
|
||||||
|
unset PREVIOUS_VENV
|
||||||
|
unset ANSIBLE_BIN
|
||||||
|
|
||||||
# Prepare environment for the upgrade of Nova
|
# Prepare environment for the upgrade of Nova
|
||||||
export TEST_PLAYBOOK="${WORKING_DIR}/tests/benchmark-upgrade.yml"
|
export TEST_PLAYBOOK="${WORKING_DIR}/tests/benchmark-upgrade.yml"
|
||||||
export ANSIBLE_LOG_PATH="${ANSIBLE_LOG_DIR}/ansible-execute-nova-upgrade.log"
|
export ANSIBLE_LOG_PATH="${ANSIBLE_LOG_DIR}/ansible-execute-nova-upgrade.log"
|
||||||
|
@ -27,9 +27,3 @@
|
|||||||
|
|
||||||
# Install Neutron
|
# Install Neutron
|
||||||
- include: common/test-install-neutron.yml
|
- include: common/test-install-neutron.yml
|
||||||
|
|
||||||
# Ensure the repo is setup for previous version
|
|
||||||
- include: common/previous/test-repo-setup.yml
|
|
||||||
|
|
||||||
# Install previous Nova
|
|
||||||
- include: test-install-previous-nova.yml
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user