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

Select Status

RSS

ulimit2 (3) Versions 0.2.0

Installs/Configures ulimit parameters

Policyfile
Berkshelf
Knife
cookbook 'ulimit2', '~> 0.2.0', :supermarket
cookbook 'ulimit2', '~> 0.2.0'
knife supermarket install ulimit2
knife supermarket download ulimit2
README
Dependencies
Changelog
Quality 33%

ulimit2 Cookbook

A cookbook to set resource limits via ulimit.

Requirements

Ruby 1.9 or later

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

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

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

ulimit2 CHANGELOG

This file is used to list changes made in each version of the ulimit2 cookbook.

0.1.0

0.1.1

0.2.0

Collaborator Number Metric
            

0.2.0 failed this metric

Failure: Cookbook has 0 collaborators. A cookbook must have at least 2 collaborators to pass this metric.

Contributing File Metric
            

0.2.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a CONTRIBUTING.md file

Foodcritic Metric
            

0.2.0 failed this metric

FC064: Ensure issues_url is set in metadata: ulimit2/metadata.rb:1
FC065: Ensure source_url is set in metadata: ulimit2/metadata.rb:1
FC066: Ensure chef_version is set in metadata: ulimit2/metadata.rb:1
FC069: Ensure standardized license defined in metadata: ulimit2/metadata.rb:1
FC072: Metadata should not contain "attribute" keyword: ulimit2/metadata.rb:1
Run with Foodcritic Version 16.3.0 with tags metadata,correctness ~FC031 ~FC045 and failure tags any

No Binaries Metric
            

0.2.0 passed this metric

Testing File Metric
            

0.2.0 failed this metric

Failure: To pass this metric, your cookbook metadata must include a source url, the source url must be in the form of https://github.com/user/repo, and your repo must contain a TESTING.md file

Version Tag Metric
            

0.2.0 passed this metric