summaryrefslogtreecommitdiffstats
path: root/vagrant/bootstrap.centos7.sh
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2016-02-03 02:09:58 -0500
committerDave Wallace <dwallacelf@gmail.com>2016-02-03 02:10:25 -0500
commitdd98ae7aa20dfa4d601c1c584f28ace9497bae46 (patch)
tree4aaa31545681afb394d5cb2b3b568b521e37ab36 /vagrant/bootstrap.centos7.sh
parent2587eee429cb0ef07125f0f6d74d1f669878d553 (diff)
Initial Honeycomb vagrant support.
The following environment variables are used to customize the behavior of the vagrant VM: HONEYCOMB_VAGRANT_DISTRO - Set to "centos7" to run CentOS (currently inop). Unset or any other value runs ubuntu 14.04. HONEYCOMB_M2_REPOSITORY - Set to the pathname of a directory to contain the M2 repository outside of the VM. The specified directory will be mounted at /m2-repository and /home/vagrant/.m2/settings.xml will be modified to use /m2-repository instead of the default directory (/home/vagrant/.m2/repository). VPP_VAGRANT_NICS - Set to the number of addtional NICS desired for VPP to use. VPP_REPO - Set to the pathname of a VPP repository. The specified pathname will be mounted on /vpp and a working repo will be cloned into /home/vagrant/git/vpp. VPP will then be built, installed and started after the VM is created. Change-Id: I6b673c3c378c6b6b7c342d91dc33118ecc97bd05 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'vagrant/bootstrap.centos7.sh')
-rw-r--r--vagrant/bootstrap.centos7.sh46
1 files changed, 46 insertions, 0 deletions
diff --git a/vagrant/bootstrap.centos7.sh b/vagrant/bootstrap.centos7.sh
new file mode 100644
index 000000000..f55e68a24
--- /dev/null
+++ b/vagrant/bootstrap.centos7.sh
@@ -0,0 +1,46 @@
+
+# Standard update + upgrade dance
+yum check-update
+yum update -y
+
+# 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
+
+# Load the uio kernel module
+modprobe uio_pci_generic
+
+echo uio_pci_generic >> /etc/modules-load.d/uio_pci_generic.conf
+
+# Setup for hugepages using upstart so it persists across reboots
+sysctl -w vm.nr_hugepages=1024
+echo "vm.nr_hugepages=1024" >> /etc/sysctl.conf
+mkdir -p /mnt/huge
+echo "hugetlbfs /mnt/huge hugetlbfs defaults 0 0" >> /etc/fstab
+mount /mnt/huge
+
+# Setup the vpp code
+cd ~vagrant/
+sudo -u vagrant mkdir git
+cd git/
+
+# Check if git exists and remove it before attempting clone, else clone ineffective when "reload --provision"
+[ -d vpp ] && rm -rf vpp
+sudo -H -u vagrant git clone /vpp
+cd vpp
+
+# Initial vpp build
+if [ -d build-root ]; then
+ # Bootstrap vpp
+ cd build-root/
+ sudo -H -u vagrant ./bootstrap.sh
+
+ # Build vpp
+ sudo -H -u vagrant make PLATFORM=vpp TAG=vpp_debug install-packages
+ cd ~vagrant/
+ cat /vagrant/README
+fi