Hi Jordan,
Thanks for your reply.
Let’s say the limits are general.
Here is what I’ve done:
1. Added depends 'limits' into “chef-client/metadata.rb” 2. 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:
">
]
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:
1. Add the dependency on limits to your application tomcat cookbook 2. 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 < "> > wrote:
|
Archive powered by MHonArc 2.6.16.