From: Jeffrey F. <jfr...@us...> - 2005-04-29 23:48:23
|
Update of /cvsroot/cruisecontrol/cruisecontrol/contrib/distributed In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29358/contrib/distributed Modified Files: README.html build.xml Log Message: Patches by Dan Rollo: 1. build.xml: include jakarta-oro-2.0.3.jar from main/lib in classpaths 2. README.html: cleanup of my prior patch changes 3. conf/master-build.xml: add jar with required classes to paths 4. DistributedMasterBuilder.java: rethrow RuntimeExceptions from build() method in CCException so build loop knows about the problem. Flag found agent as claimed. Also, use updated isBusy() in searching for available agents. 5. ZipUtil.java: avoid creating empty zip files, and ensure such streams areclosed. 6. BuildAgent.java: increase registration wait time to work better under jdk1.4 7. BuildAgentService.java: added claim() method to flag an agent as busy asap. 8. BuildAgentServiceImpl.java: synchronize access to busy flag. Implement isBusy() method. 9. PropertiesTestHelper.java: check for expected exception message in test 10. ZipUtilTest.java: Update test involving empty zip files (which are no longer created). Also ensure temp test files are actually deleted. Index: README.html =================================================================== RCS file: /cvsroot/cruisecontrol/cruisecontrol/contrib/distributed/README.html,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- README.html 11 Mar 2005 07:12:56 -0000 1.1 +++ README.html 29 Apr 2005 23:48:07 -0000 1.2 @@ -25,6 +25,17 @@ <li><code>reggie-dl.jar</code></li> <li><code>start.jar</code></li> <li><code>tools.jar</code></li> + (including the jars below fixes jini warnings about missing jars during master startup) + <li><code>fiddler.jar</code></li> + <li><code>fiddler-dl.jar</code></li> + <li><code>mahalo.jar</code></li> + <li><code>mahalo-dl.jar</code></li> + <li><code>mecury.jar</code></li> + <li><code>mecury-dl.jar</code></li> + <li><code>norm.jar</code></li> + <li><code>norm-dl.jar</code></li> + <li><code>outrigger.jar</code></li> + <li><code>outrigger-dl.jar</code></li> </ul> </li> <li>Build Cruise Control in the usual way.</li> @@ -61,8 +72,12 @@ <li>Start the master by navigating to the <i>contrib/distributed/dist/master</i> directory and running <code>ant</code>. The default target should start the registrar and class server.</li> <li>Start the agent by navigating to the <i>contrib/distributed/dist/agent</i> directory and running <code>ant</code>. The default target should start the build agent and register it with the registrar. Note: while there is no reason you couldn't have an agent running in your build master, additional agents will require you to copy the <i>cc-agent.zip</i> to each machine, unzipping and configuring for each of them.</li> <li>Test that Jini is running and your agent(s) is/are registered using the <code>JiniLookUpUtility</code>. In <i>contrib/distributed/dist/master</i> run <code>ant test-jini</code>. After 5 seconds you should see a list of services that have been registered with Jini. Since the Jini registrar itself is a Jini service you should have <code>com.sun.jini.reggie.ConstrainableRegistrarProxy</code> listed even if have no agents running. If you do have agents running, however, you should see a <code>Proxy</code> service listed for each of them, with <code>BuildAgentService</code> listed as the type.</li> - <li>You can manually run a build using the <code>InteractiveBuildUtility</code>. This allows you to test your configuration without starting Cruise Control. In <i>contrib/distributed/dist/master</i> run <code>ant manual-build</code>. If the distributed tag in your configuration file does not contain any entries you'll be prompted to enter them. These are optional, however, and pressing <i>ENTER</i> at the prompt will pick up whatever agent is available. Note that you can pass in the path to your Cruise Control configuration file as an argument to the <code>InteractiveBuildUtility</code> and save a step when running it.</li> - <li>Start Cruise Control the usual way. Any builds that are queued for a distributed builder should be sent to your running agent.</li> + <li>You can manually run a build using the <code>InteractiveBuildUtility</code>. This allows you to test your configuration without starting Cruise Control. In <i>contrib/distributed/dist/master</i> run <code>ant manual-build</code>. If the distributed tag in your configuration file does not contain any entries you'll be prompted to enter them. These are optional, however, and pressing <i>ENTER</i> at the prompt will pick up whatever agent is available. Note that you can pass in the path to your Cruise Control configuration file as an argument to the <code>InteractiveBuildUtility</code> and save a step when running it. (Note: This ant target is not working right now, but the class should work outside of ant.)</li> + <li>Start Cruise Control the usual way. Any builds that are queued for a distributed builder should be sent to your running agent. Modified startup scripts which include additional jars are in: contrib/disttributed. + <p>The cruisecontrol.bat file currently fails due to Windows command line length limitations. You may wish to remove some jars from the CRUISE_PATH to work around this. One example that works under jdk1.5 is: set CRUISE_PATH=%CRUISE_PATH%;%DISTDIR%\cruisecontrol.jar;%LIBDIR%\log4j.jar;%LIBDIR%\jdom.jar;%LIBDIR%\ant\ant.jar;%LIBDIR%\ant\ant-launcher.jar;%LIBDIR%\jakarta-oro-2.0.3.jar;%LIBDIR%\mail.jar;%LIBDIR%\junit.jar;%LIBDIR%\activation.jar;%LIBDIR%\commons-net-1.1.0.jar;%LIBDIR%\starteam-sdk.jar;%LIBDIR%\mx4j.jar;%LIBDIR%\mx4j-tools.jar;%LIBDIR%\mx4j-remote.jar;%LIBDIR%\smack.jar;%DISTRIBDIR%\dist\agent\lib\cc-agent.jar;%DISTRIBDIR%\lib\jini-core.jar;%DISTRIBDIR%\lib\jini-ext.jar;%DISTRIBDIR%\lib\jsk-platform.jar;%DISTRIBDIR%\lib\jsk-resources.jar;%DISTRIBDIR%\lib\reggie.jar;%DISTRIBDIR%\lib\reggie-dl.jar;% DISTRIBDIR%\lib\start.jar;%DISTRIBDIR%\lib\tools.jar;%DISTRIBDIR%\conf;. (removed the following:%LIBDIR%\xerces.jar;%LIBDIR%\xalan.jar;%LIBDIR%\comm.jar;%LIBDIR%\x10.jar;) + <p>While starting CC, you may see an error about no plugin registered for "distributed". To fix, register plugin in config.xml: + <p><pre><plugin name="distributed" classname="net.sourceforge.cruisecontrol.builders.DistributedMasterBuilder"/></pre> + </li> </ol> </li> <li> Index: build.xml =================================================================== RCS file: /cvsroot/cruisecontrol/cruisecontrol/contrib/distributed/build.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- build.xml 11 Mar 2005 07:12:56 -0000 1.1 +++ build.xml 29 Apr 2005 23:48:07 -0000 1.2 @@ -107,6 +107,7 @@ <fileset dir="../../main/lib"> <include name="log4j.jar" /> <include name="jdom.jar" /> + <include name="jakarta-oro-2.0.3.jar" /> </fileset> <fileset dir="../../main/dist"> <include name="cruisecontrol.jar" /> @@ -142,6 +143,7 @@ <include name="log4j.jar" /> <include name="jdom.jar" /> <include name="xerces.jar" /> + <include name="jakarta-oro-2.0.3.jar" /> </fileset> <fileset dir="../../main/dist"> <include name="cruisecontrol.jar" /> @@ -172,15 +174,18 @@ <fileset dir="../../main/dist"> <include name="cruisecontrol.jar" /> </fileset> - <fileset dir="bin" /> </classpath> <src path="src" /> <src path="test" /> </javac> + + <copy todir="bin"> + <fileset dir="test" includes="*.properties"/> + </copy> </target> <target name="test" depends="compile-agent" description="Runs unit tests for distributed extensions to Cruise Control"> - <!-- + <junit fork="yes" forkmode="perBatch" haltonfailure="yes" printsummary="on" > <classpath > <pathelement path="bin"/> @@ -203,7 +208,7 @@ <fileset dir="bin" includes="**/*Test.class" /> </batchtest> </junit> ---> + </target> <target name="jar-agent" depends="compile-agent" description="Creates cc-agent.jar and cc-agent-dl.jar"> |