Grid UI setup

From PDP/Grid Wiki
Jump to navigationJump to search

On machines that support the CVMFS file system (stoomboot and most desktop systems), you can easily set up the Grid command-line tools.

Check if your machine has CVMFS:

stbc-i2:~> ls /cvmfs
alice.cern.ch  atlas.cern.ch  lhcb.cern.ch  sft.cern.ch
stbc-i2:~> ls /cvmfs/grid.cern.ch
3.1.22-0		centos7-ui-preview-v03	emi3ui-latest	       emi-ui-3.14.0-1_sl6v1	  emi-ui-3.7.3-1_sl6v2	 emi-wn-3.10.0-1_sl6v2	    glite	    umd-sl6wn-test
3.1.39-0		centos7-ui-preview-v04	emi3ui-test	       emi-ui-3.15.3-1_sl6v1	  emi-wn-2.5.0-1	 emi-wn-3.15.3-1_sl6v1	    Grid	    util
3.1.41-0		centos7-ui-test		emi3wn-latest	       emi-ui-3.17.1-1.sl6umd4v1  emi-wn-2.5.1-1_sl6v2	 emi-wn-3.17.1-1.sl6umd4v1  pakiti	    vc
3.1.45-0		centos7-ui-v03		emi3wn-test	       emi-ui-3.17.1-1.sl6umd4v2  emi-wn-2.5.1-1_v1	 emi-wn-3.17.1-1_sl6v1	    README
3.2.11-1		centos7-wn-preview-v01	emi-ui-2.10.4-1_sl5v1  emi-ui-3.17.1-1_sl6v1	  emi-wn-2.6.0-1_sl6v1	 emi-wn-3.17.1-1_sl6v2	    umd-c7ui-test
centos7-ui-preview-v01	centos7-wn-preview-v02	emi-ui-2.10.4-1_sl6v1  emi-ui-3.17.1-1_sl6v2	  emi-wn-2.6.0-1_v1	 emi-wn-3.7.3-1_sl6v2	    umd-c7wn-test
centos7-ui-preview-v02	default			emi-ui-2.9.0-1_sl5v1   emi-ui-3.17.1-1_sl6v3	  emi-wn-3.10.0-1_sl6v1  etc			    umd-sl6ui-test

Note that CVMFS is automounted, so the grid.cern.ch subdirectory may not be there unless you explicitly ask to list (or use) it.

Now set up the command line tools:

stbc-i2:~> source /cvmfs/grid.cern.ch/etc/profile.d/setup-cvmfs-ui.sh

Now you can do things like create a grid proxy or retrieve data:

stbc-i2:~> voms-proxy-init --voms atlas
Enter GRID pass phrase for this identity:
Contacting lcg-voms2.cern.ch:15001 [/DC=ch/DC=cern/OU=computers/CN=lcg-voms2.cern.ch] "atlas"...
Remote VOMS server contacted succesfully.

Created proxy in /tmp/x509up_u5970.

Your proxy is valid until Fri Jul 21 02:16:33 CEST 2017

Support is included in CVMFS for the usual high-energy physics experiments like ATLAS, ALICE, etc. But not all of our local experiments are present. You can try this command:

. /global/ices/lcg/etc/profile.d/grid-env.sh

which does the same as the above "source" command and adds as well support for the known local experiments. If you've tried both options and you still get an error when trying to use the virtual organization (VO) for your experiment, like this:

stbc-i2:~> voms-proxy-init --voms projects.nl:/projects.nl/modulations
VOMS server for VO projects.nl is not known! Check your vomses configuration.

you can add the configuration locally ... below is an example for the "projects.nl" VO, the PDP group can help you find the right information for configuring a different VO. In any case, once you get the right information, these are the steps involved. Note that for "projects.nl", "voms.grid.sara.nl" etc you need to fill in instead the corresponding values for the VO you want.

stbc-i2:~> mkdir -p $HOME/.glite/vomsdir/projects.nl
stbc-i2:~> cat > $HOME/.glite/vomsdir/projects.nl/voms.grid.sara.nl.lsc <<EOF
/O=dutchgrid/O=hosts/OU=sara.nl/CN=voms.grid.sara.nl
/C=NL/O=NIKHEF/CN=NIKHEF medium-security certification auth
EOF 
stbc-i2:~> mkdir -p $HOME/.glite/vomses
stbc-i2:~> cat > $HOME/.glite/vomses/projects.nl-voms.grid.sara.nl <<EOF
"projects.nl" "voms.grid.sara.nl" "30028" "/O=dutchgrid/O=hosts/OU=sara.nl/CN=voms.grid.sara.nl" "projects.nl"
EOF

stbc-i2:~> export X509_VOMS_DIR=$HOME/.glite/vomsdir
stbc-i2:~> export VOMS_USERCONF=$HOME/.glite/vomses

stbc-i2:~> voms-proxy-init --voms projects.nl:/projects.nl/modulations
Enter GRID pass phrase for this identity: ....