-
-
Notifications
You must be signed in to change notification settings - Fork 599
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Avoid using recommends "monit"
in metadata.rb
#162
Comments
Hi, sorry for not getting to you sooner. I always understood Chef's
Can you be more specific what "undesired" here means? What is uploaded and what do you expect? How do you declare dependency on |
I would highly suggest using binary dependencies - it's either a dep, or it's not. |
@sethvargo That's quite problematic in this specific use case. There are multiple Monit cookbooks, with varying functionality and features. So the cookbook won't specify a "binary" dependency, because it leaves the decision about which Monit cookbook to use to the user. |
That's a documentation issue though, not a dependency issue. Your cookbook is designed to work with one or more of those monit cookbooks, right? So you document that, then depend on monit. |
I agree with @sethvargo -- although I am agreeing because I think the elasticsearch cookbook needs to be explicit about what version of monit it supports if it's required. |
And here's where our approach differs, Seth. I document the situation like this in the README:
Based on long years of fighting dependency hell as an end-user in Ruby, in pre- and post- Bundler years, the last thing I want to do is to force that on them. So, if you want to use the It's exactly the same issue with Java, by the way, which is arguably much more central to Elasticsearch usage:
Given how much I struggled with the Opscode Java cookbook over the years, the last thing I want to do to my end users is forcing them to use it. I can imagine many people writing their own lightweight Java cookbooks and perfectly satisfiying Elasticsearch requirements in that way. |
@mahmoudimus No, the cookbook won't make that decision for you. Pick up a Monit cookbook you consider "good" (to quote you: “I am currently using https://github.com/phlipper/chef-monit which is a much superior cookbook for monit.”) and use it. The contract it has to provide to the Elasticsearch cookbook is quite minimal. |
@karmi fair enough :) |
@karmi - you mean like this: https://github.com/opscode-cookbooks/jenkins#java 😄 |
@sethvargo Yeah, exactly like that. |
Recommending monit, when using Berkshelf, will upload an undesired version of
monit
to the chef server. While this is being addressed by berkshelf/berkshelf#895, we should not depend on therecommends
keyword.The text was updated successfully, but these errors were encountered: