Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [jetty-users] sharing config across servers in jetty 9

This is an open feature request.
The jetty-9-alpn branch (aka the jetty-9.2 branch), has reworked the file lookups, and are in a better place to support shim directories (sorry, don't have a better name for them) in the future.

So that the lookup could logically look like something of the following ...
   ${jetty.base}    = /opt/apps/self-serve
   ${project.common}  = /opt/groups/web-group
   ${devops.common} = /opt/devops/devops-common
   ${corp.common}      = /opt/corp/legal-common
   ${jetty.home}          = /opt/jetty/jetty-distribution

Would welcome some discussion on a good way to accomplish it.
I think having the directories also be associated with a property name is important (for various lib or xml lookups)

Joakim Erdfelt <joakim@xxxxxxxxxxx>
Expert advice, services and support from from the Jetty & CometD experts

On Mon, Mar 31, 2014 at 2:44 PM, Hal Deadman <hal.deadman@xxxxxxxxx> wrote:
I have 10 or so webapps that I want to run on N jetty servers, (each server in their own JVM with one or two webapps per server). I would like the servers to share the same jetty.home (unmodified jetty installation). The servers will be similar in terms of having the same modules enabled and similar config so I would like to share that config as well. Each server would have its own webapps folder and logs directory and it would be nice if they could have a start.d and etc directories and start.ini file to override shared properties and configuration so that would argue for setting the jetty.base as the server directory. Under that scenario I don't see a way to reference shared config without modifying the files in jetty.root (when using start.jar). If I make the jetty.base point to the shared config then I could pass in properties and xml config as command-line arguments for server specific overrides but then I would need to customize several modules to give each server its own webapps and logs folder since the modules seem to assume jetty.base is not shared by multiple JVMs running jetty. 

Maybe what I should be doing is just putting my shared config in jetty.root so that when I upgrade to a new distro I can just unzip the shared config on top of the new distro. Another option would be to put shared config in version control in one place and just deploy multiple copies of the shared config in each server's base directory. 

What I think would be ideal is the ability to have multiple jetty.root folders where the first one would be the full jetty distro and each subsequent one could add or override files in the start.d, etc, modules and resources folders. 

ex. jetty.root=/opt/jetty-distribution-9.1.3.v20140225,/opt/jetty-shared

Am I missing a way to set this up with a clean jetty.root and config shared by multiple jetty servers?

Thanks, Hal

jetty-users mailing list

Back to the top