Comments
Description
Transcript
Basic aliensh S. Bagnasco, INFN Torino
Basic aliensh S. Bagnasco, INFN Torino CNAF Nov 27-28, 2007 Preparing the certificates Certificates should be stored under $HOME/.globus Globus enforces privacy on your private key! (chmod 400) Stefano Bagnasco - INFN Torino INFN Grid School for Users - CNAF Nov 27-28, 2007 - 2 /3475 Changes in environment Stefano Bagnasco - INFN Torino INFN Grid School for Users - CNAF Nov 27-28, 2007 - 3 /3475 Getting a GRID proxy Authentication command (default is the local username) Happens every 24 hours Put certificate password Stefano Bagnasco - INFN Torino INFN Grid School for Users - CNAF Nov 27-28, 2007 - 4 /3475 Getting an AliEn token Stefano Bagnasco - INFN Torino INFN Grid School for Users - CNAF Nov 27-28, 2007 - 5 /3475 Authentication problems I Globus related: Permissions on $HOME/.globus/userkey.pem are not private to the user • chmod 400 userkey.pem Your certificate authority is exotic and not known to the server. Your certificate has expired. Clock skew: • • Your local computer time is in the future with respect to the server's time. Your local computer time is more in the past than the certificate life time. Stefano Bagnasco - INFN Torino INFN Grid School for Users - CNAF Nov 27-28, 2007 - 6 /3475 Authentication problems II alien-token-init related: You have not gone through all 5 steps of the AliEn user registration. You have not given the AliEn user name as an argument to the token-init command and your local user name is not identical to the AliEn user name. The script wants to bootstrap the installation but you don’t have write permissions on the installation path • Avoid bootstrapping by setting the GSHELL_ROOT environment variable. API servers are not working… Stefano Bagnasco - INFN Torino INFN Grid School for Users - CNAF Nov 27-28, 2007 - 7 /3475 Try it out! Upload your certificates to your machines: Store them under e.g: /afs/cern.ch/user/t/trn2301/.globus/ Check that the key file is read only. Get a valid alien token. If asked if you want to compile the gapi and xrootd libs answer YES (everything is already precompiled) Stefano Bagnasco - INFN Torino INFN Grid School for Users - CNAF Nov 27-28, 2007 - 8 /3475 Accessing the shell Message of the day. Standard bash shell with grid comands Main bash features are available. Not all shell helper programs are available. Some local commands (like ls, cat etc) are overwritten with the corresponding GRID commands. File/path tab completion in the virtual GRID directory. Stefano Bagnasco - INFN Torino INFN Grid School for Users - CNAF Nov 27-28, 2007 - 9 /3475 Shell Basic commands I Tab completion working!!! Stefano Bagnasco - INFN Torino INFN Grid School for Users - CNAF Nov 27-28, 2007 - 10 /3475 Shell Basic commands II Stefano Bagnasco - INFN Torino INFN Grid School for Users - CNAF Nov 27-28, 2007 - 11 /3475 Shell Basic commands III Stefano Bagnasco - INFN Torino INFN Grid School for Users - CNAF Nov 27-28, 2007 - 12 /3475 whereis command Stefano Bagnasco - INFN Torino INFN Grid School for Users - CNAF Nov 27-28, 2007 - 13 /3475 Viewing files I Stefano Bagnasco - INFN Torino INFN Grid School for Users - CNAF Nov 27-28, 2007 - 14 /3475 viewing files II Stefano Bagnasco - INFN Torino INFN Grid School for Users - CNAF Nov 27-28, 2007 - 15 /3475 Editing files Define your preferred editor via the variable EDITOR: 'emacs' 'emacs -nw' 'xemacs' 'xemacs -nw' 'pico' 'vi' (DEFAULT) 'vim' The file is temporary in /tmp on your local disk and then is uploaded once you exit the editor! Stefano Bagnasco - INFN Torino INFN Grid School for Users - CNAF Nov 27-28, 2007 - 16 /3475 Clean up old versions Stefano Bagnasco - INFN Torino INFN Grid School for Users - CNAF Nov 27-28, 2007 - 17 /3475 Copying out files GOLDEN RULE If you want to access your local directory structure while you are in the shell you should start by having the prefix “file:” e.g: cp file:/home/pchrist/gshell.sh gshell.sh Stefano Bagnasco - INFN Torino INFN Grid School for Users - CNAF Nov 27-28, 2007 - 18 /3475 File catalogue structure The path name will be: for ‘real’ data: /data/<Year>/<AcceleratorPeriod>/<RunNumber>/ for simulated data: /sim/<Year>/<ProductionType>/<RunNumber>/ Subdirectories will be called: Raw/ cond/ reco/<PassX>/ESD/ reco/<PassX>/AOD/ … File names will look like this: <xxxx>.AliESD.root For further information see: http://indico.cern.ch/conferenceDisplay.py?confId=3280 http://cern.ch/Oldenburg/MetaData/MetaData.doc Stefano Bagnasco - INFN Torino INFN Grid School for Users - CNAF Nov 27-28, 2007 - 19 /3475 Querying the File Catalogue aliensh:[alice] [1] find -x pp /alice/cern.ch/user/p/pchrist/Tutorial/PDC06/* *Merged*tag.root > pp.xml Redirect the output to the xml collection. Stefano Bagnasco - INFN Torino INFN Grid School for Users - CNAF Nov 27-28, 2007 - 20 /3475 Querying the File catalogue aliensh:[alice] [1] find -x pp /alice/data/2008/LHC08a/*/reco/Pass3/* *Merged*tag.root Run:collision_system=”pp” and Run:stop<"2008-03-20 10:20:33" and Run:start>"2008-03-19" > pp.xml Stefano Bagnasco - INFN Torino INFN Grid School for Users - CNAF Nov 27-28, 2007 - 21 /3475 Try it out I Access the alien shell and try some simple commands: Check your user name by typing ‘whoami’. List the contents of your home directory. Print the working directory. Create the following directory structure in your AliEn space: $HOME/bin (if it is not there) $HOME/GridSchool Get the information of the file with ‘whereis’: /alice/cern.ch/user/s/sbagnasc/GridSchool/GridSchoolNov2007.tgz Stefano Bagnasco - INFN Torino INFN Grid School for Users - CNAF Nov 27-28, 2007 - 22 /3475 Try it out II Copy the AliEn file /alice/cern.ch/user/s/sbagnasc/GridSchool/GridTutorialNovember2007.tgz to your local $HOME/GridSchool Exit the shell and unpack the file locally by typing: tar xvzf GridSchoolNov2007.tgz Enter again the shell and register: The .csh files in your AliEn $HOME/bin The .jdl files in your AliEn $HOME/GridSchool Try the -v option! Stefano Bagnasco - INFN Torino INFN Grid School for Users - CNAF Nov 27-28, 2007 - 23 /3475 Try it out iII Play with the ‘find’ command: Access the shell again and query the f.c. and get all the tag files (*.tag.root) under: /alice/sim/2007/LHC07c/pp_minbias/8268/* Get the output on your terminal (find /alice/…) Get the output on your terminal in a xml format (find -x tag /alice/…) Redirect the results to the tag.xml collection: the output will not be stored in your AliEn working directory but rather in your local working directory. Repeat the previous exercise limiting the number of output files to 5 (find -l 5 ...). Stefano Bagnasco - INFN Torino INFN Grid School for Users - CNAF Nov 27-28, 2007 - 24 /3475