nbcr summer institute 2006 gridportlets:hands-on installation and development jason novotny
DESCRIPTION
GridPortlets Basics UsingTRANSCRIPT
![Page 1: NBCR Summer Institute 2006 GridPortlets:Hands-on Installation and Development Jason Novotny](https://reader034.vdocuments.mx/reader034/viewer/2022050901/5a4d1b467f8b9ab0599a38b7/html5/thumbnails/1.jpg)
NBCR Summer Institute 2006
GridPortlets:Hands-on Installation and Development
Jason [email protected]
![Page 2: NBCR Summer Institute 2006 GridPortlets:Hands-on Installation and Development Jason Novotny](https://reader034.vdocuments.mx/reader034/viewer/2022050901/5a4d1b467f8b9ab0599a38b7/html5/thumbnails/2.jpg)
Installing GridPortlets
cd projects/gridportletsant install$CATALINA_HOME/bin/startup.sh
GridFunctionality is provided by our package called 'GridPortlets'GridPortlets is build on top of Java CoGNeed to have Globus on the resources working Certificates for portal and the userINSTALL.txt and TIPS.txt in the gridportlets source directory providing addtional information
Will deploy GridPortlets to GridSphere and generate documentation
![Page 3: NBCR Summer Institute 2006 GridPortlets:Hands-on Installation and Development Jason Novotny](https://reader034.vdocuments.mx/reader034/viewer/2022050901/5a4d1b467f8b9ab0599a38b7/html5/thumbnails/3.jpg)
GridPortlets BasicsUsing
![Page 4: NBCR Summer Institute 2006 GridPortlets:Hands-on Installation and Development Jason Novotny](https://reader034.vdocuments.mx/reader034/viewer/2022050901/5a4d1b467f8b9ab0599a38b7/html5/thumbnails/4.jpg)
Subscribing to GridPortlets
Need to subscribe to the 'GridPortlets' GroupGrid Tab will appear and provide the Portlets
![Page 5: NBCR Summer Institute 2006 GridPortlets:Hands-on Installation and Development Jason Novotny](https://reader034.vdocuments.mx/reader034/viewer/2022050901/5a4d1b467f8b9ab0599a38b7/html5/thumbnails/5.jpg)
Define Credentials
Users can retrieve credentials from a MyProxy credential repositoryCan enable their credentials for "single sign on" to computing resources at login time
![Page 6: NBCR Summer Institute 2006 GridPortlets:Hands-on Installation and Development Jason Novotny](https://reader034.vdocuments.mx/reader034/viewer/2022050901/5a4d1b467f8b9ab0599a38b7/html5/thumbnails/6.jpg)
New Credential
![Page 7: NBCR Summer Institute 2006 GridPortlets:Hands-on Installation and Development Jason Novotny](https://reader034.vdocuments.mx/reader034/viewer/2022050901/5a4d1b467f8b9ab0599a38b7/html5/thumbnails/7.jpg)
Resources
Resources available to users from the portal can be edited online or via XML File
![Page 8: NBCR Summer Institute 2006 GridPortlets:Hands-on Installation and Development Jason Novotny](https://reader034.vdocuments.mx/reader034/viewer/2022050901/5a4d1b467f8b9ab0599a38b7/html5/thumbnails/8.jpg)
Resources II
Information of each resource can be updated via MDS and/or iGrid
![Page 9: NBCR Summer Institute 2006 GridPortlets:Hands-on Installation and Development Jason Novotny](https://reader034.vdocuments.mx/reader034/viewer/2022050901/5a4d1b467f8b9ab0599a38b7/html5/thumbnails/9.jpg)
Starting a Job
A Wizard guides the user to the JobSubmission processSupports different types of jobs, either generic or user specific jobtypes which can be installed by an AdministratorJobSubmissionsServices supported in the moment are Globus and Gridlab GRMS but it is extendable to others
![Page 10: NBCR Summer Institute 2006 GridPortlets:Hands-on Installation and Development Jason Novotny](https://reader034.vdocuments.mx/reader034/viewer/2022050901/5a4d1b467f8b9ab0599a38b7/html5/thumbnails/10.jpg)
Defining a Job
Define a simple 'ls' on a resource
![Page 11: NBCR Summer Institute 2006 GridPortlets:Hands-on Installation and Development Jason Novotny](https://reader034.vdocuments.mx/reader034/viewer/2022050901/5a4d1b467f8b9ab0599a38b7/html5/thumbnails/11.jpg)
Defining a Job II
Select the machine to run onChoose number of processors and jobqueues
![Page 12: NBCR Summer Institute 2006 GridPortlets:Hands-on Installation and Development Jason Novotny](https://reader034.vdocuments.mx/reader034/viewer/2022050901/5a4d1b467f8b9ab0599a38b7/html5/thumbnails/12.jpg)
Submitting the Job
Review Job Specification
![Page 13: NBCR Summer Institute 2006 GridPortlets:Hands-on Installation and Development Jason Novotny](https://reader034.vdocuments.mx/reader034/viewer/2022050901/5a4d1b467f8b9ab0599a38b7/html5/thumbnails/13.jpg)
Job completed
Job did run and is completedShowing information about the job and Job output
![Page 14: NBCR Summer Institute 2006 GridPortlets:Hands-on Installation and Development Jason Novotny](https://reader034.vdocuments.mx/reader034/viewer/2022050901/5a4d1b467f8b9ab0599a38b7/html5/thumbnails/14.jpg)
File Browser Portlet
Users can browse files on remote computing resources in a manner similar to how they might browse files on their desktop. We have made it relatively simple to create new directories, transfer and delete files all with simple HTML interfaces
![Page 15: NBCR Summer Institute 2006 GridPortlets:Hands-on Installation and Development Jason Novotny](https://reader034.vdocuments.mx/reader034/viewer/2022050901/5a4d1b467f8b9ab0599a38b7/html5/thumbnails/15.jpg)
GridPortlets BasicsProgramming
![Page 16: NBCR Summer Institute 2006 GridPortlets:Hands-on Installation and Development Jason Novotny](https://reader034.vdocuments.mx/reader034/viewer/2022050901/5a4d1b467f8b9ab0599a38b7/html5/thumbnails/16.jpg)
Typical Tasks
Need credentialLocate executableAdd parameters and parameterfilesChoose machine to run onTransfer executable & parameterfiles to the selected resourceExecute jobGet Status on jobTransfer StdOut/StdErr and other outputfilesEverything was seems easy on local machines maybe not on the Grid (e.g. mkdir -p) !All codesamples are contained within GridPortlets
![Page 17: NBCR Summer Institute 2006 GridPortlets:Hands-on Installation and Development Jason Novotny](https://reader034.vdocuments.mx/reader034/viewer/2022050901/5a4d1b467f8b9ab0599a38b7/html5/thumbnails/17.jpg)
GridPortlet Services
Everything is wrapped up in servicesCredentialManagerServiceJobSubmissionServiceUserManagementService
To use these any portlet or other service has to instantiate the needed services
public void init(PortletConfig config) throws PortletException {super.init(config);try {
ums = (UserManagerService)createPortletService(UserManagerService.class); cms = (CredentialManagerService)createPortletService(CredentialManagerService.class); crs = (CredentialRetrievalService)createPortletService(CredentialRetrievalService.class); } catch (PortletServiceException e) { log.error("Unable to initalize Credential/UsermanagerService."+e); } }
![Page 18: NBCR Summer Institute 2006 GridPortlets:Hands-on Installation and Development Jason Novotny](https://reader034.vdocuments.mx/reader034/viewer/2022050901/5a4d1b467f8b9ab0599a38b7/html5/thumbnails/18.jpg)
Credentials
CredentialManagment has function tocreateactivatedeactivatedelete...
To check if a user has a credential public boolean userHasCredentials(String username) { User user = ums.getUserByUserName(username); boolean answer = true; if (cms.getActiveCredentials(user).size() == 0) { answer = false; } return answer; }
![Page 19: NBCR Summer Institute 2006 GridPortlets:Hands-on Installation and Development Jason Novotny](https://reader034.vdocuments.mx/reader034/viewer/2022050901/5a4d1b467f8b9ab0599a38b7/html5/thumbnails/19.jpg)
Listing Files
To get a filelisting use the FileBrowserService
1 FileBrowser fileBrowser = fileBrowserService.createFileBrowser(user, fileHostName);
2 FileListing fileListing = fileBrowser.list(filePath);3 fileListing.waitFor();4 List fileLocations = fileListing.getFileLocations();
![Page 20: NBCR Summer Institute 2006 GridPortlets:Hands-on Installation and Development Jason Novotny](https://reader034.vdocuments.mx/reader034/viewer/2022050901/5a4d1b467f8b9ab0599a38b7/html5/thumbnails/20.jpg)
Directory operations
Get a user's home directory
Create a directory
1 FileBrowser fileBrowser = fileBrowserService.createFileBrowser(user,
fileHostName);2 String homeDir = fileBrowser.getHomeDirectory();
1 FileBrowser fileBrowser = fileBrowserService.createFileBrowser(user,
fileHostName);2 FileMakeDir makeDir = fileBrowser.makeDirectory(dstPath);3 makeDir.waitFor();
![Page 21: NBCR Summer Institute 2006 GridPortlets:Hands-on Installation and Development Jason Novotny](https://reader034.vdocuments.mx/reader034/viewer/2022050901/5a4d1b467f8b9ab0599a38b7/html5/thumbnails/21.jpg)
Copy files
FileBrowserServices provides needed methods
1 FileBrowser srcBrowser = fileBrowserService.createFileBrowser(user,
srcHostName);2 FileLocation srcLocation = srcBrowser.createFileLocation(srcPath);3 FileBrowser dstBrowser = fileBrowserService.createFileBrowser(user,
dstHostName);4 FileBrowser dstLocation = fileBrowser.createFileLocation(dstPath);5 FileCopy copy = srcFileBrowser.copy(srcLocation, dstLocation);7 copy.waitFor();