Handle an absent fact blacklist in the configuration

This updates the configuration handling code to gracefully accept an absent
fact blacklist, and to treat this as an empty array.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Mark ISO unpack test pending on OSX

Unfortunately, the libarchive version shipped with OS-X 10.8 and 10.9 doesn't
actually support unpacking ISO images -- or, at least, not the way it is being
used in our code.

This marks the test pending, using the block form, so that unexpected success
will let us identify if the issue is ever fixed, but for now we can run the
test suite successfully on OS-X.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Merge pull request #49 from daniel-pittman/bugfix-empty-or-missing-fact-blacklist

Handle an absent fact blacklist in the configuration
Merge pull request #50 from daniel-pittman/mark-iso-unpack-test-pending-for-osx

Mark ISO unpack test pending on OSX
Expose broker install scripts via the web API

This finishes binding broker installation scripts to the API: now, given a
node, you can request the install script for its broker be compiled and
returned via the API.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Hook up execution of the broker install script

This ties the final stage, `os_complete`, common template to the broker
installation script -- by enabling the code that would fetch it and pass it to
bash(1) for evaluation.

This should enable brokers to work correctly in the final stage of operation.

It also fixes, in passing, a minor bug: booting in a KVM virtual machine would
work correctly, but booting in anything else fell through into the
error handler.

Now there are a handful more notifications, and we correctly exit the PXE
stack and have the firmware carry on through the boot process.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Use a more liberal hash for carrying template parameters

Using OpenStruct to provide access to the `configuration` data in broker
templates was convenient, but limited: it gave a pleasant method based syntax
for reading the content, but it didn't provide the conveniences like
enumaration methods that a real hash would.

This adds the `hashie` gem to the project, and uses that to construct a custom
Hash subclass for the purpose -- providing convenience readers, and
indifferent access where both string and symbol keys work as expected.

This avoids rebuilding the same sort of infrastructure ourselves, while
providing an awesome DWIM experience to authors of broker scripts.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>
Rewrite Puppet broker to use Puppet Labs package repositories

The original Razor Puppet broker installed Puppet from a gem.  This,
unfortunately, was kind of a rough user experience -- because the gem didn't
do much setup for users, and because it was awfully hard to excise the gem
version if you wanted to use a real package manager.

Since Puppet Labs provides, and recommends, our own package repositories for
installing the Puppet Community Edition, our broker should follow that advice.

This implements that -- rewriting the broker install script to support our own
package repositories as far as possible.

Presently that support is limited only to Linux flavours, but there is no
reason why it can't reasonably simply extend to working correctly on other
platforms in future.

Signed-off-by: Daniel Pittman <daniel@rimspace.net>