![]() |
||||||||||||||||||||||||
Cluster and Grid Computing (Practical Work)
| ||||||||||||||||||||||||
|
Creating Adaptors: When you want to write your own adaptor, you can use the following recipe:
The easiest way to create a resource broker for the Amazon Cloud is to extend the existing SshTrilead resource broker for and add some Amazon specific knowledge to it. As with the previous assigment, there is a template that you can use for your implementation. As a result, your adaptor recipe will look like this:
Amazon Broker Template: The Amazon broker template can be found in the usual directory on the fs0 machine:
/usr/local/VU/practicum/gridcomputing/tarballs/amazonbroker-template.tgz
It contains a skeleton for your implementation that looks like this: public class AmazonResourceBrokerAdaptor extends SshTrileadResourceBrokerAdaptor { public AmazonResourceBrokerAdaptor(GATContext gatContext, Preferences preferences) throws ... { super(gatContext, preferences); // Add stuff here if needed. } public Job submitJob(JobDescription description) throws ... { // Do whatever you need to do here, and then // call super.submitJob(...) to submit a job. } } It is very important that you use 'ant' to build your source, since a special MANIFEST file must be inserted into the Amazon resource broker jar file. This MANIFEST file is used by the JavaGAT to figure out what type of adaptor it can find in the jar file. If it is not found, your implementation will not be recognised as an adaptor. Telling JavaGAT about your adaptor: After you have created an Amazon broker, you will have to tell the JavaGAT where it can can find your implementation. You can do this by setting the AMAZON_ADAPTOR environment variable, for example:
export AMAZON_ADAPTOR=$HOME/amazonbroker/jar/AmazonResourceBrokerAdaptor.jar
This way, your AmazonResourceBrokerAdaptor.jar file will be automatically added to the list of adaptors that the JavaGAT loads (provided that you use the /usr/local/VU/practicum/gridcomputing/bin/run_grid_app script to run your grid applications). Updating JOINC: After you have created an Amazon resource broker implementation, you must update your JOINC implementation to use the "Amazon" resource broker instead of "globus". Also don't forget to remove any hard-coded machine settings. |
|
|
|||||||
| phonebook |
|||||||
|
If you spot a mistake, please e-mail the maintainer of this page.
|
|||||||