How use
From XtremWebCH Wiki
Contents |
Downloading, installing and using XWCH
If you want to try out XWCH without installing it, please send your request to xtremwebch@eig.ch.
In what follows, we will cover the installation and a running a "hello world" job. To do so, we install the coordinator, warehouse and worker. For all of these, you will need Java runtime 1.6 or later. For the coordinator (but not for the other packages) you will need GlassFish2 web container.
Coordinator installation
The coordinator is an "EAR" web application that can be deployed under a web server like GlassFish2. Download: [1]
Install:
- with your GlassFish service console, create a database connection called "xwchtestlocal", connecting to database "xwch" (see Media:Xwch-database.jpg).
- in the same console, deploy the downloaded EAR file.
- point your browser to http://yourhost:yourport/XWCHWeb/Main.iface
- for administration, the username is webadmin@xtremwebch.net, the default password is rootroot
Warehouse installation
Download: [2]
To run the warehouse, unzip the file and enter the following command:
java -Xrs -classpath . -jar javanode.jar config.properties
By editing the config.properties file in the warehouse's directory you can configure which coordinator the warehouse reports to. Here is an example:
xwserver=http://mycoordinatorserver.com:8180/WorkerServiceService/WorkerService
Worker installation
Please use this installation package if you have Windows or Ubuntu Linux 8 or 9: [3]
If you want to run the worker inside a Virtual Machine with VMPlayer, please use this VMware image: [4] or QEMU image: [5]
Please use this installation package if you have Linux Debian 5 (Lenny) based system: [6]
To execute the worker, unzip the file and enter the following command:
- For linux user: sh startxw.sh
- For windows user: startxw.bat
By editing the config.properties file in the worker's directory you can configure which coordinator the worker reports to, and what its name will be. Here is an example:
workername=myworker xwserver=http://mycoordinatorserver.com:8180/WorkerServiceService/WorkerService
How to make the worker run all the time when the computer is on (even when no user is logged in)
With Windows XP, this can be done by making a scheduled task with Windows Control Panel, as shown in the following image Media:wincron.jpg.
Please note the circled "On computer startup" option in the startup time. The startup directory should be the same where the program is located (C:\worker in our case).
The "C:\worker\startxw.bat" file's content is simply:
startxw.bat
With Linux, automated tasks can be started by adding the startup command in /etc/rc.local, for instance like this:
cd /root sh startxw.sh &
Downloading the source code
If you are a programmer, you can find resources from Tech
Running a Hello world application
After installing the components, you need to create a user account at the coordinator. The user is identified by a "token" (currently client ID) that is used as a parameter in job submission.
You can run an application either by using a command line client or API.
The command line client is available here: [7]. After registration (see above), you can use the example below:
type=XWCHJob client_ID = INSERT YOUR ID HERE applicationname =APP_CLI_TEST modulename =MODULE_CLI_TEST datainputfilename =data.zip binaryinputfilename =binary.zip jobname = TESTJOB outputfilename = TEST_OUT workercommandline =hello.bat worker os =LINUX
The clientdemo.zip file [8] contains a README file explaining the job submit process by a programming language API.