One of the most useful extensions available to chef cookbook authors is the ability to write and use any arbitrary ruby code as a library. these libraries are often no more than a few lines long, but can also be as simple or as sophisticated as you want.. This cookbook contains lwrps and hwrps for handling optional common configuration of the jvm. the lwrps and/or libraries in this cookbook should be referenced from recipes that run after the installation and configuration of java via the cookbook at https://github.com/socrata-cookbooks/java. Chef cookbooks - learn chef in simple and easy steps starting this is achieved in chef by using the desired external libraries. key components of a cookbook. recipes;.
I would like to share a small handful of methods across recipes in a chef repo. i know that on a cookbook level i can put code in modules in the libraries directory (see related question).. In a cookbook i have a library(client_helper.rb). a module is defined inside it. module name is client_helper. here is the module code. module client_helper # this module contains helper methods. When you create a new chef cookbook, it will automatically create certain directories and files. you’ll then be adding your own custom files on top these.