installing and building gtlab l.
Skip this Video
Loading SlideShow in 5 Seconds..
installing and building gtlab PowerPoint Presentation
Download Presentation
installing and building gtlab

Loading in 2 Seconds...

play fullscreen
1 / 46

installing and building gtlab - PowerPoint PPT Presentation

  • Uploaded on

Make a Google gadget. Mix and match tags in a pipeline to make a new ... If you want to hook tags into chains, implement getOutput() and setInput ...

I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
Download Presentation

PowerPoint Slideshow about 'installing and building gtlab' - Kelvin_Ajay

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.

- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
installing and building gtlab

Installing and Building GTLAB

Marlon Pierce

Indiana Univeristy

gtlab and ogce
  • OGCE contains multiple sub-projects
    • Portlet-based Grid portal (with GridSphere and Tomcat).
    • Workflow suite (services and add-ins to the portal)
    • Information Web services
    • Gadget container
    • Cyberaide JavaScript libraries
    • GTLAB
  • These are packaged with Maven and include everything you need except Java and (for some services) MySQL.
  • We try to make things installable with minimal fuss.
    • Consistent directory structures across projects
    • Edit one config file (pom.xml)
    • Run one command (mvn clean install)
    • You may need to futz a little with MySQL

User’s Browser

iGoogle, Facebook

Portlet, Gadget Containers

GTLAB Gadgets

RPS, RDS, GPIR Services

TeraGrid Services


Google GData Services, Twitter Feeds, etc

GTLAB’s Relationship to Other Components


Various GTLAB applications deployed as portlets:

Remote directory browsing, proxy management, and LoadLeveler queues.


GTLAB Applications as Google Gadgets: MOAB dashboard, remote directory browser, and proxy management.

myproxy example
MyProxy Example

<h:form id="form">

<h:outputText value="Username:"/>

<h:inputText value="#{resource.username}" required="true"/>

<h:outputText value="Password: "/>

<h:inputSecret value="#{resource.password}" required="true"/>

<h:outputText value="MyProxy Server: "/>

<h:inputText value="#{resource.myproxyHostname}" required="true"/>

<o:submit id="submit" value="Submit" binding="#{builder.body}"

action="#{builder.junkAction}" >

<o:multitask id="multi" persistent="true" taskname="#{resource.taskname}">

<o:myproxy id="mypr" hostname="#{resource.myproxyHostname}"

lifetime="2" password="#{resource.password}" port="7512"





executing multiple task
Executing Multiple Task

<o:submit id="submit" value="Submit" binding="#{builder.body}"

action="#{builder.junkAction}" >

<o:multitask id="multi" persistent="true"


<o:jobsubmitid="js" myfaces="true"






<o:filetransferid="ft" myfaces="true"

from="#{resource.from}" to="#{}" />

<o:dependency id="dep" task="ft" dependsOn="js"/>



resource prediction service client with gtlab
Resource Prediction Service Client with GTLAB

<o:submit id="submit" value="Submit"



<o:multitask id="multi"









example with dependency
Example with Dependency

<o:submit id="submit” …>

<o:multitask id="multi” …>

<o:rpsAddModel resource="task1-resources"



<o:rpsManager resource="task1-resources"



<o:dependency id="deps-rpsstuff”





gtlab features
GTLAB Features
  • Extends Java Server Faces.
    • Tag components wrap major COG Abstraction Layer features
    • And Web Service clients, GridShib, etc.
    • Supports tag inter-dependencies.
  • Allows you to do standalone development.
  • Use JSF portlet bridge to convert into portlets
      • No new coding, just add/modify XML config files and jars.
      • Process is automated
  • Or forget about portlets
    • Convert into Google Gadgets
    • Develop as a Facebook application
    • Etc.
getting gtlab
Getting GTLAB
  • See
  • You can use your favorite SVN client to check out.
    • svn co (latest)
    • svn co (tagged)
  • “Latest” will give you easy access to any updates
    • “svn update”
    • Best option if you want to actively develop and get fixes right away.
no svn get the tar
No SVN? Get the TAR
  • SourceForge’s SVN/CVS viewer now provides a “Download GNU Tar” option.
  • for latest.
  • for tag
levels of abstraction in gtlab code
Levels of Abstraction in GTLAB code
  • Note JSF is compatible with JSP, so you can mix and match.
  • And you can embed JavaScript
    • YUI, Scriptaculous user interface goodies.
    • Google and Facebook APIs.

GTLAB gadgets can also run as portlets with no code changes by using the JSF portlet bridge.




Tomcat Web Server


Portlet Container




Compile and deploy into server

GTLAB Portlets



GTLAB Gadgets



Decorate with bridge and container jars, xml config files.

making gtlab google gadgets
Making GTLAB Google Gadgets
  • A Gadget is a standalone application that is integrated into your personal iGoogle display.
    • They can run on your Web server.
    • You can use SSL/HTTPS
  • Google Gadgets have two versions
    • http: these use Google’s JavaScript APIs
    • url: these wrap external applications with Iframes.
  • We currently support “url” gadgets.
example gadget config file
Example Gadget Config File

<?xml version="1.0" encoding="UTF-8" ?>


<ModulePrefs title="MyProxy Gadget Example"



<Content type="url"




Save this as MyProxy.xml and place in a Web accessible place.


Gadget containers aggregate content from multiple providers. Content is aggregated on the client by the user. Nearly any web application can be a simple gadget (as Iframes)

Other Gadgets


Tomcat + GTLAB Gadgets

Other Gadgets


RSS Feed, Cloud, etc


Grid and Web Services

