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

Some refactoring of Admin Guide chapter 2

parent 7c4234cd
Branches
Tags
No related merge requests found
No preview for this file type
No preview for this file type
No preview for this file type
No preview for this file type
......@@ -159,7 +159,7 @@ To install CTA from RPMs built in Section~\ref{compile_cta_from_source}:
In a test system, configure the ObjectStore as a Virtual File System (VFS). Initialise the new ObjectStore VFS and set
global \texttt{rwx} permissions:
\begin{lstlisting}
# ~/CTA/objectstore/cta-objectstore-initialize
# ~/CTA_build/objectstore/cta-objectstore-initialize
New object store path: file:///tmp/jobStoreVFSUaHSAk
# chmod -R 0777 /tmp/jobStoreVFSUaHSAk/
\end{lstlisting}
......@@ -192,7 +192,7 @@ Create \texttt{/etc/ceph/ceph.client.cta-id.keyring} with the following contents
caps mon = "allow r"
caps osd = "allow rwx pool=cta-tapepool namespace=cta-ns"
\end{lstlisting}
Then create environment variables to store the type and location of the new ObjectStore:
Create environment variables to store the type and location of the new ObjectStore:
\begin{lstlisting}
export OBJECTSTORETYPE=ceph
export OBJECTSTOREURL=rados://cta-id@cta-tapepool:cta-ns
......@@ -200,6 +200,70 @@ export OBJECTSTORENAMESPACE=cta-ns
export OBJECTSTOREID=cta-id
export OBJECTSTOREPOOL=cta-tapepool
\end{lstlisting}
Initialise the ObjectStore:
\begin{lstlisting}
# ~/CTA_build/objectstore/cta-objectstore-initialize $OBJECTSTOREURL
\end{lstlisting}
List the ObjectStore content:
\begin{lstlisting}
# rados -p $OBJECTSTOREPOOL --id $OBJECTSTOREID --namespace $OBJECTSTORENAMESPACE \
ls
\end{lstlisting}
Delete the ObjectStore content:
\begin{lstlisting}
# rados -p $OBJECTSTOREPOOL --id $OBJECTSTOREID --namespace $OBJECTSTORENAMESPACE \
ls | xargs -itoto rados -p $OBJECTSTOREPOOL --id $OBJECTSTOREID --namespace \
$OBJECTSTORENAMESPACE rm toto
\end{lstlisting}
\section{Configure the Catalogue}
\subsection{2/ Config file for the DB:}
\begin{verbatim}
[root@ctafrontend ~]# cat /tmp/database-rc.sh
export DATABASETYPE=oracle
export DATABASEURL=oracle:cta_devdb5/cta_devdb05_Mon_Dec_12*@devdb12
\end{verbatim}
\subsection{3/ This get's translated to this config file:}
\begin{verbatim}
[root@ctafrontend ~]# cat /etc/cta/cta_catalogue_db.conf
oracle:cta_devdb5/PASSWORD@devdb12
\end{verbatim}
\subsection{4/ In fact, there is a /etc/cta/cta\_catalogue\_db.conf.example file that has lot of explanations.}
\subsection{5/ Once you have the above, to create DB schema, do this:}
\begin{verbatim}
DELETE EXISTING SCHEMA
cta-catalogue-schema-unlock /etc/cta/cta_catalogue_db.conf
cta-catalogue-delete-all-data /etc/cta/cta_catalogue_db.conf
cta-catalogue-schema-status /etc/cta/cta_catalogue_db.conf
cta-catalogue-schema-drop /etc/cta/cta_catalogue_db.conf
CREATE NEW SCHEMA
cta-catalogue-schema-create /etc/cta/cta_catalogue_db.conf
\end{verbatim}
\section{Configure CTA Front-end}
Create the \texttt{/etc/cta/cta-frontend.conf} file with the following contents:
\begin{lstlisting}
ObjectStore BackendPath rados://cta-id@cta-tapepool:cta-ns
Catalogue NumberOfConnections 1
Log URL file:/cta-frontend.log
\end{lstlisting}
Create the CTA user:
\begin{lstlisting}
# useradd cta
\end{lstlisting}
\section{Configure Authentication}
Then there is the voodoo dance with SSS, which should be explained.
\section{Install CTA Front-end}
......@@ -263,140 +327,6 @@ echo "frontend died"
sleep infinity
\end{lstlisting}
\section{Ceph}
This explains what’s going on. The build scripts and/or Makefiles find ceph that is installed on my dev box and go ahead and build some “extra” libraries against it. The packaging logic on the other hand requires an explicit configuration option in order to package these “extra” ceph dependent libraries. So without setting the option we only get half way. These “extra” ceph-dependent libraries are built without any accompanying packaging instructions. The rpmbuild program then gets upset saying we’ve got stuff to be installed that has not been packaged.
Cheers,
Steve
On 21 Apr 2017, at 17:56, Elvin Alin Sindrilaru <elvin.alin.sindrilaru@cern.ch> wrote:
Hi Steven,
I guess you have the ceph packages on your machine and that's why it's trying to build these libraries.
You can have a look at the Jenkins project for xrootd-project so see exactly what is the command used.
\begin{verbatim}
For ceph support I think you have to pass the --define "_with_ceph11 1" option to the rpmbuild command if you really want ceph support.
\end{verbatim}
Cheers,
Elvin
From: Steven Murray
Sent: 21 April 2017 16:48
To: Elvin Alin Sindrilaru
Subject: Do these errors look familiar?
Hi Elvin,
Do these errors look familiar? They occur when I try to build the xrootd rpms. If you haven't seen this before then I look further into this myself.
\begin{verbatim}
Checking for unpackaged file(s): /usr/lib/rpm/check-files /home/smurray/rpmbuild/BUILDROOT/xrootd-20170421.6efba1c-1.el7.cern.x86_64
error: Installed (but unpackaged) file(s) found:
/usr/lib64/libXrdCeph-4.so
/usr/lib64/libXrdCephPosix.so.0
/usr/lib64/libXrdCephPosix.so.0.0.1
/usr/lib64/libXrdCephXattr-4.so
RPM build errors:
Installed (but unpackaged) file(s) found:
/usr/lib64/libXrdCeph-4.so
/usr/lib64/libXrdCephPosix.so.0
/usr/lib64/libXrdCephPosix.so.0.0.1
/usr/lib64/libXrdCephXattr-4.so
[itdssbuild01] packaging (master) >
\end{verbatim}
Cheers,
Steve
\section{Stepping through the script}
Michael,
I had a look into this script:
https://gitlab.cern.ch/cta/CTA/blob/master/continuousintegration/docker/ctafrontend/cc7/opt/run/bin/init.sh
here is what I understood:
\subsection{2/ Config file for the DB:}
\begin{verbatim}
[root@ctafrontend ~]# cat /tmp/database-rc.sh
export DATABASETYPE=oracle
export DATABASEURL=oracle:cta_devdb5/cta_devdb05_Mon_Dec_12*@devdb12
\end{verbatim}
\subsection{3/ This get's translated to this config file:}
\begin{verbatim}
[root@ctafrontend ~]# cat /etc/cta/cta_catalogue_db.conf
oracle:cta_devdb5/PASSWORD@devdb12
\end{verbatim}
\subsection{4/ In fact, there is a /etc/cta/cta\_catalogue\_db.conf.example file that has lot of explanations.}
\subsection{5/ Once you have the above, to create DB schema, do this:}
\begin{verbatim}
DELETE EXISTING SCHEMA
cta-catalogue-schema-unlock /etc/cta/cta_catalogue_db.conf
cta-catalogue-delete-all-data /etc/cta/cta_catalogue_db.conf
cta-catalogue-schema-status /etc/cta/cta_catalogue_db.conf
cta-catalogue-schema-drop /etc/cta/cta_catalogue_db.conf
CREATE NEW SCHEMA
cta-catalogue-schema-create /etc/cta/cta_catalogue_db.conf
\end{verbatim}
\subsection{6/ For the Ceph object store, this is needed:}
\begin{verbatim}
DELETE EXISTING OBJECTSTORE CONTENT
rados -p $OBJECTSTOREPOOL --id $OBJECTSTOREID --namespace $OBJECTSTORENAMESPACE ls | xargs -itoto rados -p $OBJECTSTOREPOOL --id $OBJECTSTOREID --namespace $OBJECTSTORENAMESPACE rm toto
INITIALIZE OBJECT STORE
cta-objectstore-initialize $OBJECTSTOREURL
LIST OBJECTSTORE CONTENT
rados -p $OBJECTSTOREPOOL --id $OBJECTSTOREID --namespace $OBJECTSTORENAMESPACE ls
\end{verbatim}
\subsection{8/ /etc/cta/cta-frontend.conf file has no example, but it looks like this:}
\begin{verbatim}
[root@ctafrontend ~]# cat /etc/cta/cta-frontend.conf
ObjectStore BackendPath rados://cta-vlado@tapetest:cta-vlado
Catalogue NumberOfConnections 1
Log URL file:/cta-frontend.log
\end{verbatim}
\subsection{9/ User 'cta' needs to be created, see the command: useradd cta}
\subsection{10/ Then there is the voodoo dance with SSS, which should be explained.}
------------------------------------------------------------------
That's all for my quick reverse engineering. Please put it into the
documentation in some form, I will take it from there in ~2 weeks
when I will be looking at this again.
Cheers,
Vlado
PS: The Ceph setup is probably not complete as I received instructions
with some one-time-password which I do not know what to do with.
\section{Removing CTA}
To remove the CTA Front-end and associated packages:
......@@ -430,22 +360,6 @@ and sometimes use hyphen (\texttt{/etc/cta/cta-frontend.conf}).
- Ceph packages are needed
- oracle-instantclient12.1-meta is needed (has Provides declarations)
\subsection{3/ Make universal (non-docker), package with init/bootstrap scripts and document them.}
ctafrontend.sh contains:
\begin{verbatim}
/opt/run/bin/init_objectstore.sh
/opt/run/bin/init_database.sh
\end{verbatim}
which are not in any RPMs:
\begin{verbatim}
[root@p06253947b39467 CTA-rpms]# for i in `ls -1 cta*`; do echo $i ; rpm -qpl $i ; done|grep init_
[root@p06253947b39467 CTA-rpms]#
\end{verbatim}
\subsection{4/ ctacli.sh contains comment: <FQDN>:<TCPPort> yet the value mentioned does not have the domain specified.}
Can aliases (in general) be used (such as: ctafrontend.cern.ch)? In which circumstances YES and NO?
......@@ -467,13 +381,6 @@ within ~2 hours:
This REALLY helps a human to read the logs! I would propose to simply order
all keys alphabetically and that's it.
\subsection{9/ (DOC) Describe how to get Ceph object store}
and if that is not possible, an alternative on local filesystem.
\subsection{10/ (DOC) Can object store run on a local filesystem?}
If not (because other machines
need to have access to it) what non-Ceph alternatives there are if any (NFS, AFS, ...)?
\subsection{11/ (DOC) Describe what Oracle credentials are needed.}
Where to get them and is there an alternative (SQLite)?
......@@ -487,8 +394,6 @@ Please describe.
\subsection{14/ (DOC) Documentation should explain why three SSS are needed. Picture explaining where and how they are used would be nice.}
\subsection{15/ (DOC) cta.pdf has some too-long lines cut-off hence making them unusable.}
\subsection{17/ (DOC) How to setup an MHVTL library should be an appendinx for those who do not have a real one.}
Otherwise it is confusing as it is not explain what is part of CTA and what is external.
......
No preview for this file type
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment