Adoptable Cookbooks List

Looking for a cookbook to adopt? You can now see a list of cookbooks available for adoption!
List of Adoptable Cookbooks

Supermarket Belongs to the Community

Supermarket belongs to the community. While Chef has the responsibility to keep it running and be stewards of its functionality, what it does and how it works is driven by the community. The chef/supermarket repository will continue to be where development of the Supermarket application takes place. Come be part of shaping the direction of Supermarket by opening issues and pull requests or by joining us on the Chef Mailing List.

Select Badges

Select Supported Platforms

RSS

ulimit2 (3) Versions 0.1.0

Installs/Configures ulimit parameters

Berkshelf/Librarian
Policyfile
Knife
cookbook 'ulimit2', '= 0.1.0'
cookbook 'ulimit2', '= 0.1.0', :supermarket
knife cookbook site install ulimit2
knife cookbook site download ulimit2
README
Dependencies
Quality -%

ulimit2 Cookbook

A cookbook to set resource limits via ulimit.

Requirements

Should support any linux platform, but has been tested successfully on:

  • rhel >= 5.0
  • centos >= 5.0
  • ubuntu >= 12.04
  • fedora >= 17.0

Attributes

ulimit2::default

  • ['ulimit']['conf_dir']
    Type: String
    Description: The directory to store the config file in
    Default: /etc/security/limits.d

  • ['ulimit']['conf_file']
    Type: String
    Description: The file containing the resource limits
    Default: 999-chef-ulimit.conf

Usage

ulimit2::default

Set attributes in the ulimit/params namespace to set resource limits. Example values:

node.set['ulimit']['params']['default']['nofile'] = 2000 # Set hard and soft open file limit to 2000 for all users
node.set['ulimit']['params']['default']['nproc']['soft'] = 2000 # Set the soft per-user process limit to 2000 for all users
node.set['ulimit']['params']['root']['nofile']['soft'] = 8000   # Set the soft open file limit to 8000 for the 'root' user
node.set['ulimit']['params']['root']['nofile']['hard'] = 'unlimited' # Set the hard open file limit to unlimited for the 'root' user
node.set['ulimit']['params']['@sysadmin']['nproc']['hard'] = 2500  # Set the hard process limit to 2500 for the 'sysadmin' group

Then, just include ulimit2 in your node's run_list:

{
  "name":"my_node",
  "run_list": [
    "recipe[ulimit2]"
  ]
}

For systems that don't support individual configuration files, meaning they only support settings in the /etc/security/limits.conf, set ulimit/conf_dir attribute to '/etc/security' and ulimit/conf_file attribute to 'limits.conf'; or whatever setting is appropriate to your system.

The default ulimit/conf_file attribute value gives us a reasonable chance of being the last config file applied. The files are processed according to their ASCII sort order, so there is still room to add more files to be processed after the recipe default file by naming the config file with leading character prefixes (ex. zzz-last.conf).

License and Authors

Authors: Michael Morris
License: 3-clause BSD

Dependent cookbooks

This cookbook has no specified dependencies.

Contingent cookbooks

elastic Applicable Versions

No quality metric results found