Previous: RAMADDA Developer Documents Next: RAMADDA Overview Table of contents Index Glossary Images Frames RAMADDA Developer Documents

1 Installing RAMADDA

Running under Tomcat

Place the repository.war in the tomcat webapps directory. By default the repository is accessed at /repository on the web server.

You need to specify the ramadda home directory. This is where it looks for properties files and other resources, where the java derby database is stored and where any uploaded data files are stored.

By default ramadda will use:

   <tomcat home>/.unidata/repository
i.e., the home directory of the process that runs tomcat.

You can override this a number of ways. What ramadda does is look for the property: ramadda_home in a variety of places, in precedence:

  1. In the web.xml
    In the web.xml in the repository.war you can specify command line properties:
        <param-value>-Dramadda_home=/home/dir</param-value>
    
    The problem with this is you have to unjar the war and change the web.xml. Then, when you install a new release you have to repeat the process.
  2. As a Java environment variable
    Wherever you define the arguments that are passed to java when starting Tomcat include:
    -Dramadda_home=/home/dir
    
    e.g.:
    java -Xmx512m  -Dramadda_home=/home/dir
    
  3. As a process environment variable.
    Environment variables can be set for the tomcat process Just define:
    ramadda_home=/home/dir

Running Standalone

You can run RAMADDA stand-alone. This is really useful for development and just requires Java 1.5 or greater.

To run RAMADDA run the ramadda.sh. This just does:

   java -Xmx512m -jar repository.jar
By default the server is on port 8080. To change the port do:
    java -Xmx512m -jar repository.jar -port <some port>
RAMADDA creates a local storage directory in:
<home dir>/.unidata/repository
To change this do:
    java -Xmx512m -jar repository.jar -Dramadda_home=/home/dir

Configuration

RAMADDA looks in the home directory for a repository.properties To configure RAMADDA create a repository.properties file. The properties defined in the local file override the ones defined in the system file. The system properties file, from the source release, can be viewed:
/ucar/unidata/repository/resources/repository.properties

The major thing you want to change would be the database.

By default RAMADDA uses a local Java Derby database. RAMADDA also runs using mysql and postgres (though the postgres hasn't been test in a while). To define the database just define one of the ramadda.db properties in repository.properties:

ramadda.db=derby
#ramadda.db=mysql
#ramadda.db=postgres
The mysql database and user/password is defined in the repository.properties file. To change it add to the repository.properties file the following:
ramadda.db.mysql.url=jdbc:mysql://localhost:3306/repository?zeroDateTimeBehavior=convertToNull
ramadda.db.mysql.user=the database user
ramadda.db.mysql.password=the database password

Copying a Database

If you ran RAMADDA with the default settings annd created some content that is in the database and you want to switch databases (e.g., from derby to mysql). Log in to the original RAMADDA and go to the Admin->SQL page. There is a Dump Database link. This will give you a text file of the entire database. Note: This might be a big file. You can save this file on the server or have it local.

Then, reconfigure RAMADDA to point to the new database and login again. Note: you'll have to add a new admin password, etc. Then go to the Admin->SQL page. If you saved the SQL file on the server then just enter:

file:/path/to/sql/file
in the text area and hit execute.

If you have the SQL file on your local machine upload through the sql file form.

Its probably best to shutdown and then restart RAMADDA after doing this and you should have your old database running in the new RAMADDA.

If you changed systems then you also need to copy over the storage directory tree to the new system. This is in:

<ramadda_home>/storage

Building from Source

The source release creates, at the top level, the ucar source tree and a lib directory. The lib directory has two jar files:
lib/repositorylib.jar
lib/repositorytds.jar
To compile stand-alone (e.g., using javac) put those 2 jar files in your class path.

To compile using ant:
The default ant target (all) will compile the repository source and create:

lib/repository.jar
lib/repository.war
You can run the repository stand-alone by doing:
java -jar repository.jar
All of the services except OpenDAP are available stand-alone.

The repository.war is a tomcat war file that needs to be placed in the tomcat install area.

 


Previous: RAMADDA Developer Documents Next: RAMADDA Overview Table of contents Index Glossary Images Frames RAMADDA Developer Documents