Puppet Class: xdmod

Inherits:
xdmod::params
Defined in:
manifests/init.pp

Summary

Manage XDMoD

Overview

Parameters:

  • version (String) (defaults to: $xdmod::params::version)

    Version of XDMoD to install

  • xdmod_appkernels_version (String) (defaults to: $xdmod::params::xdmod_appkernels_version)

    Version of XDMoD AppKernels to install

  • xdmod_supremm_version (String) (defaults to: $xdmod::params::xdmod_supremm_version)

    Version of XDMoD SUPReMM to install

  • database (Boolean) (defaults to: true)

    Sets database role

  • web (Boolean) (defaults to: true)

    Sets web role

  • akrr (Boolean) (defaults to: false)

    Sets akrr role

  • supremm (Boolean) (defaults to: false)

    Sets supremm role

  • supremm_database (Boolean) (defaults to: false)

    Sets supremm database role

  • compute (Boolean) (defaults to: false)

    Sets compute role

  • enable_appkernel (Boolean) (defaults to: false)

    Enable XDMoD AppKernel support

  • enable_supremm (Boolean) (defaults to: false)

    Enable XDMod SUPReMM support

  • enable_cloud_realm (Boolean) (defaults to: false)

    Enable the XDMoD cloud realm by adding the necessary database

  • enable_ondemand (Boolean) (defaults to: false)

    Enable the XDMOD OnDemand plugin and necessary database

  • local_repo_name (Optional[String]) (defaults to: undef)

    Name of yum repo hosting RPMs

  • manage_epel (Boolean) (defaults to: true)

    Boolean that sets if EPEL should be managed

  • manage_php (Boolean) (defaults to: true)

    Boolean that sets if PHP should be managed

  • package_ensure (String) (defaults to: 'present')

    XDMoD package ensure property

  • xdmod_supremm_package_ensure (String) (defaults to: 'present')

    XDMoD supremm package ensure property

  • xdmod_appkernels_package_ensure (String) (defaults to: 'present')

    XDMoD appkernels package ensure property

  • package_name (String) (defaults to: $xdmod::params::package_name)

    XDMoD package name

  • package_url (Variant[Stdlib::HTTPSUrl, Stdlib::HTTPUrl]) (defaults to: $xdmod::params::package_url)

    XDMoD package RPM URL, not used if local_repo_name is defined

  • appkernels_package_name (String) (defaults to: $xdmod::params::appkernels_package_name)

    XDMoD appkernels package name

  • appkernels_package_url (Variant[Stdlib::HTTPSUrl, Stdlib::HTTPUrl]) (defaults to: $xdmod::params::appkernels_package_url)

    XDMoD appkernels package RPM URL, not used if local_repo_name is defined

  • xdmod_supremm_package_name (String) (defaults to: $xdmod::params::xdmod_supremm_package_name)

    XDMoD supremm package name

  • xdmod_supremm_package_url (Variant[Stdlib::HTTPSUrl, Stdlib::HTTPUrl]) (defaults to: $xdmod::params::xdmod_supremm_package_url)

    XDMoD supremm package RPM URL, not used if local_repo_name is defined

  • database_host (String) (defaults to: 'localhost')

    XDMoD database host

  • database_port (Integer) (defaults to: 3306)

    XDMoD database port

  • database_user (String) (defaults to: 'xdmod')

    XDMoD database user

  • database_password (String) (defaults to: 'changeme')

    XDMoD database password

  • akrr_database_user (String) (defaults to: 'akrr')

    AKRR database user

  • akrr_database_password (String) (defaults to: 'changeme')

    AKRR database password

  • web_host (String) (defaults to: 'localhost')

    FQDN of web host

  • akrr_host (String) (defaults to: 'localhost')

    FQDN of AKRR host

  • scheduler (Enum['slurm','torque','pbs','sge']) (defaults to: 'slurm')

    Scheduler to shred, used to define default shred commands and PI column

  • shredder_command (Optional[Variant[String, Array]]) (defaults to: undef)

    Shred command(s)

  • shred_hour_start (Integer[0,23]) (defaults to: 1)

    The numeric hour to start shredding

  • shred_minutes (Integer) (defaults to: 5)

    Time in minutes between shred operations if multiple shred commands

  • ingest_hour (Optional[Integer[0,23]]) (defaults to: undef)

    The numeric hour to start ingest

  • enable_update_check (Boolean) (defaults to: true)

    Enable XDMoD update check

  • manage_apache_vhost (Boolean) (defaults to: true)

    Manage the XMDoD Apache Virtual Host

  • apache_vhost_name (String) (defaults to: $xdmod::params::apache_vhost_name)

    The Apache Virtual Host name

  • apache_ssl_cert (Stdlib::Unixpath) (defaults to: '/etc/pki/tls/certs/localhost.crt')

    Path to SSL cert used by Apache

  • apache_ssl_key (Stdlib::Unixpath) (defaults to: '/etc/pki/tls/private/localhost.key')

    Path to SSL private key used by Apache

  • apache_ssl_chain (Optional[Stdlib::Unixpath]) (defaults to: undef)

    Path to SSL chain used by Apache

  • portal_settings (Hash) (defaults to: $xdmod::params::portal_settings)

    Hash of portal_settings.ini settings to pass to xdmod_portal_setting resources

  • hierarchy_levels (Xdmod::Hierarchy_Levels) (defaults to: $xdmod::params::hierarchy_levels)

    Hierarchy levels used when defining hierarchies

  • hierarchies (Array) (defaults to: $xdmod::params::hierarchies)

    Hierarchy lines, see XDMoD docs

  • group_to_hierarchy (Hash) (defaults to: $xdmod::params::group_to_hierarchy)

    Group to Hierarchy mappings, see XDMoD docs

  • user_pi_names (Array) (defaults to: $xdmod::params::user_pi_names)

    User and PI names, see XDMoD docs

  • organization_name (Optional[String]) (defaults to: undef)

    Organization name for XDMoD instance

  • organization_abbrev (Optional[String]) (defaults to: undef)

    Organization abbreviation for XDMoD instance

  • resources (Array[Xdmod::Resource]) (defaults to: [])

    Resources to define resources.json

  • resource_specs (Array[Xdmod::Resource_Spec]) (defaults to: [])

    Resource specs for resource_specs.json

  • sender_email (String) (defaults to: $xdmod::params::sender_email)

    Configure sender for EMail

  • debug_recipient (String) (defaults to: '')

    Configure email addres to receive debug information

  • php_timezone (Optional[String]) (defaults to: undef)

    PHP Timezone

  • center_logo_source (Optional[String]) (defaults to: undef)

    Source to image that will be used as center logo in XDMoD

  • center_logo_width (Optional[Integer]) (defaults to: undef)

    The width of file from center_logo_source

  • user_dashboard (Enum['on','off']) (defaults to: 'off')

    The value for user_dashboard in portal_settings.ini

  • cors_domains (Array) (defaults to: [])

    The value for domains in cors section of portal_settings.ini

  • manage_user (Boolean) (defaults to: true)

    Boolean that sets if managing XMDoD user

  • user_uid (Optional[Integer]) (defaults to: undef)

    XMDoD user UID

  • group_gid (Optional[Integer]) (defaults to: undef)

    XDMoD user group GID

  • data_warehouse_export_directory (Stdlib::Absolutepath) (defaults to: '/var/spool/xdmod/export')

    Path used for data warehouse export

  • data_warehouse_export_retention_duration_days (Integer) (defaults to: 30)

    portal_settings.ini section=data_warehouse_export setting=retention_duration_days

  • data_warehouse_export_hash_salt (String) (defaults to: sha256($facts['networking']['fqdn']))

    portal_settings.ini section=data_warehouse_export setting=hash_salt

  • batch_export_cron_times (Array[Integer, 2 ,2]) (defaults to: [0,4])

    cron times to run batch export

  • manage_simplesamlphp (Boolean) (defaults to: false)

    Boolean that sets if managing simplesamlphp

  • simplesamlphp_config_content (Optional[String]) (defaults to: undef)

    The content for simplesamlphp config

  • simplesamlphp_config_source (Optional[String]) (defaults to: undef)

    The source for simplesamlphp config

  • simplesamlphp_authsources_content (Optional[String]) (defaults to: undef)

    The content for simplesaml php authsources

  • simplesamlphp_authsources_source (Optional[String]) (defaults to: undef)

    The source for simplesaml php authsources

  • simplesamlphp_metadata_content (Optional[String]) (defaults to: undef)

    The simplesamlphp metadata content

  • simplesamlphp_metadata_source (Optional[String]) (defaults to: undef)

    The simplesamlphp metadata source

  • simplesamlphp_cert_country (String) (defaults to: 'US')

    The simplesamlphp cert country

  • simplesamlphp_cert_organization (Optional[String]) (defaults to: undef)

    The simplesamlphp cert organization

  • simplesamlphp_cert_commonname (Optional[String]) (defaults to: undef)

    The simplesamlphp cert commonname

  • akrr_source_url (Variant[Stdlib::HTTPSUrl, Stdlib::HTTPUrl]) (defaults to: $xdmod::params::akrr_source_url)

    The AKRR source URL

  • akrr_version (String) (defaults to: $xdmod::params::akrr_version)

    The AKRR version. This version is used to build default akrr_source_url.

  • akrr_home (Optional[Stdlib::Unixpath]) (defaults to: undef)

    AKRR home path

  • manage_akrr_user (Boolean) (defaults to: true)

    Boolean to manage AKRR user

  • akrr_user (String) (defaults to: 'akrr')

    AKRR username

  • akrr_user_group (String) (defaults to: 'akrr')

    AKRR user group name

  • akrr_user_group_gid (Optional[Integer]) (defaults to: undef)

    AKRR user gropu GID

  • akrr_user_uid (Optional[Integer]) (defaults to: undef)

    AKRR user UID

  • akrr_user_shell (Stdlib::Unixpath) (defaults to: '/bin/bash')

    AKRR user shell

  • akrr_user_home (Optional[Stdlib::Unixpath]) (defaults to: undef)

    AKRR user home

  • akrr_user_managehome (Boolean) (defaults to: true)

    AKRR user managehome property

  • akrr_user_comment (String) (defaults to: 'AKRR')

    AKRR user comment

  • akrr_user_system (Boolean) (defaults to: true)

    AKRR user system property

  • akrr_restapi_port (Integer) (defaults to: 8091)

    AKRR restapi port

  • akrr_restapi_rw_password (String) (defaults to: $xdmod::params::akrr_restapi_rw_password)

    AKRR restapi RW password

  • akrr_restapi_ro_password (String) (defaults to: $xdmod::params::akrr_restapi_ro_password)

    AKRR restapi RO password

  • akrr_cron_mailto (Optional[String]) (defaults to: undef)

    AKRR cron MAILTO

  • akrr_ingestor_cron_times (Array[Integer, 2, 2]) (defaults to: [0,5])

    AKRR ingestor cron times

  • appkernel_reports_manager_cron_times (Array[Integer, 2, 2]) (defaults to: [0,6])

    AppKernel report manager cron times

  • supremm_version (String) (defaults to: $xdmod::params::supremm_version)

    Version of SUPReMM to install, builds supremm_package_url if not defined

  • supremm_package_ensure (String) (defaults to: 'present')

    SUPReMM package ensure property

  • supremm_package_url (Variant[Stdlib::HTTPSUrl, Stdlib::HTTPUrl]) (defaults to: $xdmod::params::supremm_package_url)

    The URL to download SUPReMM RPM from

  • supremm_package_name (String) (defaults to: 'supremm')

    SUPReMM RPM package name

  • supremm_mongodb_password (String) (defaults to: 'changeme')

    SUPReMM mongodb password

  • supremm_mongodb_host (String) (defaults to: 'localhost')

    SUPReMM mongodb host

  • supremm_mongodb_uri (Optional[String]) (defaults to: undef)

    SUPReMM mongodb URI

  • supremm_mongodb_replica_set (Optional[String]) (defaults to: undef)

    SUPReMM mongodb replica set

  • supremm_resources (Array[Xdmod::Supremm_Resource]) (defaults to: [])

    SUPReMM resources

  • supremm_update_cron_times (Array[Integer, 2, 2]) (defaults to: [0,2])

    The cron times to run supremm_update

  • ingest_jobscripts_cron_times (Array[Integer, 2, 2]) (defaults to: [0,3])

    The cron times to ingest job scripts

  • aggregate_supremm_cron_times (Array[Integer, 2, 2]) (defaults to: [0,4])

    The cron times to run supremm aggregation

  • supremm_archive_out_dir (Stdlib::Absolutepath) (defaults to: '/dev/shm/supremm_test')

    The path to supremm archive out

  • supremm_prometheus_url (Optional[Variant[Stdlib::HTTPSUrl, Stdlib::HTTPUrl]]) (defaults to: undef)

    Prometheus URL to use with SUPREMM summarization

  • supremm_prometheus_step (Optional[String[1]]) (defaults to: undef)

    Prometheus step value for SUPREMM summarization

  • supremm_prometheus_rates (Optional[Hash]) (defaults to: undef)

    Prometheus rate overrides for SUPREMM summarization

  • use_pcp (Boolean) (defaults to: true)

    Boolean that PCP should be used for SUPREMM

  • pcp_declare_method (Enum['include', 'resource']) (defaults to: 'resource')

    Should pcp class be included or declared like a resource

  • pcp_resource (Optional[String]) (defaults to: undef)

    PCP resource name

  • pcp_pmlogger_path_suffix (Optional[String]) (defaults to: undef)

    PCP pmlogger path suffix

  • pcp_pmlogger_config_template (String) (defaults to: 'xdmod/supremm/compute/pcp/pmlogger-supremm.config.erb')

    Template for pmlogger config

  • pcp_pmlogger_config_source (Optional[String]) (defaults to: undef)

    Source for pmlogger config

  • pcp_logging_static_freq (String) (defaults to: '1 hour')

    Frequency for PCP logging static metrics

  • pcp_logging_standard_freq (String) (defaults to: '30 sec')

    Frequency for PCP logging standard metrics

  • pcp_static_metrics (Array) (defaults to: $xdmod::params::supremm_pcp_static_metrics)

    PCP static metrics

  • pcp_standard_metrics (Array) (defaults to: $xdmod::params::supremm_pcp_standard_metrics)

    PCP standard metrics

  • pcp_environ_metrics (Array) (defaults to: $xdmod::params::supremm_pcp_environ_metrics)

    PCP environment metrics

  • pcp_merge_metrics (Boolean) (defaults to: true)

    Boolean that PCP metrics should be merged with defaults

  • pcp_hotproc_exclude_users (Array) (defaults to: $xdmod::params::supremm_pcp_hotproc_exclude_users)

    Users to exclude from PCP hotproc

  • storage_roles_source (String) (defaults to: 'puppet:///modules/xdmod/roles.d/storage.json')

    The source of storage roles.json

  • storage_cron_times (Array[Integer, 2, 2]) (defaults to: [0,5])

    The cron times for storage shred/ingest

  • manage_cron (Boolean) (defaults to: true)

    Manage XDMOD cron files

  • manage_supremm_cron (Boolean) (defaults to: true)

    Manage SUPREMM cron files

  • manage_akrr_cron (Boolean) (defaults to: true)

    Manage AKRR cron files

  • manage_appkernel_cron (Boolean) (defaults to: true)

    Manage App Kernel cron files

  • manage_storage_cron (Boolean) (defaults to: true)

    Manage Storage cron files



268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
# File 'manifests/init.pp', line 268

class xdmod (
  String $version                  = $xdmod::params::version,
  String $xdmod_appkernels_version = $xdmod::params::xdmod_appkernels_version,
  String $xdmod_supremm_version    = $xdmod::params::xdmod_supremm_version,

  # Roles
  Boolean $database                 = true,
  Boolean $web                      = true,
  Boolean $akrr                     = false,
  Boolean $supremm                  = false,
  Boolean $supremm_database         = false,
  Boolean $compute                  = false,

  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,
  Boolean $manage_php                           = true,
  String $package_ensure                        = 'present',
  String $xdmod_supremm_package_ensure          = 'present',
  String $xdmod_appkernels_package_ensure       = 'present',
  String $package_name                          = $xdmod::params::package_name,
  Variant[Stdlib::HTTPSUrl, Stdlib::HTTPUrl]
  $package_url                                = $xdmod::params::package_url,
  String $appkernels_package_name               = $xdmod::params::appkernels_package_name,
  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,
  String $database_host                   = 'localhost',
  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 $akrr_host                       = 'localhost',
  Enum['slurm','torque','pbs','sge'] $scheduler = 'slurm',
  Optional[Variant[String, Array]]
  $shredder_command                           = undef,
  Integer[0,23] $shred_hour_start               = 1,
  Integer $shred_minutes                        = 5,
  Optional[Integer[0,23]] $ingest_hour          = undef,
  Boolean $enable_update_check                  = true,
  Boolean $manage_apache_vhost                  = true,
  String $apache_vhost_name               = $xdmod::params::apache_vhost_name,
  Stdlib::Unixpath $apache_ssl_cert             = '/etc/pki/tls/certs/localhost.crt',
  Stdlib::Unixpath $apache_ssl_key              = '/etc/pki/tls/private/localhost.key',
  Optional[Stdlib::Unixpath] $apache_ssl_chain  = undef,
  Hash $portal_settings                         = $xdmod::params::portal_settings,
  Xdmod::Hierarchy_Levels $hierarchy_levels     = $xdmod::params::hierarchy_levels,
  Array $hierarchies                            = $xdmod::params::hierarchies,
  Hash $group_to_hierarchy                      = $xdmod::params::group_to_hierarchy,
  Array $user_pi_names                          = $xdmod::params::user_pi_names,
  Optional[String] $organization_name           = undef,
  Optional[String] $organization_abbrev         = undef,
  Array[Xdmod::Resource] $resources             = [],
  Array[Xdmod::Resource_Spec] $resource_specs   = [],
  String $sender_email                          = $xdmod::params::sender_email,
  String $debug_recipient                       = '', # lint:ignore:params_empty_string_assignment
  Optional[String] $php_timezone                = undef,
  Optional[String] $center_logo_source          = undef,
  Optional[Integer] $center_logo_width          = undef,
  Enum['on','off'] $user_dashboard              = 'off',
  Array $cors_domains                           = [],

  # XDMoD user/group
  Boolean $manage_user = true,
  Optional[Integer] $user_uid = undef,
  Optional[Integer] $group_gid = undef,

  # Batch export
  Stdlib::Absolutepath $data_warehouse_export_directory = '/var/spool/xdmod/export',
  Integer $data_warehouse_export_retention_duration_days = 30,
  String $data_warehouse_export_hash_salt = sha256($facts['networking']['fqdn']),
  Array[Integer, 2 ,2] $batch_export_cron_times = [0,4],

  # simplesamlphp
  Boolean $manage_simplesamlphp = false,
  Optional[String] $simplesamlphp_config_content = undef,
  Optional[String] $simplesamlphp_config_source = undef,
  Optional[String] $simplesamlphp_authsources_content = undef,
  Optional[String] $simplesamlphp_authsources_source = undef,
  Optional[String] $simplesamlphp_metadata_content = undef,
  Optional[String] $simplesamlphp_metadata_source = undef,
  String $simplesamlphp_cert_country = 'US',
  Optional[String] $simplesamlphp_cert_organization = undef,
  Optional[String] $simplesamlphp_cert_commonname = undef,

  # AKRR Install
  Variant[Stdlib::HTTPSUrl, Stdlib::HTTPUrl]
  $akrr_source_url                    = $xdmod::params::akrr_source_url,
  String $akrr_version                  = $xdmod::params::akrr_version,
  Optional[Stdlib::Unixpath] $akrr_home = undef,

  # AKRR User
  Boolean $manage_akrr_user                   = true,
  String $akrr_user                           = 'akrr',
  String $akrr_user_group                     = 'akrr',
  Optional[Integer] $akrr_user_group_gid      = undef,
  Optional[Integer] $akrr_user_uid            = undef,
  Stdlib::Unixpath $akrr_user_shell           = '/bin/bash',
  Optional[Stdlib::Unixpath] $akrr_user_home  = undef,
  Boolean $akrr_user_managehome               = true,
  String $akrr_user_comment                   = 'AKRR',
  Boolean $akrr_user_system                   = true,

  # AKRR config
  Integer $akrr_restapi_port     = 8091,
  String $akrr_restapi_rw_password    = $xdmod::params::akrr_restapi_rw_password,
  String $akrr_restapi_ro_password    = $xdmod::params::akrr_restapi_ro_password,
  Optional[String] $akrr_cron_mailto  = undef,
  Array[Integer, 2, 2] $akrr_ingestor_cron_times = [0,5],
  Array[Integer, 2, 2] $appkernel_reports_manager_cron_times = [0,6],

  # SUPReMM install
  String $supremm_version         = $xdmod::params::supremm_version,
  String $supremm_package_ensure  = 'present',
  Variant[Stdlib::HTTPSUrl, Stdlib::HTTPUrl]
  $supremm_package_url          = $xdmod::params::supremm_package_url,
  String $supremm_package_name    = 'supremm',

  # SUPReMM config
  String $supremm_mongodb_password              = 'changeme',
  String $supremm_mongodb_host            = 'localhost',
  Optional[String] $supremm_mongodb_uri         = undef,
  Optional[String] $supremm_mongodb_replica_set = undef,
  Array[Xdmod::Supremm_Resource] $supremm_resources = [],
  Array[Integer, 2, 2] $supremm_update_cron_times = [0,2],
  Array[Integer, 2, 2] $ingest_jobscripts_cron_times = [0,3],
  Array[Integer, 2, 2] $aggregate_supremm_cron_times = [0,4],
  Stdlib::Absolutepath $supremm_archive_out_dir = '/dev/shm/supremm_test',
  Optional[Variant[Stdlib::HTTPSUrl, Stdlib::HTTPUrl]] $supremm_prometheus_url = undef,
  Optional[String[1]] $supremm_prometheus_step = undef,
  Optional[Hash] $supremm_prometheus_rates = undef,

  # SUPReMM compute
  Boolean $use_pcp                                = true,
  Enum['include', 'resource'] $pcp_declare_method = 'resource',
  Optional[String] $pcp_resource                  = undef,
  Optional[String] $pcp_pmlogger_path_suffix      = undef,
  String $pcp_pmlogger_config_template            = 'xdmod/supremm/compute/pcp/pmlogger-supremm.config.erb',
  Optional[String] $pcp_pmlogger_config_source    = undef,
  String $pcp_logging_static_freq                 = '1 hour',
  String $pcp_logging_standard_freq               = '30 sec',
  Array $pcp_static_metrics                       = $xdmod::params::supremm_pcp_static_metrics,
  Array $pcp_standard_metrics                     = $xdmod::params::supremm_pcp_standard_metrics,
  Array $pcp_environ_metrics                      = $xdmod::params::supremm_pcp_environ_metrics,
  Boolean $pcp_merge_metrics                      = true,
  Array $pcp_hotproc_exclude_users                = $xdmod::params::supremm_pcp_hotproc_exclude_users,

  # Storage
  String $storage_roles_source = 'puppet:///modules/xdmod/roles.d/storage.json',
  Array[Integer, 2, 2] $storage_cron_times = [0,5],

  Boolean $manage_cron = true,
  Boolean $manage_supremm_cron = true,
  Boolean $manage_akrr_cron = true,
  Boolean $manage_appkernel_cron = true,
  Boolean $manage_storage_cron = true,
) inherits xdmod::params {
  case $scheduler {
    'slurm': {
      $scheduler_shredder_command = '/usr/bin/xdmod-slurm-helper --quiet -r RESOURCE'
      $pi_column = 'account_name'
    }
    'pbs': {
      $scheduler_shredder_command = '/usr/bin/xdmod-shredder --quiet -r RESOURCE -f pbs -d /var/spool/pbs/server_priv/accounting'
      $pi_column = 'account'
    }
    'torque': {
      $scheduler_shredder_command = '/usr/bin/xdmod-shredder --quiet -r RESOURCE -f pbs -d /var/spool/torque/server_priv/accounting'
      $pi_column = 'account'
    }
    'sge': {
      $scheduler_shredder_command = '/usr/bin/xdmod-shredder --quiet -r RESOURCE -f sge -i /var/lib/gridengine/default/common/accounting'
      $pi_column = undef
    }
    default: {
      fail("Module ${module_name}: Supported scheduler value is either slurm, pbs, torque or sge.")
    }
  }

  if $compute {
    if $use_pcp {
      if ! $pcp_resource {
        fail("Module ${module_name}: pcp_resource must be defined.")
      }
    }
  }

  $storage_resources = $resources.filter |$r| { $r['resource_type'] == 'Disk' }
  $ondemand_resources = $resources.filter |$r| { $r['resource_type'] == 'Gateway' }

  $shredder_command_default = $resources.map |$r| {
    regsubst($scheduler_shredder_command, 'RESOURCE', $r['resource'], 'G')
  }
  $shredder_command_real = pick($shredder_command, $shredder_command_default)

  $_package_url = regsubst($package_url, 'VERSION', $version, 'G')
  $_appkernels_package_url = regsubst($appkernels_package_url, 'VERSION', $xdmod_appkernels_version, 'G')
  $_xdmod_supremm_package_url = regsubst($xdmod_supremm_package_url, 'VERSION', $xdmod_supremm_version, 'G')

  $_akrr_source_url = regsubst($akrr_source_url, 'AKRR_VERSION', $akrr_version, 'G')

  $_akrr_user_home = pick($akrr_user_home, "/home/${akrr_user}")
  $_akrr_home = pick($akrr_home, "${_akrr_user_home}/akrr-${akrr_version}")

  $_supremm_package_url = regsubst($supremm_package_url, 'SUPREMM_VERSION', $supremm_version, 'G')
  $_supremm_mongodb_host = $supremm_mongodb_host ? {
    Array   => join($supremm_mongodb_host, ','),
    default => $supremm_mongodb_host,
  }
  if $supremm_mongodb_replica_set {
    $mongodb_uri_replica_set = "?replicaSet=${supremm_mongodb_replica_set}"
    $mongodb_args_replica_set = "${supremm_mongodb_replica_set}/"
  } else {
    $mongodb_uri_replica_set = ''
    $mongodb_args_replica_set = ''
  }
  $_supremm_mongodb_uri = pick($supremm_mongodb_uri, "mongodb://supremm:${supremm_mongodb_password}@${_supremm_mongodb_host}/supremm${mongodb_uri_replica_set}")
  $supremm_mongo_args = "-u supremm -p ${supremm_mongodb_password} --host ${mongodb_args_replica_set}${_supremm_mongodb_host} supremm"

  if $manage_epel {
    $epel = [Yumrepo['epel']]
    include epel
  } else {
    $epel = []
  }

  if $web and $manage_php {
    class { 'php':
      fpm      => false,
      composer => false,
      dev      => true,
    }
  }

  if $local_repo_name {
    $_package_require = [Yumrepo[$local_repo_name]] + $epel
  } else {
    $_package_require = $epel
  }

  $_mysql_remote_args = "-h ${database_host} -u ${database_user} -p${database_password}"

  if $xdmod::params::compute_only and ($web or $database or $akrr or $supremm or $supremm_database) {
    fail('This operating system is only supported for compute resources.')
  }

  if $database and $web {
    contain xdmod::user
    contain xdmod::install
    contain xdmod::database
    contain xdmod::config
    contain xdmod::config::simplesamlphp
    include xdmod::apache

    Class['xdmod::user']
    -> Class['xdmod::install']
    -> Class['xdmod::database']
    -> Class['xdmod::config']
    -> Class['xdmod::config::simplesamlphp']
    -> Class['xdmod::apache']
  } elsif $database {
    contain xdmod::database
  } elsif $web {
    contain xdmod::user
    contain xdmod::install
    contain xdmod::config
    contain xdmod::config::simplesamlphp
    contain xdmod::apache

    Class['xdmod::user']
    -> Class['xdmod::install']
    -> Class['xdmod::config']
    -> Class['xdmod::config::simplesamlphp']
    -> Class['xdmod::apache']
  }

  if $web and $enable_ondemand {
    contain xdmod::ondemand
    Class['xdmod::install']
    -> Class['xdmod::ondemand']
    Class['xdmod::ondemand']
    -> Class['xdmod::apache']
  }

  if $akrr {
    include mysql::bindings
    include mysql::bindings::python
    contain xdmod::akrr::user
    contain xdmod::akrr::install
    contain xdmod::akrr::config
    contain xdmod::akrr::service

    Class['mysql::bindings::python']
    -> Class['xdmod::akrr::user']
    -> Class['xdmod::akrr::install']
    -> Class['xdmod::akrr::config']
    -> Class['xdmod::akrr::service']

    if $database {
      Class['xdmod::database'] -> Class['xdmod::akrr::user']
    }
  }

  if $supremm_database {
    contain xdmod::supremm::database
  }

  if $supremm {
    if $web {
      $supremm_mysql_access = 'include'
      Class['xdmod::supremm::config'] -> Class['xdmod::config']
    } else {
      $supremm_mysql_access = 'defaultsfile'
    }

    include mysql::client
    include mongodb::client
    contain xdmod::supremm::install
    contain xdmod::supremm::config

    if $use_pcp {
      case $xdmod::pcp_declare_method {
        'include': {
          include pcp
        }
        'resource': {
          class { 'pcp':
            ensure => 'stopped',
          }
        }
        default: {
          # Do nothing
        }
      }
      Class['pcp']
      -> Class['xdmod::supremm::install']
    }

    if $manage_epel {
      Yumrepo['epel'] -> Package['mongodb_client']
    }

    Class['xdmod::supremm::install']
    -> Class['xdmod::supremm::config']

    if $database {
      Class['xdmod::database'] -> Class['xdmod::supremm::config']
    }

    if $supremm_database {
      Class['xdmod::supremm::database'] -> Class['xdmod::supremm::install']
    }
  }

  if $compute {
    if $use_pcp {
      contain xdmod::supremm::compute::pcp
    }
  }
}