DIRAC Pilot System deployed at I3S

DIRAC web inteface: https://grid.unice.fr:9001/DIRAC/

DIRAC Server Installation

install db ComponentMonitoringDB
install db NotificationDB
install db JobDB
install db PilotAgentsDB
install db ProxyDB
install db SandboxMetadataDB
install db SystemLoggingDB
install db TaskQueueDB
install db UserProfileDB
install db MPIJobDB
install db JobLoggingDB

install agent Configuration CE2CSAgent
install agent Framework CAUpdateAgent
install agent Framework SystemLoggingDBCleaner
install agent Framework TopErrorMessagesReporter
install agent WorkloadManagement JobCleaningAgent
install agent WorkloadManagement MightyOptimizer
install agent WorkloadManagement PilotStatusAgent
install agent WorkloadManagement StalledJobAgent
install agent WorkloadManagement TaskQueueDirector

install service Framework BundleDelivery
install service Framework Monitoring
install service Framework Notification
install service Framework ProxyManager
install service Framework SecurityLogging
install service Framework SystemLogging 
install service Framework SystemLoggingReport
install service Framework UserProfileManager
install service WorkloadManagement JobManager
install service WorkloadManagement JobMonitoring
install service WorkloadManagement JobStateUpdate
install service WorkloadManagement Matcher
install service WorkloadManagement SandboxStore
install service WorkloadManagement WMSAdministrator

Adding user automatically

$ dirac-admin-add-user -h
2011-03-17 15:32:34 UTC Framework NOTICE: Add or Modify a User info in DIRAC
2011-03-17 15:32:34 UTC Framework NOTICE: Usage:
2011-03-17 15:32:34 UTC Framework NOTICE: dirac-admin-add-user [option|cfgfile] ... Property=<Value> ...
2011-03-17 15:32:34 UTC Framework NOTICE: Arguments:
2011-03-17 15:32:34 UTC Framework NOTICE:  Property=<Value>: Properties to be added to the User like (Phone=XXXX) 
2011-03-17 15:32:34 UTC Framework NOTICE: General options: 
2011-03-17 15:32:34 UTC Framework NOTICE:   -o:  --option=         : Option=value to add 
2011-03-17 15:32:34 UTC Framework NOTICE:   -s:  --section=        : Set base section for relative parsed options 
2011-03-17 15:32:34 UTC Framework NOTICE:   -c:  --cert=           : Use server certificate to connect to Core Services 
2011-03-17 15:32:34 UTC Framework NOTICE:   -d   --debug           : Set debug mode (-dd is extra debug) 
2011-03-17 15:32:34 UTC Framework NOTICE:   -h   --help            : Shows this help 
2011-03-17 15:32:34 UTC Framework NOTICE:  
2011-03-17 15:32:34 UTC Framework NOTICE: Options: 
2011-03-17 15:32:34 UTC Framework NOTICE:   -N:  --UserName:       : Short Name of the User (Mandatory) 
2011-03-17 15:32:34 UTC Framework NOTICE:   -D:  --UserDN:         : DN of the User Certificate (Mandatory) 
2011-03-17 15:32:34 UTC Framework NOTICE:   -M:  --UserMail:       : eMail of the user (Mandatory) 
2011-03-17 15:32:34 UTC Framework NOTICE:   -G:  --UserGroup:      : Name of the Group for the User (Allow Multiple instances or None)

Uploading a proxy by dirac admin instead of proxy init

$ dirac-admin-upload-proxy -h
2011-03-17 15:47:31 UTC Framework NOTICE:   Upload a proxy to the Proxy Manager using delegation
2011-03-17 15:47:31 UTC Framework NOTICE: Usage:
2011-03-17 15:47:31 UTC Framework NOTICE:   dirac-admin-upload-proxy [option|cfgfile] ... Group
2011-03-17 15:47:31 UTC Framework NOTICE: Arguments:
2011-03-17 15:47:31 UTC Framework NOTICE:   Group:    Group name in the uploaded proxy 
2011-03-17 15:47:31 UTC Framework NOTICE: General options: 
2011-03-17 15:47:31 UTC Framework NOTICE:   -o:  --option=         : Option=value to add 
2011-03-17 15:47:31 UTC Framework NOTICE:   -s:  --section=        : Set base section for relative parsed options 
2011-03-17 15:47:31 UTC Framework NOTICE:   -c:  --cert=           : Use server certificate to connect to Core Services 
2011-03-17 15:47:31 UTC Framework NOTICE:   -d   --debug           : Set debug mode (-dd is extra debug) 
2011-03-17 15:47:31 UTC Framework NOTICE:   -h   --help            : Shows this help

