<?xml version="1.0"?><rss version="2.0"><channel><title>Go &gt; How To</title><link>http://community.thoughtworks.com/hives/0ff0111f63</link><description>Find the answers to your Go questions, including FAQs, how-tos, tips and tricks</description><language>en-us</language><copyright>Copyright 2006, HiveLive Inc.</copyright><pubDate>Sat, 06 Nov 2010 06:41:56 +0000</pubDate><lastBuildDate>Sat, 06 Nov 2010 06:41:56 +0000</lastBuildDate><docs>http://blogs.law.harvard.edu/tech/rss</docs><item><title>svn+ssh on mac osx (1 Comment)</title><link>http://community.thoughtworks.com/posts/7f1121d3ba</link><description>&lt;p&gt;&lt;em&gt;How To by &lt;a href=&quot;http://community.thoughtworks.com/people/e162972166&quot;&gt;Felix L&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I&apos;ve gotten my Ubuntu box to connect to subversion using passwordless ssh.&amp;nbsp; I was able to do that in Ubuntu using the command &quot;sudo su - cruise&quot; to setup the passwordless ssh.&amp;nbsp; Now I&apos;m trying to do it on Mac OSx, I tried using the &quot;sudo su - cruise command, and that doesn&apos;t work.&amp;nbsp; It says that cruise is an unknown login.&amp;nbsp; How do I setup the passwordless ssh on the Mac OSx?&lt;/p&gt;
&lt;p&gt;Felix&lt;/p&gt;
</description><guid isPermaLink="true">http://community.thoughtworks.com/posts/7f1121d3ba</guid><pubDate>Thu, 04 Nov 2010 20:17:59 +0000</pubDate></item><item><title>Backup the Cruise/Go embedded database</title><link>http://community.thoughtworks.com/posts/7672140434</link><description>&lt;p&gt;&lt;em&gt;How To by &lt;a href=&quot;http://community.thoughtworks.com/people/c7313fd1b6&quot;&gt;Anush Ramani&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&lt;h3&gt;Problem&lt;/h3&gt;&lt;p&gt;The Go server maintains an embedded database that stores historical data for all your pipeline, stage and job runs. Rather than backing up the entire Go directory structure, its much more convinient to just backup the embeded DB. This article shows you how to backup your data in Linux.&lt;/p&gt;
&lt;h3&gt;Solution Description&lt;/h3&gt;&lt;p&gt;&lt;strong&gt;Precondition&lt;/strong&gt;:&lt;br /&gt;
&lt;br /&gt;
In order to take a backup, the most important criteria is that the server has to be shutdown gracefully i.e.&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;The server process should be completely done. For example: &apos;ps aux | grep java&apos; should not show the Go server process&lt;/li&gt;
&lt;li&gt;The server should &lt;span style=&quot;text-decoration:underline;&quot;&gt;&lt;strong&gt;not&lt;/strong&gt;&lt;/span&gt; be killed using &apos;-9&apos; option&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;The best way to get the server down is using &apos;[sudo] /etc/init.d/go-server stop&apos;&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;Procedure&lt;/strong&gt;:&lt;br /&gt;
&lt;br /&gt;
You need to backup the &apos;db&apos; folder under the server installation folder i.e. &apos;/var/lib/go-server&apos; for a normal installation. You basically need to copy the whole db folder as a backup.&lt;br /&gt;
&lt;br /&gt;
We typically do - &apos;tar -jvf db`date`.tar.bz2 db&apos; in the /var/lib/go-server folder and move the &apos;db{date}.tar.bz2&apos; folder that is created to a drive with a lot of space. This way you are backing everything that the Go server needs.&lt;br /&gt;
&lt;br /&gt;
&lt;em&gt;TIP&lt;/em&gt;: Along with the db, it would be good if you also backup the configuration. This is the file: /etc/go/cruise-config.xml.&lt;br /&gt;
&lt;br /&gt;
Once the backup is done completely, you can start the server using the command &apos;[sudo] /etc/init.d/go-server start&apos;.&lt;br /&gt;
&lt;br /&gt;
It would be ideal if you can add this to a script and add a cron job to back up the db at midnight every day.&lt;/p&gt;
</description><guid isPermaLink="true">http://community.thoughtworks.com/posts/7672140434</guid><pubDate>Tue, 24 Aug 2010 11:08:11 +0000</pubDate></item><item><title>How to generate password for users when using password file for authentication in Cruise (6 Comments)</title><link>http://community.thoughtworks.com/posts/8d43a014c4</link><description>&lt;p&gt;&lt;em&gt;How To by &lt;a href=&quot;http://community.thoughtworks.com/people/3b59f5aa54&quot;&gt;Qiao Liang 乔梁&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&lt;h3&gt;Problem&lt;/h3&gt;&lt;p&gt;Cruise did not ship a tool to generate password with SHA1 for users. However, there are lots of tools does.&lt;/p&gt;
&lt;h3&gt;Solution Description&lt;/h3&gt;&lt;p&gt;You can use &lt;a title=&quot;htpasswd generator from apache&quot; href=&quot;http://httpd.apache.org/docs/2.0/programs/htpasswd.html&quot;&gt;htpasswd from Apache&lt;/a&gt; to generate SHA1 password. The attached file is for Windows users.&lt;/p&gt;
</description><guid isPermaLink="true">http://community.thoughtworks.com/posts/8d43a014c4</guid><pubDate>Tue, 01 Sep 2009 02:59:33 +0000</pubDate></item><item><title>Agents which are cloned from a virtual machine image conflict</title><link>http://community.thoughtworks.com/posts/e8adcb55b6</link><description>&lt;p&gt;&lt;em&gt;How To by &lt;a href=&quot;http://community.thoughtworks.com/people/3b59f5aa54&quot;&gt;Qiao Liang 乔梁&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&lt;h3&gt;Problem&lt;/h3&gt;&lt;p&gt;I have installed an agent on a virtual machine, and it worked fine with Cruise server.&lt;/p&gt;
&lt;p&gt;However when I clone the VM image, both of the agents get confused, and a job can be building on both agents at the same time.&lt;/p&gt;
&lt;h3&gt;Solution Description&lt;/h3&gt;&lt;p&gt;The reason is that Cruise server identifies agents by a unique id (UUID) which is generated by the agent the first time it starts up.&lt;/p&gt;
&lt;p&gt;If you clone an agent, the UUID is copied too.&amp;nbsp;So both of the agents with same UUID talk to Cruise server, and the server becomes dysfunctional.&lt;/p&gt;
&lt;p&gt;To resolve this issue, you just delete the file guid.txt under {agent_installation_folder}/config.&lt;/p&gt;
&lt;p&gt;Then Cruise server will recognize it as a new agent, and you can approve it.&lt;/p&gt;
&lt;p&gt;This issue will be fixed in a future version of Cruise.&lt;/p&gt;
</description><guid isPermaLink="true">http://community.thoughtworks.com/posts/e8adcb55b6</guid><pubDate>Wed, 22 Jul 2009 10:21:45 +0000</pubDate></item><item><title>svn+ssh on Windows</title><link>http://community.thoughtworks.com/posts/7bbd88ad54</link><description>&lt;p&gt;&lt;em&gt;How To by &lt;a href=&quot;http://community.thoughtworks.com/people/c925478e94&quot;&gt;Jez Humble&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&lt;h3&gt;Problem&lt;/h3&gt;&lt;p&gt;How do I make Cruise work with svn+ssh on Windows?&lt;/p&gt;
&lt;h3&gt;Solution Description&lt;/h3&gt;&lt;p&gt;Credits: some of these instructions come from &lt;a href=&quot;http://agateau.wordpress.com/2007/07/03/windows-svnssh-and-the-subversion-command-line-client/&quot;&gt;Aurelian&apos;s Room&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;1. Install the &lt;a href=&quot;http://subversion.tigris.org/getting.html#windows&quot;&gt;Subversion command line&lt;/a&gt; on all machines running Cruise Server and Cruise Agents:&amp;nbsp;http://subversion.tigris.org/getting.html#windows&lt;/p&gt;
&lt;p&gt;2. Install &lt;a href=&quot;http://www.chiark.greenend.org.uk/~sgtatham/putty/&quot;&gt;PLink&lt;/a&gt; on all machines running Cruise Server and Cruise Agents:&amp;nbsp;http://www.chiark.greenend.org.uk/~sgtatham/putty/&lt;/p&gt;
&lt;p&gt;3. Verify you can connect to the server svn is running on by running with&lt;/p&gt;
&lt;pre&gt;
plink -i c:\path\to\your\key.ppk user@server
&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;
on the command line&lt;/p&gt;
&lt;p&gt;4. Edit the Subversion config file found at C:\Documents and Settings\user\Application Data\Subversion\config. Add the following line to the section named&lt;/p&gt;
&lt;pre&gt;
[tunnels]
&lt;/pre&gt;
&lt;pre&gt;
ssh=c:/path/to/plink.exe -i c:/path/to/your/key.ppk
&lt;/pre&gt;
&lt;p&gt;5. Verify it works (without requiring a password) with:&lt;/p&gt;
&lt;pre&gt;
svn info svn+ssh://username@svnserver/svnroot/codepath
&lt;/pre&gt;
&lt;p&gt;6. Ensure Cruise is running as the same user you setup Subversion for in step 4 as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Click on Start &amp;gt; Settings &amp;gt; Control Panel &amp;gt; Administrative Tools &amp;gt; Services&lt;/li&gt;
&lt;li&gt;Double click on Cruise Server / Cruise Agent service&lt;/li&gt;
&lt;li&gt;Click on the &quot;Log On&quot; tab&lt;/li&gt;
&lt;li&gt;Change from Log On as &quot;Local System Account&quot; to &quot;This account&quot; and use the username and password of the logged in user&lt;/li&gt;
&lt;li&gt;Restart the service&lt;/li&gt;
&lt;/ul&gt;
</description><guid isPermaLink="true">http://community.thoughtworks.com/posts/7bbd88ad54</guid><pubDate>Fri, 02 Oct 2009 21:49:33 +0000</pubDate></item><item><title>How to resolve a corrupt index file</title><link>http://community.thoughtworks.com/posts/140b02521a</link><description>&lt;p&gt;&lt;em&gt;How To by &lt;a href=&quot;http://community.thoughtworks.com/people/10ba5d04b0&quot;&gt;Mark Chang&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&lt;h3&gt;Problem&lt;/h3&gt;&lt;p&gt;You may see this error message if you have a corrupt index file.&lt;br /&gt;
&lt;br /&gt;
&quot;File ID mismatch got=0 expected=454 pos=10057 false org.h2.store.DiskFile:C:\Program Files\Cruise&quot;&lt;/p&gt;
&lt;h3&gt;Solution Description&lt;/h3&gt;&lt;p&gt;Try and resolve a corrupt index file by following these steps:&lt;br /&gt;
&lt;br /&gt;
* Stop your Cruise Server&lt;br /&gt;
&lt;br /&gt;
* Delete the file &quot;cruise.index.db&quot; within the directory, &quot;$CRUISE_SERVER/db/h2db&quot;.&amp;nbsp; (CRUISE_SERVER is the folder in which the cruise server is installed.)&lt;br /&gt;
&lt;br /&gt;
* Start your Cruise Server again after deleting the file.&lt;/p&gt;
&lt;p&gt;------------&lt;/p&gt;
&lt;p&gt;We plan to introduce helpful log messages to help troubleshoot the issue in Cruise 2.0.&lt;/p&gt;
</description><guid isPermaLink="true">http://community.thoughtworks.com/posts/140b02521a</guid><pubDate>Mon, 28 Sep 2009 20:10:29 +0000</pubDate></item><item><title>Could not found the files on mapped network drive under windows</title><link>http://community.thoughtworks.com/posts/49b68fc156</link><description>&lt;p&gt;&lt;em&gt;How To by &lt;a href=&quot;http://community.thoughtworks.com/people/2f326fd606&quot;&gt;Wei Xu&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&lt;h3&gt;Problem&lt;/h3&gt;&lt;p&gt;put the 3rd party library files on a shared folder, let&apos;s say \\lib-server\libraries, and map \\lib-server as z: drive, so we can access z:\libraries for library files&lt;/p&gt;
&lt;p&gt;and my ant is using the classpath z:\libraries to build the project, it works fine when I run it in command line, but failed when running in Cruise.&lt;/p&gt;
&lt;p&gt;the output showing error message:&lt;br /&gt;
[javac] ***\***\***\TestImpl.java:2: package oracle.jbo.server does not exist&lt;br /&gt;
[javac] import oracle.jbo.server.EntityImpl;&lt;br /&gt;
[javac] ^&lt;/p&gt;
&lt;h3&gt;Solution Description&lt;/h3&gt;&lt;p&gt;That&apos;s because the agent is running in windows service mode. and based on http://support.microsoft.com/kb/180362, Cruise could not access mapped network drive when it runs in service mode.&lt;/p&gt;
&lt;p&gt;So you can choose either solutions from the following:&lt;/p&gt;
&lt;p&gt;1. use unc path. e.g. \\lib-server\libraries&lt;/p&gt;
&lt;p&gt;2. start cruise agent using command line instead of windows service&lt;/p&gt;
&lt;h3&gt;External Website&lt;/h3&gt;&lt;a href=&quot;http://support.microsoft.com/kb/180362&quot; target=&quot;_hive&quot;&gt;detail description on microsoft&lt;/a&gt;</description><guid isPermaLink="true">http://community.thoughtworks.com/posts/49b68fc156</guid><pubDate>Thu, 17 Sep 2009 09:15:39 +0000</pubDate></item><item><title>Cruise can&apos;t run my scripts</title><link>http://community.thoughtworks.com/posts/f0955a6928</link><description>&lt;p&gt;&lt;em&gt;How To by &lt;a href=&quot;http://community.thoughtworks.com/people/296931f394&quot;&gt;Chris Stevenson&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&lt;h3&gt;Problem&lt;/h3&gt;&lt;p&gt;When I try to run my scripts on unix using the exec task it fails with the error &quot;Make sure this command can execute manually&quot; even though the script is there and is executable.&lt;/p&gt;
&lt;h3&gt;Solution Description&lt;/h3&gt;&lt;p&gt;When you use the exec task on linux, it works the same way as if you were typing the command from a command prompt. This means that to run a script in the working directory you would need to add &quot;./&quot; to the executable path.&lt;/p&gt;
&lt;p&gt;So this would give an error:&lt;/p&gt;
&lt;pre&gt;
&amp;lt;exec workingDir=&quot;foo/bar&quot; command=&quot;my-script.sh&quot; /&amp;gt;
&lt;/pre&gt;
&lt;p&gt;But this would work:&lt;/p&gt;
&lt;pre&gt;
&amp;lt;exec workingDir=&quot;foo/bar&quot; command=&quot;./my-script.sh&quot; /&amp;gt;
&lt;/pre&gt;
&lt;p&gt;Also, the script must be marked as executable. If the script is not marked as executable you may need to specify the full path to the appropriate shell:&lt;/p&gt;
&lt;pre&gt;
&amp;lt;exec workingDir=&quot;foo/bar&quot; command=&quot;/bin/bash&quot;&amp;gt;
  &amp;lt;arg value=&quot;my-script.sh&quot; /&amp;gt;
