Presentation is loading. Please wait.

Presentation is loading. Please wait.

Www.epikh.eu The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) Africa 7 2011 - Joint CHAIN/EUMEDGRID- Support/EPIKH School for.

Similar presentations


Presentation on theme: "Www.epikh.eu The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) Africa 7 2011 - Joint CHAIN/EUMEDGRID- Support/EPIKH School for."— Presentation transcript:

1 www.epikh.eu The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) Africa 7 2011 - Joint CHAIN/EUMEDGRID- Support/EPIKH School for Application Porting to Science Gateways Elisa Ingrà – Consortium GARR (elisa.ingra@ct.infn.it) Grid Engine

2 Outline A Simple API for Grid Applications (SAGA): –The OGF (Open Grid Forum) Standard; –JSAGA: a Java implementation of SAGA; A generic Grid Engine for Science Gateways based on SAGA; –Grid Engine based on JSAGA; –EGI Portal Policy & Grid Security Traceability; Grid Engine usage example.

3 A Simple API for Grid Applications (SAGA) SAGA is an API that provides the basic functionality required to build distributed applications, tools and frameworks; It is independent of the details of the underlying infrastructure (e.g., the middleware); SAGA is an OGF specification: http://www.gridforum.org/documents/GFD.90.pdf http://www.gridforum.org/documents/GFD.90.pdf Several Implementations are available: – A C++ and a Java implementation developed at the Louisiana State University / CCT and Vrije Universiteit Amsterdam (http://saga.cct.lsu.edu);http://saga.cct.lsu.edu – A Java implementation developed at CCIN2P3 (http://grid.in2p3.fr/jsaga/);http://grid.in2p3.fr/jsaga/ – A Python implementation based on those above.

4 SAGA is made of: SAGA Core Libraries: contain the SAGA base system, the runtime and the API packages (job management, data management, etc.); SAGA Adaptors: provide access to the underlying grid infrastructure (adaptors are available for gLite, ARC, Globus, UNICORE and other middleware); SAGA defines a standard We then need an implementation! A Simple API for Grid Applications (SAGA)

5 JSAGA JSAGA is a Java implementation of SAGA developed at CCIN2P3; JSAGA: – Enables uniform data and job management across different grid infrastructures/middleware; – Makes extensions easily: adaptor interfaces are designed to minimize coding effort for integrating support of new technologies/middleware; – Is OS independent: most of the provided adaptors are written in full Java and they are tested both on Windows and Linux.

6 JSAGA Adaptors JSAGA supports gLite, Globus, ARC, UNICORE, etc.

7 A Generic Grid Engine for Science Gateways based on JSAGA Grid Engine Users Tracking DB Science GW Interface JSAGA API Job Engine Data Engine Users Track & Monit. Science GW 1 Science GW 2 Science GW 3 Grid MWs Liferay Portlets eToken Server

8 In order to strong reduce the risks to have the robot certificate compromised, the INFN CA decided to store this new certificate on board of the SafeNet eToken smart cards [6]; The AeToken smart card can support many certificates; A token PIN is prompted every time the user needs to interact with the smart card; e-Token

9 Users Client Applications Grid Portals / Science Gateways e-Token Server Host based mutual authentication

10 A Generic Grid Engine for Science Gateways based on JSAGA Grid Engine Users Tracking DB Science GW Interface JSAGA API Job Engine Data Engine Users Track & Monit. Science GW 1 Science GW 2 Science GW 3 Grid MWs Liferay Portlets eToken Server

11 EGI Portal Policy & VO Portal Policy The Portal, the associated Portal VO and the Portal manager are all individually and collectively responsible and accountable for all interactions with the Grid; The Portal must be capable of limiting the job submission rate; The Portal must keep audit logs for all interactions with the Grid as defined in the Traceability and Logging Policy (minimum 90 days); The Portal manager and operators must assist in security incident investigations; Where relevant, private keys associated with (proxy) certificates must not be transferred across a network, not even in encrypted form.

