xrootd installation using RPMs

How to install Xrootd by RPMs

Support e-email : adrianDOTsevcencoNOSPAMATcern.ch

1. Packages install

assumed infrastructure -> EL7 x86_64 -> only EL7 supported and tested
REDIRECTOR ON DISK SERVER CONFIGURATION IS NOT SUPPORTED NOR FORESEEN

1.0 required tools (root user is assumed)
yum -y install curl.x86_64 bind-utils.x86_64 redhat-lsb.x86_64 bzip2.x86_64

1.1 Install EPEL
RHEL/CentOS 7:
yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm

1.2 Install WLCG repo
rpm --import http://linuxsoft.cern.ch/wlcg/RPM-GPG-KEY-wlcg

RHEL/CentOS 7:
yum -y install http://linuxsoft.cern.ch/wlcg/centos7/x86_64/wlcg-repo-1.0.0-1.el7.noar…

1.3 Installation of packages (metapackage that will pull dependencies including xrootd)
yum -y install alicexrdplugins

 

2. Xrootd start scripts && configuration

Current case (tested) for xrd.sh is the running of xrootd as non privileged user

xrd.sh can generate template systemd service files - not tested yet

There are a number of environment variables that influence the workins of xrd.sh :
  XRDSH_NOWARN_ASLIB : if set (any value) do not warn xrd.sh is sourced
  XRDREADONLY : if set (any value) export path as not writable - server will not be elected for writes
  XRD_DONOTRECONF : if set (any value) the configuration of template file will be skipped;
  the conf file that will be used is either the default XRDCONFDIR/xrootd.xrootd.cf or the argument specified to -c,-f,-conf, -status

>>>>>> XRDSH_NOAPMON : if set (any value) ApMon components WILL NOT BE USED
  XRDRUNDIR : location of admin,core,logs,logsbackup dirs; if not set it will be XRDSHDIR/run/
  XRDCONFDIR : location of system.cnf and XRDCF (default xrootd.xrootd.cf) conf files; if not set it will be XRDSHDIR/xrootd.conf/
  XRDCONF : main configuration file - usually (default) named system.cnf; if not set it will have the value of XRDCONFDIR/system.cnf
  XRDSH_DEBUG : if set (any value) it will enable various printouts of xrd.sh

where XRDSHDIR - directory where xrd.sh is run from

 

Clarification on XRDSH_NOAPMON usage :
When set no apmon (MonaLisa perl agent) will be used to send usage information to configured local MonaLisa service (VOBOX)
As replacement a standalone MonaLisa agent (MLSensor) can be used as a system service and the package can be found in WLCG repository:
yum -y install mlsensor

there is a required configuration of service (as root) :
cd /etc/mlsensor
mlsensor_config <configuration_template> <name of ALICE storage name>
The service can be started/restarted with :
systemctl start mlsensor
It can be enabled (auto starting at boot):
systemctl enable mlsensor
or both at the same time:
systemctl enable --now mlsensor

2.1 Link for xrd.sh script and configuration templates:  https://github.com/adriansev/alicexrd

2.2 Deployment and setting up the environment 
xrd.sh script and the configurations can be automatically deployed from github with:
bash <(curl -fsSLk https://raw.githubusercontent.com/adriansev/alicexrd/master/deploy_alic…)

in alicexrdconf (or your directory with conf files)

cp system.cnf_CHANGEME system.cnf
and then set SE_NAME, LOCALROOT, OSSCACHE

all former others are detected automatically (see xrd.sh)

after configuration run:
~/alicexrd/xrd.sh -c

current list of arguments of xrd.sh :
usage: xrd.sh arg
where argument is _one_ of :
 [-f] force restart
 [-c] check and restart if not running
 [-k] kill running processes
 [-status] show if xrootd|cmsd pids are present
 [-logs] manage the logs
 [-conf] just (re)create configuration; optional args : <configuration_template> <xrootd_configuration>
 [-getkeys] just get keys
 [-addcron] add/refresh cron line
 [-limits] generate limits file
 [-systemd] generate systemd services files

-f, -c, -k, -status, -conf options have capability of using arguments for specifing custom paths to template and configuration file
If XRD_DONOTRECONF is enabled (set to any value) ARG1 will be taken as xrootd configuration file (and ARG2 will be ignored)
If XRD_DONOTRECONF is disabled (set to empty or not existent) ARG1 will be taken as xrootd configuration template file and ARG2 will be the configuration file that will be created at this step based on specified template

-getkeys : will check the existence of xrootd pem keys (installed by alicetokenacc rpm in /etc/grid-security/xrootd at this moment )

-limits : will generate the desired limits file to be placed in /etc/security/limits.d/
N.B. : xrd.sh use the size of configured user max processes to use up to max 90% for xrootd threads. this is computed at configuration time

-systemd : will generate in current directory a template of systemd service file - not tested, WIP