Closed stephenlauck closed 10 years ago
I don't use Berkshelf (I'm using chef-librarian because I find Berkshelf more complicated and confusing), but I'm going to investigate why it generates a metadata.json file when uploading.
I can't reproduce your issue but I'm getting a similar one:
- chef-server
has a checksum mismatch between server and repo in
.kitchen.yml does not exist in the repo
I'm looking at Berkshelf's source code right now to figure out what it does.
Edit: I give up for now, I have absolutely no idea where that .kitchen.yml
comes from and I'm extremely confused by what Berkshelf does. Reading some of the specs didn't help me understand what Berkshelf does and why. Also the current Berkshelf master is incompatible with Chef 11.8.2 because it depends on json 1.8.1.
@stephenlauck What version of Berkshelf were you using to get that metadata.json error?
Got it, I was testing with a cookbook that actually has a metadata.json. I still can't reproduce it, but now I'm getting another mismatch, this time a .gitignore
that's magically on the server but not the local cookbook.
I understand a bit more: what Berkshelf uploads is cookbooks from ~/.berkshelf/cookbooks
, but in my tests I've used the --path
switch to vendor them and add this directory to my cookbook_path. Version 2.0.10 of Berkshelf generates a .gitignore
file when it's missing, but not metadata.json. That explains the difference in my case, but it still doesn't tell me why Berkshelf adds those files (so far I can't even find where it does that in the source code).
berkshelf vendored cookbooks have a compiled metadata.json instead of metadata.rb berkshelf does seem to upload every file (it respect .chefignore) on chef server and that may explain why lots of cookbooks have different checksums
I have released version 0.10.0 that should support Berkshelf cookbooks that only have a metadata.json. I don't use Berkshelf so please tell me if it works for you.
On a 'knife cookbook inspect' errors occur when checking berkshelf uploaded cookbooks.