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

HTCondor-CE 4.0 support and APEL accounting #1

Open
wants to merge 63 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
ad7b984
If using HTCondor 8.3.8 or better, remove eval_set_environment attrib…
kreczko May 21, 2020
2fc52fd
disable puppet-lint autoload checks
kreczko May 21, 2020
7205033
add htcondor-ce-view package if current node is a condor_view_host
kreczko May 21, 2020
68d10a8
update the list of ARGUS packages
kreczko May 21, 2020
b5415b1
added required repos
kreczko May 21, 2020
a435eb8
fixed syntax error in install::repositories
kreczko May 21, 2020
bb9dbd0
removed "condor" package from dependencies
kreczko May 21, 2020
8e564b7
removed obsolete dependencies for htcondor-ce package
kreczko May 21, 2020
3a94343
making sure repositories are enabled for argus packages
kreczko May 22, 2020
f4ed58d
fixed patch for EPEL repo
kreczko May 22, 2020
df43715
added htcondor-dev repo as APEL RPMs are only available there
kreczko May 22, 2020
5646f37
added UMD and EGI repos
kreczko May 22, 2020
cd99398
added UMD repos to argus auth
kreczko May 22, 2020
5a439cc
removed duplicate repo
kreczko May 22, 2020
46ec3e4
fxied metaling for epel
kreczko May 22, 2020
09a2f77
added install options to BDII and condor-view
kreczko May 22, 2020
d0b71eb
formatting fixes
kreczko May 22, 2020
ae076ca
added ca-certificates package
kreczko May 22, 2020
ec5ad4e
added GridPPdocumentation
kreczko May 22, 2020
23dcf90
added ca-policy-egi-core to auth
kreczko May 22, 2020
4a9588d
added cert configuration
kreczko May 28, 2020
ebb193f
added fetchcrl
kreczko May 28, 2020
8d9d046
added /etc/lcmaps/lcmaps.db
kreczko May 28, 2020
cca584b
remove ca-policy-egi-core as it is provided by fetch-crl
kreczko May 28, 2020
cf30f34
fix template usage for ARGUS
kreczko May 28, 2020
8b616eb
enable bdii service
kreczko Jul 10, 2020
932781d
APEL accounting draft
kreczko Jul 10, 2020
48be1bd
added settings for apelparser (mysql)
kreczko Jul 14, 2020
9c77681
added APEL install and config
kreczko Jul 14, 2020
6d06c72
fix scaling factor default setting
kreczko Jul 20, 2020
64205e6
fixed apel_mysql parameters
kreczko Jul 20, 2020
8f6984b
fix bdii service
kreczko Jul 20, 2020
0e6992e
moving job routes to its own config manifest
kreczko Jul 20, 2020
92eedc3
added htcondor_ce::job_routes parameter
kreczko Jul 20, 2020
2ffdd1d
added customizable job_routes
kreczko Jul 20, 2020
99615b0
fixing default job route (key names shoudl be strings)
kreczko Jul 20, 2020
e3671b5
fixed job_routes file location
kreczko Jul 20, 2020
b21555f
fixing inner loop in job_routes template
kreczko Jul 20, 2020
644d5ec
moved job_route --> condor_ce_reconfig dependency to confog::job_routes
kreczko Jul 20, 2020
d9cd72b
adjust new lines in job_router settings
kreczko Jul 20, 2020
bda4fc4
added missing APEL parameter to config
kreczko Jul 20, 2020
573f496
fixed template name for condor APEL config
kreczko Jul 20, 2020
0c091a6
add missing APEL parameter to install manifest
kreczko Jul 20, 2020
dcab33c
fixed APEL parameters in config::apel
kreczko Jul 20, 2020
b29b5d5
add quotes around route name in job_routes template
kreczko Jul 20, 2020
bf81324
apel package "apel-parser" --> "apel_parsers"
kreczko Jul 20, 2020
f38b6e7
create APEL tables after database
kreczko Jul 23, 2020
426e456
introduced APEL test queue
kreczko Jul 23, 2020
e49fa75
added APEL client, parser and sender configs
kreczko Jul 23, 2020
5813922
fixing FQDN (typo) in APEL configs
kreczko Jul 23, 2020
f941b29
fixing BLAH and BATCH paths for APEL
kreczko Jul 23, 2020
ff6ede6
fixing test queue settings for APEL
kreczko Jul 23, 2020
a1b834c
added APEL cron job
kreczko Jul 24, 2020
0d0c6cb
added cron class and explicit requirement fo APEL shell script
kreczko Jul 24, 2020
eccba5f
fix: setting correct port for HTCondor-CE >= 4.0
kreczko Aug 27, 2020
8c7e8bd
feat(apel): added benchmark values for manual spec
kreczko Aug 27, 2020
b5497b7
feat(benchmark): added hepspec06 parameter for specific use of HEPSPE…
kreczko Aug 27, 2020
ee14172
added hostDN and FS auth to condor_mapfile
kreczko Nov 19, 2020
faac339
added base settings for job routes
kreczko Nov 19, 2020
5898307
updating APEL to use new AMS reporting
kreczko Apr 15, 2021
2f0ef79
APEL script: fixed comment for ssmsend
kreczko Apr 15, 2021
db499d8
APEL: added comment for sender option in sender config
kreczko Apr 15, 2021
f8804bf
travis: remove Puppet < 4 tests and add Puppet 5 and 6 tests
kreczko Apr 15, 2021
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
35 changes: 4 additions & 31 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,37 +9,10 @@ script: bundle exec rake validate && bundle exec rake lint && bundle exec rake s
matrix:
fast_finish: true
include:
- rvm: 1.9.3
env: PUPPET_VERSION="~> 3.4.0"
- rvm: 1.9.3
env: PUPPET_VERSION="~> 3.0"
- rvm: 1.9.3
env: PUPPET_VERSION="~> 3.0" FUTURE_PARSER="yes"
- rvm: 1.9.3
env: PUPPET_VERSION="~> 4.0"
- rvm: 2.0.0
env: PUPPET_VERSION="~> 3.0"
- rvm: 2.0.0
env: PUPPET_VERSION="~> 3.0" FUTURE_PARSER="yes"
- rvm: 2.0.0
env: PUPPET_VERSION="~> 4.0"
- rvm: 2.1.5
env: PUPPET_VERSION="~> 3.0"
- rvm: 2.1.5
env: PUPPET_VERSION="~> 3.0" FUTURE_PARSER="yes"
- rvm: 2.1.5
env: PUPPET_VERSION="~> 4.0"
- rvm: 2.1.5
env: PUPPET_VERSION="~> 4.0" STRICT_VARIABLES="yes"
- rvm: 2.2.3
env: PUPPET_VERSION="~> 4.0"
- rvm: default
sudo: required
dist: trusty
services: docker
env: BEAKER_set="centos-6-x86_64-docker"
bundler_args:
script: sudo service docker restart ; sleep 10 && bundle exec rake beaker
- rvm: 2.4.5
env: PUPPET_GEM_VERSION="~> 5.0"
- rvm: 2.5.3
env: PUPPET_GEM_VERSION="~> 6.0"
- rvm: default
sudo: required
dist: trusty
Expand Down
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
1. [Reference - An under-the-hood peek at what the module is doing and how](#reference)
1. [Limitations - OS compatibility, etc.](#limitations)
1. [Development - Guide for contributing to the module](#development)
1. [GridPP Documentation](#GridPP-Documentation)

## Description

Expand Down Expand Up @@ -84,3 +85,22 @@ know what the ground rules for contributing are.
If you aren't using changelog, put your release notes here (though you should
consider using changelog). You can also add any additional sections you feel
are necessary or important to include here. Please use the `## ` header.


## GridPP Documentation

- https://www.gridpp.ac.uk/wiki/Example_Build_of_an_HTCondor-CE_Cluster
- https://twiki.cern.ch/twiki/bin/view/LCG/HtCondorCeAccounting

## Defining job routes

```yaml
htcondor_ce::job_routes:
dice_centos7:
TargetUniverse: 5
eval_set_AccountingGroup: 'strcat("group_u_", x509userproxyvoname, ".", Owner)'
delete_SUBMIT_Iwd: true
set_WantIOProxy: true
set_default_maxMemory: 3000
set_Requirements: 'TARGET.OpSysAndVer == "CentOS7"'
```
1 change: 1 addition & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ require 'rubygems'
require 'puppetlabs_spec_helper/rake_tasks'
require 'puppet-lint/tasks/puppet-lint'
PuppetLint.configuration.send('disable_80chars')
PuppetLint.configuration.send('disable_autoloader_layout')
PuppetLint.configuration.ignore_paths = ["spec/**/*.pp", "pkg/**/*.pp"]

desc "Validate manifests, templates, and ruby files"
Expand Down
20 changes: 20 additions & 0 deletions files/01-ce-auth.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
###############################################################################
#
# HTCondor-CE common authorization configuration
#
# This file will NOT be overwritten upon RPM upgrade.
#
###############################################################################

# Uncomment the following lines if your SciTokens or SSL clients use
# grid certificates or your HTCondor-CE's host certificate is located
# in the standard grid location
#
# https://htcondor-ce.readthedocs.io/en/latest/installation/htcondor-ce#configuring-certificates

AUTH_SSL_SERVER_CERTFILE = /etc/grid-security/hostcert.pem
AUTH_SSL_SERVER_KEYFILE = /etc/grid-security/hostkey.pem
AUTH_SSL_SERVER_CADIR = /etc/grid-security/certificates
AUTH_SSL_CLIENT_CADIR = /etc/grid-security/certificates
# AUTH_SSL_SERVER_CAFILE =
# AUTH_SSL_CLIENT_CAFILE =
14 changes: 14 additions & 0 deletions files/apel/cron_condor-ce_apel.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env bash
# accountingRun.sh
# [email protected], 2019
# modified by [email protected]
# 210331 modified by WL as per GGUS ticket #150995: "you need to run
# separately the scripts apelclient and ssmsend, so the first one will
# create the accounting records and the second one will send them."
# Run the processes of a HTCondor accounting run

/usr/share/condor-ce/condor_blah.sh # Make the blah file (CE/Security data)
/usr/share/condor-ce/condor_batch.sh # Make the batch file (batch system job run times)
/usr/bin/apelparser # Read the blah and batch files in
/usr/bin/apelclient # Join blah and batch records to make job records
/usr/bin/ssmsend # Send job records into APEL system
6 changes: 6 additions & 0 deletions manifests/auth.pp
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,10 @@
} else {
fail("This module currently doesn't support backends other than ARGUS.")
}

package {['ca-certificates']:
ensure => latest,
}

include fetchcrl
}
32 changes: 21 additions & 11 deletions manifests/auth/argus.pp
Original file line number Diff line number Diff line change
Expand Up @@ -20,29 +20,39 @@
validate_integer($argus_port)
validate_string($argus_resourceid)

package { 'argus-pep-api-c': ensure => present, }

package { 'argus-gsi-pep-callout':
ensure => present,
require => Package['argus-pep-api-c'],
$argus_packages = [
'argus-gsi-pep-callout',
'lcas-plugins-basic',
'lcas-plugins-voms',
'lcmaps-plugins-basic',
'lcmaps-plugins-c-pep',
'lcmaps-plugins-verify-proxy',
'lcmaps-plugins-voms',
]
package { $argus_packages:
ensure => present,
install_options => ['--enablerepo', 'epel,wlcg,UMD-4-base,UMD-4-updates']
}

file { $pep_callout:
-> file { $pep_callout:
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
content => template("${module_name}/gsi-pep-callout.erb"),
require => Package['argus-gsi-pep-callout'],
}

file { $gsi_authz:
} -> file { $gsi_authz:
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
source => "puppet:///modules/${module_name}/gsi-authz.conf",
require => Package['argus-gsi-pep-callout'],
} -> file{ '/etc/lcmaps/lcmaps.db':
ensure => file,
owner => 'root',
group => 'root',
mode => '0644',
content => template("${module_name}/lcmaps.db.erb"),
require => Package['argus-gsi-pep-callout'],
}

}
20 changes: 10 additions & 10 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@
class htcondor_ce::config {
$site_security = '/etc/condor-ce/config.d/59-site-security.conf'
$main_ce_config = '/etc/condor-ce/config.d/60-configured-attributes.conf'
$job_routes = '/etc/condor-ce/config.d/61-job-routes.conf'
$condor_mapfile = '/etc/condor-ce/condor_mapfile'
$ce_sysconfig = '/etc/sysconfig/condor-ce'
# general parameters used in manifest or more than one template
$install_apel = $::htcondor_ce::install_apel
$install_bdii = $::htcondor_ce::install_bdii
$job_routes_template = $::htcondor_ce::job_routes_template
$uid_domain = $::htcondor_ce::uid_domain
$use_static_shadow = $::htcondor_ce::use_static_shadow
# $site_security
$gsi_regex = $::htcondor_ce::gsi_regex
$host_dn = $::htcondor_ce::host_dn
# $main_ce_config
$condor_view_hosts = $::htcondor_ce::condor_view_hosts
$pool_collectors = $::htcondor_ce::pool_collectors
Expand All @@ -38,13 +38,7 @@
content => template("${module_name}/60-configured-attributes.conf.erb"),
}

file { $job_routes:
ensure => file,
owner => 'condor',
group => 'condor',
mode => '0644',
content => template($job_routes_template),
}
class {'::htcondor_ce::config::job_routes': }

file { $condor_mapfile:
ensure => file,
Expand All @@ -62,7 +56,7 @@
source => "puppet:///modules/${module_name}/sysconfig-condor-ce",
}

$config_files = [File[$main_ce_config], File[$site_security], File[$job_routes], File[$condor_mapfile]]
$config_files = [File[$main_ce_config], File[$site_security], File[$condor_mapfile]]

exec { '/usr/bin/condor_ce_reconfig': refreshonly => true, }

Expand All @@ -76,4 +70,10 @@
class { '::htcondor_ce::config::shadow': }
}

if $install_apel {
class { '::htcondor_ce::config::apel': }
}

class { '::htcondor_ce::config::certs': }

}
90 changes: 90 additions & 0 deletions manifests/config/apel.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# class htcondor::config::apel
#
# This class configures the
# APEL Accounting for the HTCondor CE
#
# from https://twiki.cern.ch/twiki/bin/view/LCG/HtCondorCeAccounting
class htcondor_ce::config::apel{
$apel_ce_config = $::htcondor_ce::apel_ce_config
$apel_condor_config = $::htcondor_ce::apel_condor_config
$apel_output_dir = $::htcondor_ce::apel_output_dir
$apel_scaling_attr = $::htcondor_ce::apel_scaling_attr
$apel_mysql_root_pw = $::htcondor_ce::apel_mysql_root_pw
$apel_mysql_db = $::htcondor_ce::apel_mysql_db
$apel_mysql_user = $::htcondor_ce::apel_mysql_user
$apel_mysql_password = $::htcondor_ce::apel_mysql_password
$apel_enable_ssm = $::htcondor_ce::apel_enable_ssm
$hepspec06 = $::htcondor_ce::hepspec06

$goc_site_name = $::htcondor_ce::goc_site_name


file{$apel_ce_config:
ensure => present,
owner => 'condor',
group => 'condor',
mode => '0644',
content => template("${module_name}/51-ce-apel.conf.erb"),
require => Package['htcondor-ce-apel'],
}

file{$apel_condor_config:
ensure => present,
owner => 'condor',
group => 'condor',
mode => '0644',
content => template("${module_name}/51-condor-apel.conf.erb"),
require => Package['htcondor-ce-apel'],
}

## MySQL settings (apelparser)
class { '::mysql::server':
root_password => $mysql_root_pw,
remove_default_accounts => true,
restart => true
}

mysql::db { $apel_mysql_db:
user => $apel_mysql_user,
password => $apel_mysql_password,
host => 'localhost',
grant => ['ALL'],
sql => '/usr/share/apel/client.sql'
}

file{'/etc/apel/client.cfg':
ensure => present,
content => template("${module_name}/apel/client.cfg.erb"),
require => Package['htcondor-ce-apel'],
}

file{'/etc/apel/parser.cfg':
ensure => present,
content => template("${module_name}/apel/parser.cfg.erb"),
require => Package['htcondor-ce-apel'],
}

file{'/etc/apel/sender.cfg':
ensure => present,
content => template("${module_name}/apel/sender.cfg.erb"),
require => Package['htcondor-ce-apel'],
}

file{'/etc/apel/cron_condor-ce_apel.sh':
ensure => present,
source => "puppet:///modules/${module_name}/apel/cron_condor-ce_apel.sh",
mode => '0755',
}

class { '::cron':
manage_package => false,
}

cron::job {'apel-processing':
minute => '31',
hour => '2',
command => '/etc/apel/cron_condor-ce_apel.sh',
description => 'APEL HTCondor-CE job parsing',
require => File['/etc/apel/cron_condor-ce_apel.sh'],
}
}
13 changes: 11 additions & 2 deletions manifests/config/bdii.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Class: htcondor_ce::bdii
# Class: htcondor_ce::config bdii
#
# This class installs and configures the
# This class configures the
# Resource BDII for the HTCondor Computing Element
#
class htcondor_ce::config::bdii {
Expand All @@ -10,6 +10,7 @@
$supported_vos = $::htcondor_ce::supported_vos
$goc_site_name = $::htcondor_ce::goc_site_name
$benchmark_result = $::htcondor_ce::benchmark_result
$hepspec06 = $::htcondor_ce::hepspec06
$execution_env_cores = $::htcondor_ce::execution_env_cores
$election_type = $::htcondor_ce::election_type
$election_hosts = $::htcondor_ce::election_hosts
Expand All @@ -25,4 +26,12 @@

File[$bdii_ce_config] ~> Exec['/usr/bin/condor_ce_reconfig']

service{'bdii':
ensure => running,
enable => true,
}
# make sure /etc/condor/config.d/99-ce-bdii.conf is removed
file {'/etc/condor/config.d/99-ce-bdii.conf':
ensure => absent,
}
}
38 changes: 38 additions & 0 deletions manifests/config/certs.pp
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Configures host certificate and key files
class htcondor_ce::config::certs{
$hostcert_location = $::htcondor_ce::hostcert_location
$hostkey_location = $::htcondor_ce::hostkey_location


file {'/etc/grid-security/hostcert.pem':
ensure => file,
owner => 'root',
group => 'root',
mode => '0444',
source => $hostcert_location,
}

file {'/etc/grid-security/hostkey.pem':
ensure => file,
owner => 'root',
group => 'root',
mode => '0400',
source => $hostkey_location,
}

file {'/etc/grid-security/condorcert.pem':
ensure => file,
owner => 'condor',
group => 'condor',
mode => '0444',
source => $hostcert_location,
}

file {'/etc/grid-security/condorkey.pem':
ensure => file,
owner => 'condor',
group => 'condor',
mode => '0400',
source => $hostkey_location,
}
}
Loading