Presentation is loading. Please wait.

Presentation is loading. Please wait.

FP6−2004−Infrastructures−6-SSA-026409 www.eu-eela.org E-infrastructure shared between Europe and Latin America Practicals on Security – Infosys -- WMS.

Similar presentations


Presentation on theme: "FP6−2004−Infrastructures−6-SSA-026409 www.eu-eela.org E-infrastructure shared between Europe and Latin America Practicals on Security – Infosys -- WMS."— Presentation transcript:

1 FP6−2004−Infrastructures−6-SSA-026409 www.eu-eela.org E-infrastructure shared between Europe and Latin America Practicals on Security – Infosys -- WMS GILDA Tutors INFN EELA Tutorial Madrid, 23.02.2006

2 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 2 Access to the User Interface Login madridXX@glite-tutor.ct.infn.it where XX=01,..40 Passwd : GridMADXX XX=01,..,40 PEM PASSPHRASE : MADRID

3 FP6−2004−Infrastructures−6-SSA-026409 www.eu-eela.org E-infrastructure shared between Europe and Latin America Practicals on VOMS and MyProxy Emidio Giorgio INFN

4 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 4 Outline VOMS proxy usage MyProxy Usage

5 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 5 Preliminary :.globus directory.globus directory contains your personal public / private keys Pay attention to permissions – userkey.pem contains your private key, and must be readable just by yourself (400) – usercert.pem contains your public key, which should be readable also from outside (644) [ glite-tutor ] /home/giorgio > ls -l.globus total 8 -rw-r--r-- 1 giorgio users 1613 Oct 4 19:30 usercert.pem -r-------- 1 giorgio users 1914 Oct 4 19:30 userkey.pem

6 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 6 voms-proxy-init : options Main options -voms  command syntax is :/ /group for group specify (default none)  command syntax is :/ /Role= for Role choice (default none) -valid x:y, create a proxy valid for x hours and y minutes -vomslife x, create a proxy with AC valid for x hours (max 24 h) -cert Non-standard location of user certificate -key Non-standard location of user key -out Non-standard location of new proxy cert -userconf Non-standard location for user-defined voms server addresses Default location for voms server address file is /opt/glite/etc/vomses or $HOME/.glite/vomses. Syntax : “vo-nickname" “voms server FQDN" “port“ “voms server \ certificate subject" “vo name“ Parameters for vomses are usually provided by VOs manager voms-proxy-init –-voms gilda:/gilda voms-proxy-init --voms gilda:/gilda

7 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 7 Verify your credentials Exercise 1 : create a voms proxy then verify obtained credentials with voms-proxy-info –Main options : -all prints all proxy options -file specifies a different location of proxy file

8 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 8 VOMS proxy info /home/giorgio > voms-proxy-info -all subject : /C=IT/O=GILDA/OU=Personal Certificate/L=INFN/CN=Emidio Giorgio/Email=emidio.giorgio@ct.infn.it/CN=proxy issuer : /C=IT/O=GILDA/OU=Personal Certificate/L=INFN/CN=Emidio Giorgio/Email=emidio.giorgio@ct.infn.it identity : /C=IT/O=GILDA/OU=Personal Certificate/L=INFN/CN=Emidio Giorgio/Email=emidio.giorgio@ct.infn.it type : proxy strength : 512 bits path : /tmp/x509up_u513 timeleft : 11:59:52 === VO gilda extension information === VO : gilda subject : /C=IT/O=GILDA/OU=Personal Certificate/L=INFN/CN=Emidio Giorgio/Email=emidio.giorgio@ct.infn.it issuer : /C=IT/O=GILDA/OU=Host/L=INFN Catania/CN=voms.ct.infn.it/Email=emidio.giorgio@ct.infn.it attribute : /gilda/tutors/Role=NULL/Capability=NULL attribute : /gilda/Role=NULL/Capability=NULL timeleft : 11:59:45 Standard globus attributes Voms extensions

9 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 9 Long term proxy : MyProxy myproxy server: –myproxy-init  Allows to create and store a long term proxy certificate: –myproxy-info  Get information about stored long living proxy –myproxy-get-delegation  Get a new proxy from the MyProxy server –myproxy-destroy –Check out them with myproxy-xxx --help option A dedicated service on the RB can renew automatically the proxy –contacting the myproxy server

