Version information
This version is compatible with:
- Puppet Enterprise 2023.8.x, 2023.7.x, 2023.6.x, 2023.5.x, 2023.4.x, 2023.3.x, 2023.2.x, 2023.1.x, 2023.0.x, 2021.7.x, 2021.6.x, 2021.5.x, 2021.4.x, 2021.3.x, 2021.2.x, 2021.1.x, 2021.0.x
- Puppet >= 7.0.0 < 9.0.0
- , , , , ,
Start using this module
Add this module to your Puppetfile:
mod 'treydock-clustershell', '3.0.0'
Learn more about managing modules with a PuppetfileDocumentation
puppet-module-clustershell
Table of Contents
- Description
- Setup - The basics of getting started with clustershell
- Usage - Configuration options and additional functionality
- Reference - Module reference
Description
This module will manage ClusterShell
Setup
What clustershell affects
This module will install the clustershell packages and manage the clustershell configs.
Setup Requirements
For systems with yum
package manager there is a dependency on puppetlabs/yumrepo_core.
If genders support is enabled there is a soft dependency on treydock/genders
Usage
Install clustershell and define groups in local.cfg:
class { '::clustershell':
groupmembers => {
compute => {
group => 'compute',
member => 'node[00-99]',
}
login => {
group => 'login',
member => 'login[01-02]',
}
},
}
The equivalent in hiera would be:
clustershell::groupmembers:
compute:
group: 'compute'
member: 'node[00-99]'
login:
group: 'login'
member: 'login[01-02]'
Enable SLURM groups and make them the default:
class { '::clustershell':
default_group_source => 'slurm',
include_slurm_groups => true,
}
Enable genders groups and make them the default:
class { '::clustershell':
default_group_source => 'genders',
include_genders_groups => true,
}
Define groups via YAML group files:
class { '::clustershell':
group_yaml => {
'cluster' => {
'data' => {
'local' => {
'compute' => 'node[00-99]',
'login' => 'login[01-02]',
}
}
}
}
}
Defining group YAML files via defined type:
::clustershell::group_yaml { 'cluster':
data => {
'local' => {
'compute' => 'node[00-99]',
'login' => 'login[01-02]',
}
}
}
Can also supply custom templates to clustershell::group_yaml
::clustershell::group_yaml { 'cluster':
content => template('profile/clustershell/cluster.yaml.erb'),
}
Example of defining custom group source:
::clustershell::group_source { 'batch':
ensure => 'present',
section => 'job,moabrsv',
map => 'clustershell-batch-mapper.py $SOURCE map $GROUP',
list => 'clustershell-batch-mapper.py $SOURCE list',
}
Reference
Reference
Table of Contents
Classes
clustershell
: Manage clustershell
Defined types
clustershell::group_source
: Define group sourcesclustershell::group_yaml
: Manage a group yaml fileclustershell::groupmember
: Manage local.cfg group members
Classes
clustershell
Manage clustershell
Examples
include ::clustershell
Parameters
The following parameters are available in the clustershell
class:
fanout
connect_timeout
command_timeout
color
fd_max
history_size
node_count
verbosity
ssh_user
ssh_path
ssh_options
ensure
package_name
package_ensure
manage_epel
install_python
python_package_name
conf_dir
conf
conf_template
defaults_conf
defaults_conf_template
groups_config
groups_concat_dir
groups_conf
groups_conf_template
groups_auto_dir
groups_conf_dir
include_slurm_groups
default_group_source
default_distant_workername
groupmembers
group_yaml
include_genders_groups
manage_genders
fanout
Data type: Integer
Value for clush.conf fanout
Default value: 64
connect_timeout
Data type: Integer
Value for clush.conf connect_timeout
Default value: 15
command_timeout
Data type: Integer
Value for clush.conf command_timeout
Default value: 0
color
Data type: String
Value for clush.conf color
Default value: 'auto'
fd_max
Data type: Integer
Value for clush.conf fd_max
Default value: 8192
history_size
Data type: Integer
Value for clush.conf history_size
Default value: 100
node_count
Data type: String
Value for clush.conf node_count
Default value: 'yes'
verbosity
Data type: String
Value for clush.conf verbosity
Default value: '1'
ssh_user
Data type: Optional[String]
SSH user
Default value: undef
ssh_path
Data type: String
Path to SSH command
Default value: 'ssh'
ssh_options
Data type: String
SSH options
Default value: '-oStrictHostKeyChecking=no'
ensure
Data type: Enum['present','absent']
Module ensure property
Default value: 'present'
package_name
Data type: String
clustershell package name
Default value: 'clustershell'
package_ensure
Data type: Optional[String]
The package ensure property, defaults based on ensure
property
Default value: undef
manage_epel
Data type: Boolean
Boolean that sets of EPEL module should be managed for Red Hat based systems
Default value: true
install_python
Data type: Boolean
Boolean that sets if python module should be installed
Default value: false
python_package_name
Data type: String[1]
Package name of python module, only applies to Red Hat based systems
Default value: 'python3-clustershell'
conf_dir
Data type: Stdlib::Absolutepath
Path to clustershell configuration directory
Default value: '/etc/clustershell'
conf
Data type: Stdlib::Absolutepath
Path to clush.conf
Default value: '/etc/clustershell/clush.conf'
conf_template
Data type: String[1]
clush.conf template
Default value: 'clustershell/clush.conf.erb'
defaults_conf
Data type: Stdlib::Absolutepath
Path to defaults.conf
Default value: '/etc/clustershell/defaults.conf'
defaults_conf_template
Data type: String[1]
defaults.conf template
Default value: 'clustershell/defaults.conf.erb'
groups_config
Data type: Stdlib::Absolutepath
path to local.cfg groups config file
Default value: '/etc/clustershell/groups.d/local.cfg'
groups_concat_dir
Data type: Stdlib::Absolutepath
groups concat directory
Default value: '/etc/clustershell/tmp'
groups_conf
Data type: Stdlib::Absolutepath
path to groups.conf
Default value: '/etc/clustershell/groups.conf'
groups_conf_template
Data type: String[1]
groups.conf template
Default value: 'clustershell/groups.conf.erb'
groups_auto_dir
Data type: Stdlib::Absolutepath
path to groups auto directory
Default value: '/etc/clustershell/groups.d'
groups_conf_dir
Data type: Stdlib::Absolutepath
path to groups.conf.d
Default value: '/etc/clustershell/groups.conf.d'
include_slurm_groups
Data type: Boolean
Boolean that sets if should include slurm groups
Default value: false
default_group_source
Data type: String
The default group source
Default value: 'local'
default_distant_workername
Data type: String
The default remote command to use, usually ssh
or rsh
Default value: 'ssh'
groupmembers
Data type: Hash
Hash of resources to pass to clustershell::groupmember
Default value: {}
group_yaml
Data type: Hash
Hash of resources to pass to clustershell::group_yaml
Default value: {}
include_genders_groups
Data type: Boolean
Include genders group source
Default value: false
manage_genders
Data type: Boolean
Manage genders class when including genders group source
Default value: true
Defined types
clustershell::group_source
Define group sources
Examples
clustershell::group_source { 'slurm':
ensure => 'present',
map => 'sinfo -h -o "%N" -p $GROUP',
all => 'sinfo -h -o "%N"',
list => 'sinfo -h -o "%P"',
reverse => 'sinfo -h -N -o "%P" -n $NODE',
}
Parameters
The following parameters are available in the clustershell::group_source
defined type:
map
Data type: String
map command
ensure
Data type: Enum['present','absent','file']
Ensure property
Default value: 'present'
all
Data type: String
all command
Default value: 'UNSET'
list
Data type: String
list command
Default value: 'UNSET'
reverse
Data type: String
reverse command
Default value: 'UNSET'
section
Data type: String
Name of section for group source
Default value: $name
clustershell::group_yaml
Manage a group yaml file
Examples
clustershell::group_yaml { 'roles':
data => {
'roles' => {
'compute' => 'compute[01-04]',
'login' => 'login[01-02]',
}
}
}
Parameters
The following parameters are available in the clustershell::group_yaml
defined type:
ensure
Data type: Enum['present','absent','file']
File ensure property
Default value: 'present'
data
Data type: Hash
The data to use in defining the YAML groups
Default value: {}
source
Data type: Optional[String]
Source that can be used to define the YAML file
Default value: undef
content
Data type: Optional[String]
Content that can override this module's template for this YAML file
Default value: undef
clustershell::groupmember
Manage local.cfg group members
Examples
clustershell::groupmember { 'compute':
group => 'compute',
member => 'compute[01-02]',
}
Parameters
The following parameters are available in the clustershell::groupmember
defined type:
group
Data type: String
Name of the group
member
Data type: Variant[Array, String]
Members
Default value: $title
Change log
All notable changes to this project will be documented in this file. The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
v3.0.0 (2023-08-23)
Changed
Added
v2.0.0 (2022-04-13)
Changed
v1.1.0 (2022-04-13)
Added
v1.0.1 (2021-07-08)
Fixed
v1.0.0 (2021-03-12)
Changed
Added
Fixed
v0.3.1 (2021-02-17)
Fixed
v0.3.0 (2021-02-17)
Changed
Fixed
v0.2.1 (2020-07-24)
Fixed
v0.2.0 (2019-08-20)
Added
v0.1.0 (2019-08-20)
Changed
Added
- Update documentation #4 (treydock)
- Support Debian and Ubuntu #3 (treydock)
- Misc improvements #2 (treydock)
* This Changelog was automatically generated by github_changelog_generator
Dependencies
- puppetlabs/stdlib (>= 4.25.0 <10.0.0)
- puppetlabs/concat (>= 4.0.0 <10.0.0)
- puppet/epel (>= 3.0.0 <6.0.0)