Puppet Class: osg

Defined in:
manifests/init.pp

Summary

Class for common OSG parameters and common resources

Overview

Parameters:

  • osg_release (Enum['3.5']) (defaults to: '3.5')

    OSG release

  • repo_baseurl_bit (Optional[String]) (defaults to: 'https://repo.opensciencegrid.org')

    Base URL for osg repo, eg: https://repo.opensciencegrid.org

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

    Base URL for osg-development repo, default: https://repo.opensciencegrid.org

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

    Base URL for osg-testubg repo, default: https://repo.opensciencegrid.org

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

    Base URL for osg-upcoming repo, default: https://repo.opensciencegrid.org

  • repo_use_mirrors (Boolean) (defaults to: true)

    Sets if repos should use mirrors

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

    Path to repo GPG key

  • enable_osg (Boolean) (defaults to: true)

    Enable the osg repo

  • enable_osg_empty (Boolean) (defaults to: true)

    Enable the osg-empty repo

  • enable_osg_contrib (Boolean) (defaults to: false)

    Enable the osg-contrib repo

  • manage_epel (Boolean) (defaults to: true)

    Manage the EPEL repo

  • auth_type (Enum['lcmaps_voms']) (defaults to: 'lcmaps_voms')

    Grid authentication type

  • cacerts_package_name (Enum['osg-ca-certs', 'igtf-ca-certs', 'empty-ca-certs']) (defaults to: 'osg-ca-certs')

    Package name for osg-ca-certs

  • cacerts_package_ensure (String) (defaults to: 'installed')

    CA certs package ensure

  • shared_certs_path (String) (defaults to: '/opt/grid-certificates')

    Path to location of shared certs, for example if storing certs on NFS

  • globus_tcp_port_range_min (Integer[0, 65535]) (defaults to: 40000)

    Min for GLOBUS_TCP_PORT_RANGE

  • globus_tcp_port_range_max (Integer[0, 65535]) (defaults to: 41999)

    Max for GLOBUS_TCP_PORT_RANGE

  • globus_tcp_source_range_min (Integer[0, 65535]) (defaults to: 40000)

    Min for GLOBUS_TCP_SOURCE_RANGE

  • globus_tcp_source_range_max (Integer[0, 65535]) (defaults to: 41999)

    Max for GLOBUS_TCP_SOURCE_RANGE

  • enable_exported_resources (Boolean) (defaults to: false)

    Enable exported resources, useful when services like Squid and CE live on different hosts

  • exported_resources_export_tag (String) (defaults to: $facts['domain'])

    Exported resources export tag

  • exported_resource_collect_tag (String) (defaults to: $facts['domain'])

    Exported resources collect tag

  • site_info_group (String) (defaults to: 'OSG')

    osg-configure Site Information/group

  • site_info_host_name (String) (defaults to: $::fqdn)

    osg-configure Site Information/host_name

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

    osg-configure Site Information/resource

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

    osg-configure Site Information/resource_group

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

    osg-configure Site Information/sponsor

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

    osg-configure Site Information/site_policy

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

    osg-configure Site Information/contact

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

    osg-configure Site Information/email

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

    osg-configure Site Information/city

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

    osg-configure Site Information/country

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

    osg-configure Site Information/longitude

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

    osg-configure Site Information/latitude

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

    osg-confgiure Squid/location

  • purge_local_site_settings (Boolean) (defaults to: true)

    Purge unmanaged osg_local_site_settings resources

  • purge_gip_config (Boolean) (defaults to: true)

    Purge unmanaged osg_gip_config



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
# File 'manifests/init.pp', line 78

class osg (
  Enum['3.5'] $osg_release = '3.5',
  Optional[String] $repo_baseurl_bit = 'https://repo.opensciencegrid.org',
  Optional[String] $repo_development_baseurl_bit = undef,
  Optional[String] $repo_testing_baseurl_bit = undef,
  Optional[String] $repo_upcoming_baseurl_bit = undef,
  Boolean $repo_use_mirrors = true,
  Optional[String] $repo_gpgkey = undef,
  Boolean $enable_osg = true,
  Boolean $enable_osg_empty = true,
  Boolean $enable_osg_contrib = false,
  Boolean $manage_epel = true,
  Enum['lcmaps_voms'] $auth_type = 'lcmaps_voms',
  Enum['osg-ca-certs', 'igtf-ca-certs', 'empty-ca-certs'] $cacerts_package_name = 'osg-ca-certs',
  String $cacerts_package_ensure = 'installed',
  String $shared_certs_path = '/opt/grid-certificates',
  Integer[0, 65535] $globus_tcp_port_range_min = 40000,
  Integer[0, 65535] $globus_tcp_port_range_max = 41999,
  Integer[0, 65535] $globus_tcp_source_range_min = 40000,
  Integer[0, 65535] $globus_tcp_source_range_max = 41999,
  Boolean $enable_exported_resources = false,
  String $exported_resources_export_tag = $facts['domain'],
  String $exported_resource_collect_tag = $facts['domain'],
  # INI config values
  String $site_info_group = 'OSG',
  String $site_info_host_name = $::fqdn,
  String $site_info_resource = 'UNAVAILABLE',
  String $site_info_resource_group = 'UNAVAILABLE',
  String $site_info_sponsor = 'UNAVAILABLE',
  String $site_info_site_policy = 'UNAVAILABLE',
  String $site_info_contact = 'UNAVAILABLE',
  String $site_info_email = 'UNAVAILABLE',
  String $site_info_city = 'UNAVAILABLE',
  String $site_info_country = 'UNAVAILABLE',
  String $site_info_longitude = 'UNAVAILABLE',
  String $site_info_latitude = 'UNAVAILABLE',
  Optional[String] $squid_location = undef,
  Boolean $purge_local_site_settings = true,
  Boolean $purge_gip_config = true,
) {

  $osfamily = $facts.dig('os', 'family')
  $osmajor = $facts.dig('os', 'release', 'major')
  $supported = ['RedHat-7']
  $os = "${osfamily}-${osmajor}"
  if ! ($os in $supported) {
    fail("Unsupported OS: ${osfamily}, module ${module_name} only supports RedHat 7")
  }

  $repo_development_baseurl_bit_real  = pick($repo_development_baseurl_bit, $repo_baseurl_bit)
  $repo_testing_baseurl_bit_real      = pick($repo_testing_baseurl_bit, $repo_baseurl_bit)
  $repo_upcoming_baseurl_bit_real     = pick($repo_upcoming_baseurl_bit, $repo_baseurl_bit)
  $_repo_gpgkey                       = pick($repo_gpgkey, 'https://repo.opensciencegrid.org/osg/RPM-GPG-KEY-OSG')

  if $manage_epel {
    contain ::epel
  }
  contain osg::repos

  include osg::configure

  # Avoid collecting resources intended for export
  Osg_local_site_settings<| tag != $exported_resources_export_tag |> ~> Exec['osg-configure']
  Osg_gip_config <| |> ~> Exec['osg-configure']

  resources { 'osg_local_site_settings':
    purge  => $purge_local_site_settings,
    notify => Exec['osg-configure'],
  }

  resources { 'osg_gip_config':
    purge  => $purge_gip_config,
    notify => Exec['osg-configure'],
  }

}