[GeoNetwork-devel] [GeoNetwork opensource Developer website] #352: Configuration / Lucene and Data directory set by env variables

#352: Configuration / Lucene and Data directory set by env variables
-------------------------+--------------------------------------------------
Reporter: Fxp | Owner: geonetwork-devel@…
     Type: enhancement | Status: new
Priority: minor | Milestone:
Component: General | Version: v2.6.1
Keywords: |
-------------------------+--------------------------------------------------
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.
  1. Define 2 optional environment variables {webappname}.data.dir and
{webappname}.lucene.dir
  1. Use default location in WEB-INF/data and WEB-INF/lucene If environment
variables are not set
  1. 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 ?

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/352&gt;
GeoNetwork opensource Developer website <http://trac.osgeo.org/geonetwork&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#352: Configuration / Lucene and Data directory set by env variables
-------------------------+--------------------------------------------------
Reporter: Fxp | Owner: geonetwork-devel@…
     Type: enhancement | Status: new
Priority: minor | Milestone: Future release
Component: General | Version: v2.6.1
Keywords: |
-------------------------+--------------------------------------------------
Changes (by ticheler):

  * milestone: => Future release

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/352#comment:1&gt;
GeoNetwork opensource Developer website <http://trac.osgeo.org/geonetwork&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#352: Configuration / Lucene and Data directory set by env variables
--------------------------+-------------------------------------------------
  Reporter: Fxp | Owner: geonetwork-devel@…
      Type: enhancement | Status: closed
  Priority: minor | Milestone: Future release
Component: General | Version: v2.6.1
Resolution: fixed | Keywords:
--------------------------+-------------------------------------------------
Changes (by fxp):

  * status: new => closed
  * resolution: => fixed

Comment:

r6853+6854+6855

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/352#comment:2&gt;
GeoNetwork opensource Developer website <http://trac.osgeo.org/geonetwork&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.

#352: Configuration / Lucene and Data directory set by env variables
--------------------------+-------------------------------------------------
  Reporter: Fxp | Owner: geonetwork-devel@…
      Type: enhancement | Status: closed
  Priority: minor | Milestone: v2.7.0
Component: General | Version: v2.6.1
Resolution: fixed | Keywords:
--------------------------+-------------------------------------------------
Changes (by fxp):

  * milestone: Future release => v2.7.0

--
Ticket URL: <http://trac.osgeo.org/geonetwork/ticket/352#comment:3&gt;
GeoNetwork opensource Developer website <http://trac.osgeo.org/geonetwork&gt;
GeoNetwork opensource is a standards based, Free and Open Source catalog application to manage spatially referenced resources through the web. It provides powerful metadata editing and search functions as well as an embedded interactive web map viewer. This website contains information related to the development of the software.