| Creating a private OurGrid Community |
|
|
|
|
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.
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).
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.
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).
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. 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.
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:
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 |