CI: Use PATH to find kolla-ansible script

This change also updates the CI test scripts to use PATH to find the
kolla-ansible script, rather than relying on the file in the source
checkout.

Using the script in the source checkout was hiding an issue with pip
install --user, although that has now been fixed in
I5b47a146627d06bb3fe4a747c5f20290c726b0f9.

Related-Bug: #1915527

Change-Id: I2827a657c8716a9c40391c6bdb7ff1a2a9c1260e
Depends-On: https://review.opendev.org/c/openstack/kolla-ansible/+/775586
This commit is contained in:
Mark Goddard 2021-02-12 17:58:51 +00:00
parent fa4f99950a
commit 1ea99147c1
7 changed files with 19 additions and 19 deletions

View File

@ -14,7 +14,7 @@ function deploy_bifrost {
# Deploy the bifrost container. # Deploy the bifrost container.
# TODO(mgoddard): add pull action when we have a local registry service in # TODO(mgoddard): add pull action when we have a local registry service in
# CI. # CI.
tools/kolla-ansible -i ${RAW_INVENTORY} -vvv deploy-bifrost &> /tmp/logs/ansible/deploy-bifrost kolla-ansible -i ${RAW_INVENTORY} -vvv deploy-bifrost &> /tmp/logs/ansible/deploy-bifrost
} }

View File

@ -14,14 +14,14 @@ function deploy {
sudo chmod -R 777 /etc/kolla sudo chmod -R 777 /etc/kolla
# generate self-signed certificates for the optional internal TLS tests # generate self-signed certificates for the optional internal TLS tests
if [[ "$TLS_ENABLED" = "True" ]]; then if [[ "$TLS_ENABLED" = "True" ]]; then
tools/kolla-ansible -i ${RAW_INVENTORY} -vvv certificates > /tmp/logs/ansible/certificates kolla-ansible -i ${RAW_INVENTORY} -vvv certificates > /tmp/logs/ansible/certificates
fi fi
# Actually do the deployment # Actually do the deployment
tools/kolla-ansible -i ${RAW_INVENTORY} -vvv prechecks &> /tmp/logs/ansible/deploy-prechecks kolla-ansible -i ${RAW_INVENTORY} -vvv prechecks &> /tmp/logs/ansible/deploy-prechecks
tools/kolla-ansible -i ${RAW_INVENTORY} -vvv pull &> /tmp/logs/ansible/pull kolla-ansible -i ${RAW_INVENTORY} -vvv pull &> /tmp/logs/ansible/pull
tools/kolla-ansible -i ${RAW_INVENTORY} -vvv deploy &> /tmp/logs/ansible/deploy kolla-ansible -i ${RAW_INVENTORY} -vvv deploy &> /tmp/logs/ansible/deploy
tools/kolla-ansible -i ${RAW_INVENTORY} -vvv post-deploy &> /tmp/logs/ansible/post-deploy kolla-ansible -i ${RAW_INVENTORY} -vvv post-deploy &> /tmp/logs/ansible/post-deploy
tools/kolla-ansible -i ${RAW_INVENTORY} -vvv check &> /tmp/logs/ansible/check-deploy kolla-ansible -i ${RAW_INVENTORY} -vvv check &> /tmp/logs/ansible/check-deploy
} }

View File

@ -12,9 +12,9 @@ function reconfigure {
# TODO(jeffrey4l): make some configure file change and # TODO(jeffrey4l): make some configure file change and
# trigger a real reconfigure # trigger a real reconfigure
tools/kolla-ansible -i ${RAW_INVENTORY} -vvv prechecks &> /tmp/logs/ansible/reconfigure-prechecks kolla-ansible -i ${RAW_INVENTORY} -vvv prechecks &> /tmp/logs/ansible/reconfigure-prechecks
tools/kolla-ansible -i ${RAW_INVENTORY} -vvv reconfigure &> /tmp/logs/ansible/reconfigure kolla-ansible -i ${RAW_INVENTORY} -vvv reconfigure &> /tmp/logs/ansible/reconfigure
tools/kolla-ansible -i ${RAW_INVENTORY} -vvv check &> /tmp/logs/ansible/check-reconfigure kolla-ansible -i ${RAW_INVENTORY} -vvv check &> /tmp/logs/ansible/check-reconfigure
} }

