InterviewSolution
| 1. |
Differentiate between cookbook and recipe? |
|
Answer» Recipes are the basic configuration element in any organisations. Its a programmatic representation of the desired state of the nodes. Usually WRITTEN in ruby with Chef Domain Specific Language (DSL), these specify all the standards (policies) or updates that the nodes should follow. Recipes are often a collection of resources that are the building blocks of the infrastructure of any organisations. Cookbooks are a collection of recipes. APART from recipes, cookbooks contain other ELEMENTS like metadata, attributes, libraries, resources, templates, and tests which helps the nodes to achieve their desired state. Cookbooks can be created by Chef commands or by the Chef command-line tool called Knife. The cookbooks are the fundamental units of chefs and are uploaded to the Chef Servers and then read and deployed by the Chef Clients at the nodes. Cookbooks are standalone entities that could be transferred easily between the Chef server and node. It typically implements a scenario of infrastructure and has everything required for the scenario. Cookbooks could be VERSION controlled and hence help the development team to COLLABORATE and share cookbooks. |
|