Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Failed to load latest commit information.
berks-cookbooks removed berks-cookbooks submodules and added them as regular directories
ChefBootstrap.groovy Update
Shell.groovy Fixed erroneous function calls
chef-service.groovy updated chef service changed the chef version from 11.4.4-2 to 11.8.0-1

Common Chef service files

This folder contains common files and a base service recipe for Chef based services. The idea is using extend to include this recipe and supporting files.

The ChefBootstrap class

The ChefBootstrap class is used to bootstrap chef. Use the getBootsrap factory method to obtain a class instance. Factory method getBootsrap(installFlavor:"flavor", serverURL:"url") - factory method.

Class methods: install - Install Chef runClient(ArrayList runList) - Run Chef client with run list runClient(HashMap initialAttributes) - Run chef-client with initial attributes (including the run_list attribute) runSolo(HashMap initialAttributes) - Run chef-solo with initial attributes (including the run_list attribute)

Client configuration takes place right before chef-client is actually executed, so serverURL is meaningless while chef bootstraping (start method) takes place. This allows you to change the Chef server later on.

Installation flavors

gem - Install from ruby gems pkg - Install from Opscode repository packages fatBinary - Install using Opscode's fat binary packages (default)


In a service recipe, one might use:

service {
    lifecycle {
        install {
            ChefBootstrap.getBootstrap(serverURL:"http://somehost:4000", installFlavor:"gem").install()
        start {
            ChefBootstrap.getBootstrap(serverURL:"http://somehost:4000", installFlavor:"gem").runClient(runList)

Or better yet, just extend this service:

service {
    extend "../services/chef"
Something went wrong with that request. Please try again.