Search code examples
chef-infracookbook

What is a cookbook? and how is it used?


Can someone in plain please explain to me what a cookbook is and how we used it in a productionalized environment.

I see people using Chef - cookbooks/recepies what and how are they used?


Solution

  • Some quick terms:

    Chef resource – a resource is a description of the desired state of a particular bit of the system. Like "package foo should be installed" or "file /bar should be owned by root".

    Chef recipe – a bunch of resources which will be run in order, usually grouped around installing/managing some particular piece of software.

    Chef cookbook – a bunch of recipes and other files (config templates, default attribute values, etc) with some thematic grouping that should be released and promoted as a unit.