10 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 10 myproxy-init [giorgio@glite-tutor:~]$ myproxy-init -s grid001.ct.infn.it Your identity: /C=IT/O=GILDA/OU=Personal Certificate/L=INFN/CN=Emidio Giorgio/Email=emidio.giorgio@ct.infn.it Enter GRID pass phrase for this identity: Creating proxy..................................................... Done Proxy Verify OK Your proxy is valid until: Sun Jun 19 21:18:27 2005 Enter MyProxy pass phrase: Verifying password - Enter MyProxy pass phrase: A proxy valid for 168 hours (7.0 days) for user giorgio now exists on grid001.ct.infn.it. Principal options -c hours specifies lifetime of stored credentials -t hours specifies the maximum lifetime of credentials when retrieved -s specifies the myproxy server where to store credentials -d stores credential with the distinguished name in proxy, instead of user name (mandatory for some data management services and proxy renewal) For proxy renewal it’s also mandatory –n (no passphrase). You’ve to specify also subject of principals that can renew a delegation (-R subject, or -A for any principal)

11 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 11 myproxy-info Useful to retrieve info on stored credentials Need local credentials to be performed If credentials have been initialized with –d switch, you have also to specify it there [giorgio@glite-tutor:~]$ myproxy-info -s grid001.ct.infn.it username: giorgio owner: /C=IT/O=GILDA/OU=Personal Certificate/L=INFN/CN=Emidio Giorgio/Email=emidio.giorgio@ct.infn.it timeleft: 167:55:34 (7.0 days)

12 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 12 myproxy-get-delegation This command is used to retrieve a delegation from a long lived proxy stored on myproxy server It is independent by the machine ! You don’t need to have your certificate on board If credentials have been initialized with –d switch, you have to specify it also in myproxy-get-delegation request [giorgio@glite-tutor:~]$ myproxy-get-delegation \ -s grid001.ct.infn.it Enter MyProxy pass phrase: A proxy has been received for user giorgio in /tmp/x509up_u513

13 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 13 myproxy-destroy Delete, if existing, the long lived credentials on the specified myproxy server [glite-tutor] /home/giorgio > myproxy-destroy \ -s grid001.ct.infn.it Default MyProxy credential for user giorgio was successfully removed.

14 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 14 Exercise Exercise 2 –Create a myproxy on the server grid001.ct.infn.it, with lifetime set to 96 –Visualize information on that –Create a myproxy with –d option –Which differences you note ? –Destroy both

15 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 15 Storing long lived voms proxies myproxy doesn’t support natively VOMS To allow storing of voms ext., myproxy client has been modified, The faculty of choosing VO and group/roles has been added, while the previous options have all been kept Proxies then retrieved with myproxy-get-delegation will have the requested voms extension but… There’s a limitation, due to voms extensions lifetime: tipically it’s limited, and it’s not renewed when performing myproxy-get-delegation Studying solutions to extend voms extension renew in get-delegation The “modified” client is available only on GILDA UI’s Will be largely deployed when the above issues will be solved myproxy-init --voms gilda

16 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 16 voms extension on a delegated proxy [ui-test] /home/giorgio > myproxy-get-delegation -s grid001.ct.infn.it Enter MyProxy pass phrase: A proxy has been received for user giorgio in /tmp/x509up_u500 [ui-test] /home/giorgio > voms-proxy-info -all subject : /C=IT/O=GILDA/OU=Personal Certificate/L=INFN/CN=Emidio Giorgio/Email=emidio.giorgio@ct.infn.it/CN=proxy/CN=proxy/CN=prox y issuer : /C=IT/O=GILDA/OU=Personal Certificate/L=INFN/CN=Emidio Giorgio/Email=emidio.giorgio@ct.infn.it/CN=proxy/CN=proxy identity : /C=IT/O=GILDA/OU=Personal Certificate/L=INFN/CN=Emidio Giorgio/Email=emidio.giorgio@ct.infn.it/CN=proxy/CN=proxy type : unknown strength : 512 bits path : /tmp/x509up_u500 timeleft : 12:00:09 === VO gilda extension information === VO : gilda subject : /C=IT/O=GILDA/OU=Personal Certificate/L=INFN/CN=Emidio Giorgio/Email=emidio.giorgio@ct.infn.it issuer : /C=IT/O=GILDA/OU=Host/L=INFN Catania/CN=voms.ct.infn.it/Email=emidio.giorgio@ct.infn.it attribute : /gilda/Role=NULL/Capability=NULL attribute : /gilda/tutors/Role=NULL/Capability=NULL timeleft : 23:59:57 Voms extension lifetime

