tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "George Sexton" <gsex...@mhsoftware.com>
Subject Deploying new virtual hosts
Date Thu, 01 Dec 2005 22:06:18 GMT
I'm trying to sort out a way I can automate deploying new virtual hosts on
my Tomcat server. Right now I'm running about 70 virtual hosts. Each virtual
host has only one ROOT context. I'm planning on scaling up to at least 200
virtual hosts before I need to get a second machine. The second machine will
probably be more powerful, and I'll want to scale it into the region of
something like 1000 virtual hosts. I've looked through the documentation on
the Tomcat site and don't think I'm seeing what I need.

Ideally I would like something that would be scriptable that would let me
automatically deploy the virtual hosts. If I can't get that, some
application that would let me create a new virtual host without stopping and
re-starting tomcat would be nice. I'm thinking in the near future I will
need to deploy several new virtual hosts per day. If I can't do it
automatically, I'd at least like one tool that works that could be used to
create a virtual host correctly.

I've tried using the host-manager application, but it has some major
problems. They are:

  1) It auto deploys manager.xml. That's just rude. 
     I don't want 70 copies of the manager application deployed, when they
     will never be used. The only change ever made to a host is in the
     aliases, and that can't be edited by the manager application.
  2) The host creation parameters aren't serialized. Things like aliases
     and appbase are lost on re-start.
  3) It does not create context.xml files in the [enginname]/[hostname] 
     dirctory for any contexts that are auto-deployed when the virtual 
     host is created. IOW, if I create a virtual host with a appbase 
     of /home/abc, and there exists a web application /home/abc/ROOT,
     then I expect that it would create [enginename]/[hostname]/ROOT.xml. 
     This is particularly important since appbase isn't getting saved.
  4) There is no documentation.

I looked at the Admin application (5.5.9). I just don't think its going to
be up to any kind of task. 

  1) A major problem  is that if there is a permission problem 
     on any virtual host or context where it wants to write a 
     file, the write of server.xml just aborts, and the user 
     is given the message that changes were saved successfully. 
     So, you just go along fine until you re-start the server 
     and then the crap hits the fan in a really major way.  
  2) There were also issues where added aliases would not 
     work until the virtual host was stopped and re-started. 
     Of course the admin app doesn't give you any way of 
     stopping and re-starting a host. You have to use 
     host-manager for that. 
  3) Admin also seems incapable of deleting the manager 
     application.
  4) I've also noticed that admin puts "WatchedResource" 
     entries in the context.xml even when the context 
     is not reloadable, and it seems to add an extra 
     entry for this each time the configuration is saved.

I've been manually editing the server.xml file to add new host entries and
then re-starting Tomcat. This hasn't been a really great solution, but it
has worked. This is cumbersome because I don't want to bounce a lot of
customers so I end up doing things in the late evening when possible.

If I've missed a way of doing things, I'd appreciate any pointers. Thanks.

George Sexton
MH Software, Inc.
http://www.mhsoftware.com/
Voice: 303 438 9585
 


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Mime
View raw message