Hi Chefs,
So I’ve been trying to adapt Stephen Lauck and Stephen Lauck’s Chef Pipeline cookbook for our environment but I seem to be having a problem with dependency resolution and I want to try to understand if this is just something that won’t work or if I’m doing something wrong.
So first a summary of our environment: We have one “main” repo (called server-chef) that contains our data bags, roles, environment files, and now a master Berkshelf file for use with Pipeline. All of our cookbooks are in their own repos (e.g. github.com/evertrue/et_base-cookbook.git).
My master Berksfile looks like this:
source ‘https://supermarket.chef.io’
group :community do
cookbook 'apt’
cookbook 'newrelic’
end
%w(ec2dnsserver
et_api_haproxy
et_auth_api
et_base
et_cassandra
et_chefgithook
et_contacts_api
et_hostname
et_logger
et_monitoring
et_networking_basic
et_tools
et_users).each do |cb|
cookbook cb, git: "git@github.com:evertrue/#{cb}-cookbook"
end
Here’s the problem:
Not all of the dependencies are actually compatible between each of the cookbooks that I need to test. For example, et_base depends on version = 1.4.4 of et_users but et_rails_app depends on version = 1.5.0 of et_users.
Am I missing something? Is there any way to reconcile this? Or does the dependency tree actually have to be compatible for every single cookbook we use?
Thanks in advance y’all,
Eric
On Friday, May 15, 2015 at 12:53 PM, Eric Herot wrote:
Hi Chefs,
So I’ve been trying to adapt Stephen Lauck and Stephen Lauck’s Chef Pipeline cookbook for our environment but I seem to be having a problem with dependency resolution and I want to try to understand if this is just something that won’t work or if I’m doing something wrong.
So first a summary of our environment: We have one “main” repo (called server-chef) that contains our data bags, roles, environment files, and now a master Berkshelf file for use with Pipeline.
snip
Not all of the dependencies are actually compatible between each of the cookbooks that I need to test. For example, et_base depends on version = 1.4.4 of et_users but et_rails_app depends on version = 1.5.0 of et_users.
Am I missing something? Is there any way to reconcile this? Or does the dependency tree actually have to be compatible for every single cookbook we use?
Thanks in advance y’all,
Eric
Berks is designed to build a set of cookbooks for a single machine, where all the dependencies would need to be compatible for chef to run. I think batali can work the way you’re trying to use berks. I haven’t tried it myself and I have no idea if it will integrate with the rest of your workflow. But your options are either to not use berks, have separate Berksfiles for different kinds of machines, or make sure all of your dependencies are compatible.
--
Daniel DeLeo
Hi Eric,
On Fri, May 15, 2015 at 9:53 PM, Eric Herot eric.opscode@herot.com wrote:
Not all of the dependencies are actually compatible between each of the
cookbooks that I need to test. For example, et_base depends on version =
1.4.4 of et_users but et_rails_app depends on version = 1.5.0 of et_users.
That's a simple dependency conflict due to the strict requirements you
declared in the metadata.rb
Consider that you cannot use multiple version of the same cookbook at
the same time, so one of the two should win.
Since you have control over all those cookbook, consider to use (and
test) the same version for every dependant cookbook, or use a relaxed
operator ~> instead of =.
Cheers,
--
Giovanni Toraldo