Hi Jordan,
Thanks for your reply.
Let’s say the limits are general.
Here is what I’ve done:
-
Added depends 'limits' into “chef-client/metadata.rb”
-
Where should I put the system-wide limits?
System-wide limits
set_limit ‘*’ do
type ‘hard’
item ‘nofile’
value 4096
use_system true
end
set_limit ‘*’ do
type ‘soft’
item ‘nofile’
value 1024
use_system true
end
Mohammad
From: Jordan Wesolowski [mailto:jrwesolo@gmail.com]
Sent: Wednesday, July 22, 2015 12:32 PM
To: chef@lists.opscode.com
Subject: [chef] Re: Re: Limits Cookbook / limits.conf and limits.d
configuration files
Hello Mohammad,
I went ahead and created an issue
https://github.com/jrwesolo/limits/issues/8 so I can add clarification of
the usage of this cookbook. This type of cookbook is what is typically
called a “Library Cookbook”. Check out
http://blog.vialstudios.com/the-environment-cookbook-pattern/ and go the
section titled “The Library Cookbook”. Basically it just provides building
blocks for other cookbooks to consume.
In order to use this cookbook, add it as a dependency to the cookbook that
will need the limits set. For example, you might have an application
cookbook that sets up tomcat. This cookbook specifically needs limits
changed so you would do two different things:
-
Add the dependency on limits to your application tomcat cookbook
-
Add any number of the ‘set_limit’ definitions (you can also use the LWRP
if you’d like)
If these limits are general and not needed for any specific application,
you can add these definition/resources to your organization’s 'base’
cookbook.
Check out https://github.com/jrwesolo/limits#definition-recommended for the
recommended usage. If you’d like to use the LWRP, check out
https://github.com/jrwesolo/limits#lwrp. The respective example sections
will show you the resources being used and what they would render on the
actual file system.
Let me know if you have any issues!
Sincerely,
Jordan
On Wed, Jul 22, 2015 at 8:42 AM Jordan Wesolowski jrwesolo@gmail.com
wrote:
Mohammad,
Fabien is exactly right. This cookbook has no recipes, but instead only
provides resources. I can provide a better example once I get to a
computer, but for now try what Fabien outlined. The README.md should give a
good example on how to use the provided resources.
Sent from Outlook http://taps.io/outlookmobile
From: Fabien Delpierre fabien.delpierre@gmail.com
Sent: Wednesday, July 22, 2015 08:38
Subject: [chef] Re: Limits Cookbook / limits.conf and limits.d
configuration files
To: chef chef@lists.opscode.com
I’m not familiar with this cookbook and can’t look at its inner workings in
detail right now, but I see that it has no recipes/ folder, which tells me
it just provides resources. It sounds like you added it to your node’s run
list, but the error you’re getting makes sense since the cookbook has no
recipes. All you should need to do is add a line like the below to the
metadata.rb in your cookbook:
depends ‘limits’
Then you will be able to use the things provided by the cookbook.
On Wed, Jul 22, 2015 at 11:24 AM, Mohammad Fattahian <
mfattahian@masterfile.com> wrote:
Hi,
Can anybody help me to configure the ‘limits’ cookbook? Installed from
I added the cookbook to my Chef Server but when I run chef-client on the
node I get this error:
Recipe Compile Error
================================================================================
Chef::Exceptions::RecipeNotFound
could not find recipe default for cookbook limits
Any idea how to control system limits.conf as well as limits.d
configuration files?
Regards,
Mohammad