17 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 17 Questions…

18 FP6−2004−Infrastructures−6-SSA-026409 www.eu-eela.org E-infrastructure shared between Europe and Latin America GILDA Praticals : Information systems GILDA Tutors INFN EELA Tutorial Madrid, 23.02.2006

19 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 19 Explore the GILDA Testbed

20 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 20 How to query the IS? In order to query directly the IS elements two higher level tools are presented. lcg-infositeslcg-info These tools should be enough for most common user needs and will usually avoid the necessary of raw LDAP queries.

21 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 21 lcg-infosites The lcg-infosites command can be used as an easy way to retrieve information on Grid resources for the most use cases. USAGE: lcg-infosites --vo options -v --is

22 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 22 lcg-infosites options

23 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 23 Exercise 1 Obtaining information about CE

24 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 24 Obtaining information about CE $ lcg-infosites --vo gilda ce These are the related data for gilda: (in terms of queues and CPUs) **************************************************************** #CPU Free Total Jobs Running Waiting ComputingElement ------------------------------------------------------------------------------------------ 4 3 0 0 0 cn01.be.itu.edu.tr:2119/jobmanager-lcglsf-long 4 3 0 0 0 cn01.be.itu.edu.tr:2119/jobmanager-lcglsf-short 34 33 0 0 0 grid010.ct.infn.it:2119/jobmanager-lcgpbs-long 16 16 0 0 0 grid011f.cnaf.infn.it:2119/jobmanager-lcgpbs-long 1 1 0 0 0 grid006.cecalc.ula.ve:2119/jobmanager-lcgpbs-log [..] $ lcg-infosites --vo gilda ce -v 2 ************************************************************** These are the related data for gilda: (in terms of CEs) ************************************************************** RAMMemory Operating System System Version Processor CE Name ------------------------------------------------------------------------------------------------------------------------- 4096 SL 3 Xeon cn01.be.itu.edu.tr 1024 SLC 3 P4 dgt01.ui.savba.sk 917 SLC 3 PIII gilda-ce-01.pd.infn.it 1024 SLC 3 Athlon gildace.oact.inaf.it 256 SLC 3 PIII grid004.iucc.ac.il

25 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 25 Exercise 2 Obtaining information about SE

26 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 26 Obtaining information about SE $ lcg-infosites --vo gilda se ************************************************************** These are the related data for gilda: (in terms of SE) ************************************************************** Avail Space(Kb) Used Space(Kb) Type SEs -------------------------------------------------------------------------------------- 143547680 2472756 disk cn02.be.itu.edu.tr 168727984 118549624 disk grid009.ct.infn.it 13908644 2819288 disk grid003.cecalc.ula.ve 108741124 2442872 disk gildase.oact.inaf.it 28211488 2948292 disk testbed005.cnaf.infn.it 349001680 33028 disk gilda-se-01.pd.infn.it 31724384 2819596 disk cna03.cna.unicamp.br 387834656 629136 disk grid-se.bio.dist.unige.it

27 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 27 Exercise 3 Listing the closeSE

28 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 28 Listing the close Storage Elements $ lcg-infosites --vo gilda closeSE Name of the CE: cn01.be.itu.edu.tr:2119/jobmanager-lcglsf-long Name of the close SE: cn02.be.itu.edu.tr Name of the CE: cn01.be.itu.edu.tr:2119/jobmanager-lcglsf-short Name of the close SE: cn02.be.itu.edu.tr Name of the CE: grid010.ct.infn.it:2119/jobmanager-lcgpbs-long Name of the close SE: grid009.ct.infn.it Name of the CE: grid011f.cnaf.infn.it:2119/jobmanager-lcgpbs-long Name of the close SE: testbed005.cnaf.infn.it

