Puppet Class: osg::ce

Defined in:
manifests/ce.pp

Summary

Manage OSG CE

Overview

Parameters:

  • storage_grid_dir (String) (defaults to: '/etc/osg/wn-client/')

    osg-configure Storage/grid_dir

  • storage_app_dir (String) (defaults to: 'UNAVAILABLE')

    osg-configure Storage/app_dir

  • storage_data_dir (String) (defaults to: 'UNAVAILABLE')

    osg-configure Storage/data_dir

  • storage_worker_node_temp (String) (defaults to: 'UNAVAILABLE')

    osg-configure Storage/worker_node_temp

  • storage_site_read (String) (defaults to: 'UNAVAILABLE')

    osg-configure Storage/site_read

  • storage_site_write (String) (defaults to: 'UNAVAILABLE')

    osg-configure Storage/site_write

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

    Batch system used to submit jobs

  • batch_system_prefix (String) (defaults to: '/usr')

    Prefix of where batch system commands are installed

  • pbs_server (String) (defaults to: 'UNAVAILABLE')

    PBS server address when batch_system is torque or pbs

  • manage_hostcert (Boolean) (defaults to: true)

    Boolean that determines if hostcert is managed

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

    The source of the hostcert

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

    The source of the hostkey

  • htcondor_ce_port (Integer[0, 65535]) (defaults to: 9619)

    HTCondor CE port

  • htcondor_ce_shared_port (Integer[0, 65535]) (defaults to: 9620)

    HTCondor CE shared port

  • manage_firewall (Boolean) (defaults to: true)

    Boolean taht determines if firewall rules should be managed

  • osg_local_site_settings (Hash) (defaults to: {})

    Extra configs for osg-configure local site settings Example: { 'Local Settings/PATH' => { 'value' => '/opt/singularity/bin:$PATH' } }

  • osg_gip_configs (Hash) (defaults to: {})

    Extra configs for osg-configure GIP configs Example: { 'Subcluster owens/ram_mb' => { 'value' => 128000 } }

  • manage_users (Boolean) (defaults to: true)

    Boolean of whether to manage users and groups

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

    The UID of condor user

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

    The GID of condor group

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

    The UID of gratia user

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

    The GID of gratia group

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

    Content for /etc/condor-ce/config.d/99-local.conf

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

    Source for /etc/condor-ce/config.d/99-local.conf

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

    Content for blahp local submit attributes

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

    Source for blahp local submit attributes

  • include_view (Boolean) (defaults to: false)

    Boolean to determine if adding Condor CE View

  • view_port (Integer[0, 65535]) (defaults to: 8080)

    Port for Condor CE View

  • per_job_history_dir (Stdlib::Absolutepath) (defaults to: '/var/lib/gratia/data')

    Path used for Gratia probe DataFolder

  • gratia_probes_cron_service_ensure (String) (defaults to: 'running')

    Service ensure for gratia-probes-cron service

  • gratia_probes_cron_service_enable (Boolean) (defaults to: true)

    Service enable for gratia-probes-cron service



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,
  }
}