Furnish::Vagrant

Vagrant driver for the Furnish provisioning system. Provides Furnish::Provisioner::Vagrant to orchestrate using Vagrant 1.0.x to stand up Virtualbox VMs. It does this by driving vagrant-prison.

It has some interstitial relationship with furnish-ip in that IPs must be passed to this provisioner for it to work -- it will allocate host-only network addresses to the VMs based on the input it receives.

If you plan on doing any development work against this library directly, please read below under "Testing".

Vagrant 1.1 ?

Furnish already does most of what Vagrant 1.1 does outside of its VirtualBox support. We have no intention of supporting 1.1 and hope to deprecate this in favor of a more VirtualBox-focused system later.

Testing

First things first, there are no mocks here. This tests allocates numerous VMs, will use gobs of ram and take quite a bit of time, and due to limitations in both VBox and Vagrant, cannot be sped up by running in parallel. guard works here, but for fast test cycles, it can be faster to run things directly instead of waiting for guard to catch up. On my 8-core machine with 16GB and a SSD, the current suite takes about 5 minutes to run and peaks at about 2G of ram. This isn't changing.

For IP allocation, the network "10.10.10.0/24" is used and there's no expectation these addresses won't work.

If things break, you may need to clean things up before tests will pass again. Leaking whole machines is unfortunately a side effect of ... a broken provisioner.

Starting the virtualbox GUI console, you should see machines that have randomly generated names - mktmpdir is used underneath the hood, so this name actually depends quite a bit by what platform you're on. On my OS X box, it's /tmp/dCAFEBABE. The name of these machines will be a variant on that, the basename of that temporary dir. dCAFEBABE in this case. All you have to do is shut those machines down, and remove the machines (delete the disks too) to get things back to a better state.

If you need to see vagrant's output to assist you while testing, run your tests with FURNISH_DEBUG set in your environment.

Installation

Add this line to your application's Gemfile:

gem 'furnish-vagrant'

And then execute:

$ bundle

Or install it yourself as:

$ gem install furnish-vagrant

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request