29 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 29 Exercise 4 Listing tag of installed software

30 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 30 Listing tags of installed software $ lcg-infosites --vo gilda tag ************************************************************************** Information for gilda relative to their software tags included in each CE ************************************************************************** Name of the TAG: VO-gilda-GEANT Name of the TAG: VO-gilda-GKS05 Name of the CE:cn01.be.itu.edu.tr Name of the TAG: VO-gilda-slc3_ia32_gcc323 Name of the TAG: VO-gilda-CMKIN_5_1_1 Name of the TAG: VO-gilda-GEANT Name of the TAG: VO-gilda-GKS05 Name of the CE:grid010.ct.infn.it [..]

31 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 31 lcg-info intro This command can be used to list either CEs or the SEs that satisfy a given set of conditions, and to print the values of a given set of attributes. The information is taken from the BDII specified by the LCG_GFAL_INFOSYS environment variable. The query syntax is like this: attr1 op1 valueN,... attrN opN valueN where attrN is an attribute name op is =, >= or <=, and the cuts are ANDed. The cuts are comma-separated and spaces are not allowed.

32 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 32 USAGE lcg-info --list-ce [--bdii bdii] [--vo vo] [--sed] [--query query] [--attrs list] lcg-info --list-se [--bdii bdii] [--vo vo] [--sed] [--query query] [--attrs list] lcg-info --list-attrs lcg-info --help lcg-info usage

33 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 33 lcg-info options

34 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 34 Exercise 5 Get the list of supported attributes

35 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America 4 th EGEE Conference - Pisa, 24-28 October 2005 35 Get the list of supported attributes $ lcg-info --list-attrs Attribute name Glue object class Glue attribute name MaxTime GlueCE GlueCEPolicyMaxWallClockTime CEStatus GlueCE GlueCEStateStatus TotalJobs GlueCE GlueCEStateTotalJobs CEVOs GlueCE GlueCEAccessControlBaseRule TotalCPUs GlueCE GlueCEInfoTotalCPUs FreeCPUs GlueCE GlueCEStateFreeCPUs CE GlueCE GlueCEUniqueID WaitingJobs GlueCE GlueCEStateWaitingJobs RunningJobs GlueCE GlueCEStateRunningJobs CloseCE GlueCESEBindGroup GlueCESEBindGroupCEUniqueID CloseSE GlueCESEBindGroup GlueCESEBindGroupSEUniqueID SEVOs GlueSA GlueSAAccessControlBaseRule UsedSpace GlueSA GlueSAStateUsedSpace AvailableSpace GlueSA GlueSAStateAvailableSpace Type GlueSE GlueSEType SE GlueSE GlueSEUniqueID Protocol GlueSEAccessProtocol GlueSEAccessProtocolType ArchType GlueSL GlueSLArchitectureType Processor GlueSubCluster GlueHostProcessorModel OS GlueSubCluster GlueHostOperatingSystemName Cluster GlueSubCluster GlueSubClusterUniqueID Tag GlueSubCluster GlueHostApplicationSoftwareRunTimeEnvironment Memory GlueSubCluster GlueHostMainMemoryRAMSize

36 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 36 Exercise 6 List all the CE(s) in the BDII satisfying given conditions

37 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 37 lcg-info examples $ lcg-info --list-ce --query 'TotalCPUs=10,OS=SL*' --attrs 'RunningJobs,FreeCPUs‘ - CE: grid010.ct.infn.it:2119/jobmanager-lcgpbs-long - RunningJobs 0 - FreeCPUs 33 - CE: grid010.ct.infn.it:2119/jobmanager-lcgpbs-short - RunningJobs 0 - FreeCPUs 33 - CE: grid010.ct.infn.it:2119/jobmanager-lcgpbs-infinite - RunningJobs 1 - FreeCPUs 33 - CE: skurut1.cesnet.cz:2119/jobmanager-lcgpbs-long - RunningJobs 0 - FreeCPUs 26 [..] List all the CE(s) in the BDII satisfying given conditions

38 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 38 Exercise 7 List all the CE(s) in the BDII satisfying given condition FreeCPU =30

