summaryrefslogtreecommitdiffstats
path: root/xci
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2017-09-01 10:13:45 +0100
committerMarkos Chandras <mchandras@suse.de>2017-09-16 10:32:02 +0100
commitf819f91a39ad781d8e7c20fe4672260b4f98e5f3 (patch)
treef5e9e424f436ebd4813955eac00c9602b82364ae /xci
parent0b977bf08fcec6a709da59704fd27dcb49039abd (diff)
xci: xci-deploy.sh: Configure dib so VMs match the host
In preparation for adding SUSE support, we need to configure the dib build process to build images which match the host's OS. Change-Id: I4944245d526f916b2033abc5d219fa7a69db54ab Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'xci')
-rwxr-xr-xxci/config/env-vars5
-rwxr-xr-xxci/xci-deploy.sh24
2 files changed, 24 insertions, 5 deletions
diff --git a/xci/config/env-vars b/xci/config/env-vars
index d8e71244..c399707b 100755
--- a/xci/config/env-vars
+++ b/xci/config/env-vars
@@ -17,10 +17,5 @@ export JOB_NAME=${JOB_NAME:-false}
# Overall, it's better to use what OSA supports so we can use new features.
export XCI_ANSIBLE_PIP_VERSION=2.3.2.0
export ANSIBLE_HOST_KEY_CHECKING=False
-export DISTRO=${DISTRO:-ubuntu}
-export DIB_OS_RELEASE=${DIB_OS_RELEASE:-xenial}
-export DIB_OS_ELEMENT=${DIB_OS_ELEMENT:-ubuntu-minimal}
-export DIB_OS_PACKAGES=${DIB_OS_PACKAGES:-"vlan,vim,less,bridge-utils,sudo,language-pack-en,iputils-ping,rsyslog,curl,python,debootstrap,ifenslave,ifenslave-2.6,lsof,lvm2,tcpdump,nfs-kernel-server,chrony,iptables"}
-export EXTRA_DIB_ELEMENTS=${EXTRA_DIB_ELEMENTS:-"openssh-server"}
# subject of the certificate
export XCI_SSL_SUBJECT=${XCI_SSL_SUBJECT:-"/C=US/ST=California/L=San Francisco/O=IT/CN=xci.releng.opnfv.org"}
diff --git a/xci/xci-deploy.sh b/xci/xci-deploy.sh
index 5a01772f..24936dd5 100755
--- a/xci/xci-deploy.sh
+++ b/xci/xci-deploy.sh
@@ -67,6 +67,30 @@ echo "-------------------------------------------------------------------------"
#-------------------------------------------------------------------------------
source file/install-ansible.sh
+# Make the VMs match the host. If we need to make this configurable
+# then this logic has to be moved outside this file
+case ${OS_FAMILY,,} in
+ # These should ideally match the CI jobs
+ debian)
+ export DIB_OS_RELEASE="${DIB_OS_RELEASE:-xenial}"
+ export DIB_OS_ELEMENT="${DIB_OS_ELEMENT:-ubuntu-minimal}"
+ export DIB_OS_PACKAGES="${DIB_OS_PACKAGES:-vlan,vim,less,bridge-utils,language-pack-en,iputils-ping,rsyslog,curl,chrony,iptables,nfs-kernel-server}"
+ export EXTRA_DIB_ELEMENTS="${EXTRA_DIB_ELEMENTS:-openssh-server}"
+ ;;
+ redhat)
+ export DIB_OS_RELEASE="${DIB_OS_RELEASE:-7}"
+ export DIB_OS_ELEMENT="${DIB_OS_ELEMENT:-centos-minimal}"
+ export DIB_OS_PACKAGES="${DIB_OS_PACKAGES:-vim,less,bridge-utils,iputils,rsyslog,curl,iptables,nfs-kernel-server}"
+ export EXTRA_DIB_ELEMENTS="${EXTRA_DIB_ELEMENTS:-openssh-server}"
+ ;;
+ suse)
+ export DIB_OS_RELEASE="${DIB_OS_RELEASE:-42.3}"
+ export DIB_OS_ELEMENT="${DIB_OS_ELEMENT:-opensuse-minimal}"
+ export DIB_OS_PACKAGES="${DIB_OS_PACKAGES:-vim,less,bridge-utils,iputils,rsyslog,curl,iptables,nfs-kernel-server}"
+ export EXTRA_DIB_ELEMENTS="${EXTRA_DIB_ELEMETS:-openssh-server}"
+ ;;
+esac
+
# There is no CentOS or openSUSE support at all
if [[ $OS_FAMILY != Debian ]]; then
echo ""