[Geoserver-devel] GEOSERVER_HOME

(I'm resending this because my email looks like it might have issues -
sorry if you get this twice)

Chris,

Using an environment variable (or a "java -D....") is certainly
possible, but I think it could be a pain to actually administer - since
the user might not have access to the actual servlet runtime
environment. Also, I dont think you cannot persist changes from inside
geoserver.

The java properties is another option - there was a discussion on the
geotools list (wrt to the crs stuff) about all the problems it was
causing. I'm not sure if this was a generic problem or just something
miss-configured for that particular instance.

I went looking for how to do this - most people just say stick this in a
configuration file or talk to a configuration server somewhere. The
whole idea of a WAR is that its independent!

One possibility is to:
1. put geoserver_home in a .properties or .xml (or even web.xml). Users
can modify this when they build the .war. We can even have a little
java program that will update a .war file with a new geoserver home
(for people who dont want to build it with ant).
2. allow them to modify geoserver_home in the web interface (ie. type in
a new location)
3. we can try to update the place we store geoserver_home. If we can,
great! otherwise we tell the user that their modification will be
"overwritten" next time they start the server and we tell them how to
make in permanent (ie. update the war).

I really want to make sure that this works for everyone - not just jetty
or a hand-full of containers.

dave

Chris Holmes wrote:

Hey;, I'll dig into this more, but do check how confluence does it.

Jody

wrote an email, called soemthing like thoughts about saving. You also
could just download confluence and look at it.

Also with the jetty stuff it's pretty easy to pass in arguments - you

can

read enviromental variables and set them as java properties. Also,
couldn't you pass in properties directly in some way, instead of having

to

set the .properties file in the jar? Java does allow that in some way,
though it might be tricky through servlet containers. Ok, I'll look

into

this and try to figure out a plan, but the way I was envisioning it was

a

GEOSERVER_HOME environmental variable. Perhaps it will only be able to
work with our binary installs, but even then I think it'd be worthwhile

to

have - it's how people are used to setting home directories, no?

On Thu, 31 Mar 2005 dblasby@anonymised.com wrote:

I'm just looking into the "GEOSERVER_HOME" issue.

Currently, all the geoserver configuration is read from a set of
directories inside your .WAR file. (the entire data/ directory and the
WEB-INF/catalog.xml file)

This has two main issues:

1. Some servlet contains do not allow you to modify the contents of

the

.WAR. This means you can never save your configuration.
2. If you have multiple configuration, its difficult to choose which

one

you want to deploy, and difficult to "backup" any configuration.

I'm proposing a simple way of dealing with this - allow setting a
"GEOSERVER_HOME" that would allow reading & writing to a directory

that

is NOT in the WAR.

Basically, the directory would look like this:

my_geoserver_config/catalog.xml -- datastore definitions
my_geoserver_config/data/ -- directory of featuretypes, styles,
etc... (same as the current server/geoserver/data directory).

Once the GEOSERVER_HOME directory is known, geoserver can just read &
persist its configuration into that directory.

Unfortunately, its difficult to specify the GEOSERVER_HOME directory!

I'm, therefore, suggesting two ways to specify it:

1. setup a .properties file in the geoserver.jar file. This would
contain the location of the GEOSERVER_HOME directory. If you want to
use another directory, just modify the the .properties and rebuild the
WAR. This is a bit of a pain since you have to re-build the WAR if

you

want to change your geoserver_home directory, but it is better than
whats currently there.
2. update the web gui so that it allows someone to "type in" a new
GEOSERVER_HOME. This is nice, but it means you'll have to do this
*every* time you restart geoserver!

It would be nice if these two methods would just allow you to update

the

GEOSERVER_HOME in the .properties file, but (as already mentioned)

some

servlet containers will not allow you modify any of the files in the
WAR!!

The default should be the same as whats currently happening - it

should

use the data directory inside the WAR. If the user wants to update

it,

then they'll have to either update the .properties file or type in a
new directory.

What do you think?

dave
ps. this will be done in the 1.3.0RC1 - there isnt enough time for the
1.3.0-beta2

