aboutsummaryrefslogtreecommitdiffstats
path: root/build-root/vagrant
diff options
context:
space:
mode:
authorSrivatsa Sangli <srivrama@cisco.com>2016-04-15 13:59:00 -0700
committerEd Warnicke <hagbard@gmail.com>2016-04-20 18:44:41 +0000
commit0777915b2a98ea6353e6c0951c3aa195d4751d35 (patch)
tree9c65d16706e07c0409afb71c9d9c9b66cce05d19 /build-root/vagrant
parente5055d21a970f887a82e2153f87bc0f603a6e4bb (diff)
ubuntu 16.04 build support. Supporting systemd with vpp.service files.
Incorporating review comments : modified debian/control dependencies Change-Id: Ib2fe85d81eb7f1803ef8f54294c7c18cd07c61ba Signed-off-by: Srivatsa Sangli <srivrama@cisco.com>
Diffstat (limited to 'build-root/vagrant')
-rw-r--r--build-root/vagrant/bootstrap.ubuntu1604.sh39
1 files changed, 39 insertions, 0 deletions
diff --git a/build-root/vagrant/bootstrap.ubuntu1604.sh b/build-root/vagrant/bootstrap.ubuntu1604.sh
new file mode 100644
index 00000000..2e607f1e
--- /dev/null
+++ b/build-root/vagrant/bootstrap.ubuntu1604.sh
@@ -0,0 +1,39 @@
+# Fix grub-pc on Virtualbox with Ubuntu
+export DEBIAN_FRONTEND=noninteractive
+
+# Standard update + upgrade dance
+apt-get update
+apt-get upgrade -y
+
+# Fix the silly notion that /bin/sh should point to dash by pointing it to bash
+
+sudo update-alternatives --install /bin/sh sh /bin/bash 100
+
+cd /vpp
+sudo -H -u vagrant make install-dep
+
+# Install useful but non-mandatory tools
+apt-get install -y emacs git-review gdb gdbserver
+
+sudo -H -u vagrant make bootstrap
+sudo -H -u vagrant make pkg-deb
+(cd build-root/;dpkg -i *.deb)
+
+# Capture all the interface IPs, in case we need them later
+ifconfig -a > ~vagrant/ifconfiga
+chown vagrant:vagrant ~vagrant/ifconfiga
+
+# Disable all ethernet interfaces other than the default route
+# interface so VPP will use those interfaces. The VPP auto-blacklist
+# algorithm prevents the use of any physical interface contained in the
+# routing table (i.e. "route --inet --inet6") preventing the theft of
+# the management ethernet interface by VPP from the kernel.
+for intf in $(ls /sys/class/net) ; do
+ if [ -d /sys/class/net/$intf/device ] &&
+ [ "$(route --inet --inet6 | grep default | grep $intf)" == "" ] ; then
+ ifconfig $intf down
+ fi
+done
+
+systemctl start vpp
+cat /vagrant/README