Chef cookbook dependencies of dependencies
This might be a simple question - I am trying to install a cookbook (gitlab)
I cloned the cookbook into a folder on my local drive and ran
knife cookbook upload gitlab.
Immediately it threw an error:
Cookbook gitlab depends on cookbook postgresql version >= 0.0.0
So I ran
knife cookbook site download postgresql
It had some dependencies, which had further dependencies, and now I'm at the point where I am installing cookbooks I know I won't need (dmg, windows, etc.)
I was under the impression that this stuff automatically resolved itself like aptitude or yum. Did I miss some crucial step of a cookbook dependency resolver?
Solution 1:
Use knife cookbook site install
, which resolves dependencies.
Solution 2:
You could use one of the established cookbook dependency managers, i.e. either Librarian or Berkshelf.
Both of these tools is designed to retrieve cookbooks from the internet, e.g. from code repositories like github, or the community.opscode.com site and to put them onto your local system. These tolls will automatically resolve recursive dependencies and version requirements and pull all required cookbooks down. Once you have all these available locally, you can then upload them all to the server, e.g. by using
knife cookbook upload -a