On 26/08/2010 19:14, Mark Eggers wrote:
> I haven't tried this in production (yet) so your mileage may vary.
> 
> In the cluster setup, there's a FarmDeployer element that can be used to 
> deploy 
> across the cluster.

FarmWarDeployer would certainly benefit from more production usage.  I'm
not sure the reverse is true.


p

> The host that does the deploying:
> 
> <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
>           tempDir="${catalina.base}/temp-dir/"
>           deployDir="${catalina.base}/webapps/"
>           watchDir="${catalina.base}/watch-dir/"
>           processDeployFrequency="4"
>           watchEnabled="true"/>
> 
> And the hosts that get the web application:
> 
> <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
>           tempDir="${catalina.base}/temp-dir/"
>           deployDir="${catalina.base}/webapps/"
>           watchDir="${catalina.base}/watch-dir/"
>           processDeployFrequency="4"
>           watchEnabled="false"/>
> 
> 
> For large web applications and frequent deployments, this might generate a 
> lot 
> of network traffic.
> 
> Also, it's not intuitive (to me) how processDeployFrequency works, but I need 
> to 
> look at the code. In any case, you might have the Tomcat doing the deploying 
> not 
> actually serving content.
> 
> I found out that you can use ${variable.name} in configuration files, so it's 
> now much easier to clone installations and just edit setenv.sh(bat) as 
> appropriate.
> 
> Hope this helps.
> 
> . . . just my two cents.
> 
> /mde/
> 
> 
> 
> ----- Original Message ----
> From: Pid <p...@pidster.com>
> To: Tomcat Users List <users@tomcat.apache.org>
> Sent: Thu, August 26, 2010 7:36:15 AM
> Subject: Re: Best practices for deployment on cluster environment
> 
> On 25/08/2010 14:50, Fernando Morgenstern wrote:
>> Hi,
>>
>> I have a Tomcat cluster environment with 4 servers. I was wondering that is 
>> the 
>> best way to deploy an application on 4 servers at the same time.
>>
>> At a first moment, i thought about having a script that would copy war files 
>> to 
>> all servers using rsync. Basically i upload the war file to the first server 
>> and 
>> them use this script to copy to other tomcat servers.
>>
>> Could you share your experience with this kind of environment? Is this the 
>> best 
>> way to deal with deployment?
> 
> Scripting your deployment process is a Good Idea.  It will also mean
> that it happens the same every time, according to whatever your scripted
> procedure is.
> 
> Upload them separately to each server, check integrity and then run a
> local script to finish the process and deploy them to appBase & do
> server restarts if needed.
> 
> If you're deploying to production servers with auto-deployment enabled,
> make sure the upload occurs to a separate temp location, before copying
> it into the appBase.
> 
> You could SCP files up to a location on the server, using a user account
> configured with a password-free key pair.
> 
> SSH will let you limit a given key to specific commands, so the account
> could be configured solely for uploading the files & then running the
> local deployment script.
> 
> 
> p
> 
> 
> 
>       
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tomcat.apache.org
> For additional commands, e-mail: users-h...@tomcat.apache.org
> 

Attachment: 0x62590808.asc
Description: application/pgp-keys

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to