Installing ThoughtWorks Cruise with File Authentication on Windows August, 2009
ThoughtWorks Cruise is a compelling option for continuous integration. Even more compelling is that they offer a free version (Although their recent marketing has been somewhat ambiguous on this, see here for more info). Setting up Cruise with file authentication is hardly worth a blog post since its so simple (Plus the docs do a good job of explaining it) but I'll do it anyways.
1) Download the latest version of the Cruise Server and Cruise Agent here. Fill out the form and you will be redirected to a download page. You will also be emailed a license that is good for a year. You will have to renew this license every year. From what I have been told, your Cruise server will not stop working after a year, but you will not be able to make any changes to your pipelines until you have an updated license. Kind of a pain but I think it's worth it for a free product.
2) Install both the Cruise Server and Cruise Agent. The Cruise server coordinates the builds and the Cruise Agent actually performs tasks. So you could potentially have multiple agents on multiple servers which are handling build tasks in parallel. The free version only allows you to install agents on the same machine as the Cruise Server. The simplest Cruise install is Cruise Server and 1 Cruise Agent.
3) Enter your license key. Browse to the administrative control pane (http://localhost:8153) or by double clicking the icon on your desktop. The control panel can also be accessed over ssl by using port 8154: https://localhost:8154. This will redirect to the about page where you will need to enter your license information. You should have received a user name and license key by email. Enter the user name (Called "Licensee" in the email) and paste in the license key in appropriate box and press "Save license".
4) Create the user password file. Now you will need to create an Apache password file using the htpasswd utility in the Apache distribution. You can download the latest distro here (You can just copy the utility out of the folder and then uninstall Apache). Run the following command:
htpasswd -c -s "D:\Path\To\My\File\passwd" myusername
The "c" flag creates the file (Omit this when you are adding additional users). The "s" flag forces the SHA hashing algorithm which is what Cruise expects. Then of course the path to the password file and the username. You will be prompted for the password.
5) Set the path to the password file in the Cruise configuration. Now you will need to click on the "ADMINISTRATION" tab in the Cruise control panel then the "Source XML" sub tab. Here you will see the xml configuration for Cruise. Click the "Edit" button at the top of the file to make the textbox editable. Now add the following "security" section to the configuration:
xml version="1.0" encoding="utf-8"?> <cruise ... > <server artifactsdir="logs"> ... <security> <passwordFile path="D:\Path\To\My\File\passwd" /> security> ... server> ... cruise>
Click the save button and browse to another page in the admin. At this point you should be greeted with a login page.