Skip to content

Commit

Permalink
allow link dir within slurm::repo
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastien Varrette <Sebastien.Varrette@uni.lu>
  • Loading branch information
Sebastien Varrette authored and Sebastien Varrette committed Sep 6, 2017
1 parent c306da4 commit 4f17150
Show file tree
Hide file tree
Showing 4 changed files with 42 additions and 12 deletions.
9 changes: 8 additions & 1 deletion manifests/init.pp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# Time-stamp: <Mon 2017-09-04 21:24 svarrette>
# Time-stamp: <Wed 2017-09-06 18:35 svarrette>
#
# File:: <tt>init.pp</tt>
# Author:: UL HPC Team (hpc-sysadmins@uni.lu)
Expand Down Expand Up @@ -79,6 +79,12 @@
# @param configdir [String] Default: '/etc/slurm'
# @param clustername [String] Default: 'cluster'
# The name by which this Slurm managed cluster is known in the accounting database
#
# @param acct_gatherenergytype [String] Default: 'none'
# Identifies the plugin to be used for energy consumption accounting
# Elligible values in [ 'none', 'ipmi', 'rapl' ]
# @paraù acct_storageenforce [Array] Default: ['qos', 'limits', 'associations']
# What level of association-based enforcement to impose on job submissions.
# @param authtype [String] Default: 'munge'
# Elligible values in [ 'none', 'munge' ]
# @param authinfo [String] Default: ''
Expand Down Expand Up @@ -425,6 +431,7 @@
# Main configuration paramaters
#
Array $acct_storageenforce = $slurm::params::acct_storageenforce,
String $acct_gatherenergytype = $slurm::params::acct_gatherenergytype,
String $configdir = $slurm::params::configdir,
String $clustername = $slurm::params::clustername,
String $authtype = $slurm::params::authtype,
Expand Down
3 changes: 2 additions & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# Time-stamp: <Tue 2017-09-05 16:42 svarrette>
# Time-stamp: <Wed 2017-09-06 11:45 svarrette>
#
# File:: <tt>params.pp</tt>
# Author:: UL HPC Team (hpc-sysadmins@uni.lu)
Expand Down Expand Up @@ -132,6 +132,7 @@

# What level of association-based enforcement to impose on job submissions
$acct_storageenforce = ['qos', 'limits', 'associations']
$acct_gatherenergytype = 'none'
$batchstarttimeout = 10
$checkpointtype = 'none' # in ['blcr', 'none', 'ompi', 'poe']
$completewait = 0
Expand Down
39 changes: 29 additions & 10 deletions manifests/repo.pp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################################################################
# Time-stamp: <Tue 2017-09-05 17:29 svarrette>
# Time-stamp: <Wed 2017-09-06 18:44 svarrette>
#
# File:: <tt>repo.pp</tt>
# Author:: UL HPC Team (hpc-sysadmins@uni.lu)
Expand Down Expand Up @@ -50,22 +50,32 @@
# Typically a Git repository URL or a hash of remotename => URL mappings
# @param branch [String] Default: 'HEAD'
# The branch/revision to pull
# @param linkdir [String] Default: ''
# An Optional link to create pointing to the working copy of the repository (Ex: "/etc/slurm-${slurm::clustername}")
#
# @example Clone the SLURM control repository into '/usr/local/src/git/ULHPC/slurm'
#
# # Create the SSH key, using for instance the maestrodev/ssh_keygen module
# ssh_keygen { $slurm::username:
# comment => "${slurm::username}@${::fqdn}",
# home => $slurm::params::home,
# }
# # /!\ Render the host key known globally using sshkey { ... }
# # Now you can expect the clone to work
# class { 'slurm::repo':
# ensure => 'present',
# source => 'ssh://git@gitlab.uni.lu:8022/ULHPC/slurm.git',
# }
#
class slurm::repo(
String $ensure = $slurm::params::ensure,
String $provider = 'git',
String $basedir = $slurm::params::repo_basedir,
String $path = '',
$source = undef,
String $branch = 'HEAD',
String $syncscript = ''
String $ensure = $slurm::params::ensure,
String $provider = 'git',
String $basedir = $slurm::params::repo_basedir,
String $path = '',
$source = undef,
String $branch = 'HEAD',
String $syncscript = '',
String $linkdir = '',

)
inherits slurm::params
{
Expand Down Expand Up @@ -126,6 +136,15 @@
revision => $branch,
}


if !empty($linkdir) {
$link_ensure = $ensure ? {
'present' => 'link',
default => $ensure
}
file { $linkdir:
ensure => $link_ensure,
target => $real_path,
}
}

}
3 changes: 3 additions & 0 deletions templates/slurm.conf.erb
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,7 @@ AccountingStorageLoc=slurm
AccountingStorageType=accounting_storage/slurmdbd
#AccountingStorageUser=
AccountingStoreJobComment=YES
AcctGatherEnergyType=acct_gather_energy/<%= scope['slurm::acct_gatherenergytype']%>
JobAcctGatherFrequency=<%= scope['slurm::jobacctgatherfrequency'] %>
JobAcctGatherType=jobacct_gather/<%= scope['slurm::jobacctgathertype'] %>
<% unless scope['slurm::jobacctgatherparams'].empty? -%>
Expand All @@ -221,6 +222,8 @@ JobAcctGatherParams=<%= scope['slurm::jobacctgatherparams'] %>
Licenses=<%= scope['slurm::licenses'] %>
<% end -%>



#MaxJobCount=5000
#MaxStepCount=40000
MaxTasksPerNode=<%= scope['slurm::maxtaskspernode'] %>
Expand Down

0 comments on commit 4f17150

Please sign in to comment.