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

Slides:



Advertisements
Similar presentations
Grid Initiatives for e-Science virtual communities in Europe and Latin America The VRC-driven GISELA Science Gateway Diego Scardaci.
Advertisements

A3.1 Assignment 3 Simple Job Submission Using GT 4 GRAM.
Catania Grid & Cloud Engine Mario Torrisi Istituto Nazionale di Fisica Nucleare – Sezione di
1 Configuring Internet- related services (April 22, 2015) © Abdou Illia, Spring 2015.
1 Configuring Web services (Week 15, Monday 4/17/2006) © Abdou Illia, Spring 2006.
Basic Grid Job Submission Alessandra Forti 28 March 2006.
Catania Science Gateway Framework Motivations, architecture, features Catania, 09/06/2014Riccardo Rotondo
A crash course in njit’s Afs
© 2005,2006 NeoAccel Inc. Partners Presentation SSL VPN-Plus 2.0 Quick Start Guide.
Building service testbeds on FIRE D5.2.5 Virtual Cluster on Federated Cloud Demonstration Kit August 2012 Version 1.0 Copyright © 2012 CESGA. All rights.
Riccardo Bruno INFN.CT Sevilla, Sep 2007 The GENIUS Grid portal.
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) Hostname-portlet Template Riccardo Rotondo
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) Grid Engine Riccardo Rotondo
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) VOMS Installation and configuration Bouchra
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
Copyright ®xSpring Pte Ltd, All rights reserved Versions DateVersionDescriptionAuthor May First version. Modified from Enterprise edition.NBL.
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) WMPROXY API Python & C++ Diego Scardaci
– Introduction to the Shell 10/1/2015 Introduction to the Shell – Session Introduction to the Shell – Session 2 · Permissions · Users.
The gLite API – PART I Giuseppe LA ROCCA INFN Catania ACGRID-II School 2-14 November 2009 Kuala Lumpur - Malaysia.
INFSO-RI Enabling Grids for E-sciencE GILDA Praticals GILDA Tutors INFN Catania ICTP/INFM-Democritos Workshop on Porting Scientific.
FTP Server and FTP Commands By Nanda Ganesan, Ph.D. © Nanda Ganesan, All Rights Reserved.
E-science grid facility for Europe and Latin America Watchdog: A job monitoring solution inside the EELA-2 Infrastructure Riccardo Bruno,
07/06/11 New Features of WS-PGRADE (and gUSE) 2010 Q Q2 Miklós Kozlovszky MTA SZTAKI LPDS.
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) Workload Management System + Logging&Bookkeeping Installation.
GILDA testbed GILDA Certification Authority GILDA Certification Authority User Support and Training Services in IGI IGI Site Administrators IGI Users IGI.
INFSO-RI Enabling Grids for E-sciencE Workload Management System Mike Mineter
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) GISELA Additional Services Diego Scardaci
Group 1 : Grid Computing Laboratory of Information Technology Supervisors: Alexander Ujhinsky Nikolay Kutovskiy.
Connect. Communicate. Collaborate The Installation of RRD Measurement Archive (MA) Roman Łapacz, PSNC 27 th September, 2006 SEEREN2 Summer School, Heraklion.
NA-MIC National Alliance for Medical Image Computing UCSD: Engineering Core 2 Portal and Grid Infrastructure.
Getting started DIRAC Project. Outline  DIRAC information system  Documentation sources  DIRAC users and groups  Registration with DIRAC  Getting.
EGEE-II INFSO-RI Enabling Grids for E-sciencE The GILDA training infrastructure.
Core Java Introduction Byju Veedu Ness Technologies httpdownload.oracle.com/javase/tutorial/getStarted/intro/definition.html.
INFSO-RI Enabling Grids for E-sciencE Αthanasia Asiki Computing Systems Laboratory, National Technical.
Enabling Grids for E-sciencE Workload Management System on gLite middleware - commands Matthieu Reichstadt CNRS/IN2P3 ACGRID School, Hanoi.
Enabling Grids for E-sciencE Software installation and setup Viet Tran Institute of Informatics Slovakia.
EGI Technical Forum Amsterdam, 16 September 2010 Sylvain Reynaud.
Enabling Grids for E-sciencE Sofia, 17 March 2009 INFSO-RI Introduction to Grid Computing, EGEE and Bulgarian Grid Initiatives –
JSPG Update David Kelsey MWSG, Zurich 31 Mar 2009.
EGEE is a project funded by the European Union under contract IST Enabling bioinformatics applications to.
Grid Execution Management for Legacy Code Architecture Exposing legacy applications as Grid services: the GEMLCA approach Centre.
LCG2 Tutorial Viet Tran Institute of Informatics Slovakia.
Tutorial on Science Gateways, Roma, Riccardo Rotondo Introduction on Science Gateway Understanding access and functionalities.
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) 马兰馨 IHEP, CAS Hands on gLite Security.
Tutorial on Science Gateways, Roma, Catania Science Gateway Framework Motivations, architecture, features Riccardo Rotondo.
Remote Api Tutorial How to call WS-PGRADE workflows from remote clients through the http protocol?
EMI is partially funded by the European Commission under Grant Agreement RI Common Authentication Library Daniel Kouril, for the CaNL PT EGI CF.
Installation check for the Catania Science Gateway Framework development environment Riccardo Bruno INFN Dpt. Of
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) GILDA VM Liferay V1.3.
Development of portlets for special jobs: parametric, collections, workflows Mario Torrisi National Institute of Nuclear Physics.
The Catania Grid Engine Mr. Riccardo Rotondo Consortium GARR, Rome, Italy
REST API to develop application for mobile devices Mario Torrisi Dipartimento di Fisica e Astronomia – Università degli Studi.
The Catania Grid Engine and some implementations of the framework Diego Scardaci INFN The Catania Science Gateway Framework.
Grid Initiatives for e-Science virtual communities in Europe and Latin America Elisa Ingrà
Development of portlets for special jobs: parametric, collections, workflows Mario Torrisi Istituto Nazionale di Fisica Nucleare.
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) gLite Grid Introduction Salma Saber Electronic.
Co-ordination & Harmonisation of Advanced e-INfrastructures CHAIN Worldwide Interoperability Test Roberto Barbera – Univ. of Catania and INFN Diego Scardaci.
The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) Continue by your own… Riccardo Bruno
Sistema di Autenticazione e Autorizzazione per Science Gateway basato su Shibboleth M. Fargetta Consorzio.
Grid Engine Africa Joint CHAIN/EUMEDGRID-Support/EPIKH School for Application Porting to Science Gateways Elisa Ingrà – Consortium GARR
Java standalone version
The Linux Operating System
Long term job submission and monitoring uing grid services
Elisa Ingrà – Consortium GARR
Configuring Internet-related services
Certificates Usage and Simple Job Submission
Certificates Usage and Simple Job Submission
Grid Engine Riccardo Rotondo
gLite Job Management Christos Theodosiou
Grid Engine Diego Scardaci (INFN – Catania)
Presentation transcript:

