On 7/3/2018 1:48 PM, Michael Osipov wrote:
Am 2018-07-03 um 22:37 schrieb Igal Sapir:
On 7/3/2018 1:15 PM, Michael Osipov wrote:
Am 2018-07-03 um 22:12 schrieb Mark Thomas:
On 03/07/18 21:10, Michael Osipov wrote:
Am 2018-07-03 um 22:07 schrieb Mark Thomas:
On 03/07/18 21:02, Michael Osipov wrote:
Am 2018-07-03 um 18:27 schrieb Mark Thomas:
Hi,
I've been looking at the makebase script and thinking about
potential
use cases.
Currently, we copy conf recursively but create an empty webapps.
This is
inconsistent as any directories under conf will (nearly always)
be web
application specific config.
I think we should either copy web applications and config or
not copy
both.
My suggestion is not to copy web applications and config (i.e.
sub dirs
of /conf) by default and to add a -webapps option (or similar)
to the
makebase script and only copy them when the option is present.
Thoughts?
First of all, I don't like the '-a' approach because you make
assumptions about the target you don't know while other
operations don't
do it. I'd simply do "-r".
I do agree with your that it is somewhat inconsistent, but we
need to
consider a very important point which must be true for our
script to
work properly: CATALINA_HOME has to remain unmodified, i.e.,
contents of
conf, webapps.
Though, the new CATALINA_BASE needs to be complete to start a
Tomcat
instance, and it is complete with an empty webapps/ dir. conf/ is
mandatory.
The start will be unnecessarily messy if there are context.xml
files in
sub-directories of conf but not corresponding application in
webapps.
Then why not copy only the necessary files which Tomcat needs to
start?
That is the point of -webapps. Only copy the context.xml files if you
are going to copy the contents of webapps.
Given that you want to add "--webapps", which will you copy?
Manager?
Host Manager? All of them?
All of them. I think it has to be all or nothing. Anything else
will get
very complicated very quickly for a script. I think most cases won't
want to copy (hence the default) but I can think of a few scenarios
where it could be useful.
So even if it contains some user deployed apps?
Yes.
I think that it completely contradicts the spirit of make base: Give
me a fully working, but minimal Tomcat instance. At the end your are
trying to write a rsync for that. I think that this will add little
benefit. It will only workout if people never work with
CATALINA_HOME, but only with _BASE like I do at work.
I agree with Mark.
Copying user deployed apps will be very useful if you want to scale
out your application and deploy multiple servers for the app for high
availability etc.
$ rsync -auhh src target
done. I don't need a script for that.
By that token the whole script is unnecessary, just copy all of the
directories recursively and that's it.
Someone who scales will *never* operate from CATALINA_HOME because
this makes upgrades pain in the ass.
Then perhaps it'd be a good idea to allow to specify a source directory,
so that the files are not necessarily copied from CATALINA_HOME, but
from another CATALINA_BASE.
Igal
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org