39 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 39 $ lcg-info --list-ce --query 'FreeCPUs = 10‘--attrs ‘FreeCPUs’ - CE: grid010.ct.infn.it:2119/jobmanager-lcgpbs-long - FreeCPUs 10 - CE: grid010.ct.infn.it:2119/jobmanager-lcgpbs-short - FreeCPUs 10 - CE: grid010.ct.infn.it:2119/jobmanager-lcgpbs-infinite - FreeCPUs 10 [..] List all the CE(s) which satisfying the condition FreeCPU >=30 lcg-info examples (cont.)

40 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 40 Exercise 8 Print all the tags published by a specific CE

41 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America 4 th EGEE Conference - Pisa, 24-28 October 2005 41 Print all the tags published by a specific query $ lcg-info --list-ce --query 'CE=*gilda-ce-01.pd.infn.it:2119*‘ - -attrs ‘Tag’ PBS INFN CATANIA LCG-2 LCG-2_1_0 LCG-2_1_1 LCG-2_2_0 LCG-2_3_0 LCG-2_3_1 LCG-2_4_0 R-GMA AFS CMS-1.1.0 ATLAS-6.0.4 GATE-1.0.0-3 LHCb-1.1.1 IDL-5.4 CMSIM-125 ALICE-4.01.00 ALIEN-1.32.14 POVRAY-3.5 DEMTOOLS-1.0 CMKIN-VALID CMKIN-1.1.0 CMSIM-VALID CSOUND-4.13 MPICH VIRGO-1.0 CMS-OSCAR-2.4.5 LHCb_dbase_common-v3r1 GEANT4-6 VLC-0.7.2 EGEODE-1.0 RASTER3D SCILAB-2.6 G95-3.5.0 MAGIC-6.19 CODESA3D-1.0 VO-gilda-slc3_ia32_gcc323 VO-gilda-CMKIN_5_1_1 VO-gilda-GEANT VO-gilda-GKS05

42 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 42 Exercise 9 List the CEs with a particular Software

43 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 43 $ lcg-info –vo gilda --list-ce --query ‘Tag=*MPICH*’ --attrs ‘CE’ - CE: cn01.be.itu.edu.tr:2119/jobmanager-lcglsf-long - CE cn01.be.itu.edu.tr:2119/jobmanager-lcglsf-long - CE: cn01.be.itu.edu.tr:2119/jobmanager-lcglsf-short - CE cn01.be.itu.edu.tr:2119/jobmanager-lcglsf-short - CE: grid010.ct.infn.it:2119/jobmanager-lcgpbs-long - CE grid010.ct.infn.it:2119/jobmanager-lcgpbs-long - CE: grid011f.cnaf.infn.it:2119/jobmanager-lcgpbs-long - CE grid011f.cnaf.infn.it:2119/jobmanager-lcgpbs-long - CE: ced-ce0.datagrid.cnr.it:2119/jobmanager-lcgpbs-long - CE ced-ce0.datagrid.cnr.it:2119/jobmanager-lcgpbs-long [..] List the CEs with a particular SW

44 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 44 Exercise 10 List the SEs satisfying given query

45 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 45 List the SEs satisfying given query $ lcg-info –vo gilda --list-se --query ‘AvailableSpace=100000’ --attrs ‘CloseCE’ - SE: cn02.be.itu.edu.tr - CloseCE cn01.be.itu.edu.tr:2119/jobmanager-lcglsf-long cn01.be.itu.edu.tr:2119/jobmanager-lcglsf-short cn01.be.itu.edu.tr:2119/jobmanager-lcglsf-infinite - SE: grid009.ct.infn.it - CloseCE grid010.ct.infn.it:2119/jobmanager-lcgpbs-long grid010.ct.infn.it:2119/jobmanager-lcgpbs-short grid010.ct.infn.it:2119/jobmanager-lcgpbs-infinite - SE: ced-se0.datagrid.cnr.it - CloseCE ced-ce0.datagrid.cnr.it:2119/jobmanager-lcgpbs-long ced-ce0.datagrid.cnr.it:2119/jobmanager-lcgpbs-short ced-ce0.datagrid.cnr.it:2119/jobmanager-lcgpbs-infinite - SE: grid003.cecalc.ula.ve - CloseCE grid006.cecalc.ula.ve:2119/jobmanager-lcgpbs-cert grid006.cecalc.ula.ve:2119/jobmanager-lcgpbs-long grid006.cecalc.ula.ve:2119/jobmanager-lcgpbs-short grid006.cecalc.ula.ve:2119/jobmanager-lcgpbs-infinite [..]