dave

----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/

----- End forwarded message -----

----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/

I would say that we must just follow the standard pattern:
- ~/.geoserver
- if not .geoserver exists in user home, fall back to an environment
variable
- if neither exist, then look for the current way (<webapp_dir>/data)

I would also be against calling it GEOSERVER_HOME, since GEOSERVER_HOME
looks like the place where the application itself resides. I would call
it GEOSERVER_DATA (the environment variable)

that looks standard and simple. Should cover most situations: a user can
have its .geoserver and a sys admin configure the environment variable
for a stable deployment.

That covers the need of where to look for things. Now, if you want to be
able to configure multiple instances, you can have a .properties in that
directory with entries for the different instances.

comments?

Gabriel.

On Fri, 2005-04-01 at 13:46 -0500, dblasby@anonymised.com wrote:

(I'm resending this because my email looks like it might have issues -
sorry if you get this twice)

Chris,

Using an environment variable (or a "java -D....") is certainly
possible, but I think it could be a pain to actually administer - since
the user might not have access to the actual servlet runtime
environment. Also, I dont think you cannot persist changes from inside
geoserver.

The java properties is another option - there was a discussion on the
geotools list (wrt to the crs stuff) about all the problems it was
causing. I'm not sure if this was a generic problem or just something
miss-configured for that particular instance.

I went looking for how to do this - most people just say stick this in a
configuration file or talk to a configuration server somewhere. The
whole idea of a WAR is that its independent!

One possibility is to:
1. put geoserver_home in a .properties or .xml (or even web.xml). Users
can modify this when they build the .war. We can even have a little
java program that will update a .war file with a new geoserver home
(for people who dont want to build it with ant).
2. allow them to modify geoserver_home in the web interface (ie. type in
a new location)
3. we can try to update the place we store geoserver_home. If we can,
great! otherwise we tell the user that their modification will be
"overwritten" next time they start the server and we tell them how to
make in permanent (ie. update the war).

I really want to make sure that this works for everyone - not just jetty
or a hand-full of containers.

dave

Chris Holmes wrote:

>Hey;, I'll dig into this more, but do check how confluence does it.
Jody
>wrote an email, called soemthing like thoughts about saving. You also
>could just download confluence and look at it.
>
>Also with the jetty stuff it's pretty easy to pass in arguments - you
can
>read enviromental variables and set them as java properties. Also,
>couldn't you pass in properties directly in some way, instead of having
to
>set the .properties file in the jar? Java does allow that in some way,
>though it might be tricky through servlet containers. Ok, I'll look
into
>this and try to figure out a plan, but the way I was envisioning it was
a
>GEOSERVER_HOME environmental variable. Perhaps it will only be able to
>work with our binary installs, but even then I think it'd be worthwhile
to
>have - it's how people are used to setting home directories, no?
>
>On Thu, 31 Mar 2005 dblasby@anonymised.com wrote:
>
>>I'm just looking into the "GEOSERVER_HOME" issue.
>>
>>Currently, all the geoserver configuration is read from a set of
>>directories inside your .WAR file. (the entire data/ directory and the
>>WEB-INF/catalog.xml file)
>>
>>This has two main issues:
>>
>>1. Some servlet contains do not allow you to modify the contents of
the
>>.WAR. This means you can never save your configuration.
>>2. If you have multiple configuration, its difficult to choose which
one
>>you want to deploy, and difficult to "backup" any configuration.
>>
>>I'm proposing a simple way of dealing with this - allow setting a
>>"GEOSERVER_HOME" that would allow reading & writing to a directory
that
>>is NOT in the WAR.
>>
>>Basically, the directory would look like this:
>>
>>my_geoserver_config/catalog.xml -- datastore definitions
>>my_geoserver_config/data/ -- directory of featuretypes, styles,
>>etc... (same as the current server/geoserver/data directory).
>>
>>Once the GEOSERVER_HOME directory is known, geoserver can just read &
>>persist its configuration into that directory.
>>
>>Unfortunately, its difficult to specify the GEOSERVER_HOME directory!
>>
>>I'm, therefore, suggesting two ways to specify it:
>>
>>1. setup a .properties file in the geoserver.jar file. This would
>>contain the location of the GEOSERVER_HOME directory. If you want to
>>use another directory, just modify the the .properties and rebuild the
>>WAR. This is a bit of a pain since you have to re-build the WAR if
you
>>want to change your geoserver_home directory, but it is better than
>>whats currently there.
>>2. update the web gui so that it allows someone to "type in" a new
>>GEOSERVER_HOME. This is nice, but it means you'll have to do this
>>*every* time you restart geoserver!
>>
>>
>>It would be nice if these two methods would just allow you to update
the
>>GEOSERVER_HOME in the .properties file, but (as already mentioned)
some
>>servlet containers will not allow you modify any of the files in the
>>WAR!!
>>
>>The default should be the same as whats currently happening - it
should
>>use the data directory inside the WAR. If the user wants to update
it,
>>then they'll have to either update the .properties file or type in a
>>new directory.
>>
>>What do you think?
>>
>>dave
>>ps. this will be done in the 1.3.0RC1 - there isnt enough time for the
>>1.3.0-beta2
>>
>>dave
>

