You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Fernando Morgenstern <fe...@consultorpc.com> on 2010/02/01 11:52:54 UTC

Application deployment on clusters

Hello,

I am trying to find out how can i deploy an application on all nodes at a Tomcat 6 cluster.

Basically i have this on my server.xml:

<Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
                    tempDir="/tmp/war-temp/"
                    deployDir="/tmp/war-deploy/"
                    watchDir="/tmp/war-listen/"
                    watchEnabled="false"/>

Does it means, that i have to move my war file to /tmp/war-deploy and it will be deployed on all nodes?

I saw this post while searching on google ( http://www.mail-archive.com/users@tomcat.apache.org/msg29411.html  ) that farm deployer is broken. Could someone confirm if this is still true as this post is from 2007?

Best Regards,
---

Fernando Marcelo
www.consultorpc.com
fernando@consultorpc.com


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


Re: Application deployment on clusters

Posted by Fernando Morgenstern <fe...@consultorpc.com>.
Em 01/02/2010, às 09:04, Mark Thomas escreveu:

> On 01/02/2010 10:52, Fernando Morgenstern wrote:
>> Hello,
>> 
>> I am trying to find out how can i deploy an application on all nodes at a Tomcat 6 cluster.
>> 
>> Basically i have this on my server.xml:
>> 
>> <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
>>                    tempDir="/tmp/war-temp/"
>>                    deployDir="/tmp/war-deploy/"
>>                    watchDir="/tmp/war-listen/"
>>                    watchEnabled="false"/>
>> 
>> Does it means, that i have to move my war file to /tmp/war-deploy and it will be deployed on all nodes?
> 
> I was about to say check the docs and a found this:
> http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-deployer.html
> 
> Anyone fancy writing a documentation patch? The Javadoc also needs updating.
> 
> From a quick scan of the code:
> watchDir - the directory where we watch for changes - put your WAR to
> deploy here
> deployDir - the directory where we install applications
> tempDir - a temporaryDirectory to store binary data when downloading a
> war from the cluster

Thanks for your quick answer.

I changed watchEnabled to true and downloaded this sample war ( https://sec1.woopra.com/docs/appdev/sample/ ) into /tmp/war-listen/ but it is not listed at list applications on tomcat manager. I found the following entries on catalina.out:

INFO: check cluster wars at /tmp/war-listen
Feb 1, 2010 12:37:18 PM org.apache.catalina.ha.deploy.FarmWarDeployer fileModified
INFO: Installing webapp[/sample] from /tmp/war-deploy/sample.war
Feb 1, 2010 12:37:18 PM org.apache.catalina.ha.deploy.FarmWarDeployer remove
INFO: Cluster wide remove of web app /sample
Feb 1, 2010 12:37:38 PM org.apache.catalina.ha.deploy.WarWatcher check
INFO: check cluster wars at /tmp/war-listen
Feb 1, 2010 12:37:58 PM org.apache.catalina.ha.deploy.WarWatcher check
INFO: check cluster wars at /tmp/war-listen

Any ideas of what i am doing wrong?

Also, does this /tmp/war* paths needs to be shared between all nodes on the cluster ( Eg.: using glusterfs or another distributed filesystem ) or does tomcat takes care of this? 

Best Regards,
---

Fernando Marcelo
www.consultorpc.com
fernando@consultorpc.com


Re: Application deployment on clusters

Posted by Christopher Schultz <ch...@christopherschultz.net>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Mark,

On 2/1/2010 6:04 AM, Mark Thomas wrote:
>>>From a quick scan of the code:
> watchDir - the directory where we watch for changes - put your WAR to
> deploy here
> deployDir - the directory where we install applications

So, would that often be set to CATALINA_BASE/webapps?

> tempDir - a temporaryDirectory to store binary data when downloading a
> war from the cluster

Does this default to java.io.tmpdir?

- -chris
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAktnF1YACgkQ9CaO5/Lv0PCzLwCgjZ4c+rrp6bOcleI+g8NzSFkL
f5QAoJbHIVpOGtX46/3q/nzRF/bkz6TZ
=CUz7
-----END PGP SIGNATURE-----

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


Re: Application deployment on clusters

Posted by Mark Thomas <ma...@apache.org>.
On 01/02/2010 10:52, Fernando Morgenstern wrote:
> Hello,
> 
> I am trying to find out how can i deploy an application on all nodes at a Tomcat 6 cluster.
> 
> Basically i have this on my server.xml:
> 
> <Deployer className="org.apache.catalina.ha.deploy.FarmWarDeployer"
>                     tempDir="/tmp/war-temp/"
>                     deployDir="/tmp/war-deploy/"
>                     watchDir="/tmp/war-listen/"
>                     watchEnabled="false"/>
> 
> Does it means, that i have to move my war file to /tmp/war-deploy and it will be deployed on all nodes?

I was about to say check the docs and a found this:
http://tomcat.apache.org/tomcat-6.0-doc/config/cluster-deployer.html

Anyone fancy writing a documentation patch? The Javadoc also needs updating.

>From a quick scan of the code:
watchDir - the directory where we watch for changes - put your WAR to
deploy here
deployDir - the directory where we install applications
tempDir - a temporaryDirectory to store binary data when downloading a
war from the cluster


> I saw this post while searching on google ( http://www.mail-archive.com/users@tomcat.apache.org/msg29411.html  ) that farm deployer is broken. Could someone confirm if this is still true as this post is from 2007?

Filip was probably referring to
https://issues.apache.org/bugzilla/show_bug.cgi?id=45851 which was fixed
in 6.0.20 onwards.

Mark



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