1.

What is a wrapper cookbook?

Answer»

Chef Software hosts a repository for general-purpose community cookbooks called Chef SUPERMARKET. Hence Chef users can use these designed and tested cookbooks wherever possible which in TURN will reduce the infrastructure development time. But often we come ACROSS situations where we need to tweak the community cookbooks for our requirement i.e where wrapper cookbooks are created. Wrapper cookbooks are similar to normal cookbooks but they use recipes from other cookbooks also.One another scenario where wrapper cookbooks are created is where you have a large number of baseline cookbooks and we need to organise them for maintainability.

We create wrapper cookbooks and put in external recipes from other cookbooks for our use. This could be achieved by modifying

  1. metadata.rb file to include details about all DEPENDENT cookbooks. All dependent cookbooks are specified in “DEPENDS” directive
  2. Using ‘include_recipe‘ directive in a recipe to include external recipes from other cookbooks

Wrapper classes can be further customized to your needs through some simple attribute changes. Attribute definitions and run lists of the nodes could also be version controlled using wrapper cookbooks.



Discussion

No Comment Found