InterviewSolution
| 1. |
What are the Policyfiles? Why are they used? |
|
Answer» Policyfiles are used to combine the advantages of roles and environment with Berkshelf.In usual Chef Workflow, the versions and the LOCATIONS of COOKBOOKS being used by a Chef Client are updated in “metadata.rb” file and “Berksfile”. Often this is a tedious task and a SMALL error in these FILES make Chef Client apply the wrong cookbook and converged node would not acquire the required state. These problems could be solved by using a single document called Policyfiles to get the specific cookbook revisions and recipes that Chef Infra Client would apply. Policyfiles are applied on a GROUP of nodes, cookbooks or settings. The syntax for a Policyfile.rb file is as follows: name "name" run_list "ITEM", "ITEM", ... default_source :SOURCE_TYPE, *args cookbook "NAME" [, "VERSION_CONSTRAINT"] [, SOURCE_OPTIONS]where
|
|