summaryrefslogtreecommitdiffstats
path: root/build-root/vagrant/bootstrap.centos7.sh
diff options
context:
space:
mode:
Diffstat (limited to 'build-root/vagrant/bootstrap.centos7.sh')
-rw-r--r--build-root/vagrant/bootstrap.centos7.sh84
1 files changed, 30 insertions, 54 deletions
diff --git a/build-root/vagrant/bootstrap.centos7.sh b/build-root/vagrant/bootstrap.centos7.sh
index 72ee2460ea1..0f8158687d3 100644
--- a/build-root/vagrant/bootstrap.centos7.sh
+++ b/build-root/vagrant/bootstrap.centos7.sh
@@ -3,59 +3,35 @@
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 development tools
-yum install gdb -y
-yum install gdbserver -y
-
-# Install jdk and maven
-yum install -y java-1.8.0-openjdk-devel
-
-# Install EPEL
-yum install -y epel-release
-
-# 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
-
-# PCIutils
-yum install -y pciutils
-
-# Load the uio kernel module
+# Install dependencies
+cd /vpp
+make install-dep
+
+# Build rpms
+make bootstrap
+make pkg-rpm
+
+# Install rpms
+
+(cd build-root/;sudo rpm -Uvh *.rpm)
+
+# Disable all ethernet interfaces other than the default route
+# interface so VPP will use those interfaces. The VPP auto-blacklist
+# algorithm prevents the use of any physical interface contained in the
+# routing table (i.e. "route --inet --inet6") preventing the theft of
+# the management ethernet interface by VPP from the kernel.
+for intf in $(ls /sys/class/net) ; do
+ if [ -d /sys/class/net/$intf/device ] &&
+ [ "$(route --inet --inet6 | grep default | grep $intf)" == "" ] ; then
+ ifconfig $intf down
+ fi
+done
+
+# Install uio-pci-generic
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
+# Start vpp
+service vpp start
+
+# cat README
+cat /vagrant/README