1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
# File 'manifests/bdii/dpm.pp', line 1
class lcgdm::bdii::dpm ($sitename = undef, $basedir = 'home', $vos = [], $glue2 = true, $hdfs = false, $java_home = '/usr/lib/jvm/java') {
if $hdfs {
$se_dpm = @("EOT")
export LD_LIBRARY_PATH=<%=@java_home%>/jre/lib/amd64/server/
export X509_USER_CERT=/var/lib/ldap/hostcert.pem
export X509_USER_KEY=/var/lib/ldap/hostkey.pem
dpm-listspaces --gip --protocols --basedir <%= @basedir %> --site <%= @sitename %><% if @glue2 %> --glue2<% end %> --use-dmlite-conf /etc/dmlite.conf
| EOT
file { '/var/lib/bdii/gip/provider/se-dpm':
owner => 'root',
group => 'root',
mode => '0755',
content => inline_template($se_dpm)
}
@user { 'ldap':
groups => [$lcgdm::base::params::user],
membership => minimum,
}
} else {
$se_dpm = @("EOT")
export X509_USER_CERT=/var/lib/ldap/hostcert.pem
export X509_USER_KEY=/var/lib/ldap/hostkey.pem
dpm-listspaces --gip --protocols --basedir <%= @basedir %> --site <%= @sitename %><% if @glue2 %> --glue2<% end %>
| EOT
file { '/var/lib/bdii/gip/provider/se-dpm':
owner => 'root',
group => 'root',
mode => '0755',
content => inline_template($se_dpm)
}
file { '/var/lib/bdii/gip/provider/service-srm2.2':
owner => 'root',
group => 'root',
mode => '0755',
content => inline_template("glite-info-service /var/lib/bdii/gip/glite-info-service-srm2.2.conf <%= @sitename %> httpg://${::fqdn}:8446/srm/managerv2")
}
$qip_srm = @("EOT"/$)
init = glite-info-service-dpm init v2
service_type = SRM
get_version = echo \$GLITE_INFO_SERVICE_VERSION
get_endpoint = echo \$GLITE_INFO_SERVICE_ENDPOINT
get_status = glite-info-service-test SRM_V2 && glite-info-service-dpm status v2
WSDL_URL = http://sdm.lbl.gov/srm-wg/srm.v2.2.wsdl
semantics_URL = http://sdm.lbl.gov/srm-wg/doc/SRM.v2.2.html
get_starttime = perl -e '@st=stat(\"/var/run/dpm.pid\");print \"@st[10]\\n\";'
get_data = echo
get_services = echo
get_owner = <% @vos.sort.each do |vo| %> echo <%= vo %>; <% end %>
get_acbr = <% @vos.sort.each do |vo| %> echo VO:<%= vo %>; <% end %>
| EOT
file { '/var/lib/bdii/gip/glite-info-service-srm2.2.conf':
owner => 'root',
group => 'root',
mode => '0755',
content => inline_template($qip_srm)
}
# Required for srm provider
package { 'glite-info-provider-service': }
}
# Required for dpm-listspaces
package { 'dpm-python': }
# dpm-listspaces need hostcert and key to be able to
# connect (it is running as the ldap user)
file { '/var/lib/ldap/hostcert.pem':
ensure => present,
source => '/etc/grid-security/hostcert.pem',
owner => 'ldap',
group => 'ldap'
}
file { '/var/lib/ldap/hostkey.pem':
ensure => present,
source => '/etc/grid-security/hostkey.pem',
owner => 'ldap',
group => 'ldap',
mode => '0400'
}
}
|