Coder Social home page Coder Social logo

phil-friderici / puppet-module-cgroups Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ericsson/puppet-module-cgroups

0.0 3.0 0.0 52 KB

Puppet module to manage cgroups

License: Apache License 2.0

Ruby 83.79% Puppet 12.87% HTML 3.26% Pascal 0.08%

puppet-module-cgroups's Introduction

puppet-module-cgroups

Manage cgroups configuration service and files.

  • /etc/cgconfig.conf
  • /etc/cgconfig.d/*.conf

Compatibility

This module has been tested to work on the following systems with Puppet v3 (with and without the future parser) and Puppet v4 (with strict variables) using Ruby versions 1.8.7 (Puppet v3 only), 1.9.3, 2.0.0, 2.1.0 and 2.3.1.

  • EL 6
  • EL 7
  • SLED 11 SP2
  • SLES 11 SP2

Build Status

Class cgroups

Description

The cgroups class is used to configure the cgroup service and its main configuration details.

Parameters


cgconfig_content (string)

Optional, specify arbitary content for the cgconfig.conf file that will be included at the bottom.

  • Default: undef

config_file_path (string)

Absolute path to cgroups config file.

  • Default: '/etc/cgconfig.conf'

groups (hash)

A hash containing group resources to be configured (see below for cgroups::group resources)

  • Default: undef
Example:
cgroups::groups:
  "user/mgw-all":
    permissions:
      task:
        uid: root
        gid: mgw-all
      admin:
        uid: root
        gid: mgw-all
    controllers:
      cpuset:
        "cpuset.mems": "0"
        "cpuset.cpus": "0,1"
Hiera example with Suse 11.2 bugfix:
cgroups::user_path_fix: '/sys/fs/cgroup/user/mgw-all'
cgroups::groups:
  "user/mgw-all":
    permissions:
      task:
        uid: root
        gid: mgw-all
      admin:
        uid: root
        gid: mgw-all
    controllers:
      cpuset:
        "cpuset.mems": "0"
        "cpuset.cpus": "0,1"

mounts (hash)

A hash containing mounts to be configured in /etc/cgconfig.conf. NOTE: On systemd managed systems, the default resource controllers are the domain of systemd, therefore this setting should probably not be used unless you are managing a controller not yet supported by systemd such as net_prio.

  • Default: undef
Example:
cgroups::mounts:
  cpu: '/cgroup'

package_name (string or array)

Name of package(s) that enables cgroups. Only set it to overwrite the modules defaults: RedHat 'libcgroup', Suse 'libcgroup1'.

  • Default: undef

service_name (string)

Name of service to manage.

  • Default: 'cgconfig'

user_path_fix (string)

Absolute path to set 0775 permissions on when defined. This is a fix for Suse that have a bug in setting this though the config file. Only available on Suse.

  • Default: undef

Defined type cgroups::group

Description

The cgroups::group definition is used to configure cgroup entries in /etc/cgconfig.d.

You can also specify cgroups::groups from hiera as a hash of group resources and they will be created by the base class using create_resources.

Parameters


controllers (hash)

An optional hash containing the controllers for the group.

  • Default: undef
Example:
  controllers => {
    'cpuset' => { 
      'cpuset.mems' => '0',
      'cpuset.cpus' => '0,1'
    }
  }

permissions (hash)

An optional hash containing permissions for the group.

  • Default: undef
Example:
  permissions => {
    'task' => {
      'uid' => 'root',
      'gid' => 'mgw-all',
    },
    'admin' => {
      'uid' => 'root',
      'gid' => 'mgw-all',
    },
  }

target_path (string)

Optional parameter to define in which path the configuration file should be put. By default the module will use the /etc/cgconfig.d directory.

  • Default: '/etc/cgconfig.d'

Full example

cggroups::group { 'mgw/user':
  permissions => {
    'task' => {
      'uid' => 'root',
      'gid' => 'mgw-all',
    },
    'admin' => {
      'uid' => 'root',
      'gid' => 'mgw-all',
    },
  },
  controllers => {
    'cpuset' => { 
      'cpuset.mems' => '0',
      'cpuset.cpus' => '0,1'
    }
  }
}

puppet-module-cgroups's People

Contributors

ghoneycutt avatar phil-friderici avatar crayfishx avatar wooflock avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.