DERBY

nohup java -classpath /var/www/db-derby-10.6.1.0/lib/derby.jar:/var/www/db-derby-10.6.1.0/lib/derbynet.jar:/var/www/db-derby-10.6.1.0/lib/derbytools.jar:/var/www/db-derby-10.6.1.0/lib/derbyclient.jar org.apache.derby.drda.NetworkServerControl start &

Fix a bug in DIRAC

After installing DIRAC, insert this line to: opt/dirac/pro/DIRAC/ConfigurationSystem/Agent/CE2CSAgent.py

from DIRAC.ConfigurationSystem.Client.Helpers              import getCSExtensions, getVO

Change the web portal port for DIRAC

Change in the file:

/opt/dirac//versions/*/Linux_x86_64_glibc-2.5/etc/lighttpd.conf
server.port = <port> // server.port = 9000
$SERVER["socket"] == ":<socket>"{ ... // $SERVER["socket"] == ":9001"

Logs configuration

Change the log level

Change to runit directory. In each service directory, change the log level parameter in run executable file.

Configure logrotate for DIRAC logs

It is highly recommended to run a logrotate on the logfile of the TaskQueueDirector as it produces several MB per day. Here is an example config file for logrotate

create /etc/logrotate.d/dirac

/opt/dirac/runit/WorkloadManagement/TaskQueueDirector/log/current {
 daily
 rotate 30
 copytruncate
 compress
 notifempty
 missingok

}

Upgrade from v5r12p7 to v6r0

From the version v5r12p7, we should upgrade to v5r14 prior to v6r0.

Perform following commands under user dirac:

$ python /opt/dirac/pro/scripts/dirac-install -r v5r14 -t server -e Web -g 2010-11-20 /opt/dirac/etc/dirac.cfg
$ python /opt/dirac/pro/scripts/dirac-install -r v6r0 -t server -e Web -g 2011-06-06 /opt/dirac/etc/dirac.cfg

If you use non-default web port, you should modify it since after upgrading, configuration files will be replaced by the default ones. See the previous comments to change the web port.

To verify if all services work or generate errors, use a log watch script below:

vim LogWatch.sh

#!/bin/bash
for i in `ls /opt/dirac/startup` 
do   
  tail /opt/dirac/startup/$i/log/current;   
  echo "====================="; 
  echo $i; 
  echo "====================="; 
done

Other configurations to be done:

1. Change pilot version in the configuration file to version v6r0:

Operations→biomed→Dirac-Production→Versions→PilotVersion=v6r0

2. Disable EELA extension (comment the line: Extensions = EELA)

3. Add DIRAC RSS configuration to configuration file in section “Operations”

4. Modify the datadir parameter in “/opt/dirac/pro/mysql/share/mysql/mysql.server”

datadir=/opt/dirac/mysql/db
export HOME=/opt/dirac/mysql

Update server certificate

In case the server certificate is renewd, it must be updated in DIRAC: copy hostcert.pem and hostkey.pem into /opt/dirac/etc/grid-security/

Manage and monitor DIRAC services

$ source /opt/dirac/bashrc
$ cd /opt/dirac/startup

Show current status of all dirac services

$ runsvstat *

We can replace “*” by a any service, for instance:

$ runsvstat Accounting_ReportGenerator

Shutdown all services

$ runsvctrl d *

Or:

$ runsvctrl d Accounting_ReportGenerator Framework_Monitoring

Start all services

$ runsvctrl u *

Or:

$ runsvctrl t Accounting_ReportGenerator Framework_Monitoring

Deploy a DIRAC client

Installation

mkdir dirac-client
cd dirac-client
wget -np http://cern.ch/lhcbproject/dist/Dirac_project/dirac-install
chmod +x dirac-install

# Choose either v6:
./dirac-install -r v6r4p20
# Or v5
./dirac-install -r v5r12 -g 2010-11-20

source bashrc

# This will store the client configuration in etc/dirac.cfg
dirac-configure -V biomed -S Dirac-Production -C dips://ui-egee.unice.fr:9135/Configuration/Server --SkipCAChecks

# Make sure you have usercert.pem and userkey.pem in the $HOME/.globus folder
proxy-init

Upgrade

Optionally, you may want to upgrade your DIRAC client, for instance:

dirac-install -r v6r4p30