Skip to content

Commit

Permalink
(profile::core::rucio) update rucio profile
Browse files Browse the repository at this point in the history
  • Loading branch information
dtapiacl committed Oct 4, 2024
1 parent 3b2a029 commit cf596cd
Showing 1 changed file with 29 additions and 54 deletions.
83 changes: 29 additions & 54 deletions site/profile/manifests/core/rucio.pp
Original file line number Diff line number Diff line change
@@ -1,63 +1,38 @@
# @summary
# Install required rucio packages
#
class profile::core::rucio () {
include profile::core::letsencrypt

# Host FQDN
$fqdn = fact('networking.fqdn')

# Define XRootD Path
$xrootd_path = '/opt/xrootd'

# Define Yum Packages
$yum_packages = [
'gcc-c++',
'cmake3',
'krb5-devel',
'libuuid-devel',
'libxml2-devel',
'openssl-devel',
'systemd-devel',
'zlib-devel',
'devtoolset-7',
'xrootd',
'voms',
]

# Define PIP Packages
$pip_packages = [
'wheel',
'cryptography',
'rucio',
]

# Signed Certificate Location
$le_root = "/etc/letsencrypt/live/${fqdn}"

# Generate and sign certificate
letsencrypt::certonly { $fqdn:
plugin => 'dns-route53',
manage_cron => true,
class profile::core::rucio {
yumrepo { 'xrootd-stable':
descr => 'XRootD Stable Repository',
baseurl => 'https://xrootd.web.cern.ch/repo/stable/el$releasever/$basearch',
skip_if_unavailable => 'true',
gpgcheck => '1',
gpgkey => 'https://xrootd.web.cern.ch/repo/RPM-GPG-KEY.txt',
enabled => '1',
target => '/etc/yum.repo.d/xrootd.repo',
}

# Copy the certificates into /etc/grid-security
-> cron::monthly { 'update_cert':
command => "/bin/rsync -a --copy-links --chown=xrootd:xrootd ${le_root}/cert.pem ${le_root}/chain.pem ${le_root}/fullchain.pem ${le_root}/privkey.pem /etc/grid-security/ /dev/null 2>&1",
user => 'root',
hour => 0,
minute => 0,
date => 1,
-> package { 'xrootd':
ensure => 'installed',
}

# Install Pip3 Packages
package { $pip_packages:
ensure => 'present',
provider => 'pip3',
file { [
'/lib/systemd/system/[email protected]',
'/lib/systemd/system/[email protected]',
]:
ensure => file,
mode => '0644',
owner => 'saluser',
group => 'saluser',
}

# Install Yum Packages
package { $yum_packages:
ensure => 'present',
file { [
'/etc/xrootd',
'/var/log/xrootd',
'/var/run/xrootd',
'/var/spool/xrootd',
]:
ensure => directory,
mode => '0644',
owner => 'saluser',
group => 'saluser',
}
}

0 comments on commit cf596cd

Please sign in to comment.