12 Users’ Traceability in Science Gateways GRID USAGE TRACEABILITY Common NamePortal User Name as stored in LDAP IP + PortIP address and TCP port used by the requester TimestampIdentify the grid operation date/time Grid InteractionGrid Interaction Identification (Job “X” submission, file upload/download). The portal MUST classify all the grid operations allowed. This value will allow to identify both applications used and operation performed. Grid IDStore the actual GRID Interaction ID (Job ID for job submission and some other relevant information for data transfer) Robot CertificateIdentify the Robot Certificate used for the Grid Operation Two Tables: one for active Jobs and File Transfers and one for the finished ones. ID70 Common Namefpistagna IP + TCP Port193.206.208.183:8162 Timestamp2011-07-06 14:16:29 Grid Interaction1 Grid ID[wms://infn-wms- 01.ct.pi2s2.it:7443/glite_wms_wmproxy_server]-[https://infn-lb- 01.ct.pi2s2.it:9000/7rQ458xozactEEjoXMlxQg] Robot Certificate/C=IT/O=INFN/OU=Robot/L=COMETA/CN=Robot: ViralGrid Science Gateway - Roberto Barbera Virtual Organisationcometa Example of entry in the Users Tracking DB

13 References A Simple API for Grid Applications (SAGA): –http://www.gridforum.org/documents/GFD.90.pdf;http://www.gridforum.org/documents/GFD.90.pdf JSAGA: –http://grid.in2p3.fr/jsaga/;http://grid.in2p3.fr/jsaga/ Other SAGA Implementations: –The C++ implementation developed at the Louisiana State University/CCT: http://saga.cct.lsu.edu/;http://saga.cct.lsu.edu/ –The Java implementation developed at the Vrije Universiteit Amsterdam: http://saga.cct.lsu.edu/documentation/java. http://saga.cct.lsu.edu/documentation/java

14 GridEngine Usage The GridEngine provides a set of java APIs to manage job execution into a distributed environment and a database to register any user Grid Interaction. While developing a Grid Application the user needs to identify: –The Grid services to specify –The input and ouput files –The executable The three steps above can be easily identified, then written and tested with a small set of GridEngine API calls. This set of instructions can be used then inside the portlet concentrating the user to deal with the interface while developing the portlet

15 Let’s start - Checkout Hostname-standalone is here: –http://svn.ct.infn.it/svn/liferay/trunk/gilda/hostname-standalone/http://svn.ct.infn.it/svn/liferay/trunk/gilda/hostname-standalone/ hostname.java job/ input_file.txt pilot_script.sh standard_pilot_script.sh jobmanager.java Checkout: submit a ‘hostname’ job using GridEngine Job files (Custom dir) Input file example Job’ pilot script: change it (bash) Job’ pilot script standard (bash) Check the status of a job using GridEngine [liferayadmin@gildavm ~]$ svn checkout http://svn.ct.infn.it/svn/liferay/trunk/gilda/hostname-standalone/

16 Let’a have a look - hostname.java public class hostname { …… INIT PARAMETERS …… public static void main(String[] Args) { submitJob(); }String //JOB SUBMIT private static void submitJob() { ……………. }

17 hostname.java - INIT PARAMETERS // Liferay username automatically taken from porltet code static String username="test"; /* Confuration values used by portlet to submit jobs into the Grid infrastructure These values comes from init parameters (portlet.xml) and preferences portlet init values */String static String init_SciGwyUserTrackingDB_Hostname="localhost"; // DB hostname static String init_SciGwyUserTrackingDB_Username="tracking_user"; // Username static String init_SciGwyUserTrackingDB_Password="usertracking"; // Password static String init_SciGwyUserTrackingDB_Database="userstracking"; // Database // portlet preference values static String pref_bdiiHost="ldap://bdii.eumedgrid.eu:2170"; static String pref_wmsHost=""; // "wms://infn-wms-01.ct.pi2s2.it:7443/glite_wms_wmproxy_server"; static String pref_pxServerHost="voms.ct.infn.it"; static String pref_pxRobotId="21057"; static String pref_pxRobotVO="eumed"; static String pref_pxRobotRole="eumed"; static String pref_pxUserProxy=""; // "/etc/GILDA/eToken/proxy.txt"; static String pref_SciGwyAppId="9"; static String pref_JobRequirements=""; static String pref_pxRobotRenewalFlag="true"; // this test uses only one file as input static String inputSandbox_inputFile="job/input_file.txt"; // Each GridEngine job uses a human readable job identifier static String jobIdentifier="Standalone hostname job execution"; private static String LS = System.getProperty("line.separator");String System

18 hostname.java - JOB SUBMIT 1/4 // Portlet preference Values for job submission String bdiiHost=pref_bdiiHost; // "ldap://bdii.eumedgrid.eu:2170"; String wmsHost=pref_wmsHost; // "https://infn-wms-01.ct.pi2s2.it"; String pxServerHost=pref_pxServerHost; // voms.ct.infn.it String pxRobotId=pref_pxRobotId; // "21057"; String pxRobotVO=pref_pxRobotVO; // "eumed"; String pxRobotRole=pref_pxRobotRole; // "eumed"; String pxUserProxy=pref_pxUserProxy; // "/etc/GILDA/eToken/proxy.txt"; Boolean pxRobotRenewalFlag; // It will be evaluated later from preferences // SciGtw UserTraking data // Data below should not used by portlets int applicationId=Integer.parseInt(pref_SciGwyAppId); // GridOperations Application Id String hostUTDB=init_SciGwyUserTrackingDB_Hostname; // DB hostname String unameUTDB=init_SciGwyUserTrackingDB_Username; // Username String passwdUTDB=init_SciGwyUserTrackingDB_Password; // Password String dbnameUTDB=init_SciGwyUserTrackingDB_Database; // Database // Job details String executable="/bin/sh"; // Application executable String arguments="pilot_script.sh"; // executable' arguments String outputPath="/tmp/"; // Output Path String outputFile="hostname-Output.txt"; // Distributed application standard output String errorFile="hostname-Error.txt"; // Distrubuted application standard error String appFile="job_output.txt"; // Gate output file (defined phsp.root in mac file) String BooleanIntegerString

19 hostname.java - JOB SUBMIT 2/4 // InputSandbox (string with comma separated list of file names) // Inside portlet code static file should be placed inside // directory: appServerPath+"/WEB-INF/job/ // Dinamically created input files should be placed in /tmp // directory with a prefix like: _ _file // avoiding problems during concurrent accesses to the portlet String inputSandbox= "job/pilot_script.sh" // pilot script +","+inputSandbox_inputFile // input file ; // OutputSandbox (string with comma separated list of file names) String outputSandbox=appFile; // Output file // Take care of software tags contained into the // variable pref_JobRequirements // more than one tag can be specified separating them by a ';' String jdlRequirements[] = pref_JobRequirements.split(";"); int numRequirements=0; for(int i=0; i<jdlRequirements.length; i++) { if(!jdlRequirements[i].equals("")) { jdlRequirements[numRequirements] = "JDLRequirements=("+jdlRequirements[i]+")"; numRequirements++; } _log.info("Requirement["+i+"]='"+jdlRequirements[i]+"'"); } String

20 hostname.java - JOB SUBMIT 3/4 // Instanciate GridEngine JobSubmission object JSagaJobSubmission tmpJSaga = new JSagaJobSubmission ("jdbc:mysql://"+hostUTDB+"/"+dbnameUTDB,unameUTDB,passwdUTDB); // !!ATTENTION!! // Above initializing statement must be replaced by the line below // when integrating the jobSubmit code into the portlet //JSagaJobSubmission tmpJSaga = new JSagaJobSubmission(); tmpJSaga.setBDII(bdiiHost); // Associate the infrastructure top BDII // Proxy renewal flag if((pref_pxRobotRenewalFlag.toLowerCase()).equals("true")) pxRobotRenewalFlag=true; else pxRobotRenewalFlag=false; // Associate a valid proxy // If the user specifies a path containing a local proxy it will be used if(pxUserProxy==null || pxUserProxy.equals("")) { _log.info("Using ROBOT Proxy..."); tmpJSaga.useRobotProxy(pxRobotId, pxRobotVO, pxRobotRole, pxRobotRenewalFlag); } else { _log.info("Using User proxy..."); tmpJSaga.setUserProxy(pxUserProxy); }

21 hostname.java - JOB SUBMIT 4/4 tmpJSaga.setExecutable(executable); // Specify the executeable tmpJSaga.setArguments(arguments); // Specify the application' arguments tmpJSaga.setOutputPath(outputPath); // Specify the output directory tmpJSaga.setInputFiles(inputSandbox); // Setup input files (InputSandbox) tmpJSaga.setOutputFiles(outputSandbox); // Setup output files (OutputSandbox); tmpJSaga.setJobOutput(outputFile); // Specify the std-outputr file tmpJSaga.setJobError(errorFile); // Specify the std-error file if(numRequirements>0) tmpJSaga.setJDLRequirements(jdlRequirements); // Assign requirements // Submit the job // If a WMS is specified the call to Job submission changes if(wmsHost!=null && !wmsHost.equals("")) { _log.info("Using jobSubmit with WMS"); tmpJSaga.submitJobAsync(username, hostUTDB, applicationId, wmsHost, jobIdentifier); } else { _log.info("Using jobSubmit without WMS"); tmpJSaga.submitJobAsync(username, hostUTDB, applicationId, jobIdentifier); } // View jobSubmission details _log.info( "submitJob" +LS+"submitJobAsync("+username+","+hostUTDB+","+applicationId+","+jobIdentifier+")" +LS+"bdiiHost: '"+bdiiHost+"'" +LS+"wmsHost: '"+wmsHost+"'" +LS+"pxRobotId: '"+pxRobotId+"'" +LS+"pxRobotVO: '"+pxRobotVO+"'" +LS+"pxRobotRole: '"+pxRobotRole+"'" +LS+"pxUserProxy: '"+pxUserProxy+"'" +LS+"pxRobotRenewalFlag: '"+pxRobotRenewalFlag.toString()+"'" +LS+"inputSandbox: '"+inputSandbox+"'" +LS+"outputSandbox: '"+outputSandbox+"'" +LS+"pref_JobRequirements: '"+pref_JobRequirements+"'" ); // _log.info } // submitJob

22 CLASSPATH CLASSPATH – In Order to compile hostname.java it’s necessary set a right CLASSPATH, GILDA VM is already set. [liferayadmin@gildavm ~]$ echo $CLASSPATH.:/opt/glassfish3/glassfish/domains/liferay/lib/activation- 1.1.jar:/opt/glassfish3/glassfish/domains/liferay/lib/addressing-1.0- 1.0.jar:/opt/glassfish3/glassfish/domains/liferay/lib/axis-1.4- patched.jar:/opt/glassfish3/glassfish/domains/liferay/lib/axis-jaxrpc- 1.4.jar:/opt/glassfish3/glassfish/domains/liferay/lib/axis-saaj- 1.4.jar:/opt/glassfish3/glassfish/domains/liferay/lib/axis-wsdl4j- 1.5.1.jar:/opt/glassfish3/glassfish/domains/liferay/lib/bcpg- 1.37.0.jar:/opt/glassfish3/glassfish/domains/liferay/lib/bcpg-jdk14- 1.22.0.jar:/opt/glassfish3/glassfish/domains/liferay/lib/bcprov-jdk14- 140.jar:/opt/glassfish3/glassfish/domains/liferay/lib/castor-1.0- xml.jar:/opt/glassfish3/glassfish/domains/liferay/lib/classad- 2.4.jar:/opt/glassfish3/glassfish/domains/liferay/..... /opt/glassfish3/glassfish/domains/liferay/lib/xml-apis- 1.0.b2.jar:/opt/glassfish3/glassfish/domains/liferay/lib/xmlbeans- 2.2.0.jar:/opt/glassfish3/glassfish/domains/liferay/lib/xmlsec-1.4.1.jar

23 Preliminaries [liferayadmin@gildavm ~]$ sudo mkdir -p /tmp/jobOutput [sudo] password for liferayadmin: [liferayadmin@gildavm ~]$ sudo chown -R root:users /tmp [liferayadmin@gildavm ~]$ sudo chmod -R 777 /tmp [liferayadmin@gildavm ~]$ cd hostname-standalone/ jobOutput dir – Create the jobOutput directory for the job output; Right permissions – give the right permissions to the directory.

24 Compile hostname.java [liferayadmin@gildavm hostname-standalone]$ ls -la total 72 drwxrwxr-x 4 liferayadmin liferayadmin 4096 Nov 25 16:59. drwx------ 5 liferayadmin liferayadmin 4096 Nov 25 16:59.. -rw-rw-r-- 1 liferayadmin liferayadmin 9552 Nov 25 16:59 hostname.java drwxrwxr-x 3 liferayadmin liferayadmin 4096 Nov 25 16:59 job -rw-rw-r-- 1 liferayadmin liferayadmin 19371 Nov 25 16:59 jobmanager.java drwxrwxr-x 6 liferayadmin liferayadmin 4096 Nov 25 16:59.svn [liferayadmin@gildavm hostname-standalone]$ javac hostname.java [liferayadmin@gildavm hostname-standalone]$ ls -la total 92 drwxrwxr-x 4 liferayadmin liferayadmin 4096 Nov 25 17:00. drwx------ 5 liferayadmin liferayadmin 4096 Nov 25 16:59.. -rw-rw-r-- 1 liferayadmin liferayadmin 4659 Nov 25 17:00 hostname.class -rw-rw-r-- 1 liferayadmin liferayadmin 9552 Nov 25 16:59 hostname.java -rw-rw-r-- 1 liferayadmin liferayadmin 435 Nov 25 17:00 hostname$_log.class drwxrwxr-x 3 liferayadmin liferayadmin 4096 Nov 25 16:59 job -rw-rw-r-- 1 liferayadmin liferayadmin 19371 Nov 25 16:59 jobmanager.java drwxrwxr-x 6 liferayadmin liferayadmin 4096 Nov 25 16:59.svn

25 Execute hostname.java 1/2 [liferayadmin@gildavm hostname-standalone]$ java hostname Requirement[0]='' JSAGA_HOME:null saga.factory:fr.in2p3.jsaga.impl.SagaFactoryImpl Using ROBOT Proxy... outputPath:/tmp//jobOutput/ Using jobSubmit without WMS submitJob submitJobAsync(test,localhost,9,Standalone hostname job execution) bdiiHost: 'ldap://bdii.eumedgrid.eu:2170' wmsHost: '' pxRobotId: '21057' pxRobotVO: 'eumed' pxRobotRole: 'eumed' pxUserProxy: '' pxRobotRenewalFlag: 'true' inputSandbox: 'job/pilot_script.sh,job/input_file.txt' outputSandbox: 'job_output.txt' pref_JobRequirements: '‘..

26 Execute hostname.java 2/2 ----->New GET HTTP<-------- proxyPath=/tmp/17baf82d-a107-40c1-a2b1-42e965b00d5b Creating session.... UrlPrefix VO=eumed DN=/C=IT/O=INFN/OU=Robot/L=COMETA/CN=Robot: EUMEDGRID Science Gateway - Riccardo Bruno Session recovered... resourceManager: Input = ActiveGridInteractions,test,localhost,9,,/C=IT/O=INFN/OU=Robot/L=COMETA/CN=Robot: EUMEDGRID Science Gateway - Riccardo Bruno,21057,eumed,eumed Database connection established Data Inserted. ID = 3 Database connection terminated jobSandbox:job/pilot_script.sh>pilot_script.sh,job/input_file.txt>input_file.txt,/tmp//jobOutput/3/<hostname- Output.txt,/tmp//jobOutput/3/<hostname-Error.txt,/tmp//jobOutput/3/<job_output.txt JobDescription Created... Index=0 Resource Manager selected: wms://wms-4.dir.garr.it:7443/glite_wms_wmproxy_server Submitting job... [wms://wms-4.dir.garr.it:7443/glite_wms_wmproxy_server]-[https://lb- 4.dir.garr.it:9000/i1DK2ZxUbgS32PNGEwM9Pg] Database connection established Database connection terminated [liferayadmin@gildavm hostname-standalone]$

27 Compile jobmanager.java [liferayadmin@gildavm hostname-standalone]$ javac jobmanager.java [liferayadmin@gildavm hostname-standalone]$ ls -la total 132 drwxrwxr-x 4 liferayadmin liferayadmin 4096 Nov 25 17:11. drwx------ 5 liferayadmin liferayadmin 4096 Nov 25 16:59.. -rw-rw-r-- 1 liferayadmin liferayadmin 4659 Nov 25 17:11 hostname.class -rw-rw-r-- 1 liferayadmin liferayadmin 9552 Nov 25 16:59 hostname.java -rw-rw-r-- 1 liferayadmin liferayadmin 435 Nov 25 17:11 hostname$_log.class drwxrwxr-x 3 liferayadmin liferayadmin 4096 Nov 25 16:59 job -rw-rw-r-- 1 liferayadmin liferayadmin 851 Nov 25 17:11 jobmanager$1.class -rw-rw-r-- 1 liferayadmin liferayadmin 11314 Nov 25 17:11 jobmanager.class -rw-rw-r-- 1 liferayadmin liferayadmin 1168 Nov 25 17:11 jobmanager$Commands.class -rw-rw-r-- 1 liferayadmin liferayadmin 19371 Nov 25 16:59 jobmanager.java -rw-rw-r-- 1 liferayadmin liferayadmin 441 Nov 25 17:11 jobmanager$_log.class drwxrwxr-x 6 liferayadmin liferayadmin 4096 Nov 25 16:59.svn

28 HELP COMMAND - jobmanager.java [liferayadmin@gildavm hostname-standalone]$ java jobmanager help help Usage: jobmanager [ ] Possible commands: status - retrieve the status of a given job output - retrieve the output of a given job info - shows information about a given job cancel - cancel the submission of a given job list - shows the list of current acrive grid interactions update - updates all job statuses help - shows this help message

29 LIST COMMAND - jobmanager.java [liferayadmin@gildavm hostname-standalone]$ java jobmanager list list Getting job list... id| common_name| timestamp|grid_interaction| status|user_description 3| test| 2011-11-25 16:02:49.0| 9| SUBMITTED|Standalone hostname job execution 2| test| 2011-11-25 09:38:12.0| 9| SUBMITTED|Standalone hostname job execution

30 STATUS COMMAND - jobmanager.java [liferayadmin@gildavm hostname-standalone]$ java jobmanager status 2 Getting job status of job: '2' Getting job status... JSAGA_HOME:null saga.factory:fr.in2p3.jsaga.impl.SagaFactoryImpl outputPath:/tmp/jobOutput/ Using ROBOT Proxy... nativeJobId=https://infn-lb-01.ct.pi2s2.it:9000/WgAfu18Ezp9CcBdiKTm_DA serviceURL=wms://infn-wms-01.ct.pi2s2.it:7443/glite_wms_wmproxy_server ----->New GET HTTP<-------- proxyPath=/tmp/e4aa08b6-3176-45e0-9c6c-339d6fce6623 Creating session.... UrlPrefix VO=eumed DN=/C=IT/O=INFN/OU=Robot/L=COMETA/CN=Robot: EUMEDGRID Science Gateway - Riccardo Bruno Session recovered... Creating JobService... Getting job info... Resource manager: 'wms://infn-wms-01.ct.pi2s2.it:7443/glite_wms_wmproxy_server' Grid job identifier: 'https://infn-lb-01.ct.pi2s2.it:9000/WgAfu18Ezp9CcBdiKTm_DA' Common name: 'test' Timestamp: '2011-11-25 09:38:12.0' Grid interaction: '9' User description: 'Standalone hostname job execution' Grid job status: 'SUBMITTED' [liferayadmin@gildavm hostname-standalone]$

31 INFO COMMAND - jobmanager.java [liferayadmin@gildavm hostname-standalone]$ java jobmanager info You must specify a job identifier to get its information [liferayadmin@gildavm hostname-standalone]$ java jobmanager info 2 Getting job info of job: '2' Getting job info... Resource manager: 'wms://infn-wms- 01.ct.pi2s2.it:7443/glite_wms_wmproxy_server' Grid job identifier: 'https://infn-lb- 01.ct.pi2s2.it:9000/WgAfu18Ezp9CcBdiKTm_DA' Common name: 'test' Timestamp: '2011-11-25 09:38:12.0' Grid interaction: '9' User description: 'Standalone hostname job execution' Grid job status: 'SUBMITTED‘ [liferayadmin@gildavm hostname-standalone]$

32 CANCEL COMMAND - jobmanager.java [liferayadmin@gildavm hostname-standalone]$ java jobmanager cancel 2 Cancelling job... JSAGA_HOME:null saga.factory:fr.in2p3.jsaga.impl.SagaFactoryImpl outputPath:/tmp/jobOutput/ Using ROBOT Proxy... nativeJobId=https://infn-lb-01.ct.pi2s2.it:9000/WgAfu18Ezp9CcBdiKTm_DA serviceURL=wms://infn-wms-01.ct.pi2s2.it:7443/glite_wms_wmproxy_server ----->New GET HTTP<-------- proxyPath=/tmp/d21ad0ba-abf0-46de-b5e0-e6e42d8e1194 Creating session.... UrlPrefix VO=eumed DN=/C=IT/O=INFN/OU=Robot/L=COMETA/CN=Robot: EUMEDGRID Science Gateway - Riccardo Bruno Session recovered... Creating JobService... NoSuccess: ; nested exception is: java.net.ConnectException: Connection refused [liferayadmin@gildavm hostname-standalone]$ java jobmanager status 2 Getting job status of job: '2' Getting job status... JSAGA_HOME:null saga.factory:fr.in2p3.jsaga.impl.SagaFactoryImpl outputPath:/tmp/jobOutput/ Using ROBOT Proxy... Getting job info... [liferayadmin@gildavm hostname-standalone]$

33 UPDATE COMMAND - jobmanager.java [liferayadmin@gildavm hostname-standalone]$ java jobmanager update list Updating jobs... Getting job list... Getting job status... JSAGA_HOME:null saga.factory:fr.in2p3.jsaga.impl.SagaFactoryImpl outputPath:/tmp/jobOutput/ Using ROBOT Proxy... nativeJobId=https://lb-4.dir.garr.it:9000/M7cueUGBdDEJZF3tbECk-w serviceURL=wms://wms-4.dir.garr.it:7443/glite_wms_wmproxy_server ----->New GET HTTP<-------- proxyPath=/tmp/c3586713-0acf-4219-8202-9bd665200929 Creating session.... UrlPrefix VO=eumed DN=/C=IT/O=INFN/OU=Robot/L=COMETA/CN=Robot: EUMEDGRID Science Gateway - Riccardo Bruno Session recovered... Creating JobService... Getting Job... Getting Job State... updating new job status... id| common_name| timestamp|grid_interaction| status|user_description 4| test| 2011-11-25 16:30:17.0| 9| SUBMITTED|Standalone hostname job execution [liferayadmin@gildavm hostname-standalone]$

34 OUTPUT COMMAND - jobmanager.java 1/4 [liferayadmin@gildavm hostname-standalone]$ java jobmanager status 4 Getting job status of job: '4' Getting job status... JSAGA_HOME:null saga.factory:fr.in2p3.jsaga.impl.SagaFactoryImpl outputPath:/tmp/jobOutput/ Using ROBOT Proxy... nativeJobId=https://lb-4.dir.garr.it:9000/M7cueUGBdDEJZF3tbECk-w serviceURL=wms://wms-4.dir.garr.it:7443/glite_wms_wmproxy_server ----->New GET HTTP<-------- proxyPath=/tmp/d2ccb251-5691-476c-ae11-c68d8ca0a9e5 Creating session.... UrlPrefix VO=eumed DN=/C=IT/O=INFN/OU=Robot/L=COMETA/CN=Robot: EUMEDGRID Science Gateway - Riccardo Bruno Session recovered... Creating JobService... Getting Job... Getting Job State... Getting job info... Resource manager: 'wms://wms-4.dir.garr.it:7443/glite_wms_wmproxy_server' Grid job identifier: 'https://lb-4.dir.garr.it:9000/M7cueUGBdDEJZF3tbECk-w' Common name: 'test' Timestamp: '2011-11-25 16:30:17.0' Grid interaction: '9' User description: 'Standalone hostname job execution' Grid job status: 'DONE' [liferayadmin@gildavm hostname-standalone]$

35 OUTPUT COMMAND - jobmanager.java 2/4 [liferayadmin@gildavm hostname-standalone]$ java jobmanager output 4 Getting job output of job: '4' Getting job output... JSAGA_HOME:null..... DN=/C=IT/O=INFN/OU=Robot/L=COMETA/CN=Robot: EUMEDGRID Science Gateway - Riccardo Bruno Session recovered... Creating JobService... Getting Job... creating output directory /tmp/jobOutput/4/ output directory created. Job output have been retrieved successfully (if it exists) Current Dir=/home/liferayadmin/hostname-standalone creating a tgz archive containing output files... tar czvf /tmp/jobOutput/4.tgz /tmp/jobOutput/4 Database connection established Inserting data in GridInteractions. Input = GridInteractions,test,localhost,9,[wms://wms-4.dir.garr.it:7443/glite_wms_wmproxy_server]-[https://lb- 4.dir.garr.it:9000/M7cueUGBdDEJZF3tbECk-w],/C=IT/O=INFN/OU=Robot/L=COMETA/CN=Robot: EUMEDGRID Science Gateway - Riccardo Bruno,21057,eumed,eumed Data Inserted. ID = 2 Database connection terminated Database connection established Deleting data in ActiveGridInteractions. Database connection terminated Output file in: '/jobOutput/4.tgz' [liferayadmin@gildavm hostname-standalone]$

36 OUTPUT COMMAND - jobmanager.java 3/4 [liferayadmin@gildavm hostname-standalone]$ cd /tmp/jobOutput/ [liferayadmin@gildavm jobOutput]$ ls -la total 32 drwxrwxrwx 3 root users 4096 Nov 25 17:41. drwxrwxrwt 11 root users 4096 Nov 25 17:41.. drwxrwxr-x 2 liferayadmin liferayadmin 4096 Nov 25 17:41 4 -rw-rw-r-- 1 liferayadmin liferayadmin 583 Nov 25 17:41 4.tgz [liferayadmin@gildavm jobOutput]$ cd 4 [liferayadmin@gildavm 4]$ ls -la total 36 drwxrwxr-x 2 liferayadmin liferayadmin 4096 Nov 25 17:41. drwxrwxrwx 3 root users 4096 Nov 25 17:41.. -rw-rw-r-- 1 liferayadmin liferayadmin 0 Nov 25 17:41 hostname-Error.txt -rw-rw-r-- 1 liferayadmin liferayadmin 985 Nov 25 17:41 hostname-Output.txt -rw-rw-r-- 1 liferayadmin liferayadmin 168 Nov 25 17:41 job_output.txt [liferayadmin@gildavm 4]$

37 JOB OUTPUT [liferayadmin@gildavm 4]$ cat hostname-Error.txt [liferayadmin@gildavm 4]$ cat hostname-Output.txt -------------------------------------------------- hostname job landed on: 'chem14.sns.it' -------------------------------------------------- Job execution starts on: 'Fri Nov 25 17:31:08 CET 2011' ---[WN HOME directory]---------------------------- total 48 drwxr-xr-x 2 eumed010 eumed 2048 Nov 25 17:31 CREAM497805877 -rwx------ 1 eumed010 eumed 24369 Nov 25 17:30 CREAM497805877_jobWrapper.sh -rw------- 1 eumed010 eumed 9732 Nov 25 17:30 cream_497805877.proxy -rw-r--r-- 1 eumed010 eumed 4141 Nov 25 17:31 glite-swat-client-wn-tests.data ---[WN Working directory]------------------------- total 12 -rw-r--r-- 1 eumed010 eumed 0 Nov 25 17:31 hostname-Error.txt -rw-r--r-- 1 eumed010 eumed 595 Nov 25 17:31 hostname-Output.txt -rw-r--r-- 1 eumed010 eumed 26 Nov 25 17:31 input_file.txt -rw-r--r-- 1 eumed010 eumed 832 Nov 25 17:31 pilot_script.sh ---[Your message]--------------------------------- This is the message text! Job execution ends on: 'Fri Nov 25 17:31:08 CET 2011' [liferayadmin@gildavm 4]$ cat job_output.txt -------------------------------------------------- hostname job landed on: 'chem14.sns.it' -------------------------------------------------- This is the message text! [liferayadmin@gildavm 4]$

38 Customize hostname.java: HOW TO? In Order to customize hostname-standalone you have to: –Add your input files into job directory; –Modify the batch file /job/pilot_script.sh –Use /job/standard_pilot_script.sh as a backup file batch; –Modify hostname.java submitJob method; –Compile hostname.java (slides page 24); –Execute hostname.java (slides pages 25-26); –Check Status and Output of the submitted job (slides pages 28-37); –If everything is ok copy hostname.java submitJob method into java file of your portlet:  /docroot/WEB-INF/src/it/infn/ct/hostname_portlet.java

39 Questions?


Download ppt "Www.epikh.eu The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) Africa 7 2011 - Joint CHAIN/EUMEDGRID- Support/EPIKH School for."

Similar presentations


Ads by Google