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-slurm_providers', '0.14.1'
Learn more about managing modules with a PuppetfileDocumentation
puppet-slurm_providers
Table of Contents
- Overview
- Setup - The basics of getting started
- Reference - An under-the-hood peek at what the module is doing
- Limitations - OS compatibility, etc.
Overview
The SLURM providers module lets you manage various SLURM resources with Puppet.
Supported versions of SLURM
Currenlty this module supports version 19.05 of SLURM
Setup
This module requires that sacctmgr
be in PATH
.
If SLURM binaries are is not in path then then you must configure Puppet with a valid path to sacctmgr
and scontrol
.
Below is an example of configuring Puppet if SLURM install prefix is /opt/slurm
.
slurm_config { 'puppet':
sacctmgr_path => '/opt/slurm/bin/sacctmgr',
scontrol_path => '/opt/slurm/bin/scontrol',
}
Reference
http://treydock.github.io/puppet-slurm_providers/
Limitations
This module has been tested using the following versions of SLURM
- 20.02.x
- 20.11.x
- 21.08.x
- 22.05.x
- 23.02.x
- 23.11.x
The following operating systems have been tested
- RHEL/CentOS 7 x86_64
- RHEL/Rocky 8 x86_64
- RHEL/Rocky 9 x86_64
Development
Testing
Install gem dependencies
bundle install
Run unit tests
bundle exec rake spec
The following environment variables can be used to modify the behavior of the beaker tests:
- SLURM_BEAKER_version - Version of SLURM to install. Defaults to 20.02.3
Example of running beaker tests using an internal repository, and leaving VMs running after the tests.
export BEAKER_destroy=no
export BEAKER_PUPPET_COLLECTION=puppet5
export PUPPET_INSTALL_TYPE=agent
export BEAKER_set=centos-7
bundle exec rake beaker
Reference
Table of Contents
Resource types
slurm_account
: Puppet type that manages a SLURM accountslurm_cluster
: Puppet type that manages a SLURM clusterslurm_config
: Abstract type to configure other SLURM typesslurm_license
: Puppet type that manages a SLURM software resourceslurm_qos
: Puppet type that manages a SLURM QOSslurm_reservation
: Puppet type that manages a SLURM Reservationslurm_user
: Puppet type that manages a SLURM userslurmctld_conn_validator
: Verify that a connection can be successfully established between a node and the slurmctld server. Its primary use is as a precondition to prslurmdbd_conn_validator
: Verify that a connection can be successfully established between a node and the slurmdbd server. Its primary use is as a precondition to pre
Resource types
slurm_account
Puppet type that manages a SLURM account
Examples
Add SLURM account
slurm_account { 'staff on cluster':
ensure => 'present',
max_jobs => 1000,
priority => 9999,
}
@example Add SLURM account
slurm_account { 'staff:cluster':
ensure => 'present',
max_jobs => 1000,
priority => 9999,
}
Properties
The following properties are available in the slurm_account
type.
default_qos
DefaultQOS
description
Description
ensure
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
fairshare
Fairshare number or "parent"
Default value: 1
grp_jobs
GrpJobs
Default value: absent
grp_jobs_accrue
GrpJobsAccrue
Default value: absent
grp_submit_jobs
GrpSubmitJobs
Default value: absent
grp_tres
GrpTRES
Default value: absent
grp_tres_mins
GrpTRESMins
Default value: absent
grp_tres_run_mins
GrpTRESRunMins
Default value: absent
grp_wall
GrpWall
Default value: absent
max_jobs
MaxJobs
Default value: absent
max_jobs_accrue
MaxJobsAccrue
Default value: absent
max_submit_jobs
MaxSubmitJobs
Default value: absent
max_tres_mins_per_job
MaxTresMinsPerJob
Default value: absent
max_tres_per_job
MaxTresPerJob
Default value: absent
max_tres_per_node
MaxTresPerJob
Default value: absent
max_wall_duration_per_job
MaxWallDurationPerJob
Default value: absent
organization
Organization
parent_name
Account parent name
priority
Priority
qos
QOS, undefined will inherit parent QOS
Parameters
The following parameters are available in the slurm_account
type.
account
Account name
cluster
Cluster name
name
namevar
Account name
provider
The specific backend to use for this slurm_account
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
slurm_cluster
Puppet type that manages a SLURM cluster
Examples
Add a SLURM cluster
slurm_cluster { 'test':
ensure => 'present',
}
Properties
The following properties are available in the slurm_cluster
type.
ensure
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
features
Features
Default value: absent
fed_state
Valid values: active
, inactive
, drain
, drain_remove
FedState
federation
Federation
Default value: absent
Parameters
The following parameters are available in the slurm_cluster
type.
flags
Flags
name
namevar
cluster name
provider
The specific backend to use for this slurm_cluster
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
slurm_config
Abstract type to configure other SLURM types
Parameters
The following parameters are available in the slurm_config
type.
install_prefix
The path to SLURM install prefix
name
namevar
The name of the resource
slurm_license
Puppet type that manages a SLURM software resource
Examples
Add SLURM software resource
slurm_license { 'matlab@host':
ensure => 'present',
count => 100,
}
slurm_license { 'matlab@host for linux':
ensure => 'present',
percent_allowed => 100,
}
Properties
The following properties are available in the slurm_license
type.
count
Count
description
Description
ensure
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
percent_allowed
PercentAllowed
server_type
ServerType
Default value: absent
Parameters
The following parameters are available in the slurm_license
type.
cluster
Cluster
name
namevar
Resource name
provider
The specific backend to use for this slurm_license
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
resource_name
Resource name
server
Server
type
Resource type, read-only
Default value: License
slurm_qos
Puppet type that manages a SLURM QOS
Examples
Add SLURM QOS
slurm_qos { 'high':
ensure => 'present',
flags => ['DenyOnLimit','RequiresReservation'],
grace_time => 300,
grp_tres => { 'node' => 40 },
max_tres_per_user => { 'node' => 20 },
max_wall => '2-00:00:00',
priority => 2000000,
}
Properties
The following properties are available in the slurm_qos
type.
description
Description
ensure
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
flags
Valid values: DenyOnLimit
, EnforceUsageThreshold
, NoReserve
, PartitionMaxNodes
, PartitionMinNodes
, OverPartQOS
, PartitionTimeLimit
, RequiresReservation
, NoDecay
, UsageFactorSafe
, absent
Flags
Default value: absent
grace_time
GraceTime
Default value: 0
grp_jobs
GrpJobs
Default value: absent
grp_jobs_accrue
GrpJobsAccrue
Default value: absent
grp_submit_jobs
GrpSubmitJobs
Default value: absent
grp_tres
GrpTRES
Default value: absent
grp_tres_mins
GrpTRESMins
Default value: absent
grp_tres_run_mins
GrpTRESRunMins
Default value: absent
grp_wall
GrpWall
Default value: absent
max_jobs_per_account
MaxJobsPerAccount
Default value: absent
max_jobs_per_user
MaxJobsPerUser
Default value: absent
max_submit_jobs_per_account
MaxSubmitJobsPerAccount
Default value: absent
max_submit_jobs_per_user
MaxSubmitJobsPerUser
Default value: absent
max_tres_mins
MaxTresMins
Default value: absent
max_tres_per_account
MaxTresPerAccount
Default value: absent
max_tres_per_job
MaxTresPerJob
Default value: absent
max_tres_per_node
MaxTresPerNode
Default value: absent
max_tres_per_user
MaxTresPerUser
Default value: absent
max_wall
MaxWall
Default value: absent
min_prio_threshold
MinPrioThreshold
Default value: absent
min_tres_per_job
MinTRESPerJob
Default value: absent
preempt
Preempt
Default value: absent
preempt_exempt_time
PreemptExemptTime
Default value: absent
preempt_mode
Valid values: cluster
, cancel
, checkpoint
, requeue
PreemptMode
Default value: cluster
priority
Priority
Default value: 0
usage_factor
UsageFactor
Default value: 1.000000
usage_threshold
UsageThreshold
Default value: absent
Parameters
The following parameters are available in the slurm_qos
type.
name
namevar
QOS name
provider
The specific backend to use for this slurm_qos
resource. You will seldom need to specify this --- Puppet will usually
discover the appropriate provider for your platform.
slurm_reservation
Puppet type that manages a SLURM Reservation
Examples
Add SLURM Reservation
slurm_reservation { 'maint':
ensure => 'present',
start_time => 'now',
duration => '02:00:00',
users => ['root'],
flags => ['maint','ignore_jobs'],
nodes => 'ALL',
}
Properties
The following properties are available in the slurm_reservation
type.
accounts
Accounts
burst_buffer
BurstBuffer
core_cnt
CoreCnt
duration
Duration
end_time
EndTime
ensure
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
flags
Flags
licenses
Licenses
node_cnt
NodeCnt
nodes
Nodes
partition_name
PartitionName
start_time
StartTime
tres
TRES
users
Users
Parameters
The following parameters are available in the slurm_reservation
type.
features
Features
name
namevar
Reservation name
provider
The specific backend to use for this slurm_reservation
resource. You will seldom need to specify this --- Puppet will
usually discover the appropriate provider for your platform.
timezone
TZ environment variable value
slurm_user
Puppet type that manages a SLURM user
Examples
Add SLURM user under account 'bar' on cluster 'test'
slurm_user { 'foo under bar on test':
ensure => 'present',
max_jobs => 1000,
priority => 9999,
}
Add SLURM user under account 'bar' on cluster 'test'
slurm_user { 'foo:bar:test':
ensure => 'present',
max_jobs => 1000,
priority => 9999,
}
Properties
The following properties are available in the slurm_user
type.
admin_level
Valid values: None
, Operator
, Administrator
AdminLevel
Default value: None
default_account
DefaultAccount
default_qos
DefaultQOS
ensure
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
fairshare
Fairshare number or "parent"
Default value: 1
grp_jobs
GrpJobs
Default value: absent
grp_jobs_accrue
GrpJobsAccrue
Default value: absent
grp_submit_jobs
GrpSubmitJobs
Default value: absent
grp_tres
GrpTRES
Default value: absent
grp_tres_mins
GrpTRESMins
Default value: absent
grp_tres_run_mins
GrpTRESRunMins
Default value: absent
grp_wall
GrpWall
Default value: absent
max_jobs
MaxJobs
Default value: absent
max_jobs_accrue
MaxJobsAccrue
Default value: absent
max_submit_jobs
MaxSubmitJobs
Default value: absent
max_tres_mins_per_job
MaxTresMinsPerJob
Default value: absent
max_tres_per_job
MaxTresPerJob
Default value: absent
max_tres_per_node
MaxTresPerJob
Default value: absent
max_wall_duration_per_job
MaxWallDurationPerJob
Default value: absent
priority
Priority
qos
QOS, undefined will inherit parent QOS
Parameters
The following parameters are available in the slurm_user
type.
account
Account name
cluster
Cluster name
name
namevar
User name
partition
Partition name
Default value: absent
provider
The specific backend to use for this slurm_user
resource. You will seldom need to specify this --- Puppet will usually
discover the appropriate provider for your platform.
user
User name
slurmctld_conn_validator
Verify that a connection can be successfully established between a node and the slurmctld server. Its primary use is as a precondition to prevent configuration changes from being applied if the slurmctld server cannot be reached.
Properties
The following properties are available in the slurmctld_conn_validator
type.
ensure
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
Parameters
The following parameters are available in the slurmctld_conn_validator
type.
name
namevar
An arbitrary name used as the identity of the resource.
provider
The specific backend to use for this slurmctld_conn_validator
resource. You will seldom need to specify this ---
Puppet will usually discover the appropriate provider for your platform.
timeout
The max number of seconds that the validator should wait before giving up and deciding that slurmctld is not running; defaults to 30 seconds.
Default value: 30
slurmdbd_conn_validator
Verify that a connection can be successfully established between a node and the slurmdbd server. Its primary use is as a precondition to prevent configuration changes from being applied if the slurmdbd server cannot be reached.
Properties
The following properties are available in the slurmdbd_conn_validator
type.
ensure
Valid values: present
, absent
The basic property that the resource should be in.
Default value: present
Parameters
The following parameters are available in the slurmdbd_conn_validator
type.
name
namevar
An arbitrary name used as the identity of the resource.
provider
The specific backend to use for this slurmdbd_conn_validator
resource. You will seldom need to specify this --- Puppet
will usually discover the appropriate provider for your platform.
timeout
The max number of seconds that the validator should wait before giving up and deciding that slurmdbd is not running; defaults to 30 seconds.
Default value: 30
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.
v0.14.1 (2024-03-25)
Fixed
v0.14.0 (2023-12-28)
Changed
Added
v0.13.0 (2022-10-06)
Added
v0.12.4 (2022-08-08)
Fixed
v0.12.3 (2021-10-05)
Fixed
v0.12.2 (2021-07-28)
Fixed
v0.12.1 (2021-07-21)
Fixed
v0.12.0 (2021-03-17)
Changed
v0.11.1 (2021-01-29)
Fixed
v0.11.0 (2021-01-12)
Added
Fixed
v0.10.0 (2021-01-04)
Added
v0.9.0 (2020-10-09)
Added
v0.8.0 (2020-09-16)
Added
Fixed
v0.7.3 (2020-09-15)
Fixed
v0.7.2 (2020-08-26)
Fixed
v0.7.1 (2020-07-29)
Fixed
v0.7.0 (2020-07-22)
Added
v0.6.1 (2020-07-13)
Fixed
v0.6.0 (2020-07-13)
Added
v0.5.0 (2020-06-23)
Added
v0.4.2 (2020-06-22)
Fixed
v0.4.1 (2020-06-22)
Fixed
v0.4.0 (2020-06-22)
Added
v0.3.0 (2020-06-22)
Added
v0.2.0 (2019-12-27)
Changed
Added
Fixed
v0.1.1 (2019-12-23)
Fixed
v0.1.0 (2019-12-23)
Changed
* This Changelog was automatically generated by github_changelog_generator
Copyright (C) 2014 Trey Dockendorf <treydock@tamu.edu> Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.