# Cookbook Creator Cookbook Creator role is to provide lightweight mechanism of initial cookbook generation from template. ## Installation You can install it by using a command: `gem install cookbook_creator` ## Dependencies Cookbook Creator during its installation will also install required gems: * chef * berkshelf * kitchen * json * ohai * rake * rspec * chefspec * serverspec * mixlib-cli * mixlib-config * chef-zero ## Usage `cookbook_create ` Where: * is obligatory * can be: - `-c, --config ` - `-g, --generator_cookbook ` - `-m, --maintainer ` - `-e, --maintainer_email ` - `-p, --provisioner ` # Default is chef_zero - `-l, --license ` - `-P, --platform ` - `-d, --driver ` # Docker is the default - `-i, --image # Used only if selected driver is docker` - `-s, --supermarket_url ` # Custom supermarket URL. Is usefull in case we have our own private supermarket - `-L, --lwrp` # Will be generated LWRP skeleton - `-b, --lib` # Will be generated library skeleton ## Config options Config file could has following options: - `maintainer ''` - `maintainer_email ''` - `provisioner ''` - `license ''` - `platform ''` - `driver ''` - `supermarket_url ''` - `lwrp ''` - `lib ''` - `generator_cookbook ''` - `image ''` ## Config locations By default Cookbook Creator will search for config file in following places: * Under `env['COOKBOOK_CREATOR_HOME']/generator.rb` if set * Under `Current directory/generator.rb` * Under `Current directory/.generator/generator.rb` * Under `$HOME/.generator/generator.rb` ## Options merging Options will be merged in the following order: * Initially will be build hash with default options from CLI * CLI options will be overwritten by the options within config file * Config file options will be overwritten by any arguments which will be passed to the script *WARNING:* Cookbook Creator can have some bugs. Please report to sanicheev@tacitknowledge.com if you will find any.