summaryrefslogtreecommitdiffstats
path: root/xci/files/xci-lib.sh
diff options
context:
space:
mode:
Diffstat (limited to 'xci/files/xci-lib.sh')
-rw-r--r--xci/files/xci-lib.sh24
1 files changed, 9 insertions, 15 deletions
diff --git a/xci/files/xci-lib.sh b/xci/files/xci-lib.sh
index cb0751da..860153b9 100644
--- a/xci/files/xci-lib.sh
+++ b/xci/files/xci-lib.sh
@@ -52,7 +52,7 @@ function bootstrap_xci_env() {
source "$XCI_PATH/xci/installer/${INSTALLER_TYPE}/env" &>/dev/null || true
# source xci configuration
source $XCI_PATH/xci/config/env-vars
- # source the baremetal variable
+ # baremetal variable to true if the vendor in the pdf is not libvirt
grep -o vendor.* ${PDF} | grep -q libvirt && export BAREMETAL=false || export BAREMETAL=true
}
@@ -135,7 +135,7 @@ function install_ansible() {
[curl]=curl
)
EXTRA_PKG_DEPS=( apt-utils )
- sudo apt-get update
+ sudo apt-get update -qq > /dev/null
;;
rhel|fedora|centos)
@@ -158,7 +158,7 @@ function install_ansible() {
[wget]=wget
[curl]=curl
)
- sudo $PKG_MANAGER updateinfo
+ sudo $PKG_MANAGER updateinfo > /dev/null
EXTRA_PKG_DEPS=( deltarpm )
;;
@@ -172,14 +172,7 @@ function install_ansible() {
install_map+=(${EXTRA_PKG_DEPS[@]} )
- ${INSTALLER_CMD} ${install_map[@]}
-
- # Note(cinerama): If pip is linked to pip3, the rest of the install
- # won't work. Remove the alternatives. This is due to ansible's
- # python 2.x requirement.
- if [[ $(readlink -f /etc/alternatives/pip) =~ "pip3" ]]; then
- sudo -H update-alternatives --remove pip $(readlink -f /etc/alternatives/pip)
- fi
+ ${INSTALLER_CMD} ${install_map[@]} > /dev/null
# We need to prepare our virtualenv now
virtualenv --quiet --no-site-packages ${XCI_VENV}
@@ -189,7 +182,7 @@ function install_ansible() {
# We are inside the virtualenv now so we should be good to use pip and python from it.
pip -q install --upgrade pip==9.0.3 # We need a version which supports the '-c' parameter
- pip -q install --upgrade -c $uc -c $osa_uc ara virtualenv pip setuptools shade ansible==$XCI_ANSIBLE_PIP_VERSION ansible-lint==3.4.21
+ pip -q install --upgrade -c $uc -c $osa_uc ara==0.16.4 virtualenv pip setuptools shade ansible==$XCI_ANSIBLE_PIP_VERSION ansible-lint==3.4.21
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"
@@ -197,9 +190,9 @@ function install_ansible() {
ansible_lint() {
set -eu
- local playbooks_dir=(xci/playbooks xci/installer/osa/playbooks xci/installer/kubespray/playbooks)
+ local playbooks_dir=(xci/playbooks xci/installer/osa/playbooks xci/installer/kubespray/playbooks xci/installer/osh/playbooks)
# Extract role from scenario information
- local testing_role=$(sed -n "/^- scenario: ${DEPLOY_SCENARIO}/,/^$/p" ${XCI_PATH}/xci/opnfv-scenario-requirements.yml | grep role | rev | cut -d '/' -f -1 | rev)
+ local testing_role=$(sed -n "/^- scenario: ${DEPLOY_SCENARIO}$/,/^$/p" ${XCI_PATH}/xci/opnfv-scenario-requirements.yml | grep role | rev | cut -d '/' -f -1 | rev)
# clear XCI_CACHE
rm -rf ${XCI_CACHE}/repos/openstack-ansible-tests
@@ -270,7 +263,7 @@ submit_bug_report() {
echo "xci installer: $INSTALLER_TYPE"
echo "xci scenario: $DEPLOY_SCENARIO"
echo "Environment variables:"
- env | grep --color=never '\(OPNFV\|XCI\|INSTALLER_TYPE\|OPENSTACK\|SCENARIO\|ANSIBLE\)'
+ env | grep --color=never '\(OPNFV\|XCI\|INSTALLER_TYPE\|OPENSTACK\|SCENARIO\|ANSIBLE\|BIFROST\|DIB\)'
echo "-------------------------------------------------------------------------"
}
@@ -293,6 +286,7 @@ log_xci_information() {
[[ "$INFRA_DEPLOYMENT" == "bifrost" ]] && echo "openstack/bifrost version: $OPENSTACK_BIFROST_VERSION"
[[ "$INSTALLER_TYPE" == "osa" ]] && echo "openstack/openstack-ansible version: $OPENSTACK_OSA_VERSION"
[[ "$INSTALLER_TYPE" == "kubespray" ]] && echo "kubespray version: $KUBESPRAY_VERSION"
+ [[ "$INSTALLER_TYPE" == "osh" ]] && echo "kubespray version: $KUBESPRAY_VERSION"
echo "-------------------------------------------------------------------------"
}