Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 1 | |
| 2 | # Standard update + upgrade dance |
| 3 | yum check-update |
| 4 | yum update -y |
| 5 | |
| 6 | # Install build tools |
| 7 | yum groupinstall 'Development Tools' -y |
| 8 | yum install openssl-devel -y |
| 9 | yum install glibc-static -y |
| 10 | |
| 11 | # Install jdk and maven |
| 12 | yum install -y java-1.8.0-openjdk-devel |
| 13 | |
Dave Barach | b10277d | 2016-02-02 10:57:15 -0500 | [diff] [blame^] | 14 | # Install EPEL |
| 15 | yum install -y epel-release |
| 16 | |
| 17 | # Install components to build Ganglia modules |
| 18 | yum install -y apr-devel |
| 19 | yum install -y --enablerepo=epel libconfuse-devel |
| 20 | yum install -y --enablerepo=epel ganglia-devel |
| 21 | |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 22 | # Load the uio kernel module |
| 23 | modprobe uio_pci_generic |
| 24 | |
| 25 | echo uio_pci_generic >> /etc/modules-load.d/uio_pci_generic.conf |
| 26 | |
| 27 | # Setup for hugepages using upstart so it persists across reboots |
| 28 | sysctl -w vm.nr_hugepages=1024 |
| 29 | echo "vm.nr_hugepages=1024" >> /etc/sysctl.conf |
| 30 | mkdir -p /mnt/huge |
| 31 | echo "hugetlbfs /mnt/huge hugetlbfs defaults 0 0" >> /etc/fstab |
| 32 | mount /mnt/huge |
| 33 | |
| 34 | # Setup the vpp code |
| 35 | cd ~vagrant/ |
| 36 | sudo -u vagrant mkdir git |
| 37 | cd git/ |
| 38 | |
Keith Burns (alagalah) | d5201c8 | 2016-01-31 21:15:27 +0100 | [diff] [blame] | 39 | # Check if git exists and remove it before attempting clone, else clone ineffective when "reload --provision" |
| 40 | [ -d vpp ] && rm -rf vpp |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 41 | sudo -H -u vagrant git clone /vpp |
| 42 | cd vpp |
| 43 | |
| 44 | # Initial vpp build |
| 45 | if [ -d build-root ]; then |
| 46 | # Bootstrap vpp |
| 47 | cd build-root/ |
| 48 | sudo -H -u vagrant ./bootstrap.sh |
| 49 | |
| 50 | # Build vpp |
| 51 | sudo -H -u vagrant make PLATFORM=vpp TAG=vpp_debug install-packages |
| 52 | cd ~vagrant/ |
| 53 | cat /vagrant/README |
| 54 | fi |