Friday, April 27, 2012

A New Home

The Argo Database web application is getting a new home at! 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
-A PREROUTING -p tcp -m tcp --dport 80 -j REDIRECT --to-ports 8080
# 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.