View File

@ -132,6 +132,6 @@ EOF
setup_openstack_clients setup_openstack_clients
RAW_INVENTORY=/etc/kolla/inventory RAW_INVENTORY=/etc/kolla/inventory
tools/kolla-ansible -i ${RAW_INVENTORY} -e ansible_user=$USER -vvv bootstrap-servers &> /tmp/logs/ansible/bootstrap-servers kolla-ansible -i ${RAW_INVENTORY} -e ansible_user=$USER -vvv bootstrap-servers &> /tmp/logs/ansible/bootstrap-servers
prepare_images prepare_images

View File

@ -11,7 +11,7 @@ export PYTHONUNBUFFERED=1
function mariadb_stop { function mariadb_stop {
echo "Stopping the database cluster" echo "Stopping the database cluster"
tools/kolla-ansible -i ${RAW_INVENTORY} -vvv stop --yes-i-really-really-mean-it --tags mariadb --skip-tags common kolla-ansible -i ${RAW_INVENTORY} -vvv stop --yes-i-really-really-mean-it --tags mariadb --skip-tags common
if [[ $(sudo docker ps -q | grep mariadb | wc -l) -ne 0 ]]; then if [[ $(sudo docker ps -q | grep mariadb | wc -l) -ne 0 ]]; then
echo "Failed to stop MariaDB cluster" echo "Failed to stop MariaDB cluster"
return 1 return 1
@ -21,7 +21,7 @@ function mariadb_stop {
function mariadb_recovery { function mariadb_recovery {
# Recover the database cluster. # Recover the database cluster.
echo "Recovering the database cluster" echo "Recovering the database cluster"
tools/kolla-ansible -i ${RAW_INVENTORY} -vvv mariadb_recovery --tags mariadb --skip-tags common kolla-ansible -i ${RAW_INVENTORY} -vvv mariadb_recovery --tags mariadb --skip-tags common
} }
function test_recovery { function test_recovery {

View File

@ -15,7 +15,7 @@ function upgrade_bifrost {
# CI. # CI.
# TODO(mgoddard): make some configuration file changes and trigger a real # TODO(mgoddard): make some configuration file changes and trigger a real
# upgrade. # upgrade.
tools/kolla-ansible -i ${RAW_INVENTORY} -vvv deploy-bifrost &> /tmp/logs/ansible/upgrade-bifrost kolla-ansible -i ${RAW_INVENTORY} -vvv deploy-bifrost &> /tmp/logs/ansible/upgrade-bifrost
} }

View File

@ -11,12 +11,12 @@ function upgrade {
RAW_INVENTORY=/etc/kolla/inventory RAW_INVENTORY=/etc/kolla/inventory
# generate self-signed certificates for the optional internal TLS tests # generate self-signed certificates for the optional internal TLS tests
if [[ "$TLS_ENABLED" = "True" ]]; then if [[ "$TLS_ENABLED" = "True" ]]; then
tools/kolla-ansible -i ${RAW_INVENTORY} -vvv certificates > /tmp/logs/ansible/certificates kolla-ansible -i ${RAW_INVENTORY} -vvv certificates > /tmp/logs/ansible/certificates
fi fi
tools/kolla-ansible -i ${RAW_INVENTORY} -vvv prechecks &> /tmp/logs/ansible/upgrade-prechecks kolla-ansible -i ${RAW_INVENTORY} -vvv prechecks &> /tmp/logs/ansible/upgrade-prechecks
tools/kolla-ansible -i ${RAW_INVENTORY} -vvv pull &> /tmp/logs/ansible/pull-upgrade kolla-ansible -i ${RAW_INVENTORY} -vvv pull &> /tmp/logs/ansible/pull-upgrade
tools/kolla-ansible -i ${RAW_INVENTORY} -vvv upgrade &> /tmp/logs/ansible/upgrade kolla-ansible -i ${RAW_INVENTORY} -vvv upgrade &> /tmp/logs/ansible/upgrade
tools/kolla-ansible -i ${RAW_INVENTORY} -vvv check &> /tmp/logs/ansible/check-upgrade kolla-ansible -i ${RAW_INVENTORY} -vvv check &> /tmp/logs/ansible/check-upgrade
} }