diff --git a/README.md b/README.md index 8c9b035..7f1227b 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,13 @@ To develop cookbook changes with Vagrant: - If the vagrant vm is already up run 'vagrant provision' if not run 'Vagrant up' - When finish testing commit and upload your cookbook as normal but don't forget to bump the cookbook version in the metadata.rb. +## Running behind a Web Proxy +If you are behind a proxy you can install the `vagrant-proxyconf` pluging to have Vagrant honor standard proxy-related environment variables and set the +vm to use them also. +``` +vagrant plugin install vagrant-proxyconf +``` + # Alternate Vagrant Configurations To run any of these alternate configs, simply run the Vagrant commands from within the subdir, though note the vertica debs must be copied into the subdir also. diff --git a/Vagrantfile b/Vagrantfile index 614f16e..b7662ad 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -7,6 +7,19 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # Settings for all vms config.berkshelf.enabled = true + # Handle local proxy settings + 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.box = "precise64" config.vm.box_url = "http://files.vagrantup.com/precise64.box" config.vm.synced_folder "~/", "/vagrant_home" diff --git a/split/Vagrantfile b/split/Vagrantfile index 924236d..7b83ed0 100644 --- a/split/Vagrantfile +++ b/split/Vagrantfile @@ -8,6 +8,19 @@ Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| config.berkshelf.enabled = true config.berkshelf.berksfile_path = "../Berksfile" + # Handle local proxy settings + 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.box = "precise64" config.vm.box_url = "http://files.vagrantup.com/precise64.box" config.vm.synced_folder "~/", "/vagrant_home"