III - Configuration guide
Now that we've installed all the required packages, let's configure and bring up our CTA instance step by step.
This guide is an approach to an easy, basic installation. However, note that:
It is assumed that you've created an oracle or postgresql database to use as the Catalogue DB.
It is assumed that you've created a VFS or NFS to create the ObjectStore later (this guide does not cover Ceph configuration steps).
It is assumed that you have got a Kerberos server and that you're able to create a keytab.
1. Initialise the ObjectStore
First step is to initialize the space that our tape system will be using to store (shared) objects between our servers, as its name implies.
It is recommended to use Ceph in a production system, however it is not mandatory. This guide will cover the initialisation of a Network File System (NFS) as the ObjectStore.
First, check that you've mounted your NFS and installed the cta-objectstore-tools
package:
Create the configuration file at /etc/cta/cta-objectstore-tools.conf
and include the following line:
Execute the following commands:
Let's use cta-objectstore-list
. You should see the AgentRegister, DriveRegister and SchedulerGlobalLock processes for the moment. You're done.
Note: do not manipulate or remove any of the processes or objects under any circumstances, except you know very well what you're doing!
2. Create the Catalogue
You can either use Oracle or PostgreSQL as your database to contain your Catalogue. Steps are the same.
Assuming that you've already created a database, let's write down the connection string at /etc/cta/catalogue.conf file. Use the correct format of the ones below according to your DB system:
Make sure you have the cta-catalogueutils
package installed. Now, let's use this connection string to create our database schema:
Check if the schema has been created correctly:
There is a command for dropping the schema. Use this at your own risk!
3. Create an admin user
Once you've created the schema for the catalogue, it's time to create now an admin user that will be able to query the catalogue's data through cta-admin commands.
Important: the name given to the admin user has to match the name given to the kerberos user.
You can have multiple admin users, as long as they have their own kerberos keytab to generate valid tickets.
4. Set up the authentication
Before starting, verify that you have an user named 'cta' . It should be created when installing the packages. If not, create it. Then, you also have to create the group 'tape'. This user and group will be the owners of some of our keytabs:
Let's start by configuring the Kerberos authentication. Make sure you have the krb5-workstation
package installed. Then, modify your /etc/krb5.conf
file and replace the information to point at your kerberos server.
As mentioned before, you'll also need to generate a kerberos keytab for your admin user to be able to execute admin commands from the krb server.
Simply copy your keytab to the /etc/cta
directory and change the owner and group:
Then, generate a valid ticket with the following command:
To check if your ticket has generated correctly, execute:
Tickets are valid for 24 hours by default. It is up to you to change these settings on your krb server or create a cron executing the kinit command every day.
You're done with the Kerberos part of the authentication. Now, let's create the Simple Shared Secret (SSS) keytabs. These are also required for the frontend to work.
First, check that you have installed the xrootd-server
package. Then, execute:
5. Configure the CTA frontend
You've finished creating all these keytabs. Let's bring our first service up, which will be the cta-frontend daemon.
First of all, take a look at the contents of the frontend configuration file. It is located at /etc/cta/cta-frontend-xrootd.conf
. For now, you can leave almost every parameter at its default value, except these ones:
Now, edit the /etc/sysconfig/cta-taped
file and make sure it is pointing at the correct SSS keytab:
Modify the cta.endpoint at file /etc/cta/cta-cli.conf
. You can leave all other values at default. You should specify the machine where you are installing the frontend.
Create the necessary logfiles:
Start the daemon and check its status:
Now you should be able to do your first cta-admin command:
If it does not work, try with the debug option or check the troubleshooting section.
Now, let's start the other frontend daemon, cta-frontend-grpc. This one is in charge of receiving the requests from dCache and transmitting them to the other CTA components.
Before starting the service, check the /etc/systemd/system/cta-frontend-grpc.service
file. The user and tape specified must be the following:
Save the changes:
Create the configuration file for the daemon at /etc/cta/cta.conf
. This file must include the following parameters:
The cta-frontend-grpc logs directly at /var/log/messages
. However, you can redirect the logs with simple this rsyslog rule (must be in /etc/rsyslog.d
directory):
Create the logfile and restart rsyslog:
Now, let's start the daemon:
You're done setting up the whole frontend! Let's continue with the tapeserver part.
6. Creating the udev rules
In this step we are using an udev rule to create a symbolic link to the SCSI media changer device.
Create the file /etc/udev/rules.d/00-cta.rules
and add the following content:
Once done, reboot your machine or apply the rules with the following command:
7. Configuring the cta-rmcd daemon
This service should run on the tapeserver where your drive(s) are connected to.
First, check that you have installed the cta-smc
and cta-rmcd
packages. Then, make sure to have this line at /etc/sysconfig/cta-rmcd
file:
Create the logfile and give permissions:
Start the service:
You can now use cta-smc commands as a replacement of mtx commands. It is useful to quickly check some information and do manual tape operations.
Here are a few examples of what you can do, but check the manpage of cta-smc to see the complete list of options.
8. Configuring the cta-taped daemon
First, let's check the configuration file, /etc/cta/cta-taped.conf
. For now, you can leave all the default values except for these lines, which you'll have to uncomment:
Now, go to /etc/sysconfig/cta-taped
. Specify the logfile and the correct sss keytab:
We have to register a drive manually. Add a line at /etc/cta/TPCONFIG
. Take a look at the columns.
DRIVE_NAME : the identifier that will be displayed when listing the drives with cta-admin, so think of a good nomenclature to identify them easily.
LOGICAL_LIBRARY_NAME: the name you want your logical library to have, and under which the drive will be operating.
DRIVE_DEVICE: Corresponds to the No-rewind SCSI Device (/dev/nstX). If we only have one drive on the tape server, it will always be nst0.
LIBRARY_SLOT: Corresponds to the SCSI Media Changer Device. It is always smcX, where X corresponds to the drive ordinal assigned. Look up the drive ordinal with "cta-smc -q D"
An example of a TPCONFIG file with one drive would be:
Create the logfile and give permissions:
Finally, start the cta-taped service:
You're done configuring all of the necessary files and services of CTA, and have them all running. With all this done, we can jump to filling our logical library metadata with cta-admin commands. (See: Chapter III)
Last updated