summaryrefslogtreecommitdiffstats
path: root/xci/xci-deploy.sh
diff options
context:
space:
mode:
authorMarkos Chandras <mchandras@suse.de>2017-12-28 12:00:08 +0000
committerMarkos Chandras <mchandras@suse.de>2018-01-03 09:53:02 +0000
commitd3116e3182ebae9d40544060a0318cbc382e388c (patch)
tree883283e0f3f6222130d5ae16b0b90aa739d69769 /xci/xci-deploy.sh
parenta9e1c486d93630a7f1f19ec79b968ba5404bde0e (diff)
xci: Decouple VM distribution from host OS
Introduce a new XCI_DISTRO variable to select the distribution to deploy on the VMs in order to make deployments more flexible and decouple the VM OS selection from the host one. The default value for this new variable is to match the host OS but users can always set it to one of the supported distributions. We can now simply execute the install-ansible.sh script instead of sourcing it in order to keep the environment as clean as possible. Change-Id: Ia74eb0422f983848cde0fb7b220ea1035dfa78bc Signed-off-by: Markos Chandras <mchandras@suse.de>
Diffstat (limited to 'xci/xci-deploy.sh')
-rwxr-xr-xxci/xci-deploy.sh14
1 files changed, 6 insertions, 8 deletions
diff --git a/xci/xci-deploy.sh b/xci/xci-deploy.sh
index fa03ef8d..e0b31ab9 100755
--- a/xci/xci-deploy.sh
+++ b/xci/xci-deploy.sh
@@ -99,24 +99,22 @@ echo "-------------------------------------------------------------------------"
#-------------------------------------------------------------------------------
echo "Info: Installing Ansible from pip"
echo "-------------------------------------------------------------------------"
-source files/install-ansible.sh
+bash files/install-ansible.sh
echo "-------------------------------------------------------------------------"
-# 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
+case ${XCI_DISTRO,,} in
# These should ideally match the CI jobs
- debian)
+ 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,language-pack-en,iputils-ping,rsyslog,curl,iptables}"
;;
- redhat)
+ centos)
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}"
;;
- suse)
+ opensuse)
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}"
@@ -124,7 +122,7 @@ case ${OS_FAMILY,,} in
esac
# There is no CentOS support at all
-if [[ $OS_FAMILY == RedHat ]]; then
+if [[ ${XCI_DISTRO,,} == centos ]]; then
echo ""
echo "Error: Sorry, only Ubuntu and SUSE hosts are supported for now!"
echo "Error: CentOS 7 support is still work in progress."