Chef cheatsheet

Creating cookbook

cd ~/chef-repo

knife cookbook create newrelic-config              /OR/               cd cookbooks; chef generate cookbook newrelic-config

cd cookbooks/newrelic-config/recipes

touch update_config.rb

notepad update_config.rb

[...Author Recipe.....]

Upload cookbook

cd ~\chef-repo

foodcritic .\cookbooks\trendMicro\recipes\*

knife cookbook test newrelic-config

knife cookbook upload newrelic-config

Modify role and include new recipe

vim  .\roles\portalapps.json

  >> "recipe[newrelic-config::update_config]"

Upload Role

knife upload .\roles\portalapps.json