&amp;lt;/exec&amp;gt;
&lt;/pre&gt;</description><guid isPermaLink="true">http://community.thoughtworks.com/posts/f0955a6928</guid><pubDate>Wed, 05 Aug 2009 20:32:43 +0000</pubDate></item><item><title>Setup environment variables for Cruise Agent on Mac</title><link>http://community.thoughtworks.com/posts/0ba5b8bc82</link><description>&lt;p&gt;&lt;em&gt;How To by &lt;a href=&quot;http://community.thoughtworks.com/people/85ce7690d9&quot;&gt;Li Yanhui&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&lt;p&gt;Normally if you run Cruise Agent on Mac by double clicking the application, it doesn&apos;t inherit environment variables from /etc/profile, ~/.profile etc. You need to use the ~/.MacOSX/environment.plist to specify environment variables.&lt;/p&gt;
&lt;p&gt;For example, if you want to specify ANT_OPTS environment variable for using Ant in Cruise Agent, the content of environment.plist may look like this:&lt;/p&gt;
&lt;p&gt;&amp;lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&amp;gt;&lt;br /&gt;
&amp;lt;!DOCTYPE plist PUBLIC &quot;-//Apple//DTD PLIST 1.0//EN&quot; &quot;http://www.apple.com/DTDs/PropertyList-1.0.dtd&quot;&amp;gt;&lt;br /&gt;
&amp;lt;plist version=&quot;1.0&quot;&amp;gt;&lt;br /&gt;
&amp;lt;dict&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;key&amp;gt;ANT_OPTS&amp;lt;/key&amp;gt;&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;string&amp;gt;-Xmx2048m&amp;lt;/string&amp;gt;&lt;br /&gt;
&amp;lt;/dict&amp;gt;&lt;br /&gt;
&amp;lt;/plist&amp;gt;&lt;/p&gt;
&lt;p&gt;And if you change the environment.plist please make sure you logout and login again to make it take effect.&lt;/p&gt;
&lt;p&gt;More information can be found here: &lt;a title=&quot;http://developer.apple.com/qa/qa2001/qa1067.html&quot; href=&quot;http://developer.apple.com/qa/qa2001/qa1067.html&quot;&gt;http://developer.apple.com/qa/qa2001/qa1067.html&lt;/a&gt;&lt;/p&gt;
</description><guid isPermaLink="true">http://community.thoughtworks.com/posts/0ba5b8bc82</guid><pubDate>Tue, 28 Jul 2009 07:03:35 +0000</pubDate></item><item><title>Agents do not get recognised on restart when anti-virus application installed</title><link>http://community.thoughtworks.com/posts/bd16edcad3</link><description>&lt;p&gt;&lt;em&gt;How To by &lt;a href=&quot;http://community.thoughtworks.com/people/2f326fd606&quot;&gt;Wei Xu&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;&lt;h3&gt;Problem&lt;/h3&gt;&lt;p&gt;The original bug is http://community.thoughtworks.com/posts/5724dc11b1,&lt;/p&gt;
&lt;p&gt;The problem is when anti-virus application installed on agent side, the agent always think it&apos;s a new agent, so need to approve it again. it&apos;s a bug in the current release, and we&apos;ll fix it in next release.&lt;/p&gt;
&lt;h3&gt;Solution Description&lt;/h3&gt;&lt;p&gt;The workaround is change the setting in your antivirus software, for example in ESET NOD32:&lt;/p&gt;
&lt;p&gt;Antivirus Settings -&amp;gt; Web access protection -&amp;gt; Http, https&lt;/p&gt;
&lt;p&gt;disable http checking or remove the port 80 from the list&lt;/p&gt;
</description><guid isPermaLink="true">http://community.thoughtworks.com/posts/bd16edcad3</guid><pubDate>Wed, 15 Jul 2009 06:53:19 +0000</pubDate></item></channel></rss>
