Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tknerr/vagrant-proxy-test
fiddling around with Vagrant and HTTP Proxies
https://github.com/tknerr/vagrant-proxy-test
Last synced: about 2 months ago
JSON representation
fiddling around with Vagrant and HTTP Proxies
- Host: GitHub
- URL: https://github.com/tknerr/vagrant-proxy-test
- Owner: tknerr
- Created: 2013-07-23T21:46:52.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2013-08-26T06:19:27.000Z (over 11 years ago)
- Last Synced: 2023-03-23T00:22:28.569Z (almost 2 years ago)
- Language: Shell
- Size: 66.4 KB
- Stars: 1
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
vagrant-proxy-test
==================Fiddling around with Proxy settings and Vagrant.
Setting Proxy on the Host
=========================This is required if your host (i.e. the machnine hosting your Vagrant VMs) is behind a Tools.
Tools like [git](http://git-scm.org/), [vagrant-berkshelf](https://github.com/riotgames/vagrant-berkshelf) or [bindler](https://github.com/fgrehm/bindler) require the proxy to be configured correctly when you run `vagrant up`.
This is as simple as setting both the `HTTP_PROXY` and `HTTPS_PROXY` env vars on the host:
```
$ export HTTP_PROXY=http://my.proxy.org:8080
$ export HTTPS_PROXY=http://my.proxy.org:8080
```Setting Proxy on the Vagrant VM
===============================Another story is configuring a proxy on the Vagrant VM.
For example, your laptop (i.e. host) is running inside your corporate network which requires you to configure a proxy, but the Vagrant VM might be running in the AWS Cloud via the [vagrant-aws](https://github.com/mitchellh/vagrant-aws) provider and thus not require a proxy. On the other hand it might be running locally using the default virtualbox provider and then you need the same proxy settings.
To configure the Vagrant VM for using a proxy set the `VAGRANT_HTTP_PROXY` env var on the host:
```
$ export VAGRANT_HTTP_PROXY=http://my.proxy.org:8080
```The `Vagrantfile` in this test project will pick up this env var and - depending on whether it is set or not - set/unset the proxy *inside* the Vagrant VM via a shell provisioner.
Considerations
==============* [vagrant-omnibus](https://github.com/schisamo/vagrant-omnibus) does not support proxy configuration [yet](https://github.com/schisamo/vagrant-omnibus/pull/25)
* even if we set the proxy variables via a separate shell provisionier the vagrant-omnibus plugin does not work because it kicks in before *any* of the provisioniers run
* this will probably get much easier with [vagrant-proxyconf](https://github.com/tmatilai/vagrant-proxyconf/), once [#6](https://github.com/tmatilai/vagrant-proxyconf/pull/6) and [#13](https://github.com/tmatilai/vagrant-proxyconf/issues/13) are resolved