CNK's blog

Vagrant and Veewee

Installing

I was trying to follow this DevOps Toolbox tutorial but I am running across some issues that seem like version conflicts. The instructions just say to create a Gemfile that specifies vagrant and veewee with no version numbers. This implies that the tutorial was written when vagrant was still primarily distributed as a gem. But, as detailed in my previous post, I have Vagrant 1.2.2 installed as a stand alone program. I tried just omitting vagrant from my gem file, but the gem version got installed anyway because veewee 0.3.7 lists “vagrant >= 0.9” as a runtime dependency.

I poked around trying to figure out if it was possible to use veewee with the newer version of vagrant. The Veewee Readme on Github indicates that I should probably clone from the repository rather than using the veewee gem. So I cloned veewee into the top level of my devops_toolbox directory (which gave me commit 4cf8acc7507d646f897dcd40bf06b2bcc961a6c0). Then I created a Gemfile that referenced this checkout and then ran ‘bundle install’ in my devops_toolbox gemset.

# Gemfile
source 'https://rubygems.org'
gem "veewee", :path => "./veewee/"

The Veewee repository comes with a .rvmrc file which tries to help by setting ‘bundle exec’ aliases for veewee and irb. Not sure that helps - and it leads to conflicts with the .rvmrc file in my devops_toolbox parent directory. I tried removing it but then when I ran ‘bundle install’ in devops_toolbox, I got the following error:

Using veewee (0.3.7) from source at ./veewee/

veewee at /Users/cnk/Code/devops_toolbox/veewee did not have a valid
gemspec.  This prevents bundler from installing bins or native
extensions, but that may not affect its functionality.

The validation message from Rubygems was:
  [".rvmrc"] are not files

Using bundler (1.3.0)
Your bundle is complete! Use `bundle show [gemname]` to see where a bundled gem is installed.

Creating a basebox

The tutorial says to use ‘vagrant basebox templates’ but vagrant no longer supplies the templates. But I can now get the same list from veewee. Fedora 19 just came out at the beginning of the month and comes with Ruby 2.0.0. I am tempted but having already had version conflict problems getting this far, I think I am going to play it safe and build a Fedora 18 box with Ruby 1.9.3. I am not sure if I am going to end up with p327 (which is what originally shipped with Fedora 18) or if the install will automatically install p448 from the updates. We’ll see.

$ veewee vbox define '32bit-fedora18' 'Fedora-18-i386' --workdir=/Users/cnk/Code/devops_toolbox
The basebox '32bit-fedora18' has been successfully created from the template 'Fedora-18-i386'
You can now edit the definition files stored in
/Users/cnk/Code/devops_toolbox/definitions/32bit-fedora18 or build the
box with:
veewee vbox build '32bit-fedora18' --workdir=/Users/cnk/Code/devops_toolbox

Other useful resources

Comments