Running GIS Demos
From CrisisGridWiki
Contents |
Running GIS demos: Instructions for servo account
Terms Used
HPSEARCH_HOME points to the folder where hpsearch is installed. On grid farm, under servo account, this points to
/home/servo/hpsearch/hpsearch-1.0.1.3
NB_HOME points to the folder where NaradaBrokering is installed. Version 1.1.6 is installed under
/home/servo/nb116
HPSearch Configuration w.r.t. to Context service:
WSContext ASYNChronous version is used for all GIS demos. To avail this,
CONTEXT_MODE=async MUST be set in HPSEARCH_HOME/bin/setenv.sh(.bat)
Also set the location of the context service in HPSEARCH_HOME/conf/hpsearch.conf
When using ASYNC version, the value of property ASYNC.location is used.
Running Pattern Informatics:
The following configuration is required:
For WMS:
The location of PICodeRunner.js file is /home/servo/GIS/PI/scripts/PICodeRunner.js
The location of hpsearch ShellWS web service's wsdl is http://machine:port/ShellWS?wsdl
where machine is where HPSearch is running.
Port is usually 28080 UNLESS the service was started on a port other than the default by using
-shellws.port=???? command line parameter e.g. http://gf6.ucs.indiana.edu:28080/ShellWS?wsdl
For HPSearch:
Location of context service may be changed by setting appropriate value in HPSEARCH_HOME/conf/hpsearch.conf
GIS demos use Async version of context service
CONTEXT_MODE in HPSEARCH_HOME/bin/setenv.sh MUST be async i.e.
CONTEXT_MODE=async
- Similarly make changes in
GIS/PI/setenv.shIF one exists
Changes in PICodeRunner.sh
Changes are required in GIS/PI/scripts/PICodeRunner.sh file.
The following MUST be set appropriately
piServiceLoc = "http://trex.ucs.indiana.edu:4700/axis/services/WSSConnector?wsdl";
wfsServiceLoc = "http://gf8.ucs.indiana.edu:7070/wfs-streaming-service/services/wfs?wsdl";
ttpServerLoc = "http://trex.ucs.indiana.edu:4522/";
httpServerLoc is location of a stripped down http server in hpsearch it can be started using
$HPSEARCH_HOME/bin/runHTTPServer.sh(.bat) -p <PORT> -root <PATH to the ROOT directory as required>
E.g.
runHTTPServer.sh -p 4522 -root $HOME/GIS/PI/www
will tun on port 4522 and make the given path as the root folder displayed when viewed thru
a browser pointing at http://machine:4522/
ALSO make change to the following line in the file
w.invoke("GetFeatureOnStream", request, "trex.ucs.indiana.edu", "3045", rawDataStream);
These refer to the machine where the NB broker is running and the port for NIOTCP connection.
HOWTO run:
Start a broker
NB_HOME/bin/startbr.sh
Start HPSearch kernel
$HPSEARCH_HOME/bin/start.sh
Start PICodeRunner Service
$HOME/GIS/PI/axisServer.sh -p <port>
Here port must match the port in piServiceLoc defined in the PICodeRunner.js file
Start the temp http server
$HPSEARCH_HOME/bin/runHTTPServer.sh -p 4522 -root $HOME/GIS/PI/www
Again the port 4522 will be similar to the one in httpServerLoc defined in the PICodeRunner.js file
Running Virtual California:
Demo Components:
1 instance of GISDateConversion filter service
-> Reads data from WFS and converts date from MDY to float
-> Previously was run on TREX:4800
4 instances of VCRunner Services
-> Previously run on GF1 - GF4, port 4800
1 instance of HTTP Server
-> previously run on Gf1:4500
Running Components:
Run HPSearch 1.0.1.3
Run $HPSEARCH_HOME/bin/start.sh
To close the instance run
$HPSEARCH_HOME/bin/kill.sh /tmp/hpsearch.pid
Run NB
$NB_HOME/bin/startbr.sh
On the machine where GISDateConversionFilter runs,
In $HOME/GIS/virtualCalifornia/GISDateConversion Run
./axisServer.sh -p 4800
To deploy each of the VCRunner instances on (gridfarm machines) gf1 - gf4. Log on to each machine and then
In$HOME/GIS/virtualCalifornia/gf?, and run./axisServer.sh -p 4800
Finally,
Goto $HPSEARCH_HOME/bin and run
./runHTTPServer.sh -p 4500 -root $HOME/GIS/virtualCalifornia/www/
Changes required in vcrunner.js
Changes are required in GIS/virtualCalifornia/scripts/vcrunner.sh file
The following MUST be set appropriately
wfsServiceLoc = "http://gf8.ucs.indiana.edu:7070/wfs-streaming-service/services/wfs?wsdl";
outputServerLoc = "http://gf1.ucs.indiana.edu:4500/";
outputServerLoc is location of a stripped down http server in hpsearch it can be started using
$HPSEARCH_HOME/bin/runHTTPServer.sh(.bat) -p <PORT> -root <PATH to the ROOT directory as required>
E.g.
runHTTPServer.sh -p 4500 -root $HOME/GIS/virtualCalifornia/www
will run on port 4500 and make the given path as the root folder displayed when viewed thru
a browser pointing at http://gf1.ucs.indiana.edu:4500/
dateConvServiceLoc = "http://trex.ucs.indiana.edu:4800/axis/services/WSSConnector?wsdl";
serviceArray = ["http://gf1.ucs.indiana.edu:4800/axis/services/WSSConnector?wsdl",
"http://gf2.ucs.indiana.edu:4800/axis/services/WSSConnector?wsdl",
"http://gf3.ucs.indiana.edu:4800/axis/services/WSSConnector?wsdl",
"http://gf4.ucs.indiana.edu:4800/axis/services/WSSConnector?wsdl"];
These must be set appropriately. If a different port was used above when starting axisServer.sh, then the URL for the services MUST reflect the correct port.
ALSO make change to the following line in the file
w.invoke("GetFeatureOnStream", request, "trex.ucs.indiana.edu", "3045", rawDataStream);
These refer to the machine where the NB broker is running and the port for NIOTCP connection.
Changes required in WMS:
Set HPSearch Web service locator for Shell Web service to
http://machine:port/ShellWS?wsdl
where machine is the machine where hpsearch runs
port is the port where the Web service is deployed in hspearch. Default is 28080,
but can be set to something different by starting hpsearch with the
-shellws.port=xxxx parameter where xxxx is the new port number.
Set location of the vcrunner.js file to /home/servo/GIS/virtualCalifornia/scripts/vcrunner.js
Source Code for VC and PI:
Source code for the services is placed under src folder in the respective service installation folders.
