Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
upload failed for cookbooks/audit because missing "compat_resource" #204
knife cookbook upload audit -o ./chef-cookbooks
Chef Development Kit Version: 1.2.22
Red Hat Enterprise Linux Server release 7.0 (Maipo)
[What you are trying to achieve and you can't?]
Steps to Reproduce:
upload with no error, or to have updated 'compat_resource' version in the cookbook audit
Failed as "ERROR: The missing cookbook(s) are: 'compat_resource' version '>= 0.0.0' "
This is expected behavior.
There are two ways to solve this:
I would recommend using Berkshelf as it will make sure the right versions of the right dependency cookbooks are downloaded and then uploaded to your Chef Server.
I hope this helps!
Thanks, @adamleff !
W, [2017-03-31T14:12:59.449649 #6460] WARN -- : You are setting a key that conflicts with a built-in method Hashie::Mash#frozen? defined in Kernel. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the # method.
Yeah, that a lot of warnings you can ignore - that's fixed in the upcoming ChefDK release.
So, you ran
It looks like you might be new to Chef. The problem you are seeing is that knife cookbook upload is expecting that all dependencies of the cookbook are handled. You can't upload a cookbook to the Chef Server without uploading its dependencies. This isn't a problem specific to this cookbook, it's something that you need to understand and deal with for any cookbook that you use. The metadata.rb file will indicate what dependencies there are. You can either manually handle the dependencies by downloading them from the supermarket and uploading them, or you can use a tool like berkshelf to handle the dependencies. If you look at the Berksfile that is included you'll see that it will pull from the public supermarket https://supermarket.chef.io.