46 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 46 Questions…

47 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 47 R-GMA Practical Valeria Ardizzone

48 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 48 To Start the R-GMA command line tool run the following command: >rgma On startup you should receive the following message: R-GMA Command Line Tool (1)

49 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 49 Commands are entered by typing at the rgma> prompt and hitting ‘enter’ to execute the command. A history of the commands executed can be accessed using the Up and Down arrow keys. To search a command from history use CTRL-R and type the first few letters of the command to recall. Command autocompletion is supported (use Tab when you have partly entered a command). Entering Command

50 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 50 General Commands help Display general help information. help Display help for a specific command. exit or quit Exit from R-GMA command line interface. Show tables Display the name of all tables existing in the Schema Describe Show all information about the structure of a table

51 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 51 Querying Data (1) Querying data uses the standard SQL SELECT statement, e.g.: rgma> SELECT * FROM GlueService The behaviour of SELECT varies according to the type of query being executed. In R-GMA there are three basic types of query: LATEST Queries only the most recent tuple for each primary key HISTORY Queries all historical tuples for each primary key CONTINUOUS Queries returns tuples continuously as they are inserted.

52 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 52 The type of query can be changed using the SET QUERY command as follow: rgma> SET QUERY LATEST or rgma> SET QUERY CONTINUOUS The current query type can be displayed using rgma> SHOW QUERY Querying Data (2)

53 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 53 Exercises 1.Display all the table of the Schema rgma>show tables 2.Display information about GlueSite table rgma>describe GlueSite 3.Basic select query on the table named GlueSite rgma>set query latest rgma>show query rgma>select Name,Latitude,Longitude from GlueSite

54 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 54 Maximum AGE of tuples The maximum age of tuples to return can also be controlled. To limit the age of latest or historical tuples use the SET MAXAGE command. The following are equivalent: rgma> SET MAXAGE 2 minutes rgma> SET MAXAGE 120 The current maximum tuple age can be displayed using rgma> SHOW MAXAGE To disable the maximum age, set it to none: rgma> SET MAXAGE none

55 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 55 Query Timeout The final property affecting queries is timeout. –For a latest or history query the timeout exists to prevent a problem (e.g. network failure) from stopping the query from completing. –For a continuous query, timeout indicates how long the query will continue to return new tuples. Default timeout is 1 minute and it can be changed using rgma>SET TIMEOUT 3 minutes or SET TIMEOUT 180 The current timeout can be displayed using rgma>SHOW TIMEOUT

56 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 56 Producer & Inserting Data The SQL INSERT statement may be used to add data to the system: rgma> INSERT INTO userTable VALUES (’a’, ’b’, ’c’, ’d’) In R-GMA, data is inserted into the system using a Producer component which handles the INSERT statement. Using the command line tool you may work with one producer at a time. The current producer type can be displayed using: rgma>show producer The producer type can be set using: rgma>set producer latest

57 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 57 Exercises 1.Insert and Select using Primary Producer to support Continuos + History query rgma>describe userTable rgma>set producer continuous rgma>insert into userTable values('cod','string',1.4,66) rgma>set query continuous rgma>set maxage 1 minutes rgma>set timeout 5 seconds rgma>select * from userTable

58 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 58 Secondary Producer To instruct the secondary producer to consume from table MyTable: rgma> SECONDARYPRODUCER userTable Like the producer, the secondary producer may be configured to answer latest and/or history queries: rgma> SET SECONDARYPRODUCER latest (By default the secondary producer can answer both latest and history queries. ) The current secondary producer type can be displayed using: rgma> SHOW SECONDARYPRODUCER

59 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 59 Exercises 2.Insert and Select using the Secondary Producer to support the latest query. rgma>set secondaryproducer latest rgma>secondaryproducer userTable rgma>show producers of userTable rgma>set producer continuous rgma>insert into userTable values ('cod','string',5.2,44) rgma>set query latest rgma>select * from userTable

