I know that when uploading a chef cookbook the compiled metadata is kept on chef server as metadata.json, but why is it that some cookbooks, when downloaded is missing metadata.rb but instead has a metadata.json inside?
How do I download the metadata.rb from chef server in that case?
Some tools (berkshelf in particular) do this so that you can use arbitrary ruby code in your metadata.rb
which might fail when evaluated on a different system. In particular, if you do something like shelling out to git with backticks, you can't evaluate that metadata.rb on a system that doesn't have git installed. I think the stove
tool also does this when you upload to supermarket.
If you need to transfer cookbooks around with no conversion of metadata, it's probably better to use your source control system if you're using berks.