1.

What is frozen cookbooks? How are they created?

Answer»

Frozen cookbooks are those cookbooks which cannot be re-imported or modified. HENCE the frozen cookbooks would not EVEN be accidentally modified. For eg:  This method HELPS us to protect our production environments from being modified while testing changes made to the development infrastructure. We can freeze a cookbook as follows:

  • Use “--freeze” option while uploading the cookbook to Chef Server using “knife UPLOAD” command. Once a cookbook is frozen it could be updated only by using “--force” option with “knife upload” command and if the “--force” is not specified an error message would be returned.
  • “berkshelf upload” command automatically makes the uploaded cookbook frozen. To stop freezing of the cookbook we could use the option “--no-freeze”. Similar to a knife, “bookshelf upload” has an option “--force” to update the frozen cookbooks.   Another option called “--halt-on-frozen” exits the “berkshelf upload” command with a non-zero exit code if the same VERSION of the cookbook is present in Chef Server.


Discussion

No Comment Found