Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ This module is designed so that different hosts can run the various components o
* puppet-module-xdmod **6.x** supports Open XDMoD **9.0.x**
* puppet-module-xdmod **7.x** supports Open XDMoD **9.5.x**
* puppet-module-xdmod **8.x** and **9.x** supports Open XDMoD **10.0.x**
* puppet-module-xdmod **10.x** supports Open XDMoD **10.5.x**
* puppet-module-xdmod **10.x** and **11.x** supports Open XDMoD **10.5.x**
* puppet-module-xdmod **12.x** supports Open XDMoD **11.0.x**

### Optional Dependencies

Expand Down Expand Up @@ -72,7 +73,7 @@ include xdmod
Examples of some hiera values that may be useful to set globally

```yaml
xdmod::version: '10.5.0'
xdmod::version: '11.0.2'
# Disable roles that are enabled by default
xdmod::web: false
xdmod::database: false
Expand Down
56 changes: 39 additions & 17 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -223,20 +223,6 @@
}
}

# Hack until merged and released:
# https://github.com/ubccr/xdmod/pull/1827
file_line { 'etl_overseer-db-log':
ensure => 'present',
path => '/usr/share/xdmod/tools/etl/etl_overseer.php',
line => " 'db' => false,",
after => "\s+'emailSubject'.+",
append_on_no_match => false,
before => [
Exec['etl-bootstrap'],
Exec['etl-bootstrap-supremm'],
],
}

# List from /usr/share/xdmod/classes/OpenXdmod/Setup/DatabaseSetup.php
# Under 'ETLv2 database bootstrap start'
$etl_bootstrap_sections = [
Expand All @@ -253,14 +239,14 @@

exec { 'etl-bootstrap':
path => '/usr/bin:/bin:/usr/sbin:/sbin',
command => "/usr/share/xdmod/tools/etl/etl_overseer.php ${etl_bootstrap_args.join(' ')}",
command => "/usr/share/xdmod/tools/etl/etl_overseer.php --log-to-database no ${etl_bootstrap_args.join(' ')}",
logoutput => true,
refreshonly => true,
notify => Exec['acl-config'],
}
exec { 'etl-bootstrap-supremm':
path => '/usr/bin:/bin:/usr/sbin:/sbin',
command => '/usr/share/xdmod/tools/etl/etl_overseer.php -p supremm.bootstrap -p jobefficiency.bootstrap',
command => '/usr/share/xdmod/tools/etl/etl_overseer.php --log-to-database no -p supremm.bootstrap -p jobefficiency.bootstrap',
logoutput => true,
refreshonly => true,
notify => Exec['acl-config'],
Expand Down Expand Up @@ -298,6 +284,11 @@
Undef => 'HPC',
default => $r['resource_type'],
}
if $r['resource_allocation_type'] =~ Undef {
$resource_allocation_type = 'CPU'
} else {
$resource_allocation_type = $r['resource_allocation_type']
}
if $resource_type == 'HPC' {
$pi_column = $r['pi_column'] ? {
Undef => $xdmod::pi_column,
Expand All @@ -311,6 +302,7 @@
'name' => $r['name'],
'description' => $r['description'],
'resource_type' => $resource_type,
'resource_allocation_type' => $resource_allocation_type,
'pi_column' => $pi_column,
'timezone' => $r['timezone'],
'shared_jobs' => $r['shared_jobs'],
Expand All @@ -324,7 +316,37 @@
'ppn' => 1,
}
}
$resource_specs = $xdmod::resource_specs + $ondemand_resource_specs
$resource_specs = $xdmod::resource_specs.map |$r| {
if $r['gpu_node_count'] =~ Undef {
$gpu_node_count = 0
} else {
$gpu_node_count = $r['gpu_node_count']
}
if $r['gpu_processor_count'] =~ Undef {
$gpu_processor_count = 0
} else {
$gpu_processor_count = $r['gpu_processor_count']
}
if $r['gpu_ppn'] =~ Undef {
$gpu_ppn = 0
} else {
$gpu_ppn = $r['gpu_ppn']
}
$data = {
'resource' => $r['resource'],
'start_date' => $r['start_date'],
'end_date' => $r['end_date'],
'processors' => $r['processors'],
'nodes' => $r['nodes'],
'ppn' => $r['ppn'],
'cpu_node_count' => $r['cpu_node_count'],
'cpu_processor_count' => $r['cpu_processor_count'],
'cpu_ppn' => $r['cpu_ppn'],
'gpu_node_count' => $gpu_node_count,
'gpu_processor_count' => $gpu_processor_count,
'gpu_ppn' => $gpu_ppn,
}
} + $ondemand_resource_specs

file { '/etc/xdmod/resources.json':
ensure => 'file',
Expand Down
8 changes: 3 additions & 5 deletions manifests/database.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
user => $xdmod::database_user,
password => $xdmod::database_password,
host => $xdmod::web_host,
charset => 'latin1',
collate => 'latin1_swedish_ci',
charset => 'utf8',
collate => 'utf8_unicode_ci',
grant => ['ALL'],
}

Expand All @@ -20,9 +20,7 @@
mysql::db { 'modw': }
mysql::db { 'modw_aggregates': }
mysql::db { 'modw_filters': }
if $xdmod::enable_cloud_realm {
mysql::db { 'modw_cloud': }
}
mysql::db { 'modw_cloud': }
if $xdmod::enable_ondemand {
mysql::db { 'modw_ondemand': }
}
Expand Down
5 changes: 1 addition & 4 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,6 @@
# Enable XDMoD AppKernel support
# @param enable_supremm
# Enable XDMod SUPReMM support
# @param enable_cloud_realm
# Enable the XDMoD cloud realm by adding the necessary database
# @param enable_ondemand
# Enable the XDMOD OnDemand plugin and necessary database
# @param local_repo_name
Expand Down Expand Up @@ -276,7 +274,6 @@

Boolean $enable_appkernel = false,
Boolean $enable_supremm = false,
Boolean $enable_cloud_realm = false,
Boolean $enable_ondemand = false,
Optional[String] $local_repo_name = undef,
Boolean $manage_epel = true,
Expand All @@ -293,7 +290,7 @@
String $xdmod_supremm_package_name = $xdmod::params::xdmod_supremm_package_name,
Variant[Stdlib::HTTPSUrl, Stdlib::HTTPUrl]
$xdmod_supremm_package_url = $xdmod::params::xdmod_supremm_package_url,
String[1] $php_mongodb_version = '1.16.2',
String[1] $php_mongodb_version = '1.18.1',
String $database_host = '127.0.0.1',
Integer $database_port = 3306,
String $database_user = 'xdmod',
Expand Down
9 changes: 8 additions & 1 deletion manifests/install.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,19 @@
enable_only => true,
provider => 'dnfmodule',
}
package { 'php-module':
ensure => '7.4',
name => 'php',
enable_only => true,
provider => 'dnfmodule',
}

if $xdmod::local_repo_name {
Package['nodejs-module'] -> Package['xdmod']
Package['php-module'] -> Package['xdmod']
} else {
Package['nodejs-module'] -> Yum::Install[$xdmod::package_name]
Package['php-module'] -> Yum::Install[$xdmod::package_name]
}

$mongodb_dependencies = [
Expand All @@ -25,7 +33,6 @@
}
}
php::extension { 'mongodb':
# 1.17+ requires newer PHP than what's default for RHEL8
ensure => $xdmod::php_mongodb_version,
provider => 'pecl',
ini_prefix => '40-',
Expand Down
14 changes: 7 additions & 7 deletions manifests/params.pp
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# @summary XDMoD module defaults
# @api private
class xdmod::params {
$version = '10.5.0'
$xdmod_appkernels_version = '10.5.0'
$xdmod_supremm_version = '10.5.0'
$xdmod_ondemand_version = '10.5.0'
$version = '11.0.2'
$xdmod_appkernels_version = '11.0.0'
$xdmod_supremm_version = '11.0.1'
$xdmod_ondemand_version = '11.0.1'
$sender_email = "xdmod@xdmod.${facts['networking']['domain']}"
$apache_vhost_name = "xdmod.${facts['networking']['domain']}"
$portal_settings = {}
Expand All @@ -30,13 +30,13 @@
$compute_only = false
}
$package_name = 'xdmod'
$package_url = "https://github.com/ubccr/xdmod/releases/download/vVERSION-1.0/xdmod-VERSION-1.0.el${facts['os']['release']['major']}.noarch.rpm"
$package_url = "https://github.com/ubccr/xdmod/releases/download/vVERSION-3/xdmod-VERSION-3.el${facts['os']['release']['major']}.noarch.rpm"
$appkernels_package_name = 'xdmod-appkernels'
$appkernels_package_url = "https://github.com/ubccr/xdmod-appkernels/releases/download/vVERSION-1.0/xdmod-appkernels-VERSION-1.0.el${facts['os']['release']['major']}.noarch.rpm"
$xdmod_supremm_package_name = 'xdmod-supremm'
$xdmod_supremm_package_url = "https://github.com/ubccr/xdmod-supremm/releases/download/vVERSION-1.0/xdmod-supremm-VERSION-1.0.el${facts['os']['release']['major']}.noarch.rpm"
$xdmod_supremm_package_url = "https://github.com/ubccr/xdmod-supremm/releases/download/vVERSION-1/xdmod-supremm-VERSION-1.el${facts['os']['release']['major']}.noarch.rpm"
$supremm_package_url = "https://github.com/ubccr/supremm/releases/download/SUPREMM_VERSION/supremm-SUPREMM_VERSION-1.el${facts['os']['release']['major']}.x86_64.rpm"
$ondemand_package_url = "https://github.com/ubccr/xdmod-ondemand/releases/download/vVERSION-1.0/xdmod-ondemand-VERSION-1.0.el${facts['os']['release']['major']}.noarch.rpm"
$ondemand_package_url = "https://github.com/ubccr/xdmod-ondemand/releases/download/vVERSION-1/xdmod-ondemand-VERSION-1.el${facts['os']['release']['major']}.noarch.rpm"
}

default: {
Expand Down
16 changes: 8 additions & 8 deletions metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"dependencies": [
{
"name": "puppetlabs/stdlib",
"version_requirement": ">= 9.0.0 <10.0.0"
"version_requirement": ">= 9.1.0 <10.0.0"
},
{
"name": "puppetlabs/inifile",
Expand All @@ -22,35 +22,35 @@
},
{
"name": "puppet/mongodb",
"version_requirement": ">= 1.0.0 <7.0.0"
"version_requirement": ">= 1.0.0 <8.0.0"
},
{
"name": "puppet/epel",
"version_requirement": ">= 3.0.0 <6.0.0"
"version_requirement": ">= 3.0.0 <7.0.0"
},
{
"name": "puppet/logrotate",
"version_requirement": ">= 1.0.0 <8.0.0"
"version_requirement": ">= 1.0.0 <10.0.0"
},
{
"name": "puppet/yum",
"version_requirement": ">= 1.0.0 <8.0.0"
},
{
"name": "puppet/archive",
"version_requirement": ">= 4.0.0 <8.0.0"
"version_requirement": ">= 4.0.0 <9.0.0"
},
{
"name": "puppetlabs/apache",
"version_requirement": ">= 1.8.0 <13.0.0"
"version_requirement": ">= 1.8.0 <14.0.0"
},
{
"name": "puppet/augeasproviders_shellvar",
"version_requirement": ">= 5.0.0 <7.0.0"
},
{
"name": "saz/sudo",
"version_requirement": ">= 3.0.0 <9.0.0"
"version_requirement": ">= 3.0.0 <10.0.0"
},
{
"name": "treydock/pcp",
Expand All @@ -62,7 +62,7 @@
},
{
"name": "puppet/php",
"version_requirement": ">= 8.0.0 <11.0.0"
"version_requirement": ">= 8.0.0 <13.0.0"
}
],
"operatingsystem_support": [
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/xdmod_ondemand_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
on_supported_os(supported_os: [
{
'operatingsystem' => 'RedHat',
'operatingsystemrelease' => ['7', '8'],
'operatingsystemrelease' => ['8'],
},
]).each do |os, facts|
context "when #{os}" do
Expand Down
2 changes: 1 addition & 1 deletion spec/classes/xdmod_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
on_supported_os(supported_os: [
{
'operatingsystem' => 'RedHat',
'operatingsystemrelease' => ['7', '8'],
'operatingsystemrelease' => ['8'],
},
]).each do |os, facts|
context "when #{os}" do
Expand Down
Loading
Loading