Opened 14 years ago

Closed 14 years ago

Last modified 14 years ago

#352 closed enhancement (fixed)

Configuration / Lucene and Data directory set by env variables

Reported by: Fxp Owned by: geonetwork-devel@…
Priority: minor Milestone: v2.7.0
Component: General Version: v2.6.1
Keywords: Cc:

Description

Currently, lucene and data directory are defined in config.xml appHandler element. The enhancement is to have configuration option to set their location in order to make backups easier and to have a more flexible configuration

Comments

  • With WAR file,
    • To change lucene and data directory, user needs to unzip the war first
    • Lucene and data could be overwritten each time the war file is expanded
  • By default data directory is in the jetty root directory (if you deploy more than one node in the same jetty, then user have to change data directory location otherwise data directory will be shared by the instances).
  • Thesaurus directory is under xml/codelist and its content may change if you change the thesaurus.
  • These directories (data, index, codelist) needs to be in backup
  • Lucene index could not be placed in another disk even if it could be useful (eg. SSD for better performance)

Proposal

  1. Move the codelist directory in the data directory.
  2. Define 2 optional environment variables {webappname}.data.dir and {webappname}.lucene.dir
  3. Use default location in WEB-INF/data and WEB-INF/lucene If environment variables are not set
  4. Data directory is initialized on startup if empty with the default data directory content available in WEB-INF/data

Configuration

Add the following parameters to jetty or tomcat startup:

 -Dgeonetwork.lucene.dir=/tmp/geonetwork/lucene -Dgeonetwork.data.dir=/tmp/geonetwork/data

If more than one GeoNetwork (eg. geonetwork and geonetwork1) is installed, use:

 -Dgeonetwork.lucene.dir=/tmp/geonetwork/lucene -Dgeonetwork.data.dir=/tmp/geonetwork/data  
-Dgeonetwork1.lucene.dir=/tmp/geonetwork1/lucene -Dgeonetwork1.data.dir=/tmp/geonetwork1/data

Further improvements

Other elements need to be backup:

  • images/logos
  • images/harvesting
  • xml configuration file
  • mckoi

For images, we can't move them to the data directory because they need to be web accessible.

For XML configuration file, more work is needed to move them to the data directory (at least config.xml include some of them in relative way). Maybe move configuration to db is better ?

Attachments (1)

352.patch (14.8 KB ) - added by Fxp 14 years ago.

Download all attachments as: .zip

Change History (4)

by Fxp, 14 years ago

Attachment: 352.patch added

comment:1 by ticheler, 14 years ago

Milestone: Future release

comment:2 by fxp, 14 years ago

Resolution: fixed
Status: newclosed

r6853+6854+6855

comment:3 by fxp, 14 years ago

Milestone: Future releasev2.7.0
Note: See TracTickets for help on using tickets.