#!/bin/bash

set -e
set -x

if [[ "$(id -u)" != "0" ]]; then
  echo "Script must be run as root"
  exit 0
fi

cd ~

apt-key adv --keyserver keyserver.ubuntu.com --recv-keys D4284CDD
echo "deb http://52.8.15.63/apt trusty testing kernel" > /etc/apt/sources.list.d/iovisor.list
apt-get update
apt-get -y install linux-headers-4.3.999-iovisor+ linux-image-4.3.999-iovisor+
apt-get -y install libbcc python-pip python-netaddr git
pip install future

git clone https://github.com/svinota/pyroute2.git pyroute2
cd pyroute2
make install

reboot
