Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 1 | # Standard update + upgrade dance |
| 2 | apt-get update |
| 3 | apt-get upgrade -y |
| 4 | |
| 5 | # Fix the silly notion that /bin/sh should point to dash by pointing it to bash |
| 6 | |
| 7 | sudo update-alternatives --install /bin/sh sh /bin/bash 100 |
| 8 | |
| 9 | # Install build tools |
| 10 | apt-get install -y build-essential autoconf automake bison libssl-dev ccache libtool git dkms debhelper |
| 11 | |
| 12 | # Install other stuff |
| 13 | # apt-get install -y qemu-kvm libvirt-bin ubuntu-vm-builder bridge-utils |
| 14 | |
| 15 | # Install uio |
| 16 | apt-get install -y linux-image-extra-`uname -r` |
| 17 | |
| 18 | # Install jdk and maven |
| 19 | apt-get install -y openjdk-7-jdk |
| 20 | # $$$ comment out for the moment |
| 21 | # apt-get install -y --force-yes maven3 |
| 22 | |
| 23 | # Install debian packaging tools |
| 24 | apt-get install -y debhelper dkms |
| 25 | |
| 26 | # Setup for hugepages using upstart so it persists across reboots |
| 27 | echo "vm.nr_hugepages=1024" >> /etc/sysctl.d/20-hugepages.conf |
| 28 | sysctl --system |
| 29 | |
| 30 | cat << EOF > /etc/init/hugepages.conf |
| 31 | start on runlevel [2345] |
| 32 | |
| 33 | task |
| 34 | |
| 35 | script |
| 36 | mkdir -p /run/hugepages/kvm || true |
| 37 | rm -f /run/hugepages/kvm/* || true |
| 38 | rm -f /dev/shm/* || true |
| 39 | mount -t hugetlbfs nodev /run/hugepages/kvm |
| 40 | end script |
| 41 | EOF |
| 42 | |
| 43 | # Make sure we run that hugepages.conf right now |
| 44 | start hugepages |
| 45 | |
| 46 | # Setup the vpp code |
| 47 | cd ~vagrant/ |
| 48 | sudo -u vagrant mkdir git |
| 49 | cd git/ |
| 50 | |
| 51 | # You will need to alter this line to reflect reality. |
| 52 | sudo -H -u vagrant git clone /vpp |
| 53 | cd vpp/ |
| 54 | |
| 55 | # Initial vpp build |
| 56 | if [ -d build-root ]; then |
| 57 | # Bootstrap vpp |
| 58 | cd build-root/ |
| 59 | sudo -H -u vagrant ./bootstrap.sh |
| 60 | |
| 61 | # Build vpp |
| 62 | sudo -H -u vagrant make PLATFORM=vpp TAG=vpp_debug install-deb |
| 63 | |
Ed Warnicke | b463ec8 | 2015-12-22 20:04:54 -0700 | [diff] [blame] | 64 | # Install debian packages |
| 65 | dpkg -i *.deb |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 66 | |
Ed Warnicke | b463ec8 | 2015-12-22 20:04:54 -0700 | [diff] [blame] | 67 | # Start vpp |
| 68 | start vpp |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 69 | |
Ed Warnicke | cb9cada | 2015-12-08 15:45:58 -0700 | [diff] [blame] | 70 | cd ~vagrant/ |
| 71 | cat /vagrant/README |
| 72 | |
| 73 | fi |