Skip to content

Generating cookbook metadata.json

tobami edited this page Oct 11, 2011 · 2 revisions

Generating cookbook metadata.json

Cookbooks metadata is maintained in a file called 'metadata.rb' in the root directory of a cookbook. Littlechef needs this metadata in JSON format in a file called 'metadata.json', in order to be able to detect available recipes and properly merge cookbook attributes. Besides, you probably want to maintain your metadata in Ruby, as it has a more compact syntax than JSON.

In order to create this file for a certain cookbook run:

knife cookbook metadata -o site-cookbooks mongodb

or, to regenerate all, run:

knife cookbook metadata --all