Português (Brasil)English (United Kingdom)
Creating a private OurGrid Community PDF Print E-mail

In order to install an OurGrid site, you should follow these steps:

 

1. Download, configure and start the OurGrid Discovery Service
2. Download, configure and start the OurGrid Aggregator 
3. Download and install the OurGrid Web Status  
4. Download and install the OurGrid Broker Web Service 
5. Create a Broker Web Service Client

 


 

1. Download, configure and start the OurGrid Discovery Service [top]

Download the latest Discovery Service version here.

Unpack the downloaded package.

The resulted unpacked tree looks like this: 

  • certification/ - Stores X.509 certificates
  • lib/ - Jars
  • COPYING - License file
  • COPYING.LESSER - License file
  • ds                           - Unix script
  • ds.bat - Windows script
  • ds.properties              - Discovery Service properties
  • log4j.cfg.xml - Logging configuration
  • testjvm - Unix script used to find Java

You can use the Discovery Service Console. In order to run the DS Console, double click the ds.bat file (Windows) or type 'ds start' (Linux).

You must open the ds.properties file to edit the XMPP properties. You must define the commune.xmpp.servername, ds.network (username@servername) and commune.xmpp.password properties. Now you can start the Discovery Service agent, typing 'ds start' in the console. The DS will prompt the success message or the error cause.

To verify the peers list connected to the Discovery Service, type 'ds status'.

 

2. Download, configure and start the OurGrid Aggregator [top]

The Aggregator component is responsable to store statistical data related to jobs executions in the Community.

Download the latest Aggregator version here.

Unpack the downloaded package.

The resulted unpacked tree looks like this: 

  • certification/ - Stores X.509 certificates
  • lib/ - Jars
  • COPYING - License file
  • COPYING.LESSER - License file
  • aggregator               - Unix script
  • aggregator.bat - Windows script
  • aggregator.properties - Aggregator properties
  • log4j.cfg.xml - Logging configuration
  • testjvm - Unix script used to find Java

You need to install a Database to store the Aggregator data. We recomend MySql 5. In the file lib/ourgrid.jar, there is a file (aggregator-hibernate.cfg.xml) with the configurations related to the Database. Please, insert the data correctly (machine name, database user and password).

You can use the Aggregator Console. In order to run the Aggregator Console, double click the aggregator.bat file (Windows) or type 'aggregator start' (Linux).

You must open the aggregator.properties file to edit the XMPP properties.You must define the commune.xmpp.username, commune.xmpp.servername, commune.xmpp.password, aggregator.ds.username, aggregator.ds.servername (These two last properties are related to the Discovery Service that will be connected to the Aggregator to provide informations). Now you can start the Aggregator agent, typing 'aggregator start' in the console. The Aggregator will prompt the success message or the error cause.

To verify the Aggregator status, type 'aggregator status'.

 

3. Download and install the OurGrid Web Status [top]

The Web Status is a Web Application that lists the Community status, with its Peers and Workers. Through the WebStatus, you can see how many Peers are conected to the Community, the number of idle machines, and machines in use by the grid.

To deploy this component, you need to install a Java Web Server. We recomend Tomcat.

Download the latest Web Status version here.

Deploy the webstatus.war file in the webapps folder. Before start Tomcat, insert the properties correctly in the cmmstats.properties file, stored at WEB-INF/classes folder.
You need to inform the Discovery Service username and servername to the WebStatus in the properties cmmstats.ds.username and cmmstats.ds.servername. With these properties, the WebStatus can purchase the status of the Community. Finally, fill the properties commune.xmpp.username, commune.xmpp.servername and commune.xmpp.password.

 

4. Download and install the OurGrid Broker Web Service [top]

OurGrid provides a Web Service to Job submissions. You can deploy this WS downloading the latest Web Service version here.

The services avaliable are:
 
  • sendFile(byte[] file, String name) - sends a file to the Broker Web Service
  • submitJob(WsJobSpec job) - submits a job with its specifications
  • getJobStatus(int jobID) - returns the job status
  • getFile(String fileName) - returns the outputfile specified by the fileName
  • cancelJob(int jobID) - cancels the job´s execution

After downloading the Web Service, deploy the application in a Java Web Server. We recomend Tomcat.

You need to install a OurGrid Broker specifically to the Web Service. We recomend that a user must be created. For example: Create a user called webservice, install and start the Broker (setting the properties to this user). Before start Tomcat, go into TOMCAT_HOME/webapps/brokercontrol/WEB-INF/classes/resources/webservice and fill the broker.properties file according to the properties of the Broker installed to the webservice user.

Now, you can start the Tomcat. Verify if the WSDL file was correctly deployed, accessing the address:

http://yourmachine:8080/brokercontrol/brokercontrol?wsdl

 

5. Create a Broker Web Service Client [top]

You can use the OurGrid Web Service, consuming its services through any programming language that implements SOAP Protocol. Below, you can see two examples of the Web Service clients (Java and C#):

JAVA

To generate a Java Client, run the following command (The executable wsimport is found in the JSK 6, in the bin folder):

wsimport -keep -p folder http://localhost:8080/brokercontrol/brokercontrol?wsdl

The client classes are generated and you can use the services through the BrokerControlWSService and BrokerControlWS classes. For example:

           BrokerControlWSService service = new BrokerControlWSService();
           BrokerControlWS facade = service.getBrokerControlWSPort();
    
           byte[] file = new byte[256];
       
           //Sending file to the Broker
           facade.sendFile(file, "file.txt");

           //Creating Job
           WsJobSpec job = createJobSpec();

           //Submitting job
           String result = facade.submitJob(job);

           String status = facade.getJobStatus(jobId);


C#

To generate a C# Client, run the following commands:

wsdl /language:C# http://localhost:8080/brokercontrol/brokercontrol?wsdl

csc /t:library BrokerControlWSService.cs


The client classes are generated and you can use the services through the BrokerControlWSService class. For example:

      class Client
       {
           public static void Main(string[] args)
          {
               BrokerControlWSService service = new BrokerControlWSService();

              try {
                    string result = service.submitJob(createSpec());

                    Console.WriteLine("Job added...");
             }
        }
     }

Run the following command and the client will be executed:

csc /r:BrokerControlWSService.dll Client.cs