27 October 2011

Virtualization, a Vagrant 0.8 try

It has been a long time since I wanted to dive in virtualization. I always feared that my PC would not have enough RAM and end up only loosing time.

But I have been using VirtualBox and a bit of VMWare recently ... it looks good.

So next step to really get some benefits is to automate with Vagrant, Chef and Puppet ...

So far the setup is not as smoove as they say it would be ...

From here, this post turns into a rant :-)

First: Ruby. As far as I know, you have no choice here: Vagrant, Chef and Puppet are build on Ruby. I didn't even try to search for Python or whatelse based automations (but I would be glad to know Ruby alternatives).

So, Ruby, there is a Windows installer, click click, OK. Done. 

gem install vagrant

"Error: cannot access the Net". Ruby doesn't use the system proxy. You have to set an Environment variable: HTTP_PROXY=http://user:pwd@proxydemerde.com:1234/

gem install vagrant

"Error: you need the SDK". Vagrant uses particular modules that require local compilation (à la Gentoo). So you have to install Ruby SDK. (Why isn't it installed by default ?). Back to the Ruby web site. The SDK is a zip file, no installer this time. and be careful the zip doesn't contains its parent folder: you have to create a folder and uncompress the zip into this folder. Then run a script in the uncompressed folder that will find your Ruby installations and then run another script that will update theses installations so they are aware of the SDK presence.

gem install vagrant

"Error: cannot compile some ffi stuff". Vagrant uses some modules that uses some version of ffi.h and dependencies got messed up somehow. Google and find that you have to "gem install fii --version='1.0.9'" ... Dependency management ...

gem install vagrant

"Success". Nice. Next step install a machine. The examples feature "Ubuntu Lucid", I looked for one of the 3 more recents versions, but there are not a lot of choice here. So anyway it is a LongTermSupport, let not be too picky.

vagrant box add ludic64 http://files.vagrantup.com/lucid64.box

"Error: No space left on device ...." Well, the installer didn't ask for a workspace or project folder. It supposed there was plenty of space in "home". Back to Google, many solutions, some seems to not work for everyone. I edited the gem script to specify the "HOME" variable. Removed the ~/.gem and ~/.Vagrant folders.

vagrant box add ludic64 http://files.vagrantup.com/lucid64.box

"Error: No space left on device ...." Well, ".gem" is created in the floder I specified. But I have to set the variable in the vagrant script also ... Why is there no config file of global environement variable ?

vagrant box add ludic64 http://files.vagrantup.com/lucid64.box

"Success". I am close ! Just two commands left:

vagrant init ludic64

"Success" Just one more:

vagrant up

"Error: method missing in OLE ..." 

I tried with the "lucid32", same error. Some Google search, looks like the bug is being worked on.

Well Vagrant is in Beta after all. Sometimes, you are just out of luck. I hope it may help some other poor Windows / proxy users.

I will get back to Vagrant later. Next post may be about Chef or Puppet.

October summary - 2017-10

10 October Science Looks like the p-value has been under fire for years. https://www.nature.com/news/one-size-fits-all-threshold-for-p-value...