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 | |
| 14 | # Load the uio kernel module |
| 15 | modprobe uio_pci_generic |
| 16 | |
| 17 | echo uio_pci_generic >> /etc/modules-load.d/uio_pci_generic.conf |
| 18 | |
| 19 | # Setup for hugepages using upstart so it persists across reboots |
| 20 | sysctl -w vm.nr_hugepages=1024 |
| 21 | echo "vm.nr_hugepages=1024" >> /etc/sysctl.conf |
| 22 | mkdir -p /mnt/huge |
| 23 | echo "hugetlbfs /mnt/huge hugetlbfs defaults 0 0" >> /etc/fstab |
| 24 | mount /mnt/huge |
| 25 | |
| 26 | # Setup the vpp code |
| 27 | cd ~vagrant/ |
| 28 | sudo -u vagrant mkdir git |
| 29 | cd git/ |
| 30 | |
| 31 | # You will need to alter this line to reflect reality. |
| 32 | sudo -H -u vagrant git clone /vpp |
| 33 | cd vpp |
| 34 | |
| 35 | # Initial vpp build |
| 36 | if [ -d build-root ]; then |
| 37 | # Bootstrap vpp |
| 38 | cd build-root/ |
| 39 | sudo -H -u vagrant ./bootstrap.sh |
| 40 | |
| 41 | # Build vpp |
| 42 | sudo -H -u vagrant make PLATFORM=vpp TAG=vpp_debug install-packages |
| 43 | cd ~vagrant/ |
| 44 | cat /vagrant/README |
| 45 | fi |