(TeraGrid, OSG, etc)

Social Network

Services (Orkut, LinkedIn,etc)


GTLAB Applications as Google Gadgets: MOAB dashboard, remote directory browser, and proxy management.


Common science gateway architecture.

Aggregation is in the portlet container.

Users have limited selections of components.




Portlets and Container


Grid and Web Services

(TeraGrid, OSG, etc)

Grid and Web Services

(TeraGrid, OSG, etc)

Grid and Web Services

(TeraGrid, OSG, etc)

making gtlab gadgets into portlets
Making GTLAB Gadgets into Portlets
  • Do all development in jsf_standalone directory
    • This is where your template tags will be placed
  • When you are ready to convert:
    • Download and build the OGCE portal
    • cd GTLAB/transition
    • mvn clean process-resources
    • cd GTLAB/portlets
    • mvn clean install
  • You will need to make small edits to portlet.xml, group.xml, and layout.xml in GTLAB/portlet/src/main/webapp/WEB-INF/
  • That’s it.

Various GTLAB applications deployed as portlets:

Remote directory browsing, proxy management, and LoadLeveler queues.

build gtlab




















  • Unpack or checkout code
  • Cd GTLAB
    • All commands are executed from here.
  • Edit properties at the top of pom.xml.
    • Change IP
    • Change project.home if you unpack someplace besides $HOME.
  • Run “mvn clean install”
run examples
Run Examples
  • From GTLAB, start tomcat with ./
  • From GTLAB, stop Tomcat with ./
  • Point browser to http://localhost:8080/GTLAB
  • Start with MyProxy Example
next steps
Next Steps
  • Play with examples.
    • These are really bare bones. Make something interesting.
  • Make a Google gadget.
  • Mix and match tags in a pipeline to make a new application.
    • Use the dependency tag.
    • Note you can mix and match JSF and JSP if you are not familiar with JSF.
  • Try making a new tag.
    • Explained next.
making a new jsf page from tags
Making a New JSF Page from Tags
  • I recommend starting from the examples.
    • jsf_standalone/src/main/webapp/examples
  • “Build” the examples with
    • mvn –o clean install –f jsf_standalone/pom.xml
  • The “-o” option is used to build offline. Will also avoid unnecessary Maven repository updates.
  • The “-f” specifies only build this specific module.
  • I recommend not futzing with the deployed versions under portal_deploy.
    • A computer is a state machine. State must be reproducible.
making a new tag
Making a New Tag
  • Run the following command from GTLAB:
    • mvn clean process-resources -Dprojectname=Test -f templateTag/pom.xml
    • Add -Ddest.dir=/tmp for a dry run.
  • Replace “test” with the name of your tag.
  • Replace “Test” with the name for your Bean.
  • This will make 4 files
  • Edits also 3 config files
    • gtlab-factory.xml, managed-beans.xml, components.xml
  • This will compile but to implement something useful, you will need to edit the highlighted files.
implementing a tag
Implementing a Tag
  • The place to start is (or whatever you used for –Dprojectname=…).
  • This includes several inherited methods that can be implemented.
    • Most important is submit(). Use the try/catch block. This is where the action is.
    • If you want to hook tags into chains, implement getOutput() and setInput().
    • Also take a look at the other beans.
suggested tags a wish list
Suggested Tags: A Wish List
  • What can you do in your bean? Anything server-side Java can do.
  • Some suggestions:
    • Implement a tag client to a remote Web service. Amazon has some interesting ones….
    • Implement an RSS/Atom feed client to Twitter, your blog, Facebook, etc.
    • Combine the feeds as a mash-up.
    • Connect to a database with JDBC.
    • Implement a JMS publisher or subscriber.
    • Use Google Java APIs to interact with Blogger, Calendar, and YouTube.
    • Try interacting with Facebook.
example make an inca dashboard
Example: Make an INCA Dashboard
  • INCA is used as the testing framework for the TeraGrid.
  • You can get the latest INCA test results from the URL
    • See Sangmi’s notes at
  • You’ll get back some fine looking XML.
  • Let’s make a little dashboard out of this.
first create a new empty tag
First, Create a New, Empty Tag

mvn clean process-resources \ \

-Dprojectname=IncaStatus \

-f templateTag/pom.xml

second implement the bean
Second, Implement the Bean
  • Main thing is to implement IncaStatusBean’s submit() method.
  • Code is hard to put in a PPT slide
  • See
third implement a jsf page
Third, Implement a JSF Page
  • Actual tag is shown below.
  • Full example is
  • It includes some boilerplate (can be automated).

<o:incastatus id=”mytest"




Here’s the resulting page. You can make into a portlet in a couple of steps. You can also tie to other tags in a pipeline.

next steps make a pipeline
Next Steps: Make a Pipeline

Find Running Hosts


  • Implement the setInput() and getOutput() methods.
  • Pipeline it with the Resource Description and Resource Prediction Service tags.
  • Integrate QBETS tags
    • Currently unwritten
  • Integrate with Job Submission

Find Best Host for YourJob (RPS)

Find Host with Shortest Wait Time (QBETS)

Submit Job

more stuff about gtlab
More Stuff about GTLAB
  • Supports linear tag dependencies.
    • Removed dependence on COG graph processing (still use the COG)
    • We can support graphs of any tag you care to write.
    • Only support pipelines currently, not full DAGs
  • Redesigned to simplify writing new tags.
    • Extensive use of factories.
    • You no longer have to change core code to add a tag
    • Templates for 4 Java files and 3 XML config files now can be done in one (mvn) step
      • Typically you will only need to edit one Java file.