-
Notifications
You must be signed in to change notification settings - Fork 74
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Configure Proxy Before not After Omnibus #52
Conversation
Was trying to get the vagrant-omnibus plugin working behind a corporate proxy today and it was working fine for everything else but timing out for the omnibus plugin. I'm very new to ruby/vagrant/etc but I'm thinking this is the reason. Thanks for all your work, this plugin has cured almost all my proxy headaches.
Thanks! But we actually have to hook after the omnibus action in middleware stack as the order is practically reverse due to the Provision action waiting for the VM to boot. Did you set https proxy too? |
Ah my bad, I really shouldn't be randomly guessing at fixes. Here's a the gist of the debug output and my vagrantfile. https://gist.github.com/sgarlick987/9128306 Some additional info about my setup Also if I leave the proxy config on, but change to a different network it gets past the " Let me know if there's anything else I can provide you. |
Thanks for all the information. The log shows that the environment variables on the guest are indeed configured before trying to download the omnibus installer. But I think I know what's the problem here. vagrant-omnibus uses Vagrant's internal downloader to fetch the "install.sh" on the host (and then uploads and runs it on the guest). The downloader actually uses embedded curl, which then fails as it is not configured to use the proxy server. As curl uses the standard environment variables, you should be able to:
You'll need to set the same variables for downloading boxes or installing plugins too. vagrant-proxyconf can't unconditionally configure those, as the config reflects the guest side. And guests can be e.g. on AWS with very different settings than the host. We could maybe add a config switch for setting the env vars on the host, especially if I ever manage to finnish the auto-detection of the proxy server. Only catch is that for |
Great, that worked perfectly. I had originally had the HTTP_PROXY set, but not HTTPS_PROXY, and was getting past that initial ruby gem call that the host does before starting up and was assuming that that point on was all on the guest side. Thanks again for the time you put into this, its saved me and a few coworkers a lot of hassle configuring proxies for each component,. |
Yeah, originally it was on the guest side, but moved to the host in v1.1.2 so that curl/wget is not required on the guest. install.sh can now download the package with e.g. perl too. Easier to use Vagrant's curl than include all that logic into vagrant-omnibus too. Nice to hear that this plugin is useful! My own use case was (and is) to use a caching proxy locally to speed up provisioning, but I totally understand the pain of corporate proxies. Please file issues if you have ideas how to make things better. Closing this issue, but hope to get into #53 on some point. |
Eh, buttons. How do they work? |
Was trying to get the vagrant-omnibus plugin working behind a corporate proxy today and it was working fine for everything else but timing out for the omnibus plugin. I'm very new to ruby/vagrant/etc but I'm thinking this is the reason.
Thanks for all your work, this plugin has cured almost all my proxy headaches.