CloudBindle / bindle

A command line tool for provisioning and interacting with VMs.

Home Page:https://github.com/CloudBindle

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Installation from behind a firewall / through a proxy

keiranmraine opened this issue · comments

Hi,

I've spent some time trying to figure out why various bits of the install work correctly when working through a proxy and some don't.

So first thing to note was that to use the vagrant plugin installs you have to have a fully qualified authenticated proxy set (even if your server doesn't need authentication):

export http_proxy=http://user:password@host:port
export https_proxy=http://user:password@host:port

I then installed 'vagrant-proxyconf' and created ~/.vagrant.d/Vagrantfile (modified appropriately)

Vagrant.configure("2") do |config|
if Vagrant.has_plugin?("vagrant-proxyconf")
config.proxy.http = "http://user:password@host:port/"
config.proxy.https = "http://user:password@host:port/"
config.proxy.no_proxy = "localhost,127.0.0.1,.example.com"
end

... other stuff

end

Then I set everything up and executed the 'vagrant_cluster_launch.pl' script (Template module install is not required as commented out).

VM created and started, but then the script seems to hang indefinitely following:

The SQL commands have been written to: /tmp/ooziedb-2666877175238121606.sql

What I discovered was that this was a subsequent 'wget' running as root.

wget -q http://extjs.com/deploy/ext-2.2.zip

On modifying the script to print http_proxy this was found to not be set. It should be noted that all of the apt-get steps work so they must be getting the proxy info.

Logging into the machine with 'vagrant ssh' I can see the proxy is set appropriately:

vagrant@master:~$ whoami
vagrant
vagrant@master:~$ echo $http_proxy
http://kr2:xxxx@wwwcache.sanger.ac.uk:3128
vagrant@master:~$ sudo whoami
root
vagrant@master:~$ sudo echo $http_proxy
http://kr2:xxxx@wwwcache.sanger.ac.uk:3128
vagrant@master:~$ sudo bash
root@master:~# echo $http_proxy
http://kr2:xxxx@wwwcache.sanger.ac.uk:3128

As a check I've performed install with no-proxy disconnected from Sanger VPN and all works fine. If I stay connected to the VPN, but don't set proxy all the earlier apt-get steps fail also.

Any help you can give would be great. Although I can install at home it's not the best solution for others in my team.

I did all of this on Max OSX 10.8.5 with the recommended version of vagant etc from the details on the PanCancer guide. I can provide a detailed description for Mac install (perl dependencies via cpanm) if useful.

Kind regards,
Keiran

Hi,
We haven't had experience with the vagrant-proxyconf plugin. Looking through the issues reported for the plugin, I wonder if you're dealing with this issue tmatilai/vagrant-proxyconf#58

Try creating a simple script of your own that prints out http_proxy and does a wget while using a command similar to that in the last line of the provision_script_list_thread function in the Perl launcher script. See whether you can reproduce http_proxy not being set that way.