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 [email protected]