60 FP6−2004−Infrastructures−6-SSA-026409 www.eu-eela.org E-infrastructure shared between Europe and Latin America GILDA Praticals GILDA Tutors INFN Catania

61 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 61 Workload Management System

62 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 62 In the glite middleware a user can submit and cancel jobs, query their status, and retrieve their output. These tasks go under the name of Workload Management. There are two different User Interfaces to accomplish these tasks. One is the Command Line Interface and the other is the Graphical User Interface. Workload Management System

63 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 63 Command Line Interface Job Submission – Perform the job submission to the Grid. $ glite-job-submit [options] – where is a file containing the job description, usually with extension.jdl. --vo : perform submission with a different VO than the UI default one. --output, -o save jobId on a file. --resource, -r specify the resource for execution. --nomsgi neither message nor errors on the stdout will be displayed.

64 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 64 If the submission is successful, the output is similar to: glite-job-submit test.jdl ======================glite-job-submit Success ======================= The job has been successfully submitted to the Network Server. Use glite-job-status command to check job current status. Your job identifier (edg_jobId) is: - https://lxshare0234.cern.ch:9000/rIBubkFFKhnSQ6CjiLUY8Q =================================================================== In case of failure, an error message will be displayed instead, and an exit status different form zero will be retured. Command Line Interface (cont.)

65 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 65 If the command returns the following error message: **** Error: API_NATIVE_ERROR **** Error while calling the "NSClient::multi" native api AuthenticationException: Failed to establish security context... **** Error: UI_NO_NS_CONTACT **** Unable to contact any Network Server it means that there are authentication problems between the UI and the Network Server (check your proxy or have the site administrator check the certificate of the server). Command Line Interface (cont.)

66 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 66 It is possible to see which CEs are eligible to run a job specified by a given JDL file using the command glite-job-list-match test.jdl Connecting to host lxshare0380.cern.ch, port 7772 Selected Virtual Organisation name (from UI conf file): dteam *************************************************************************** COMPUTING ELEMENT IDs LIST The following CE(s) matching your job requirements have been found: adc0015.cern.ch:2119/jobmanager-lcgpbs-infinite adc0015.cern.ch:2119/jobmanager-lcgpbs-long adc0015.cern.ch:2119/jobmanager-lcgpbs-short *************************************************************************** Command Line Interface (cont.)

67 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 67 After a job is submitted, it is possible to see its status using the glite-job-status command. glite-job-status https://lxshare0234.cern.ch:9000/X-ehTxfdlXxSoIdVLS0L0whttps://lxshare0234.cern.ch:9000/X-ehTxfdlXxSoIdVLS0L0w ************************************************************* BOOKKEEPING INFORMATION: Printing status info for the Job: https://lxshare0234.cern.ch:9000/X-ehTxfdlXxSoIdVLS0L0w Current Status: Scheduled Status Reason: unavailable Destination: lxshare0277.cern.ch:2119/jobmanager-pbs-infinite reached on: Fri Aug 1 12:21:35 2003 ************************************************************* Command Line Interface (cont.)

68 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 68 The option -i can be used to specify a file with a list of job identifiers (saved previously with the -o option of glite-job-submit). glite-job-status -i jobs.list --------------------------------------------------------------------------------------------------- 1 : https://lxshare0234.cern.ch:9000/UPBqN2s2ycxt1TnuU3kzEw 2 : https://lxshare0234.cern.ch:9000/8S6IwPW33AhyxhkSv8Nt9A 3 : https://lxshare0234.cern.ch:9000/E9R0Yl4J7qgsq7FYTnhmsA 4 : https://lxshare0234.cern.ch:9000/Tt80pBn17AFPJyUSN9Qb7Q a : all q : quit --------------------------------------------------------------------------------------------------- Choose one or more edg_jobId(s) in the list - [1-4]all: If the - -all option is used instead, the status of all the jobs owned by the user submitting the command is retrieved. Command Line Interface (cont.)

69 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 69 The --status (-s) option makes the command retrieve only the jobs that are in the specified state, and the --exclude (-e) option makes it retrieve jobs that are not in the specified state. This two lasts options are mutually exclusive, although they can be used with --from and --to. Example: All jobs of the user that are in the state DONE or RUNNING are retrieved. glite-job-status --all -s Done -s Running Command Line Interface (cont.)