The EPIKH Project (Exchange Programme to advance e-Infrastructure Know-How) Africa Joint CHAIN/EUMEDGRID- Support/EPIKH School for Application Porting to Science Gateways Elisa Ingrà – Consortium GARR Grid Engine

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.

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: Several Implementations are available: – A C++ and a Java implementation developed at the Louisiana State University / CCT and Vrije Universiteit Amsterdam ( – A Java implementation developed at CCIN2P3 ( – A Python implementation based on those above.

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)

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.

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

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

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

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

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

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.

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 Port :8162 Timestamp :16:29 Grid Interaction1 Grid ID[wms://infn-wms- 01.ct.pi2s2.it:7443/glite_wms_wmproxy_server]-[ 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

References A Simple API for Grid Applications (SAGA): – JSAGA: – Other SAGA Implementations: –The C++ implementation developed at the Louisiana State University/CCT: –The Java implementation developed at the Vrije Universiteit Amsterdam:

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

Let’s start - Checkout Hostname-standalone is here: – 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 ~]$ svn checkout

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() { ……………. }

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

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; // " 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

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

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); }

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

CLASSPATH CLASSPATH – In Order to compile hostname.java it’s necessary set a right CLASSPATH, GILDA VM is already set. ~]$ echo $CLASSPATH.:/opt/glassfish3/glassfish/domains/liferay/lib/activation- 1.1.jar:/opt/glassfish3/glassfish/domains/liferay/lib/addressing 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 jar:/opt/glassfish3/glassfish/domains/liferay/lib/bcpg jar:/opt/glassfish3/glassfish/domains/liferay/lib/bcpg-jdk jar:/opt/glassfish3/glassfish/domains/liferay/lib/bcprov-jdk 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 jar:/opt/glassfish3/glassfish/domains/liferay/lib/xmlsec jar

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

