Quick Guide to Dirac

From GridPP Wiki
Revision as of 11:45, 11 March 2014 by Andrew mcnab (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

DRAFT SUBJECT TO TEST DRAFT SUBJECT TO TEST DRAFT SUBJECT TO TEST DRAFT SUBJECT TO TEST DRAFT SUBJECT TO TEST DRAFT SUBJECT TO TEST


Introduction

This document describes how to quickly set up a simple Dirac client, create a job script and then submit it to a Dirac server for execution. For more help or further information on this topic, please contact janusz.martyniak@imperial.ac.uk

Server URL

The Dirac server is installed at Imperial College. The Web interface is at:

 https://dirac.grid.hep.ph.ic.ac.uk:8443

You need a certificate installed in your browser.

Dirac client installation

mkdir dirac
cd dirac
wget -np -O dirac-install http://lhcbproject.web.cern.ch/lhcbproject/dist/Dirac_project/dirac-install
chmod +x dirac-install
./dirac-install -V gridpp -r v6r9p17
source bashrc 

Note 1: The 'gridpp' in the command above does not refer to the gridpp VO - please use the command as is, independently of which VO you will use later on."

Note 2: The version (v6r9p17) should match the version given at the bottom of the GridPP DIRAC portal web pages.

Configure the client

Create a dumb, groupless proxy (mind -x). This option is to be used only when configuring the client.

Have your keys in .globus/ and the CA certs in /etc/grid-security

Make a proxy.

$ dirac-proxy-init -x

Generating proxy... 
Enter Certificate password:
Proxy generated: 
subject      : /C=UK/O=eScience/OU=Imperial/L=Physics/CN=janusz martyniak/CN=proxy
issuer       : /C=UK/O=eScience/OU=Imperial/L=Physics/CN=janusz martyniak
identity     : /C=UK/O=eScience/OU=Imperial/L=Physics/CN=janusz martyniak
timeleft     : 23:59:59
path         : /tmp/x509up_u500
username     : unknown
properties   :  


Configure defaults.

$ dirac-configure defaults-gridpp.cfg

Executing: /tmp/dirac/DIRAC/Core/scripts/dirac-configure.py defaults-gridpp.cfg  
Checking DIRAC installation at "/tmp/dirac" 


Special comand for admin users:

$ dirac-proxy-init -g dirac_admin 
Generating proxy... 
Enter Certificate password:
Proxy generated: 
subject      : /C=UK/O=eScience/OU=Imperial/L=Physics/CN=janusz martyniak/CN=proxy
issuer       : /C=UK/O=eScience/OU=Imperial/L=Physics/CN=janusz martyniak
identity     : /C=UK/O=eScience/OU=Imperial/L=Physics/CN=janusz martyniak
timeleft     : 23:59:59
DIRAC group  : dirac_admin
path         : /tmp/x509up_u500
username     : martynia
properties   : AlarmsManagement, ServiceAdministrator, CSAdministrator, JobAdministrator, FullDelegation, ProxyManagement, Operator 

Create a proxy for a community

To be able to submit a job, you need to be a member of a community (VO), here gridpp. If you are, you can create a proxy:

$ dirac-proxy-init -g gridpp_user
Generating proxy... 
Enter Certificate password:
Uploading proxy for gridpp_user... 

Proxy generated: 
subject      : /C=UK/O=eScience/OU=Imperial/L=Physics/CN=janusz martyniak/CN=proxy
issuer       : /C=UK/O=eScience/OU=Imperial/L=Physics/CN=janusz martyniak
identity     : /C=UK/O=eScience/OU=Imperial/L=Physics/CN=janusz martyniak
timeleft     : 23:59:58
DIRAC group  : gridpp_user
path         : /tmp/x509up_u500
username     : martynia
properties   : NormalUser 

You can easily verify what VOs you are a member of, by going to the Dirac website and clicking at the drop-down menu at the bottom right, next to your username@ text. If your username shows "Anonymous" it means that you are not registered as a Dirac user. Please contact janusz.martyniak at imperial.ac.uk. Other VOs: vo.londongrid.ac.uk: use 'londongrid_user'.

Create a JDL

Now we are ready to create a simple Dirac jdl. Put the lines below into a file Simple.jdl:

[
JobName = "Simple_Job";
Executable = "/bin/ls";
Arguments = "-ltr";
StdOutput = "StdOut";
StdError = "StdErr";
OutputSandbox = {"StdOut","StdErr"};
]

Submit a job

$ dirac-wms-job-submit Simple.jdl 
JobID = 236

Check job status:

$ dirac-wms-job-status 236

JobID=236 Status=Waiting; MinorStatus=Pilot Agent Submission; Site=ANY 

and eventually:

$ dirac-wms-job-status 236
JobID=236 Status=Done; MinorStatus=Execution Complete; Site=LCG.Glasgow.uk;

The jobs can also be monitored using the Web interface. Go to Jobs ->Job monitor You can also submit a job using the Web interface (Tools->Job Launchpad).