- From: Zuhaib Siddique <
>
- To:
- Subject: [chef] Re: recipes to bootstrap for things like ulimit etc.
- Date: Wed, 16 May 2012 19:53:47 -0700
So we have a cookbook called "performance" which does a bunch of tweaks for
us that we use. One of them for Ubuntu is set the pam.d/common-session and
/etc/security/limits.conf. Its important you set it for both root and the
user you wish to use the ulimit setting for.
the code looks like this:
template "/etc/security/limits.conf" do
source "limits.conf.erb"
owner "root"
group "root"
mode "0644"
variables(
:user => node[:ulimit][:user],
:soft => node[:ulimit][:soft],
:hard => node[:ulimit][:hard]
)
end
/etc/security/limits.conf
<%= @user %> soft nofile <%= @soft %>
<%= @user %> hard nofile <%= @hard %>
# End of file
root soft nofile 64000
root hard nofile 65000
and you need to add common-session this:
session required pam_limits.so
I should oensource that cookbook.
Zuhaib
On May 13, 2012, at 4:37 AM, S Ahmed
<
>
wrote:
>
Are there any good bootstrap type recipes that you would want to run on all
>
servers.
>
>
I'm thinking things like changing the # of file descriptionts (ulimit) etc.
Archive powered by MHonArc 2.6.16.