Compile hostname.java hostname-standalone]$ ls -la total 72 drwxrwxr-x 4 liferayadmin liferayadmin 4096 Nov 25 16:59. drwx 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 Nov 25 16:59 jobmanager.java drwxrwxr-x 6 liferayadmin liferayadmin 4096 Nov 25 16:59.svn hostname-standalone]$ javac hostname.java hostname-standalone]$ ls -la total 92 drwxrwxr-x 4 liferayadmin liferayadmin 4096 Nov 25 17:00. drwx 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 Nov 25 16:59 jobmanager.java drwxrwxr-x 6 liferayadmin liferayadmin 4096 Nov 25 16:59.svn

Execute hostname.java 1/2 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: '‘..

Execute hostname.java 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]-[ 4.dir.garr.it:9000/i1DK2ZxUbgS32PNGEwM9Pg] Database connection established Database connection terminated hostname-standalone]$

Compile jobmanager.java hostname-standalone]$ javac jobmanager.java hostname-standalone]$ ls -la total 132 drwxrwxr-x 4 liferayadmin liferayadmin 4096 Nov 25 17:11. drwx 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 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 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

HELP COMMAND - jobmanager.java 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

LIST COMMAND - jobmanager.java hostname-standalone]$ java jobmanager list list Getting job list... id| common_name| timestamp|grid_interaction| status|user_description 3| test| :02:49.0| 9| SUBMITTED|Standalone hostname job execution 2| test| :38:12.0| 9| SUBMITTED|Standalone hostname job execution

STATUS COMMAND - jobmanager.java 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= serviceURL=wms://infn-wms-01.ct.pi2s2.it:7443/glite_wms_wmproxy_server ----->New GET HTTP< proxyPath=/tmp/e4aa08b e0-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: ' Common name: 'test' Timestamp: ' :38:12.0' Grid interaction: '9' User description: 'Standalone hostname job execution' Grid job status: 'SUBMITTED' hostname-standalone]$

INFO COMMAND - jobmanager.java hostname-standalone]$ java jobmanager info You must specify a job identifier to get its information 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: ' 01.ct.pi2s2.it:9000/WgAfu18Ezp9CcBdiKTm_DA' Common name: 'test' Timestamp: ' :38:12.0' Grid interaction: '9' User description: 'Standalone hostname job execution' Grid job status: 'SUBMITTED‘ hostname-standalone]$

CANCEL COMMAND - jobmanager.java 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= 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 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... hostname-standalone]$

UPDATE COMMAND - jobmanager.java 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= serviceURL=wms://wms-4.dir.garr.it:7443/glite_wms_wmproxy_server ----->New GET HTTP< proxyPath=/tmp/c acf bd 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| :30:17.0| 9| SUBMITTED|Standalone hostname job execution hostname-standalone]$

OUTPUT COMMAND - jobmanager.java 1/4 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= serviceURL=wms://wms-4.dir.garr.it:7443/glite_wms_wmproxy_server ----->New GET HTTP< proxyPath=/tmp/d2ccb c-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: ' Common name: 'test' Timestamp: ' :30:17.0' Grid interaction: '9' User description: 'Standalone hostname job execution' Grid job status: 'DONE' hostname-standalone]$

OUTPUT COMMAND - jobmanager.java 2/4 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]-[ 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' hostname-standalone]$

OUTPUT COMMAND - jobmanager.java 3/4 hostname-standalone]$ cd /tmp/jobOutput/ 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 jobOutput]$ cd 4 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 4]$

JOB OUTPUT 4]$ cat hostname-Error.txt 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 CREAM rwx eumed010 eumed Nov 25 17:30 CREAM _jobWrapper.sh -rw eumed010 eumed 9732 Nov 25 17:30 cream_ 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' 4]$ cat job_output.txt hostname job landed on: 'chem14.sns.it' This is the message text! 4]$

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

Questions?