Skip to content
Snippets Groups Projects
Commit 604fcca1 authored by Michael Davis's avatar Michael Davis
Browse files

Finishes Appendix A: Install a Local EOS Instance

parent 16cccc41
Branches
Tags
No related merge requests found
No preview for this file type
......@@ -129,7 +129,12 @@ xrdsssadmin: 1 key out of 2 kept (0 expired).
\end{lstlisting}
Note that XRoot clients which parse a multi-line SSS keytab file use the last line in the file as their key.
\section{Set up the EOS \texttt{sysconfig} files}
\section{Configure EOS \texttt{sysconfig}}
\begin{alertbox}
It looks like there is a new config file \texttt{/etc/eos.systemd.conf} which overlaps with (or supercedes?)
\texttt{/etc/syconfig/eos\_env}. Check which of these is the correct one to use.
\end{alertbox}
Create the \texttt{/etc/syconfig/eos\_env} file based on the example installed by the \texttt{eos-server} RPM:
\begin{lstlisting}
......@@ -155,12 +160,8 @@ EOS_MGM_MASTER2=devbox.cern.ch
EOS_MGM_ALIAS=devbox.cern.ch
EOS_MAIL_CC="your.name@cern.ch"
\end{lstlisting}
Copy the EOS \texttt{mgm} hostname into \texttt{/etc/sysconfig/eos}:
\begin{lstlisting}
# echo EOS_MGM_URL=root://devbox.cern.ch > /etc/sysconfig/eos
\end{lstlisting}
\section{Set up the XRoot \texttt{mgm} configuration file}
\section{Configure XRoot \texttt{mgm}}
SSS will be used for communication between the CTA Tape Server and EOS. In a production system, Kerberos is also
required for communication between the user and EOS.
......@@ -198,89 +199,107 @@ Finally, ensure that the EOS namespace plugin will be loaded:
#-------------------------------------------------------------------------------
mgmofs.nslib /usr/lib64/libEosNsInMemory.so
\end{lstlisting}
Create a local directory for EOS \texttt{mgm}. It seems this is not actually used for anything, but creating it
suppresses a spurious error in the EOS logs.
\begin{lstlisting}
# mkdir -p /mgm
# chown daemon:daemon /mgm/
\end{lstlisting}
\section{Set up the XRoot \texttt{fst} configuration file}
\section{Configure XRoot \texttt{fst}}
Replace references to \texttt{localhost} with the FQDN of the local development box:
In \texttt{/etc/xrd.cf.fst}, replace references to \texttt{localhost} with the FQDN of the local development box:
\begin{lstlisting}
all.manager devbox.cern.ch 2131
fstofs.broker root://devbox.cern.ch:1097//eos/
\end{lstlisting}
Create a local directory to be used to store files by the EOS \texttt{fst}:
\begin{lstlisting}
# mkdir -p /fst
# chown daemon:daemon /fst/
\end{lstlisting}
\section{Start the XRoot daemons that will run the EOS \texttt{mgm}, \texttt{mq} and \texttt{fst} plugins}
\section{Start XRoot daemons}
Start the XRoot daemons that will run the EOS \texttt{mgm}, \texttt{mq} and \texttt{fst} plugins:
\begin{lstlisting}
# systemctl start eos
\end{lstlisting}
%\section{Set both the EOS \texttt{mgm} and the EOS \texttt{mq} to be masters}
%\begin{lstlisting}
%# service eos master mgm
%# service eos master mq
%\end{lstlisting}
%As agreed I've installed a very simple EOS instance on eosctatape (p06253947b39467).
%
%The FST storage directory is:
%
% /srv/castor/01/fst
%
% [Ticket] Remove dependency on /usr/sbin/eosfsregister
%
% The /usr/sbin/eosfsregister command-line tool is a convenience script for registering an EOS fst node with its an EOS mgm node. This script is not directly maintained by the EOS developers.
%
% eosfsregister currently determines the location of the EOS mgm node by parsing the contents of the /etc/sysconfig/eos file. This file is part of the initd configuration files for EOS. This file does not exist in the set of configuration files for systemd. The CTA project is using a version of EOS based on systemd and therefore we currently have the work around of creating the /ets/sysconfig/eos file on our systemd based setups.
%
% The work carried out by the /usr/sbin/eosfsregister command-line tool can be done by using "standard" EOS commands directly maintained by the EOS developers. We should modify our CTA install/configure/setup scripts to use these "standard" EOS commands and therefore remove our dependency on the /usr/sbin/eosfsregister command-line tool.
\section{Create a local directory to be used to store files by the EOS \texttt{fst}}
The logs for the XRoot daemons will be created under \texttt{/var/log/eos/fst}, \texttt{/var/log/eos/mgm} and \texttt{/var/log/eos/mq}.
\begin{alertbox}
The EOS \texttt{mgm} startup script checks if we are running under \texttt{systemd}, but the test it performs does not work inside a
Docker container, as (a) pidof is part of \texttt{sysvtools-init}, which is not installed and (b) the \texttt{systemd} process is
started as \texttt{init} (a symbolic link to \texttt{systemd}):
\begin{lstlisting}
# mkdir -p /fst
# chown daemon:daemon /fst/
/usr/sbin/pidof systemd
\end{lstlisting}
This has been reported to the EOS team to fix. In the meantime, here is a hack to work around the problem:
\begin{lstlisting}
# yum install -y sysvinit-tools
# ln -s /usr/bin/sleep /tmp/systemd
# /tmp/systemd 1000 &
# systemctl start eos
\end{lstlisting}
\end{alertbox}
\section{Enable the kerberos and simple shared secret authentication mechanisms within EOS as opposed to xroot}
\section{Enable EOS authentication mechanisms}
Enable the Kerberos and Simple Shared Secret authentication mechanisms within EOS (as opposed to XRoot):
\begin{lstlisting}
# eos vid enable sss
# eos vid enable krb5
\end{lstlisting}
\section{Register the local /fst directory with the default EOS space}
\begin{lstlisting}
# EOS_MGM_URL="root://devbox.cern.ch" eosfstregister -r /fst default:1
\end{lstlisting}
\section{Configure the default EOS space}
\section{Put the EOS fst node on-line}
Create a directory for the default EOS space and register it with EOS:
\begin{lstlisting}
# eos node set devbox.cern.ch on
# mkdir -p /srv/castor/01/fst
# chown daemon:daemon /srv/castor/01/fst
# echo 'EOS_MGM_URL=root://devbox.cern.ch' > /etc/sysconfig/eos
# eosfstregister -r /srv/castor/01/fst default:1
###########################
# <eosfstregister> v1.0.0
###########################
/srv/castor/01/fst : uuid=abae0ba6-ffc5-491f-9ef3-291f291493af fsid=undef
success: mapped 'abae0ba6-ffc5-491f-9ef3-291f291493af' <=> fsid=1
\end{lstlisting}
\section{Enable the default EOS space}
\begin{alertbox}
\texttt{/usr/sbin/eosfsregister} is a convenience script for registering an EOS \texttt{fst} node with an EOS
\texttt{mgm} node. It parses the deprecated configuration file \texttt{/etc/sysconfig/eos} to determine the location of
the EOS \texttt{mgm} node. For the time being, we need to create this file even though it is not used by EOS directly.
\texttt{eosfsregister} is not maintained by the EOS developers, and the same work can be done by standard EOS commands.
We will modify our CTA install/configure/setup scripts to use the standard commands nstead of \texttt{eosfsregister}.
\end{alertbox}
Enable the WorkFlow Engine (WFE) for the default EOS space, enable default EOS space, bring the EOS \texttt{fst} node
on-line:
\begin{lstlisting}
# eos space config default space.wfe=on
# eos space set default on
# eos node set devbox.cern.ch on
\end{lstlisting}
\section{Create the EOS namespace}
Create the \texttt{/eos} directory within the EOS namespace, map it to the EOS
\texttt{default} space and then set the number of replicas to 1.
Wait until the EOS disk filesystem comes online:
\begin{lstlisting}[moredelim={[is][keywordstyle]{@@}{@@}},keywordstyle=\textbf]
# eos fs ls /srv/castor/01/fst | grep online
devbox.cern.ch (1095) 1 /srv/castor/01/fst default.0 ...evbox.cern.ch booted rw nodrain @@online@@ unknown raid
\end{lstlisting}
Create the \texttt{/eos} directory within the EOS namespace, map it to the EOS \texttt{default} space, set the number of
replicas to 1:
\begin{lstlisting}
# eos attr -r set default=replica /eos
# eos attr -r set sys.forced.nstripes=1 /eos
# eos mkdir /eos/cta
# eos chmod 777 /eos/cta
\end{lstlisting}
\section{Test the EOS installation}
Perform a simple write and read test of the new EOS installation:
\begin{lstlisting}
# eos -b node ls
# eos mkdir /eos/cta
# eos chmod 777 /eos/cta
# xrdcp /etc/motd root://devbox.cern.ch//eos/cta/
# xrdcp root://devbox.cern.ch//eos/cta/motd /tmp/eostest
# diff /tmp/eostest /etc/motd
\end{lstlisting}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment