Posts Tagged ‘parade.properties’

First-time installation

Sunday, February 24th, 2008

In order to run ParaDe, you’ll need:

  • a tomcat server, preferrably version 5.5 (we didn’t test it on 6 yet)
  • a sql database, like MySQL or else
  • an OS that supports JNotify. We recommend using a unix-based OS. Linux supports inotify natively since kernel 2.6.13.
  • the Java Virtual Machine, version 5 or higher
  • the Apache Ant tools

Step 1: Checking out ParaDe

For the moment, the only way of downloading ParaDe is by checking it out from CVS. You can read more about it on the SourceForge project pages.

The easiest method for checking out ParaDe is the anonymous checkout. In a new folder of your choice, type:

cvs -d:pserver:anonymous@parade.cvs.sourceforge.net:/cvsroot/parade login

cvs -z3 -d:pserver:anonymous@parade.cvs.sourceforge.net:/cvsroot/parade co -P parade2

This will check out ParaDe. For further updates from the repository you can type:

cvs -z3 -d:pserver:anonymous@parade.cvs.sourceforge.net:/cvsroot/parade update

Step 2: The configuration files

Let’s say you have now a fresh checkout in the folder parade. You’ll now have to configure ParaDe and its interaction with tomcat and your database server.

The first thing you need to do is to configure the parade.properties file in parade/webapp/WEB-INF/classes. There’s an example file at parade/webapp/WEB-INF/classes/parade.properties.example which you can directly copy.

The next file that matters is tomcat.properties in the folder parade. There’s also a tomcat.properties.example file provided. Here you’ll only need to configure:

  • the path to your tomcat folder (e.g. if you have extracted a tomcat distribution in the same folder as parade, the path will likely be something like ../apache-tomcat-5.5.x)
  • the JVM’s Xms (minimum memory size) and Xmx (maximum memory size) values (by default those are suited to a production environment).

The other parameters are by default configured to fit the tomcat configuration in ParaDe’s “tomcat”directory, and youdon’t need to change them unless you want to run ParaDe on a different port (or have a safer manager authentication). In this case, don’t forget to do the necessary changes in ParaDe’s tomcat/server.xml and tomcat/tomcat-users.xml.

Once this is done, all you need is configuring the database. First, you need to create a database for parade. with MySQL, issuing a

CREATE DATABASE parade;

statement will do it. Then, you also need to configure the connection to the database in parade/webapp/WEB-INF/classes/hibernate.cfg.xml. ParaDe uses Hibernate to cache the state of the files and rows it handles, see the Hibernate website for more information about supported database systems and configuration options.

Step 3: Running ParaDe for the very first time

So, at this point you should be ready to run parade. From your shell or command-line, type

ant tomcat

You should now see tomcat starting up, and then hibernate creating a lot of tables. If everything goes fine, accessing your tomcat (e.g. http://localhost:5050) should show you the ParaDe index page, with only one row (the root row).

Step 4: Configuring the rows

Now you can configure the rows. First, stop the running ParaDe (at this point, hitting Ctrl+C should just stop tomcat). In parade/webapp/WEB-INF/classes/rows.properties you can set-up which rows you’d like to deploy. The syntax goes as follows:

rowName=/path/to/webapp/
rootrowdata.rowName.obs=Description of the row
rowdata.rowName.webapp=relative path to the context, leave blank if none

Step 5: Starting ParaDe properly

You can then run ParaDe again in a more robust way by issuing

nohup ant tomcat &

The logs will be in parade/tomcat/logs/catalina.out or accessible inside of ParaDe by looking on the root row.

If you plan to have ParaDe running regullarily, there is also a “parade” script which you can either copy over to e.g. /etc/init.d (for Debian-like distributions) or link from there. Don’t forget to “chmod +x” the script file!

That’s it! Enjoy using your new parade configuration!