summaryrefslogtreecommitdiffstats
path: root/vagrant/basebuild
diff options
context:
space:
mode:
authorEd Warnicke <eaw@cisco.com>2016-03-24 09:27:20 -0500
committerEd Warnicke <eaw@cisco.com>2016-03-24 15:27:13 -0500
commitf76f44f9c8d80e072c568c68ea2289653ddad475 (patch)
tree336cb582ff020420c7d82b2319e6ed08288cf54c /vagrant/basebuild
parenta6a021778a56114f6ffbcc77174acae4ee544172 (diff)
Add basebuild for centos
Change-Id: I8a8ba3fe1fd3fb12ed3f3004bbc863cb7b2c9872 Signed-off-by: Ed Warnicke <eaw@cisco.com>
Diffstat (limited to 'vagrant/basebuild')
-rw-r--r--vagrant/basebuild/bootstrap.sh100
1 files changed, 72 insertions, 28 deletions
diff --git a/vagrant/basebuild/bootstrap.sh b/vagrant/basebuild/bootstrap.sh
index 817de8f17..e3ce2cac2 100644
--- a/vagrant/basebuild/bootstrap.sh
+++ b/vagrant/basebuild/bootstrap.sh
@@ -1,39 +1,83 @@
-# Standard update + upgrade dance
-apt-get update
-apt-get upgrade -y
-# Fix the silly notion that /bin/sh should point to dash by pointing it to bash
+ubuntu_systems() {
+ # Standard update + upgrade dance
+ apt-get update
+ apt-get upgrade -y
-sudo update-alternatives --install /bin/sh sh /bin/bash 100
+ # Fix the silly notion that /bin/sh should point to dash by pointing it to bash
-# Install build tools
-apt-get install -y build-essential autoconf automake bison libssl-dev ccache libtool git dkms debhelper libganglia1-dev libapr1-dev libconfuse-dev
+ sudo update-alternatives --install /bin/sh sh /bin/bash 100
-# Install other stuff
-apt-get install -y --force-yes bridge-utils vim gdb iproute2
+ # Install build tools
+ apt-get install -y build-essential autoconf automake bison libssl-dev ccache libtool git dkms debhelper libganglia1-dev libapr1-dev libconfuse-dev
-# Install debian packaging tools
-apt-get install -y debhelper dkms
+ # Install other stuff
+ apt-get install -y --force-yes bridge-utils vim gdb iproute2
-# Install uio
-apt-get install -y linux-image-extra-`uname -r`
+ # Install debian packaging tools
+ apt-get install -y debhelper dkms
-# Install jdk and maven
-apt-get install -y openjdk-7-jdk
-# $$$ comment out for the moment
-# apt-get install -y --force-yes maven3
+ # Install uio
+ apt-get install -y linux-image-extra-`uname -r`
-# Load the uio kernel module
-modprobe uio_pci_generic
+ # Install jdk and maven
+ apt-get install -y openjdk-7-jdk
+ # $$$ comment out for the moment
+ # apt-get install -y --force-yes maven3
-# Make sure uio loads at boot time
-echo uio_pci_generic >> /etc/modules
+ # Load the uio kernel module
+ modprobe uio_pci_generic
-# Setup for hugepages using upstart so it persists across reboots
-sysctl -w vm.nr_hugepages=1024
-mkdir -p /mnt/huge
-echo "hugetlbfs /mnt/huge hugetlbfs defaults 0 0" >> /etc/fstab
-mount /mnt/huge
+ # Make sure uio loads at boot time
+ echo uio_pci_generic >> /etc/modules
-# Install virtualenv for test execution
-apt-get install -y --force-yes python-virtualenv python-pip python-dev \ No newline at end of file
+ # Setup for hugepages using upstart so it persists across reboots
+ sysctl -w vm.nr_hugepages=1024
+ mkdir -p /mnt/huge
+ echo "hugetlbfs /mnt/huge hugetlbfs defaults 0 0" >> /etc/fstab
+ mount /mnt/huge
+
+ # Install virtualenv for test execution
+ apt-get install -y --force-yes python-virtualenv python-pip python-dev
+}
+
+rh_systems {
+ # Install build tools
+ yum groupinstall 'Development Tools' -y
+ yum install openssl-devel -y
+ yum install glibc-static -y
+
+ # Install jdk and maven
+ yum install -y java-1.8.0-openjdk-devel
+
+ # Install EPEL
+ yum install -y https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
+
+ # Install components to build Ganglia modules
+ yum install -y apr-devel
+ yum install -y --enablerepo=epel libconfuse-devel
+ yum install -y --enablerepo=epel ganglia-devel
+}
+
+echo "---> Attempting to detect OS"
+# OS selector
+if [ -f /usr/bin/yum ]
+then
+ OS='RH'
+else
+ OS='UBUNTU'
+fi
+
+case "$OS" in
+ RH)
+ echo "---> RH type system detected"
+ rh_systems
+ ;;
+ UBUNTU)
+ echo "---> Ubuntu system detected"
+ ubuntu_systems
+ ;;
+ *)
+ echo "---> Unknown operating system"
+ ;;
+esac \ No newline at end of file