Documente Academic
Documente Profesional
Documente Cultură
OurGrid components are certified to work with the OpenFire server (formerly WildFire), although other servers may also work. You
can find below a detailed guide on how to obtain, install and set up the OpenFire server to work with OurGrid.
You can download the Openfire at the following link: http://www.igniterealtime.org/downloads/index.jsp
Steps to install the Openfire server
1. Download the Openfire tarball from the website
2. Extract the tarball
3. Get into the created directory, named 'openfire' and start the server with 'bin/openfire start'.
In a few seconds the server will be running and it will be possible to access its Web administration console to set it up. To access the
console point your browser to 'http://host:9090'; where 'host' is the name of the machine on which the server was just installed. If
you are on the same machine as Openfire, the following URL will usually work: 'http://127.0.0.1:9090'. Then you will set the first
server setup screen.
Server Setup
1 de 8 11-02-2011 18:50
Installing and configuring an OurGrid site http://www.ourgrid.org/index.php?view=article&i...
On 'Database settings' choose 'Embedded database'. An external database can be used although this option has been not tested by the
OurGrid team.
On 'Profile settings' choose 'Default'.
On 'Administrator account', fill your e-mail address and choose a administrator password.
The initial setup is now done. Restart your openfire server and now you can login to the admin console using username 'admin' and the
password you have just chosen.
Server configuration
The initial setup is now done. Restart your openfire server and now you will be able to login to the admin console using username
'admin' and the password you have just set.
Server configuration
Most of the Openfire default properties are suitable for OurGrid. However, some Server Settings should be changed. Remember to
click 'Save Settings' after modifying a configuration section.
2 de 8 11-02-2011 18:50
Installing and configuring an OurGrid site http://www.ourgrid.org/index.php?view=article&i...
You can use the Peer Console or the Peer GUI. In order to run the Peer GUI, double click the peer.bat file (Windows) or type 'bash peer
gui' (Linux). You will see a GUI like this:
The GUI automatically suggests the XMPP user name, password and server name. You may change the user name to the name of your
peer. If you are using other XMPP server (for example, if you have installed one in your site), change the server name property.
Important: The server name must match the exact address set in the Openfire's xmpp.domain property. To view the value of this
property, open the Openfire admin console and go to Server > Server Manager > System properties > xmpp.domain
The XMPP server can be configured to create an account on its first login. In this case, if the account does not exists, it is created in
that XMPP server with the user name and password used in the login. You can test your connection pushing the "Test Connection"
button. Remember, if the server allows, this tests can automatically create your XMPP account. If your connection fails, follow these
steps:
- Verify if the XMPP server is UP;
- Create the user account or allow the server to create them automatically;
- Test the connection again;
After changing the peer properties, click the "Save" button to store the values in the peer.properties file.The next time you run the
Peer GUI, the new values will be shown.
Now you are ready to start the Peer agent. So, click the "Start peer" link. When the peer has started successfull, the "Start peer" link
will be disabled and the "Stop peer" link will be enabled.
If you choose to run the Peer via console, you must open the peer.properties file to edit the XMPP properties.You must define the
commune.xmpp.username, commune.xmpp.servername and commune.xmpp.password properties. Now you can start the peer agent,
typing 'bash peer start' in the console.The peer will prompt the success message or the error cause. You may need to use the 'chmod +x
peer' command, to enable the execution of the peer script.
By default, the peer is configured to connect to the the official OurGrid Discovery Service, which is the component responsible to
connect all the community peers. It is located in the address lsd-ds@xmpp.ourgrid.org. This e-mail address is being protected from
3 de 8 11-02-2011 18:50
Installing and configuring an OurGrid site http://www.ourgrid.org/index.php?view=article&i...
spambots. You need JavaScript enabled to view it . However, you can join other OurGrid communities, changing the Discovery Service
address, or you can simply choose not to join the community, unmarking the "Join community?" check box. Do not forget to save your
updates with the "Save" button.
If you use the Peer GUI, the Discovery Service configuration is in "Peer Configuration > Basic > Discovery Service settings". You can
click in the "Test connection" button to ping the Discovery Service.
The Discovery Service configuration can also be set using the peer.properties file, by simply setting the peer.joincommunity and
peer.ds.network properties respectively to "yes" and "ds-username@ds-servername".
Since you have started the peer, you can check the Discovery Service connection and see the other community peers in the
"Community" tab of the Peer GUI.
4 de 8 11-02-2011 18:50
Installing and configuring an OurGrid site http://www.ourgrid.org/index.php?view=article&i...
In the console, you can check the Discovery Service connection typing the 'bash peer status' command.
If you trust all the grid users (for example, in a private community), you can use the Executors that run the tasks directly in the
Operational System (Linux or Windows).
However, if you do not trust the grid users, you should use an Executor with Virtualization. So, in this case, the tasks run inside of a
virtual machine without network access. This is a very secure option, because a hacker can damage the virtual machine, but its state is
reset every time the worker is allocated. There are two options of virtualized Executors: VServer, for Linux; and VMWare Server, for
Windows and Linux.
The executor is configured in the worker.executor property of the worker.properties file. If this property is empty, the Executor will
run directly on the OS. To use VServer, define the property with VSERVER. To use VMWare Server, set VMWARE both in Linux or
Windows. This functionality brings a new requirement:
For Workers that run on Linux you should install the Linux VServer (see instructions here) or the VMWare Server (see instructions
here);
For Workers that run on Windows you should install the VMWare Server (see instructions here);
Besides all the system requirements above mentioned, machines where the Workers will be installed must have:
Workers are distributed with the virtual environment they use. It is required
around 2 GB of disk space for the complete installation of a Worker. It is
important to notice that this great amount of disk space needed to install a
Disk space Worker is not due to the worker itself, but due to the virtual environment it uses
for security purposes. Besides, the amount of available disk space for the user
account running the Worker will determine how much space there will be
available for the tasks that will run on the machine.
OS Linux or Windows
Connectivity All grid machines must be able to connected to a XMPP server
Other tools unzip
Download the latest worker version here and (for each grid machine):
unzip worker-4.x.y.zip
cd worker-4.x.y/
And perform the instructions in the two following sections.
You can create a similar SDF by just replacing the "worker" sections. The mandatory properties, "username" and "servername", refer to
5 de 8 11-02-2011 18:50
Installing and configuring an OurGrid site http://www.ourgrid.org/index.php?view=article&i...
the XMPP username and servername respectivelly. You can define any property in the SDF, e.g. javaversion : 1.6, hasGenomaDB :
true. The properties defined in the workerdefaults section are applied to all the workers in the site.
In the Peer GUI, click the "Import workers from file" link and choose the SDF file:
Starting a Worker
Edit the worker.properties file and update the basic Commune properties commune.xmpp.username, commune.xmpp.servername and
commune.xmpp.password to configure the connection to the XMPP server. The commune.xmpp.username and
commune.xmpp.servername properties must match the values set in the Peer for this Worker.
You should also copy the Peer's public key (commune.publickey property in peer.properties file) to the worker.peer.publickey
property of worker.properties file (Notice that you won't be able to start a Worker if its commune.publickey property is not set up).
Run:
'cd
/YOUR_WORKER_HOME/'
'bash worker start'
At this point the Worker should be up and running. Use 'bash worker status' to check its status. You may need to use the 'chmod +x worker' command to enable the
execution of the worker script.
Although, the OurGrid Worker should run as a service on each machine. We suggest you to create a script like the one below and set up
your PC to to run it on boot:
6 de 8 11-02-2011 18:50
Installing and configuring an OurGrid site http://www.ourgrid.org/index.php?view=article&i...
export JAVA_HOME=/YOUR_JDK_HOME
export PATH=$JAVA_HOME/bin:$PATHecho "Starting OurGrid Worker 4.0"
su username #You should use this line in order not to start the
Worker as 'root'user cd /YOUR_WORKER_HOME/
bash worker start
7. Add the local users and start the OurGrid Broker [top]
The Peer is the manager of an OurGrid site. The administrator can define the site's local users in the Peer GUI or console. Each site
user should have a XMPP account (with username, servername and password), which will be used to run a Broker. Before starting the
Broker, the user account should also be registered in the Peer with the same data used in the XMPP account. In the Peer GUI, there is a
"Add peer user" link, which opens a window with the necessary user data: user name, server name and password. In the console you can
use the adduser command:
'bash peer adduser username@servername password'
Important: the data you used when adding the user must be the same data you use in the Broker (broker.properties file).
Unzip broker-4.x.y.zip
Go to broker-4.x.y/ folder
Type 'broker gui' or double click the broker.bat file.
These commands will open the Broker GUI. But, if you want to use the console, you can use the 'broker' shell script to perform the same
commands.
The Broker configuration data will be stored in the broker.properties file, that is located in:
After defining the XMPP user name, server name and password, in the Broker GUI or directly editing the broker.properties file, you
can start the Broker, clicking in the 'Start' link of the GUI or using the command:
'bash broker start'
You may need to use the 'chmod +x broker' command, to enable the execution of the broker script.
8. Connect the Broker to its Peer [top]
Use your favorite text editor to create a description file containing the Peers to which your Broker should request Workers. Typically,
you'll use a single Peer, which will be the manager of your site. This Peer will be responsible for communicating with the rest of the
community on your behalf to obtain resources for your use.
This is an example of a grid description file mypeer.gdf:
peer:
username: mylabpeer
servername: xmpp.mylab.org
label: Peer of my lab
The username and servername properties should contain the same data of the Peer XMPP account.
The Broker GUI has a "Set grid" link, which opens a window to choose a GDF file. There is also a setgrid command on broker console:
'bash broker setgrid mypeer.gdf'
If the Broker has successfully logged in the Peer, you will see a green circle near the peer's name, in the "Peers" tab of Broker GUI. You
will also see the user with a green circle, in the "Peer users" tab of Peer GUI.
9. Running a Job [top]
A simple example job is available in the Broker package. To run the job click on the "Add job" link into your Broker GUI and give the JDF
7 de 8 11-02-2011 18:50
Installing and configuring an OurGrid site http://www.ourgrid.org/index.php?view=article&i...
you want to submit to OurGrid. Use the "Jobs" tab to monitor your job's status.
If you prefer a command line interface, type:
'bash broker addjob examples/addJob/simplejob.jdf'
'bash broker status' (to monitor the job status)
8 de 8 11-02-2011 18:50