> -----Original Message----- > From: Christopher Schultz [mailto:ch...@christopherschultz.net] > Sent: Friday, February 17, 2012 9:42 AM > To: Tomcat Users List > Subject: Re: generic deployment question > > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > Jeffrey, > > On 2/17/12 10:36 AM, Christopher Schultz wrote: > > Jeffrey, > > > > On 2/16/12 4:12 PM, Jeffrey Janner wrote: > >> I host an app for a couple of dozen customers. Naturally, > >> upgrade time can be a bit of a pain, and I'd like to simplify > >> things. Assuming that all the customer-specific information (DB > >> connection info, logger info, etc.) can be described as resources > >> in the context.xml file, would it be possible to put the actual > >> webapp in a single pre-exploded directory without causing Tomcat > >> fits? > > > > [snip] > > > >> Then when a new release comes out, I can deploy the web-app once > >> and modify the individual customer's contexts to point to the > >> new release path as they choose upgrade (or all at once). > > > > When you say "deploy the web-app once" you aren't really talking > > about deploying it: what you mean is just throwing it up on the > > server on the disk some place. A "deployment" is really when the > > context gets launched and it available to clients. > > > > I don't see any reason why you couldn't do this. I agree with Pid > > that you shouldn't explode the WAR file: there's no reason to do > > that unless you have buggy code that doesn't fetch resources > > properly. I think it would be as easy as this: > > > > 1. Get the WAR file into a new place: > > > > $ cp my-new-version.war \ /path/to/non-auto-deploy-webapps/ > > > > 2. For each webapp you want to upgrade: $ echo > > ",s/my-old-version\.war/my-new-version\.war/g" \ | ed > > $CATALINA_BASE/conf/Catalina/[hostname]/webapp.xml > > > > If you have auto-deploy enabled, I believe this will cause Tomcat > > to reload the context. If not, you may have to use the manager to > > either re-load the context or re-deploy. > > http://tomcat.apache.org/tomcat-7.0-doc/manager- > howto.html#Deploy_A_New_Application_from_a_Local_Path > > You can deploy from an existing configuration file like this: > http://localhost:8080/manager/text/deploy?config=file:/path/context.xml > > I'm not sure if "update=true" will work for that command, so you may > have to perform an undeploy first, then a re-deploy. >
That's where I'm trying to get the current developer crop to go so I can use "standard" deployment methods. Then maybe, just maybe, I can turn all this over to someone else and "retire". Of course, right now, it's like trying to paddle upstream in a molasses river in a rubber dingy. __________________________________________________________________________ Confidentiality Notice: This Transmission (including any attachments) may contain information that is privileged, confidential, and exempt from disclosure under applicable law. If the reader of this message is not the intended recipient you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited. If you have received this transmission in error, please immediately reply to the sender or telephone (512) 343-9100 and delete this transmission from your system.