----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/

----- End forwarded message -----

----------------------------------------------------------
This mail sent through IMP: https://webmail.limegroup.com/

-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Geoserver-devel mailing list
Geoserver-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geoserver-devel

Gabriel Roldán wrote:

I would say that we must just follow the standard pattern:
- ~/.geoserver
- if not .geoserver exists in user home, fall back to an environment
variable
- if neither exist, then look for the current way (<webapp_dir>/data)

Unfortantly what we expect as application users does not seem to be normal with respect to web apps.
Java does not have access to env variables (only properties passed in using -D on the command line), even so these properties are not always avaialble - only a convention used by some application servers. I only mentioned it because some application servers make setting these properties "easy".

The only thing we can actually assume is the web.xml file, it is where all application configuration has to live. Does anyone know
if tomcat, or jetty have a user interface allowing the web.xml file to be changed?

I think what we need is a survey of application containers and the configuration options they provide.
Jody

From MAILER-DAEMON Wed Apr 06 00:39:54 2005
Message-ID: <2E5A40438629B446B74FA0083374A4AB0285082A@anonymised.com>
From: System Administrator <postmaster@anonymised.com>
To: geoserver-devel@lists.sourceforge.net
MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2657.72)
X-MS-Embedded-Report: Content-Type: multipart/mixed;
  boundary="----_=_NextPart_000_01C53A7B.C6B0B7CE"
X-OriginalArrivalTime: 06 Apr 2005 07:39:34.0793 (UTC) FILETIME=[C73C3F90:01C53A7B]
X-Spam-Score: 1.0 (+)
X-Spam-Report: Spam Filtering performed by sourceforge.net.
  See http://spamassassin.org/tag/ for more details.
  Report problems to http://sf.net/tracker/?func=add&group_id=1&atid=200001
  1.0 FORGED_RCVD_HELO Received: contains a forged HELO
Subject: [Geoserver-devel] Undeliverable: important
Sender: geoserver-devel-admin@lists.sourceforge.net
Errors-To: geoserver-devel-admin@lists.sourceforge.net
X-BeenThere: geoserver-devel@lists.sourceforge.net
X-Mailman-Version: 2.0.9-sf.net
Precedence: bulk
List-Unsubscribe: <https://lists.sourceforge.net/lists/listinfo/geoserver-devel&gt;,
  <mailto:geoserver-devel-request@lists.sourceforge.net?subject=unsubscribe>
List-Id: Geoserver Developers' List <geoserver-devel.lists.sourceforge.net>
List-Post: <mailto:geoserver-devel@lists.sourceforge.net>
List-Help: <mailto:geoserver-devel-request@lists.sourceforge.net?subject=help>
List-Subscribe: <https://lists.sourceforge.net/lists/listinfo/geoserver-devel&gt;,
  <mailto:geoserver-devel-request@lists.sourceforge.net?subject=subscribe>
