GithubHelp home page GithubHelp logo

isabella232 / hw-lxc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cookbooks/hw-lxc

0.0 0.0 0.0 208 KB

A Chef cookbook for lxc (Initial Upstream: hw-cookbooks, Repository: lxc)

Home Page: https://github.com/hw-cookbooks/lxc

Ruby 100.00%

hw-lxc's Introduction

LXC

Manage linux containers with Chef.

Recipes

default

Installs the packages and configuration files needed for lxc on the server. If the node uses apt-cacher-ng as a client, the server will be reused when building containers.

install_dependencies

Installs the packages needed to support lxc's containers.

containers

This recipe creates all of the containers defined in the ['lxc']['containers'] hash. Here is an example of an example container:

node['lxc']['containers']['example'] = { 
  'template' => 'ubuntu',
  'trim' => , false,
  'debug' => , true 
}

You may set trim and debug to true if you need them (default is false).

Backing store file system and template options are not yet supported.

knife

Install and manage containers via the knife-remotelxc plugin.

Example

include_recipe 'lxc'

lxc_container 'my_container' do
  action :create
  validation_client 'my-validator'
  server_uri 'https://api.opscode.com/organizations/myorg'
  validator_pem content_from_encrypted_dbag
  run_list ['role[base]']
  chef_enabled true
end

lxc_container 'my_container_clone' do
  action :clone
  base_container 'my_container'
  chef_enabled true
end

lxc_service 'my_container_clone' do
  action :start
end

Containers do not have to be Chef enabled but it does make them extremely easy to configure. If you want the Omnibus installer cached, you can set the attribute

node['omnibus_updater']['cache_omnibus_installer'] = true

in a role or environment (default is false). The lxc_container resource also provides initialize_commands which an array of commands can be provided that will be run after the container is created.

Repository:

Contributors

hw-lxc's People

Contributors

chrisroberts avatar mattray avatar portertech avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.