This is the LXC provisioner for chef-metal.
To run the tests, which creates an Ubuntu machine and installs this into it:
gem install chef-metal
rake build
cd test/
chef-client -z vagrant.rb ubuntu12.rb test_machine.rb
require 'chef_metal_lxc/lxc_provisioner'
with_provisioner ChefMetalLXC::LXCProvisioner.new
The provisioner represents lxc containers in a directory.
ChefMetalLXC::LXCProvisioner.new(...)
lxc_path - path where the lxc containers will be located. This ends up being a sort of namespace, since the machines' names must be unique under each path.
To specify provisioning options that will be used with all subsequent machine
definitions:
with_provisioner_options :template => <template name>,
:template_options => <arguments>
:backing_store => <backing store>
These options correspond to the options in lxc create:
- template: the LXC template name to use.
- template_options: An array of string arguments to pass to the template.
- backing_store: The backing store to use for the file system.