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