Friday, April 27, 2012

A New Home

The Argo Database web application is getting a new home at argoweb.whoi.edu! This post documents the changes made to Argoweb.

Changes to Argoweb

Installation of MySQL Database and Apache Tomcat was accomplished using a custom bash shell script to download, unzip, compile the applications from source. The following changes were made to argoweb:
  • added groups 'argoweb', 'mysql', and 'tomcat'
  • added users 'argoweb', 'mysql', and 'tomcat'
  • removed:
    • apache2 (replaced by Tomcat)
  • installed:
    • vim 
    • openjdk 6
    • g++ 4.4
    • MySQL 5.1
    • Apache Tomcat 6 Apache Tomcat 7 
      • Note: Tomcat 6 does not support the latest version of Java. Tomcat 7, however, is not natively supported by Debian so it must be installed from source.
  • used iptables to route incoming traffic on port 80 to the Tomcat server:

root@argoweb:/etc/tomcat6# iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080
root@argoweb:/etc/tomcat6# iptables-save
# Generated by iptables-save v1.4.8 on Thu May 3 05:31:30 2012
*nat
:PREROUTING ACCEPT [53:7910]
:POSTROUTING ACCEPT [2:191]
:OUTPUT ACCEPT [2:191]
-A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
COMMIT
# Completed on Thu May 3 05:31:30 2012

  • performed dump of previous database :
mysqldump -u root -p --databases floats > argoweb_dump.sql
  • used sql file to populate Argoweb database
  • deployed the Argo Database application on the Tomcat server
  • created a script to mirror some directories from Ursa to ArgoWeb (/usr/local/bin/ursa-volume-sync):
    • ursa:/Volumes/U1/argo -> argoweb:/data/Volumes/U1/argo
    • ursa:/Volumes/U2 -> argoweb:/data/Volumes/U2
    • cron'd to run twice daily. After the initial transfer, this script has completed in under 10 minutes, without any major changes to files on Ursa. After an update to the GDAC, it may take significantly longer.

Thursday, March 8, 2012

Solo II - Mission Parameters

In an effort to facilitate uploading of mission parameters to Solo II floats via Iridium satellite communication, an interactive web module will be integrated into the existing WHOI Argo Database. The primary goal of this module is to offer secure, remote web access to a graphical user interface (GUI) layer for the existing command-line oriented Iridium message uploading process. In addition, reported mission parameters will be browsable from from the web application.

Mission Parameter Data Flow
Iridium messages are processed upon receipt to produce readable flat text files. Theses files are parsed by a Java application to generate several Java objects corresponding to Solo II mission parameters. The Java object are mapped and saved to relational database tables.
Figure 1: Solo II - Mission Parameter Data Flow
An Apache Tomcat server is used as a Java Servlet container. Each Java Servlet is mapped to a particular URL path and is responsible for handling all HTTP POST and GET requests to that path. Upon receipt of a HTTP request, a Java Servlet will perform some work (e.g. processing request parameters, perform database queries), and generate an HTML document in response.