aboutsummaryrefslogtreecommitdiffstats
path: root/resources/tools/vagrant/Vagrantfile
diff options
context:
space:
mode:
authorDave Wallace <dwallacelf@gmail.com>2016-05-25 18:15:00 -0400
committerJan Gelety <jgelety@cisco.com>2016-06-02 15:27:15 +0000
commitc70aa9f7233f8b041ecdf1117dffac0ef29d128b (patch)
tree785c822e0328ac46bf26a654a59ec552b9bbe527 /resources/tools/vagrant/Vagrantfile
parent022cc77a6848eca746b20408856897a4e7cb5947 (diff)
CSIT-117: CSIT Vagrant+Virtualbox dev environment inoperative on Ubuntu
Change-Id: I05ea675a2eb6d0b240008efa0d27166616c6e741 Signed-off-by: Dave Wallace <dwallacelf@gmail.com>
Diffstat (limited to 'resources/tools/vagrant/Vagrantfile')
-rw-r--r--resources/tools/vagrant/Vagrantfile24
1 files changed, 21 insertions, 3 deletions
diff --git a/resources/tools/vagrant/Vagrantfile b/resources/tools/vagrant/Vagrantfile
index 3e18192bec..0355ad7730 100644
--- a/resources/tools/vagrant/Vagrantfile
+++ b/resources/tools/vagrant/Vagrantfile
@@ -30,10 +30,17 @@ $install_prereqs = <<-SHELL
SHELL
$install_vpp = <<-SHELL
- sudo apt-get -y purge vpp\*
cd /vagrant
- if [ -e /vagrant/vpp-*.deb ]; then
- sudo dpkg -i vpp-*.deb
+ vpp_pkgs="$(echo vpp*.deb)"
+ if [ "$vpp_pkgs" != "vpp*.deb" ]; then
+ if [ "$(dpkg -l | grep vpp)" != "" ] ; then
+ sudo apt-get -y purge vpp\*
+ fi
+ sudo dpkg -i vpp*.deb
+ vppcfg="/etc/vpp/startup.conf"
+ sudo rm -f $vppcfg.orig
+ sudo cp $vppcfg $vppcfg.orig
+ echo -e '\nheapsize 512M' | sudo tee -a $vppcfg
fi
SHELL
@@ -61,6 +68,17 @@ def add_dut(config, name, mgmt_ip, net1, net2)
end
Vagrant.configure(2) do |config|
+ if Vagrant.has_plugin?("vagrant-proxyconf")
+ if ENV["http_proxy"]
+ config.proxy.http = ENV["http_proxy"]
+ end
+ if ENV["https_proxy"]
+ config.proxy.https = ENV["https_proxy"]
+ end
+ if ENV["no_proxy"]
+ config.proxy.no_proxy = ENV["no_proxy"]
+ end
+ end
config.vm.define "tg" do |tg|
tg.vm.box = "puppetlabs/ubuntu-14.04-64-nocm"
tg.vm.hostname = "tg"