blob: 89cd4e8eac48a61172bdcfeb8e6feaccc00935ec [file] [log] [blame]
Ed Warnickecb9cada2015-12-08 15:45:58 -07001# Standard update + upgrade dance
2apt-get update
3apt-get upgrade -y
4
5# Fix the silly notion that /bin/sh should point to dash by pointing it to bash
6
7sudo update-alternatives --install /bin/sh sh /bin/bash 100
8
9# Install build tools
10apt-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
16apt-get install -y linux-image-extra-`uname -r`
17
18# Install jdk and maven
19apt-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
24apt-get install -y debhelper dkms
25
26# Setup for hugepages using upstart so it persists across reboots
27echo "vm.nr_hugepages=1024" >> /etc/sysctl.d/20-hugepages.conf
28sysctl --system
29
30cat << EOF > /etc/init/hugepages.conf
31start on runlevel [2345]
32
33task
34
35script
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
40end script
41EOF
42
43# Make sure we run that hugepages.conf right now
44start hugepages
45
46# Setup the vpp code
47cd ~vagrant/
48sudo -u vagrant mkdir git
49cd git/
50
51# You will need to alter this line to reflect reality.
52sudo -H -u vagrant git clone /vpp
53cd vpp/
54
55# Initial vpp build
56if [ -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 Warnickeb463ec82015-12-22 20:04:54 -070064 # Install debian packages
65 dpkg -i *.deb
Ed Warnickecb9cada2015-12-08 15:45:58 -070066
Ed Warnickeb463ec82015-12-22 20:04:54 -070067 # Start vpp
68 start vpp
Ed Warnickecb9cada2015-12-08 15:45:58 -070069
Ed Warnickecb9cada2015-12-08 15:45:58 -070070 cd ~vagrant/
71 cat /vagrant/README
72
73fi