aboutsummaryrefslogtreecommitdiffstats
path: root/extras
diff options
context:
space:
mode:
authorKyle Mestery <mestery@mestery.com>2018-08-10 16:32:13 -0500
committerDave Barach <openvpp@barachs.net>2018-08-14 20:16:51 +0000
commitacc1fbcb5e13961c1fcf1a00952b19b154b296b6 (patch)
tree3b67148a2b99a0a938dd766cfbf90b4009052851 /extras
parentce96dda4478d8a9ee3e3a6646c3367eb20263e3f (diff)
Make vagrant work behind a proxy
Without this change, I cannot get the in-tree VPP Vagrant to work behind a proxy. This commit fixes that by ensuring when we run sudo we're passing environment variables, amongst some other cleanups. Change-Id: Ica98a1238d40e6e6ccf80c472f52559c95af52f0 Signed-off-by: Kyle Mestery <mestery@mestery.com>
Diffstat (limited to 'extras')
-rw-r--r--extras/vagrant/Vagrantfile2
-rwxr-xr-xextras/vagrant/build.sh6
-rwxr-xr-xextras/vagrant/clearinterfaces.sh2
-rw-r--r--extras/vagrant/env.sh3
-rwxr-xr-x[-rw-r--r--]extras/vagrant/install.sh8
-rwxr-xr-xextras/vagrant/run.sh9
6 files changed, 17 insertions, 13 deletions
diff --git a/extras/vagrant/Vagrantfile b/extras/vagrant/Vagrantfile
index badaa979a43..a97a3dc38fc 100644
--- a/extras/vagrant/Vagrantfile
+++ b/extras/vagrant/Vagrantfile
@@ -12,6 +12,8 @@ Vagrant.configure(2) do |config|
elsif distro == 'opensuse'
config.vm.box = "opensuse/openSUSE-42.3-x86_64"
config.vm.box_version = "1.0.4.20170726"
+ elsif distro == 'ubuntu1804'
+ config.vm.box = "bento/ubuntu-18.04"
else
config.vm.box = "puppetlabs/ubuntu-16.04-64-nocm"
end
diff --git a/extras/vagrant/build.sh b/extras/vagrant/build.sh
index 86ed4cdb184..3a10e707fb9 100755
--- a/extras/vagrant/build.sh
+++ b/extras/vagrant/build.sh
@@ -47,13 +47,13 @@ rm -f build-root/.bootstrap.ok
if [ $OS_ID == "centos" ]; then
echo rpm -V apr-devel
rpm -V apr-devel
- if [ $? != 0 ]; then sudo yum reinstall -y apr-devel;fi
+ if [ $? != 0 ]; then sudo -E yum reinstall -y apr-devel;fi
echo rpm -V ganglia-devel
rpm -V ganglia-devel
- if [ $? != 0 ]; then sudo yum reinstall -y ganglia-devel;fi
+ if [ $? != 0 ]; then sudo -E yum reinstall -y ganglia-devel;fi
echo rpm -V libconfuse-devel
rpm -V libconfuse-devel
- if [ $? != 0 ]; then sudo yum reinstall -y libconfuse-devel;fi
+ if [ $? != 0 ]; then sudo -E yum reinstall -y libconfuse-devel;fi
fi
# Build and install packaging
diff --git a/extras/vagrant/clearinterfaces.sh b/extras/vagrant/clearinterfaces.sh
index 78f6705ca32..31a63098e87 100755
--- a/extras/vagrant/clearinterfaces.sh
+++ b/extras/vagrant/clearinterfaces.sh
@@ -12,6 +12,6 @@ chown vagrant:vagrant ~vagrant/ifconfiga
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
+ sudo -E ifconfig $intf down
fi
done
diff --git a/extras/vagrant/env.sh b/extras/vagrant/env.sh
index bd329ea7ce9..441a4c1aaef 100644
--- a/extras/vagrant/env.sh
+++ b/extras/vagrant/env.sh
@@ -1,6 +1,7 @@
#!/usr/bin/env bash
-export VPP_VAGRANT_DISTRO="ubuntu1604"
+export VPP_VAGRANT_DISTRO="ubuntu1804"
export VPP_VAGRANT_NICS=2
export VPP_VAGRANT_VMCPU=4
export VPP_VAGRANT_VMRAM=4096
+export VPP_VAGRANT_POST_BUILD=install
diff --git a/extras/vagrant/install.sh b/extras/vagrant/install.sh
index a53faa4dd73..cfe5fe5b2d0 100644..100755
--- a/extras/vagrant/install.sh
+++ b/extras/vagrant/install.sh
@@ -12,7 +12,7 @@ fi
if [ -f /etc/lsb-release ];then
. /etc/lsb-release
elif [ -f /etc/redhat-release ];then
- sudo yum install -y redhat-lsb
+ sudo -E yum install -y redhat-lsb
DISTRIB_ID=`lsb_release -si`
DISTRIB_RELEASE=`lsb_release -sr`
DISTRIB_CODENAME=`lsb_release -sc`
@@ -24,7 +24,7 @@ echo DISTRIB_CODENAME: $DISTRIB_CODENAME
echo DISTRIB_DESCRIPTION: $DISTRIB_DESCRIPTION
if [ $DISTRIB_ID == "Ubuntu" ]; then
- (cd ${VPP_DIR}/build-root/;sudo dpkg -i *.deb)
+ (cd ${VPP_DIR}/build-root/;sudo -E dpkg -i *.deb)
elif [ $DISTRIB_ID == "CentOS" ]; then
- (cd ${VPP_DIR}/build-root/;sudo rpm -Uvh *.rpm)
-fi \ No newline at end of file
+ (cd ${VPP_DIR}/build-root/;sudo -E rpm -Uvh *.rpm)
+fi
diff --git a/extras/vagrant/run.sh b/extras/vagrant/run.sh
index 3c779fa23f6..61c9261fe2f 100755
--- a/extras/vagrant/run.sh
+++ b/extras/vagrant/run.sh
@@ -12,11 +12,12 @@ fi
if [ "$OS_ID" == "centos" ] || [ "$OS_ID" == "opensuse" ]; then
# Install uio-pci-generic
- modprobe uio_pci_generic
+ sudo -E modprobe uio_pci_generic
fi
+
echo "Starting VPP..."
-if [ "$OS_ID" == "ubuntu" ] && [ $OS_CODENAME = "trusty" ] ; then
- start vpp
+if [ "$OS_ID" == "ubuntu" ] && [ "$OS_CODENAME" == "trusty" ] ; then
+ sudo -E start vpp
else
- service vpp start
+ sudo -E service vpp start
fi