List-Archive: <http://sourceforge.net/mailarchive/forum.php?forum=geoserver-devel&gt;
Date: Wed Apr 6 00:40:45 2005
X-Original-Date: Wed, 6 Apr 2005 09:39:33 +0200

This message is in MIME format. Since your mail reader does not understand
this format, some or all of this message may not be legible.

------_=_NextPart_000_01C53A7B.C6B0B7CE
Content-Type: text/plain;
  charset="windows-1252"

Your message

  To: elis@anonymised.com
  Subject: important
  Sent: Wed, 6 Apr 2005 09:39:49 +0200

did not reach the following recipient(s):

elis@anonymised.com on Wed, 6 Apr 2005 09:39:32 +0200
    The recipient name is not recognized
  The MTS-ID of the original message is: c=es;a=
;p=correo;l=SRVIMC020504060739112S23SB
    MSEXCH:IMS:Correo:SGTC:SRVIMC02 0 (000C05A6) Unknown Recipient

                              Internet Email Confidentiality Footer Este mensaje y cualquier fichero adjunto esta dirigido unicamente a sus destinatarios y pueden contener informacion confidencial. Si usted considera que ha recibido este correo electronico por error (por asunto, por remitente o por cualquier otra causa), le informamos que cualquier revision, alteracion, impresion, copia o transmision de este mensaje o de cualquier fichero adjunto esta prohibida y puede constituir un acto ilegal. Por favor, notifiquele el error al remitente respondiendo a este e-mail y elimine el mensaje y su contenido inmediatamente.

This e-mail and any files transmitted with it are intended solely for the use of the intended recipients and may contain confidential information. If it appears (from the subject matter or address information or otherwise) that you received this email in error, please note that any review, dissemination, disclosure, alteration, printing, copying or transmission of this e-mail or any file transmitted with it is prohibited with is prohibited and may be unlawful. Please notify us by return e mail and delete this email and its contents immediately.

------_=_NextPart_000_01C53A7B.C6B0B7CE
Content-Type: message/rfc822

Message-ID: <SRVSMTP02mRXf2LTrpw0004ce42@anonymised.com>
From: geoserver-devel@lists.sourceforge.net
To: elis@anonymised.com
Subject: important
Date: Wed, 6 Apr 2005 09:39:49 +0200 MIME-Version: 1.0
X-Mailer: Internet Mail Service (5.5.2657.72)
X-MS-Embedded-Report: Content-Type: multipart/mixed;
  boundary="----_=_NextPart_002_01C53A7B.C6B0B7CE"

------_=_NextPart_002_01C53A7B.C6B0B7CE
Content-Type: text/plain;
  charset="windows-1252"

Requested file.

                              Internet Email Confidentiality Footer Este mensaje y cualquier fichero adjunto esta dirigido unicamente a sus destinatarios y pueden contener informacion confidencial. Si usted considera que ha recibido este correo electronico por error (por asunto, por remitente o por cualquier otra causa), le informamos que cualquier revision, alteracion, impresion, copia o transmision de este mensaje o de cualquier fichero adjunto esta prohibida y puede constituir un acto ilegal. Por favor, notifiquele el error al remitente respondiendo a este e-mail y elimine el mensaje y su contenido inmediatamente.

This e-mail and any files transmitted with it are intended solely for the use of the intended recipients and may contain confidential information. If it appears (from the subject matter or address information or otherwise) that you received this email in error, please note that any review, dissemination, disclosure, alteration, printing, copying or transmission of this e-mail or any file transmitted with it is prohibited with is prohibited and may be unlawful. Please notify us by return e mail and delete this email and its contents immediately.

------_=_NextPart_002_01C53A7B.C6B0B7CE
Content-Type: text/plain;
  name="details_elis.txt"
Content-Disposition: attachment;
  filename="details_elis.txt"

FILE QUARANTINED
----------------

Antigen for Exchange removed details_elis.pif since it
was found to match the FILE FILTER= unnamed:*.pif file filter.

------_=_NextPart_002_01C53A7B.C6B0B7CE--
------_=_NextPart_000_01C53A7B.C6B0B7CE--