Repository is archived
No commit activity in last 3 years
No release in over 3 years
Provisioner for creating LXC containers in Chef Provisioning.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

Runtime

< 3.0, >= 1.0
>= 0.0.3, ~> 0.0
 Project Readme

MAINTAINERS WANTED

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.

chef-provisioning-lxc

Build Status Gem Version

This is the LXC provisioner for chef-provisioning.

Quick Start

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

Basic Usage

require 'chef/provisioning'
machine 'mario' do
  recipe 'apache2'
end

Machine Options

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.