70 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 70 A job can be canceled before it ends using the command glite-job-cancel. glite-job-cance l https://lxshare0234.cern.ch:9000/dAE162is6EStca0VqhVkoghttps://lxshare0234.cern.ch:9000/dAE162is6EStca0VqhVkog Are you sure you want to remove specified job(s)? [y/n]n :y =================== glite-job-cancel Success==================== The cancellation request has been successfully submitted for the following job(s) - https://lxshare0234.cern.ch:9000/dAE162is6EStca0VqhVkog =========================================================== Command Line Interface (cont.)

71 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 71 After the job has finished (it reaches the DONE status), its output can be copied to the UI glite-job-output https://lxshare0234.cern.ch:9000/snPegp1YMJcnS22yF5pFlg https://lxshare0234.cern.ch:9000/snPegp1YMJcnS22yF5pFlg Retrieving files from host lxshare0234.cern.ch ***************************************************************** JOB GET OUTPUT OUTCOME Output sandbox files for the job: - https://lxshare0234.cern.ch:9000/snPegp1YMJcnS22yF5pFlg have been successfully retrieved and stored in the directory: /tmp/jobOutput/snPegp1YMJcnS22yF5pFlg ***************************************************************** By default, the output is stored under /tmp, but it is possible to specify in which directory to save the output using the - -dir option. Command Line Interface (cont.)

72 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 72 Exercise 1

73 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 73 Run an ls command on the selected resource. [ Executable = "ls.sh"; Arguments = "-alt"; StdError = "stderr.log"; StdOutput = "stdout.log"; InputSandbox = "ls.sh"; OutputSandbox = {"stderr.log", "stdout.log"}; ] ls.sh #!/bin/sh /bin/ls

74 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 74 Exercise 2

75 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 75 [ JobType = "MPICH"; NodeNumber = 2; StdOutput = "cpi.out"; StdError = "cpi.err"; InputSandbox = {"cpi"}; OutputSandbox = {"cpi.err","cpi.out"}; Requirements = (Member("GLITE-1.4", other.GlueHostApplicationSoftwareRunTimeEnvironm ent) && (other.GlueCEInfoTotalCPUs >= 2)); ]

76 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 76 Exercise 3

77 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 77 Modify c_sample.c file as follow: #include int main(int argc, char **argv) { printf("\n\n\n"); printf("Hello !\n"); printf("Welcome to ICTP/INFM Tutorial, Trieste 06th- 17th Feb. - 2006 \n\n\n"); exit(0); } This exercise allows user to submit a C program.

78 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 78 Compile your script with: gcc –o c_sample c_sample.c Submit the c_sample.jdl job to the grid [ Executable = “/bin/sh”; Arguments = “start_c_sample.sh”; StdOutput = “std.out"; StdError = “std.err"; InputSandbox = {"c_sample“,”start_c_sample.sh”}; OutputSandbox = {“std.err",“std.out"}; ] Inspect the status and retrieve its output when the job is finished.

79 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 79 Exercise 4

80 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 80 Modify c_sample.c file as follow: #include int main(int argc, char **argv) { char *name = argv[1]; printf("\n\n\n"); printf("Hello %s!\n“,name); printf("Welcome to ICPT/INFM Tutorial, Trieste 07th- 17th Feb. - 2006 \n\n\n"); exit(0); }

81 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 81 Exercise (cont.) Compile your script with: gcc –o c_sample c_sample.c Modify the start_c_sample.sh script as follow: #!/bin/sh chmod 777 c_sample./c_sample $1 Modify c_sample.jdl’s Arguments as follow: Arguments = "start_c_sample.sh "; Submit, inspect the status and retrieve its output when the job is finished.

82 FP6−2004−Infrastructures−6-SSA-026409 E-infrastructure shared between Europe and Latin America Madrid, EELA Tutorial, 23.02.2006 82 Questions…


Download ppt "FP6−2004−Infrastructures−6-SSA-026409 www.eu-eela.org E-infrastructure shared between Europe and Latin America Practicals on Security – Infosys -- WMS."

Similar presentations


Ads by Google