-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(profile::core::rucio) update rucio profile
- Loading branch information
Showing
1 changed file
with
29 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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', | ||
} | ||
} |