Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BDII config and some other bits #10

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
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
52 changes: 52 additions & 0 deletions manifests/bdii.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
class argus_server::bdii(
$site_name = $argus_server::site_name,
$bdii_config_dir = $argus_server::bdii_config_dir
) {

# ARGUS configuration files

file { '/var/lib/bdii/gip/provider/glite-info-glue2-provider-service-argus':
ensure => 'present',
owner => 'ldap',
group => 'ldap',
mode => '0655',
content => template("${module_name}/glite-info-glue2-provider-service-argus.erb"),
require => Package['glite-info-provider-service'],
notify => Service['bdii'],
}

service { 'bdii':
ensure => running,
enable => true,
hasstatus => true,
hasrestart => true,
require => Package['bdii'],
}


file {"${bdii_config_dir}/glite-info-glue2-argus-pap.conf":
ensure => 'link',
target => "${bdii_config_dir}/glite-info-glue2-argus-pap.conf.template",
require => Package['glite-info-provider-service'],
}

file {"${bdii_config_dir}/glite-info-glue2-argus-pdp.conf":
ensure => 'link',
target => "${bdii_config_dir}/glite-info-glue2-argus-pdp.conf.template",
require => Package['glite-info-provider-service'],
}

file {"${bdii_config_dir}/glite-info-glue2-argus-pep.conf":
ensure => 'link',
target => "${bdii_config_dir}/glite-info-glue2-argus-pep.conf.template",
require => Package['glite-info-provider-service'],
}

file {"${bdii_config_dir}/glite-info-glue2-service-argus.conf":
ensure => 'link',
target => "${bdii_config_dir}/glite-info-glue2-service-argus.conf.template",
require => Package['glite-info-provider-service'],
}


}
5 changes: 5 additions & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
$servicekey = $argus_server::servicekey,
$servicecert_source = $argus_server::servicecert_source,
$servicekey_source = $argus_server::servicekey_source,
$configure_bdii = $argus_server::configure_bdii
) {

# ARGUS configuration files
Expand Down Expand Up @@ -51,6 +52,10 @@
content => template("${module_name}/pepd.ini.erb"),
notify => Service['argus-pepd'],
}

if $configure_bdii {
class { 'argus_server::bdii':}
}

if $manage_certificate {
if $servicecert_source != '' {
Expand Down
23 changes: 17 additions & 6 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,19 @@
class argus_server (
$argus_host_dn,
$admin_password,
$site_name = 'MY-DUMMY-SITE',
$argus_host = $::fqdn,
$packages = ['java-1.8.0-openjdk', 'argus-authz', 'bdii', 'glite-info-provider-service'],
$bdii_config_dir = '/etc/glite/info/service',
$pap_poll_interval = 3600,
$pdp_retention_interval = 240,
$pap_policy = {},
$centralban_enabled = false,
$centralban_host = 'argusngi.gridpp.rl.ac.uk',
$centralban_dn = '/C=UK/O=eScience/OU=CLRC/L=RAL/CN=argusngi.gridpp.rl.ac.uk',
$manage_certificate = true,
$manage_argus_policy = true,
$configure_bdii = false,
$servicecert = '/etc/grid-security/hostcert.pem',
$servicekey = '/etc/grid-security/hostkey.pem',
$servicecert_source = '',
Expand All @@ -39,10 +43,17 @@
fail("OS family ${facts['os']['family']} is not supported by this module")
}
}
if $manage_argus_policy {
class { 'argus_server::install': }
class { 'argus_server::config': }
class { 'argus_server::services': }
class { 'argus_server::policy': }
Class['argus_server::install'] -> Class['argus_server::config'] -> Class['argus_server::services'] -> Class['argus_server::policy']

class { 'argus_server::install': }
class { 'argus_server::config': }
class { 'argus_server::services': }
class { 'argus_server::policy': }
Class['argus_server::install'] -> Class['argus_server::config'] -> Class['argus_server::services'] -> Class['argus_server::policy']
}
} else {
class { 'argus_server::install': }
class { 'argus_server::config': }
class { 'argus_server::services': }
Class['argus_server::install'] -> Class['argus_server::config'] -> Class['argus_server::services']
}
}
4 changes: 2 additions & 2 deletions manifests/services.pp
Original file line number Diff line number Diff line change
Expand Up @@ -10,16 +10,16 @@
require => Class['fetchcrl::install'],
unless => '/bin/ls /etc/grid-security/certificates/*.r0 1>/dev/null 2>&1'
}

if $manage_certificate {
exec { 'hostcert update':
command => $argus_server::restart_cmd,
refreshonly => true,
subscribe => [
File[$servicecert],
File[$servicekey],
],
}
}

service { 'argus-pap':
ensure => 'running',
enable => true,
Expand Down
11 changes: 11 additions & 0 deletions templates/glite-info-glue2-provider-service-argus.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/sh

##
# Argus services GLUE2 info provider
# Created by Puppet Module
#
# See: /etc/argus/info-glue2
##

/usr/bin/glite-info-glue2-multi /etc/argus/info-glue2/glite-info-glue2-argus-pap.conf,/etc/argus/info-glue2/glite-info-glue2-argus-pdp.conf,/etc/argus/info-glue2/glite-info-glue2-argus-pep.conf <%= @site_name %> /etc/argus/info-glue2/glite-info-glue2-service-argus.conf