summaryrefslogtreecommitdiffstats
path: root/packer/provision/baseline.sh
diff options
context:
space:
mode:
Diffstat (limited to 'packer/provision/baseline.sh')
-rw-r--r--packer/provision/baseline.sh34
1 files changed, 32 insertions, 2 deletions
diff --git a/packer/provision/baseline.sh b/packer/provision/baseline.sh
index a0ef68061..7d18d5aba 100644
--- a/packer/provision/baseline.sh
+++ b/packer/provision/baseline.sh
@@ -208,6 +208,27 @@ EOF
}
+opensuse_systems() {
+ # SELinux?
+
+ echo "---> Updating operating system"
+ zypper -n clean
+ zypper -n update
+
+ # add in components we need or want on systems
+ echo "---> Installing base packages"
+ zypper install -y unzip xz puppet git git-review perl-XML-XPath wget make
+
+ # All of our systems require Java (because of Jenkins)
+ echo "---> Configuring OpenJDK"
+ zypper install -y 'java-*-openjdk-devel'
+
+ # Needed to parse OpenStack commands used by infra stack commands
+ # to initialize Heat template based systems.
+ zypper install -y jq
+
+}
+
all_systems() {
# Allow jenkins access to update-alternatives command to switch java version
cat <<EOF >/etc/sudoers.d/89-jenkins-user-defaults
@@ -238,10 +259,15 @@ echo "---> Attempting to detect OS"
ORIGIN=$(if [ -e /etc/redhat-release ]
then
echo redhat
- else
+ else [ -e /etc/os-release ]
+ DIST="$(grep "\<ID\>" /etc/os-release)"
+ if [ $DIST = "ID=ubuntu" ]
+ then
echo ubuntu
+ else
+ echo opensuse
+ fi
fi)
-#ORIGIN=$(logname)
case "${ORIGIN}" in
fedora|centos|redhat)
@@ -252,6 +278,10 @@ case "${ORIGIN}" in
echo "---> Ubuntu system detected"
ubuntu_systems
;;
+ opensuse)
+ echo "---> openSuSE system detected"
+ opensuse_systems
+ ;;
*)
echo "---> Unknown operating system"
;;