"Seegrid will be due for a migration to confluence on the 1st of August. Any update on or after the 1st of August will NOT be migrated"

BoM Observational Data Via 52°North SOS Deployment Guide


This deployment guide has been created to help BoM publish the time series observational data via 52°North SOS for demonstration purpose. It uses AWRIS dataset (or SLAKE databaase mentioned in this guide) as example. The trunk version source code in this guide is base on svn revision 12182 and is base on the test deployment in the Windows environment. For more detail 52°North SOS information and tutorial, please refer to :

Prepare the Databases

  1. Source Database : SLAKE Database (PostgreSQL)
    1. Download and run the https://www.seegrid.csiro.au/subversion/ASRDC/BOM/SOS/databaseMapping/createViewScript.sql.
    2. Successfully running the script will create 10 views (with 'sos_' prefix) in SLAKE database. These views are created base on mapping from https://www.seegrid.csiro.au/subversion/ASRDC/BOM/SOS/databaseMapping/SOSDBMapping.xls.
  2. Target Database : SOS Database (PostgreSQL)
    1. Create a new database user (e.g. sosuser) and new database (e.g. SOSDB).
    2. Download and run https://svn.52north.org/svn/swe/main/SOS/Service/trunk/SOS/52n-sos/db/datamodel_postgres83.sql.
    3. Successfully running the script will create 17 tables in the new database.

Setup and Run the ETL Script (base on Windows Environment example)

  1. Download the ETL script from https://twiki.auscope.org/projects/bom/mapping_awrisdb_to_sosdb_0.1.zip.
  2. Extract the zip file to a new folder, e.g. ETLScript.
  3. Download config file from https://www.seegrid.csiro.au/subversion/ASRDC/BOM/SOS/ETL/config/config.properties to the ETLScript folder created above.
  4. Create two new folder in ETLScript folder : temp and logs.
  5. The parameters in the config.properties is in the key;value pair format, change the value for each parameter to the correct value, e.g.
  6. Leave the logFileName; without value as the name of the log file will be generated dynamically when running the ETL script.
  7. Edit C:\etlscript\mapping_awrisdb_to_sosdb_0.1\mapping_awrisdb_to_sosdb\mapping_awrisdb_to_sosdb_run.bat to add in the config file location, e.g.
    cd `dirname $0`
    java -Xms256M -Xmx1024M -cp classpath.jar: awris_sos_mapping.mapping_awrisdb_to_sosdb_0_1.mapping_awrisdb_to_sosdb --context=Default --context_param configFilePath=C:\ETLScript\config.properties $* 
  8. Run the ETL script and if error occured, an email notification will be triggered and sent to the email specify in the config.properties file. Detail error will be log in the log file in the directory specify in config.properties file.
  9. No restart of the web application is needed to reflect the latest changes from the datasource. The setting for auto update of cache are set in C:\tomcat6\webapps\52nSOSv350\WEB-INF\conf\sos.config CAPABILITIESCACHEUPDATEINTERVAL parameter.

Download, Patch and Build 52°North SOS

  1. Createa new dir, e.g. C:/SOS and svn download the latest trunk source code from : https://svn.52north.org/svn/swe/main/SOS/Service/trunk/SOS/52n-sos.
  2. Download the patch from https://www.seegrid.csiro.au/subversion/ASRDC/BOM/SOS/52NorthSOS/rev12182/52nSOSrev12182.patch and run the patch against the downloaded source code. Note that the patch is created base on trunk revision 12182 and it is for the following changes :
  3. Replace the request samples for sos v2.0 (found in C:\SOS\52n-sos-service\src\main\webapp\examples\sos_v20) with examples from https://www.seegrid.csiro.au/subversion/ASRDC/BOM/SOS/52NorthSOS/rev12182/sos_v20/.
  4. To build the war file, run "mvn install" command from the command prompt. The successfully build war file can be found in C:\SOS\52n-sos-service\target\ folder.
  5. The build war file base from svn revision 12182 with the above patch can be downloaded from : https://www.seegrid.csiro.au/subversion/ASRDC/BOM/SOS/52NorthSOS/rev12182/52nSOSv350.war

Install 52°North SOS

  1. Make sure that Tomcat and PostgreSQL database are started.
  2. Navigate to the Tomcat Manager, e.g. http://localhost:8080/manager/html.
  3. Scroll down to the section “WAR file to deploy” and select the WAR file to install.
  4. Click on “deploy”. The new service instance will be shown in the application list.

Test 52°North SOS

  1. Point your browser to http://localhost:8080/52nSOSv350/.
  2. Select TestClient for specification 2.0.0 link.
  3. From the Request Examples drop down list, select the request you want to test, and click on the Send button.
Topic revision: r4 - 25 May 2012, FlorenceTan