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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
|
# File 'manifests/ce.pp', line 68
class osg::ce (
String $storage_grid_dir = '/etc/osg/wn-client/',
String $storage_app_dir = 'UNAVAILABLE',
String $storage_data_dir = 'UNAVAILABLE',
String $storage_worker_node_temp = 'UNAVAILABLE',
String $storage_site_read = 'UNAVAILABLE',
String $storage_site_write = 'UNAVAILABLE',
Enum['torque', 'pbs', 'slurm'] $batch_system = 'torque',
String $batch_system_prefix = '/usr',
String $pbs_server = 'UNAVAILABLE',
Boolean $manage_hostcert = true,
Optional[String] $hostcert_source = undef,
Optional[String] $hostkey_source = undef,
Integer[0, 65535] $htcondor_ce_port = 9619,
Integer[0, 65535] $htcondor_ce_shared_port = 9620,
Boolean $manage_firewall = true,
Hash $osg_local_site_settings = {},
Hash $osg_gip_configs = {},
Boolean $manage_users = true,
Optional[Integer] $condor_uid = undef,
Optional[Integer] $condor_gid = undef,
Optional[Integer] $gratia_uid = undef,
Optional[Integer] $gratia_gid = undef,
Optional[String] $condor_ce_config_content = undef,
Optional[String] $condor_ce_config_source = undef,
Optional[String] $blahp_local_submit_content = undef,
Optional[String] $blahp_local_submit_source = undef,
Boolean $include_view = false,
Integer[0, 65535] $view_port = 8080,
Stdlib::Absolutepath $per_job_history_dir = '/var/lib/gratia/data',
String $gratia_probes_cron_service_ensure = 'running',
Boolean $gratia_probes_cron_service_enable = true,
) {
include osg
include osg::cacerts
case $batch_system {
/torque|pbs/: {
$batch_system_package_name = undef
$ce_package_name = 'osg-ce-pbs'
$batch_ini_section = 'PBS'
$location_name = 'pbs_location'
$batch_settings = {
'PBS/pbs_server' => { 'value' => $pbs_server }
}
$gratia_probe_config = '/etc/gratia/pbs-lsf/ProbeConfig'
$blahp_submit_attributes = '/etc/blahp/pbs_local_submit_attributes.sh'
}
'slurm': {
$batch_system_package_name = 'empty-slurm'
$ce_package_name = 'osg-ce-slurm'
$batch_ini_section = 'SLURM'
$location_name = 'slurm_location'
$batch_settings = {}
$gratia_probe_config = '/etc/gratia/slurm/ProbeConfig'
$blahp_submit_attributes = '/etc/blahp/slurm_local_submit_attributes.sh'
}
default: {
fail('osg::ce: batch_system must be either torque, pbs or slurm')
}
}
if $include_view {
$view_ensure = 'present'
} else {
$view_ensure = 'absent'
}
class { 'osg::gridftp':
manage_hostcert => $manage_hostcert,
hostcert_source => $hostcert_source,
hostkey_source => $hostkey_source,
manage_firewall => $manage_firewall,
standalone => false,
}
include osg::configure::site_info
contain osg::ce::users
contain osg::ce::install
contain osg::ce::config
contain osg::ce::service
Class['osg']
-> Class['osg::cacerts']
-> Class['osg::ce::users']
-> Class['osg::ce::install']
-> Class['osg::gridftp']
-> Class['osg::configure::site_info']
-> Class['osg::ce::config']
-> Class['osg::ce::service']
if $manage_firewall {
firewall { '100 allow HTCondorCE':
ensure => 'present',
action => 'accept',
dport => $htcondor_ce_port,
proto => 'tcp',
}
firewall { '100 allow HTCondorCE shared_port':
ensure => 'present',
action => 'accept',
dport => $htcondor_ce_shared_port,
proto => 'tcp',
}
firewall { '100 allow HTCondorCE View':
ensure => $view_ensure,
action => 'accept',
dport => $view_port,
proto => 'tcp',
}
}
exec { 'condor_ce_reconfig':
path => '/usr/bin:/bin:/usr/sbin:/sbin',
refreshonly => true,
}
}
|