1 / 21

GridPortlets:Hands-on Installation and Development

GridPortlets:Hands-on Installation and Development. Jason Novotny Jnovotny@ncmir.ucsd.edu. Installing GridPortlets. cd projects/gridportlets ant install $CATALINA_HOME/bin/startup.sh. GridFunctionality is provided by our package called 'GridPortlets'

vivek
Download Presentation

GridPortlets:Hands-on Installation and Development

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. GridPortlets:Hands-on Installation and Development Jason Novotny Jnovotny@ncmir.ucsd.edu

  2. Installing GridPortlets cd projects/gridportlets ant install $CATALINA_HOME/bin/startup.sh • GridFunctionality is provided by our package called 'GridPortlets' • GridPortlets is build on top of Java CoG • Need to have Globus on the resources working • Certificates for portal and the user • INSTALL.txt and TIPS.txt in the gridportlets source directory providing addtional information • Will deploy GridPortlets to GridSphere and generate documentation

  3. GridPortlets Basics Using

  4. Subscribing to GridPortlets • Need to subscribe to the 'GridPortlets' Group • Grid Tab will appear and provide the Portlets

  5. Define Credentials • Users can retrieve credentials from a MyProxy credential repository • Can enable their credentials for "single sign on" to computing resources at login time

  6. New Credential

  7. Resources • Resources available to users from the portal can be edited online or via XML File

  8. Resources II • Information of each resource can be updated via MDS and/or iGrid

  9. Starting a Job • A Wizard guides the user to the JobSubmission process • Supports different types of jobs, either generic or user specific jobtypes which can be installed by an Administrator • JobSubmissionsServices supported in the moment are Globus and Gridlab GRMS but it is extendable to others

  10. Defining a Job • Define a simple 'ls' on a resource

  11. Defining a Job II • Select the machine to run on • Choose number of processors and jobqueues

  12. Submitting the Job • Review Job Specification

  13. Job completed • Job did run and is completed • Showing information about the job and Job output

  14. 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

  15. GridPortlets Basics Programming

  16. Typical Tasks • Need credential • Locate executable • Add parameters and parameterfiles • Choose machine to run on • Transfer executable & parameterfiles to the selected resource • Execute job • Get Status on job • Transfer StdOut/StdErr and other outputfiles • Everything was seems easy on local machines maybe not on the Grid (e.g. mkdir -p) ! • All codesamples are contained within GridPortlets

  17. GridPortlet 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); } } • Everything is wrapped up in services • CredentialManagerService • JobSubmissionService • UserManagementService • To use these any portlet or other service has to instantiate the needed services

  18. Credentials public boolean userHasCredentials(String username) { User user = ums.getUserByUserName(username); boolean answer = true; if (cms.getActiveCredentials(user).size() == 0) { answer = false; } return answer; } • CredentialManagment has function to • create • activate • deactivate • delete • ... • To check if a user has a credential

  19. 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();

  20. Directory operations 1 FileBrowser fileBrowser = fileBrowserService.createFileBrowser(user, fileHostName); 2 String homeDir = fileBrowser.getHomeDirectory(); • Get a user's home directory • Create a directory 1 FileBrowser fileBrowser = fileBrowserService.createFileBrowser(user, fileHostName); 2 FileMakeDir makeDir = fileBrowser.makeDirectory(dstPath); 3 makeDir.waitFor();

  21. 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();

More Related