summaryrefslogtreecommitdiffstats
path: root/xci/files
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2018-03-19 14:15:00 +0000
committerMarkos Chandras <mchandras@suse.de>2018-03-21 17:28:55 +0000
commit613d9d5631fa4f7fbc6b565e35620fdb5dd3561e (patch)
tree213bdb042a15fccdbae62eedb3075e701d4830cb /xci/files
parent0e1dda4501a6f71112a70bbb6eda034acfaaa147 (diff)
xci: Install the ARA callback plugin
The ARA Ansible plugin can be used to visualize the entire XCI run so lets install it by default and generate a report at the end of the execution. Change-Id: I66c3230b371001c110e81755c5f0dad4b1756606 Link: https://github.com/openstack/ara Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'xci/files')
-rw-r--r--xci/files/install-lib.sh19
1 files changed, 18 insertions, 1 deletions
diff --git a/xci/files/install-lib.sh b/xci/files/install-lib.sh
index 0ea6f181..ce52ff4b 100644
--- a/xci/files/install-lib.sh
+++ b/xci/files/install-lib.sh
@@ -14,6 +14,10 @@
function install_ansible() {
set -eu
+ # Use the upper-constraints file from the pinned requirements repository.
+ local requirements_sha=$(awk '/requirements_git_install_branch:/ {print $2}' ${XCI_PATH}/xci/installer/osa/files/openstack_services.yml)
+ local uc="https://raw.githubusercontent.com/openstack/requirements/${requirements_sha}/upper-constraints.txt"
+
declare -A PKG_MAP
# workaround: for latest bindep to work, it needs to use en_US local
@@ -163,7 +167,20 @@ function install_ansible() {
PIP=$(which pip)
echo "Using pip: $(${PIP} --version)"
- ${PIP} -q install --user --upgrade virtualenv pip setuptools ansible==$XCI_ANSIBLE_PIP_VERSION
+ ${PIP} -q install --user --upgrade -c $uc ara virtualenv pip setuptools ansible==$XCI_ANSIBLE_PIP_VERSION
+
+ ara_location=$(${PYTHON} -c "import os,ara; print(os.path.dirname(ara.__file__))")
+ export ANSIBLE_CALLBACK_PLUGINS="/etc/ansible/roles/plugins/callback:${ara_location}/plugins/callbacks"
+}
+
+collect_xci_logs() {
+ echo "----------------------------------"
+ echo "Info: Collecting XCI logs"
+ echo "----------------------------------"
+
+ # Create the ARA log directory and store the sqlite source database
+ mkdir -p ${LOG_PATH}/ara/
+ rsync -q -a "${HOME}/.ara/ansible.sqlite" "${LOG_PATH}/ara/"
}
# vim: set ts=4 sw=4 expandtab: