|
38 | 38 | # Boolean that determines if apache is declared or included |
39 | 39 | # @param apache_user |
40 | 40 | # Name of the Apache user |
41 | | -# @param apache_scls |
42 | | -# SCLs to load when starting Apache service |
43 | 41 | # @param generator_insecure |
44 | 42 | # Run ood-portal-generator with --insecure flag |
45 | 43 | # This is needed if you wish to use default ood@localhost user or |
|
58 | 56 | # ood_portal.yml logroot |
59 | 57 | # @param use_rewrites |
60 | 58 | # ood_portal.yml use_rewrites |
| 59 | +# @param http_redirect_host |
| 60 | +# ood_portal.yml http_redirect_host |
61 | 61 | # @param use_maintenance |
62 | 62 | # ood_portal.yml use_maintenance |
63 | 63 | # @param maintenance_ip_allowlist |
|
169 | 169 | # nginx_stage.yml pun_custom_env |
170 | 170 | # @param nginx_stage_app_root |
171 | 171 | # nginx_stage.yml app_root |
172 | | -# @param nginx_stage_scl_env |
173 | | -# nginx_stage.yml scl_env |
174 | 172 | # @param nginx_stage_app_request_regex |
175 | 173 | # nginx_stage.yml app_request_regex |
176 | 174 | # @param nginx_stage_min_uid |
|
248 | 246 | # |
249 | 247 | class openondemand ( |
250 | 248 | # repos |
251 | | - String $repo_release = '3.1', |
| 249 | + String $repo_release = '4.0', |
252 | 250 | Variant[Stdlib::HTTPSUrl, Stdlib::HTTPUrl] |
253 | 251 | $repo_baseurl_prefix = 'https://yum.osc.edu/ondemand', |
254 | 252 | Variant[Stdlib::HTTPSUrl, Stdlib::HTTPUrl, Stdlib::Absolutepath] |
|
273 | 271 | # Apache |
274 | 272 | Boolean $declare_apache = true, |
275 | 273 | String[1] $apache_user = 'apache', |
276 | | - String $apache_scls = 'httpd24', |
277 | 274 |
|
278 | 275 | # ood_portal.yml |
279 | 276 | Boolean $generator_insecure = false, |
|
284 | 281 | Boolean $disable_logs = false, |
285 | 282 | String $logroot = 'logs', |
286 | 283 | Boolean $use_rewrites = true, |
| 284 | + String $http_redirect_host = '%{HTTP_HOST}', |
287 | 285 | Boolean $use_maintenance = true, |
288 | 286 | Array $maintenance_ip_allowlist = [], |
289 | 287 | Optional[String] $maintenance_source = undef, |
|
347 | 345 | Optional[String] $nginx_stage_ondemand_title = undef, |
348 | 346 | Hash $nginx_stage_pun_custom_env = {}, |
349 | 347 | Openondemand::Nginx_stage_namespace_config $nginx_stage_app_root = {}, |
350 | | - String $nginx_stage_scl_env = 'ondemand', |
351 | 348 | Optional[Openondemand::Nginx_stage_namespace_config] $nginx_stage_app_request_regex = undef, |
352 | 349 | Integer $nginx_stage_min_uid = 1000, |
353 | 350 | Integer $nginx_stage_passenger_pool_idle_time = 300, |
|
402 | 399 | $osname = $facts.dig('os', 'name') |
403 | 400 | $osmajor = $facts.dig('os', 'release', 'major') |
404 | 401 |
|
405 | | - $supported = ['RedHat-7','RedHat-8','RedHat-9','RedHat-2023','Debian-20.04','Debian-22.04','Debian-24.04','Debian-12'] |
| 402 | + $supported = ['RedHat-8','RedHat-9','RedHat-2023','Debian-20.04','Debian-22.04','Debian-24.04','Debian-12'] |
406 | 403 | $os = "${osfamily}-${osmajor}" |
407 | 404 | if ! ($os in $supported) { |
408 | 405 | fail("Unsupported OS: module ${module_name}. osfamily=${osfamily} osmajor=${osmajor} detected") |
409 | 406 | } |
410 | 407 |
|
411 | | - # Handle unsupported distro and OnDemand combos |
412 | 408 | if $repo_release == '3.1' { |
413 | | - if "${osfamily}-${osmajor}" == 'RedHat-7' { |
414 | | - fail('EL7 is not supported with OnDemand 3.1') |
| 409 | + # Debian 12 and Ubuntu 24.04 in OnDemand 3.1 use OS NodeJS |
| 410 | + if (String($openondemand::osmajor) in ['12', '24.04']) { |
| 411 | + $nodejs = undef |
| 412 | + } else { |
| 413 | + $nodejs = '18' |
415 | 414 | } |
416 | | - } |
417 | | - if $repo_release == '3.0' { |
418 | | - if "${osname}-${osmajor}" == 'Amazon-2023' { |
419 | | - fail('Amazon 2023 is not supported with OnDemand 3.0') |
420 | | - } |
421 | | - if "${osname}-${osmajor}" == 'Debian-12' { |
422 | | - fail('Debian 12 is not supported with OnDemand 3.0') |
423 | | - } |
424 | | - if "${osname}-${osmajor}" == 'Ubuntu-24.04' { |
425 | | - fail('Ubuntu 24.04 is not supported with OnDemand 3.0') |
426 | | - } |
427 | | - } |
428 | | - |
429 | | - if versioncmp($osmajor, '7') <= 0 { |
430 | | - $scl_apache = true |
431 | | - } else { |
432 | | - $scl_apache = false |
433 | | - } |
434 | | - |
435 | | - # EL9 only has these two versions at this time |
436 | | - if $repo_release == '3.0' and "${osfamily}-${osmajor}" == 'RedHat-9' { |
437 | | - $nodejs = 'absent' |
438 | | - $ruby = 'absent' |
439 | | - } elsif $repo_release == '3.0' { |
440 | | - $nodejs = '14' |
441 | | - $ruby = '3.0' |
442 | | - } else { |
443 | | - $nodejs = '18' |
444 | 415 | $ruby = '3.1' |
| 416 | + } else { |
| 417 | + $nodejs = '20' |
| 418 | + $ruby = '3.3' |
445 | 419 | } |
446 | 420 |
|
447 | 421 | if $selinux { |
|
539 | 513 | 'disable_logs' => $disable_logs, |
540 | 514 | 'logroot' => $logroot, |
541 | 515 | 'use_rewrites' => $use_rewrites, |
| 516 | + 'http_redirect_host' => $http_redirect_host, |
542 | 517 | 'use_maintenance' => $use_maintenance, |
543 | 518 | 'maintenance_ip_allowlist' => $maintenance_ip_allowlist, |
544 | 519 | 'security_csp_frame_ancestors' => $security_csp_frame_ancestors, |
|
0 commit comments