We are actively seeking maintainers for the chef-provisioning-lxc driver. This project is not under active maintenance by CHEF, and does not currently pass tests with the latest version of chef-provisioning. If you are interested in maintaining it, please contact us in the gitter.
This is the LXC provisioner for chef-provisioning.
Assuming you have host with working LXC setup already, you can directly invoke an example recipe using chef localmode
-
Clone chef-provisioning-lxc repo
git clone https://github.com/chef/chef-provisioning-lxc
-
Run bundle install
bundle install
-
Execute the test recipe to create a linux container
bundle exec chef-client -z -o recipe[lxctests::simple] -c test/client.rb
require 'chef/provisioning'
machine 'mario' do
recipe 'apache2'
end
To specify provisioning options that will be used with all subsequent machine
definitions:
with_machine_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.