diff options
-rw-r--r-- | docs/xci-user-guide.rst | 4 | ||||
-rw-r--r-- | xci/file/install-ansible.sh | 22 | ||||
-rw-r--r-- | xci/playbooks/configure-opnfvhost.yml | 2 | ||||
-rw-r--r-- | xci/playbooks/roles/configure-nfs/vars/centos.yml | 11 | ||||
-rwxr-xr-x | xci/scripts/vm/start-new-vm.sh | 3 | ||||
-rwxr-xr-x | xci/xci-deploy.sh | 2 |
6 files changed, 30 insertions, 14 deletions
diff --git a/docs/xci-user-guide.rst b/docs/xci-user-guide.rst index bc309465..7a72a70a 100644 --- a/docs/xci-user-guide.rst +++ b/docs/xci-user-guide.rst @@ -313,11 +313,11 @@ executing the script. The current user variables can be seen from 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 ``$RELENG_DEV_PATH`` +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 RELENG_DEV_PATH=/path/to/releng-xci/`` +| ``export OPNFV_RELENG_DEV_PATH=/path/to/releng-xci/`` Pinned Versions --------------- diff --git a/xci/file/install-ansible.sh b/xci/file/install-ansible.sh index 85d02d09..ca7763ad 100644 --- a/xci/file/install-ansible.sh +++ b/xci/file/install-ansible.sh @@ -14,9 +14,10 @@ CHECK_CMD_PKGS=( python-devel ) -# Check zypper before apt-get in case zypper-aptitude -# is installed -if [ -x '/usr/bin/zypper' ]; then +source /etc/os-release || source /usr/lib/os-release + +case ${ID,,} in + *suse) OS_FAMILY="Suse" INSTALLER_CMD="sudo -H -E zypper install -y" CHECK_CMD="zypper search --match-exact --installed" @@ -39,7 +40,9 @@ if [ -x '/usr/bin/zypper' ]; then if $(${CHECK_CMD} patterns-openSUSE-minimal_base-conflicts &> /dev/null); then sudo -H zypper remove -y patterns-openSUSE-minimal_base-conflicts fi -elif [ -x '/usr/bin/apt-get' ]; then + ;; + + ubuntu|debian) OS_FAMILY="Debian" INSTALLER_CMD="sudo -H -E apt-get -y install" CHECK_CMD="dpkg -l" @@ -56,7 +59,9 @@ elif [ -x '/usr/bin/apt-get' ]; then ) EXTRA_PKG_DEPS=() sudo apt-get update -elif [ -x '/usr/bin/dnf' ] || [ -x '/usr/bin/yum' ]; then + ;; + + rhel|centos|fedora) OS_FAMILY="RedHat" PKG_MANAGER=$(which dnf || which yum) INSTALLER_CMD="sudo -H -E ${PKG_MANAGER} -y install" @@ -75,9 +80,10 @@ elif [ -x '/usr/bin/dnf' ] || [ -x '/usr/bin/yum' ]; then ) sudo yum update --assumeno EXTRA_PKG_DEPS=() -else - echo "ERROR: Supported package manager not found. Supported: apt,yum,zypper" -fi + ;; + + *) echo "ERROR: Supported package manager not found. Supported: apt,yum,zypper"; exit 1;; +esac if ! $(python --version &>/dev/null); then ${INSTALLER_CMD} ${PKG_MAP[python]} diff --git a/xci/playbooks/configure-opnfvhost.yml b/xci/playbooks/configure-opnfvhost.yml index b6dbbb13..7b168498 100644 --- a/xci/playbooks/configure-opnfvhost.yml +++ b/xci/playbooks/configure-opnfvhost.yml @@ -143,12 +143,10 @@ name: "{{ docker_package_name }}" state: latest when: lookup('env', 'JENKINS_HOME') != "" - # install python-openstackclient on opnfv host only if we are running as part of CI - name: install python-openstackclient pip: name: python-openstackclient state: present - when: lookup('env', 'JENKINS_HOME') != "" - hosts: localhost remote_user: root diff --git a/xci/playbooks/roles/configure-nfs/vars/centos.yml b/xci/playbooks/roles/configure-nfs/vars/centos.yml new file mode 100644 index 00000000..89a71ce7 --- /dev/null +++ b/xci/playbooks/roles/configure-nfs/vars/centos.yml @@ -0,0 +1,11 @@ +--- +# SPDX-license-identifier: Apache-2.0 +############################################################################## +# Copyright (c) 2017 Nokia Oyj and others. +# All rights reserved. This program and the accompanying materials +# are made available under the terms of the Apache License, Version 2.0 +# which accompanies this distribution, and is available at +# http://www.apache.org/licenses/LICENSE-2.0 +############################################################################## +nfs_server_package: "nfs-utils" +nfs_server_service: "nfs-server" diff --git a/xci/scripts/vm/start-new-vm.sh b/xci/scripts/vm/start-new-vm.sh index 8f2eff1f..1019ce88 100755 --- a/xci/scripts/vm/start-new-vm.sh +++ b/xci/scripts/vm/start-new-vm.sh @@ -244,7 +244,8 @@ if [[ $? != 0 ]]; then echo "Creating a default test case to run xci-deploy.sh" cat > ${BASE_PATH}/run_jenkins_test.sh <<EOF #!/bin/bash -cd releng-xci/xci +export XCI_FLAVOR=mini +cd ~/releng-xci/xci ./xci-deploy.sh EOF # Copy again diff --git a/xci/xci-deploy.sh b/xci/xci-deploy.sh index fd3849be..90133f8d 100755 --- a/xci/xci-deploy.sh +++ b/xci/xci-deploy.sh @@ -44,7 +44,7 @@ fi #------------------------------------------------------------------------------- # Sanitize local development environment variables #------------------------------------------------------------------------------- -user_local_dev_vars=(OPNFV_RELENG_DEV_PATH OPNFV_OSA_DEV_PATH OPNFV_BIFROST_DEV_PATH) +user_local_dev_vars=(OPNFV_RELENG_DEV_PATH 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 |