Skip to content
Open
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
11 changes: 8 additions & 3 deletions manifests/database.pp
Original file line number Diff line number Diff line change
@@ -1,13 +1,18 @@
# @summary Manage XDMoD databases
# @api private
class xdmod::database {
include mysql::server
class xdmod::database inherits xdmod::params {
if $xdmod::params::db_host.match(/'localhost'|'127.0.0.1'/) {
include mysql::server
} else {

Check warning on line 6 in manifests/database.pp

View workflow job for this annotation

GitHub Actions / Puppet 8 (Ruby 3.2.2)

indent should be 2 chars and is 4 (check: strict_indent)

Check warning on line 6 in manifests/database.pp

View workflow job for this annotation

GitHub Actions / Puppet 7 (Ruby 2.7.7)

indent should be 2 chars and is 4 (check: strict_indent)
include mysql::client
}


Check failure on line 10 in manifests/database.pp

View workflow job for this annotation

GitHub Actions / Puppet 8 (Ruby 3.2.2)

there should be no two consecutive empty lines (check: manifest_whitespace_two_empty_lines)

Check failure on line 10 in manifests/database.pp

View workflow job for this annotation

GitHub Actions / Puppet 7 (Ruby 2.7.7)

there should be no two consecutive empty lines (check: manifest_whitespace_two_empty_lines)
Mysql::Db {
ensure => 'present',
user => $xdmod::database_user,
password => $xdmod::database_password,
host => $xdmod::web_host,
host => $xdmod::db_grant_host,
charset => 'latin1',
collate => 'latin1_swedish_ci',
grant => ['ALL'],
Expand Down
23 changes: 14 additions & 9 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@
# AKRR database password
# @param web_host
# FQDN of web host
# @param db_host
# FQDN of db host
# @param db_grant_host
# host part when assigning db grants
# @param akrr_host
# FQDN of AKRR host
# @param scheduler
Expand Down Expand Up @@ -291,16 +295,17 @@
Variant[Stdlib::HTTPSUrl, Stdlib::HTTPUrl]
$appkernels_package_url = $xdmod::params::appkernels_package_url,
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,
Variant[Stdlib::HTTPSUrl, Stdlib::HTTPUrl] $xdmod_supremm_package_url = $xdmod::params::xdmod_supremm_package_url,
String[1] $php_mongodb_version = '1.16.2',
String $database_host = '127.0.0.1',
Integer $database_port = 3306,
String $database_user = 'xdmod',
String $database_password = 'changeme',
String $akrr_database_user = 'akrr',
String $akrr_database_password = 'changeme',
String $web_host = 'localhost',
String $database_host = '127.0.0.1',
Integer $database_port = 3306,
String $database_user = 'xdmod',
String $database_password = 'changeme',
String $akrr_database_user = 'akrr',
String $akrr_database_password = 'changeme',
String $web_host = 'localhost',
String $db_host = $xdmod::params::db_host,
String $db_grant_host = '%',
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For backwards compatibility, recommend default to $xdmod::params::db_host. I use this code where my MySQL server is on a different host from XDMOD.

Suggested change
String $db_grant_host = '%',
String $db_grant_host = $xdmod::params::db_host,

String $akrr_host = 'localhost',
Enum['slurm','torque','pbs','sge'] $scheduler = 'slurm',
Optional[Variant[String, Array]]
Expand Down
3 changes: 2 additions & 1 deletion manifests/params.pp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
$sender_email = "xdmod@xdmod.${facts['networking']['domain']}"
$apache_vhost_name = "xdmod.${facts['networking']['domain']}"
$portal_settings = {}
$hierarchy_levels = {
$db_host = 'localhost'
$hierarchy_levels = {
'top' => { 'label' => 'Hierarchy Top Level', 'info' => '' },
'middle' => { 'label' => 'Hierarchy Middle Level', 'info' => '' },
'bottom' => { 'label' => 'Hierarchy Bottom Level', 'info' => '' },
Expand Down
Loading