All Projects → bmhatfield → chef-ulimit

bmhatfield / chef-ulimit

Licence: Apache-2.0 License
This is a simple chef cookbook that provides a defintion for managing user_ulimit settings.

Programming Languages

ruby
36898 projects - #4 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to chef-ulimit

mysql tuning-cookbook
Chef cookbook to create MySQL configuraiton files better suited for your system.
Stars: ✭ 23 (-46.51%)
Mutual labels:  chef, cookbook
aix
Resources for AIX hosts
Stars: ✭ 22 (-48.84%)
Mutual labels:  chef, cookbook
ohai
Development repository for Chef Cookbook ohai
Stars: ✭ 49 (+13.95%)
Mutual labels:  chef, cookbook
push-jobs-cookbook
Development repository for Chef Cookbook push-jobs
Stars: ✭ 21 (-51.16%)
Mutual labels:  chef, cookbook
owncloud-cookbook
Chef cookbook to install and configure ownCloud.
Stars: ✭ 39 (-9.3%)
Mutual labels:  chef, cookbook
Windows
Development repository for Chef Cookbook windows
Stars: ✭ 251 (+483.72%)
Mutual labels:  chef, cookbook
omnibus
Prepares a machine to be an Omnibus builder. ┬──┬◡ノ(° -°ノ)
Stars: ✭ 28 (-34.88%)
Mutual labels:  chef, cookbook
Cassandra Chef Cookbook
Chef cookbook for Apache Cassandra, DataStax Enterprise (DSE) and DataStax agent
Stars: ✭ 162 (+276.74%)
Mutual labels:  chef, cookbook
auditd
Install and configure user mode auditd tools
Stars: ✭ 31 (-27.91%)
Mutual labels:  chef, cookbook
postfixadmin-cookbook
Chef cookbook to install and configure PostfixAdmin.
Stars: ✭ 13 (-69.77%)
Mutual labels:  chef, cookbook
Arcgis Cookbook
Chef cookbooks for ArcGIS
Stars: ✭ 227 (+427.91%)
Mutual labels:  chef, cookbook
chef-client
Development repository for Chef Client cookbook
Stars: ✭ 181 (+320.93%)
Mutual labels:  chef, cookbook
Chef Client
Development repository for Chef Client cookbook
Stars: ✭ 183 (+325.58%)
Mutual labels:  chef, cookbook
cookbook-cq
Chef cookbook for Adobe CQ (aka AEM)
Stars: ✭ 20 (-53.49%)
Mutual labels:  chef, cookbook
Chef Server
Cookbook to install standalone Chef Server
Stars: ✭ 173 (+302.33%)
Mutual labels:  chef, cookbook
delivery-truck
DEPRECATED: Delivery build cb for pipelines
Stars: ✭ 36 (-16.28%)
Mutual labels:  chef, cookbook
Sudo
Development repository for sudo cookbook
Stars: ✭ 113 (+162.79%)
Mutual labels:  chef, cookbook
Build Essential
Development repository for build-essential Chef Cookbook
Stars: ✭ 118 (+174.42%)
Mutual labels:  chef, cookbook
chef-postgres-hardening
This chef cookbook provides security configuration for PostgreSQL.
Stars: ✭ 26 (-39.53%)
Mutual labels:  chef, cookbook
chef-ingredient
Primitives for managing Chef products and packages
Stars: ✭ 43 (+0%)
Mutual labels:  chef, cookbook

ulimit Cookbook

delivery Cookbook Version

This cookbook provides resources for managing ulimits configuration on nodes.

  • user_ulimit resource for overriding various ulimit settings. It places configured templates into /etc/security/limits.d/, named for the user the ulimit applies to.
  • ulimit_domain which allows for configuring complex sets of rules beyond those supported by the user_ulimit resource.

The cookbook also includes a recipe (default.rb) which allows ulimit overrides with the 'su' command on Ubuntu.

Requirements

Platforms

  • Debian/Ubuntu and derivatives
  • RHEL/Fedora and derivatives

Chef

  • Chef 12.7+

Cookbooks

  • none

Attributes

  • node['ulimit']['pam_su_template_cookbook'] - Defaults to nil (current cookbook). Determines what cookbook the su pam.d template is taken from
  • node['ulimit']['users'] - Defaults to empty Mash. List of users with their limits, as below.

Default Recipe

Instead of using the user_ulimit resource directly you may define user ulimits via node attributes. The definition may be made via an environment file, a role file, or in a wrapper cookbook. Note: The preferred way to use this cookbook is by directly defining resources as it is much easier to troubleshoot and far more robust.

Example role configuration:

"default_attributes": {
   "ulimit": {
      "users": {
         "tomcat": {
            "filehandle_limit": 8193,
               "process_limit": 61504
             },
            "hbase": {
               "filehandle_limit": 32768
             }
       }
    }
 }

To specify a change for all users change specify a wildcard resource or user name like so user_ulimit "*"

Resources

user_ulimit

The user_ulimit resource creates individual ulimit files that are installed into the /etc/security/limits.d/ directory.

Actions:

  • create
  • delete

Properties

  • username - Optional property to set the username if the resource name itself is not the username. See the example below.
  • filename - Optional filename to use instead of naming the file based on the username
  • filehandle_limit -
  • filehandle_soft_limit -
  • filehandle_hard_limit -
  • process_limit -
  • process_soft_limit -
  • process_hard_limit -
  • memory_limit -
  • virt_limit -
  • core_limit -
  • core_soft_limit -
  • core_hard_limit -
  • stack_soft_limit -
  • stack_hard_limit -
  • rtprio_limit -
  • rtprio_soft_limit -
  • rtprio_hard_limit -

Examples

Example of a resource where the resource name is the username:

user_ulimit "tomcat" do
  filehandle_limit 8192 # optional
  filehandle_soft_limit 8192 # optional; not used if filehandle_limit is set)
  filehandle_hard_limit 8192 # optional; not used if filehandle_limit is set)
  process_limit 61504 # optional
  process_soft_limit 61504 # optional; not used if process_limit is set)
  process_hard_limit 61504 # optional; not used if process_limit is set)
  memory_limit 1024 # optional
  core_limit 2048 # optional
  core_soft_limit 1024 # optional
  core_hard_limit 'unlimited' # optional
  stack_soft_limit 2048 # optional
  stack_hard_limit 2048 # optional
  rtprio_limit 60 # optional
  rtprio_soft_limit 60 # optional
  rtprio_hard_limit 60 # optional
end

Example where the resource name is not the username:

user_ulimit 'set filehandle ulimits for our tomcat user' do
  username 'tomcat'
  filehandle_soft_limit 8192
  filehandle_hard_limit 8192
end

ulimit_domain

Note: The ulimit_domain resource creates files named after the domain with no modifiers by default. To override this behavior, specify the filename parameter to the resource.

Actions:

  • create
  • delete

Examples:

ulimit_domain 'my_user' do
  rule do
    item :nofile
    type :hard
    value 10000
  end
  rule do
    item :nofile
    type :soft
    value 5000
  end
end
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].