Wednesday, December 2, 2009

Continuous Integration Server Setup – Part 1

I just finished setting up a prototype Continuous Integration server with CruiseControl.NET with a lot of help from Jeff McWherter and by following many of the suggestions in a white paper by Craig Berntson.  Here are the steps and lessons learned from this experience.

I built the prototype server in VMWare using Windows Server 2003 with a C: and E: drives, and created an administrator account.  Here are the next steps:

  1. Installed CruiseControl.NET 1.4.4 SP1 accepting all defaults
  2. Created an E:\Tools folder to contain all of the necessary utility applications (e.g., E:\Tools\nUnit\bin\net-2.0\nunit-console.exe and E:\Tools\svn\svn.exe)
  3. Created a cruisecontrol user in my organization’s ActiveDirectory and then added a local Windows account for this user.  This user has read-only privileges to the SubVersion repository.
  4. Configured the CruiseControl.NET service to start automatically and to Log On using the cruisecontrol account: Selected the service, opened the Properties, Log On tab, This account radio button, browsed to the cruisecontrol account, entered the password, applied, then restarted the service. 

I then did a little fine-tuning of the CC.NET configuration files:

  • I did not change ccnet.exe.config
  • I edited ccservice.exe.config
    • In <appSettings>, I inserted the key <add key=”ccnet.config” value=”config\ccnet.config” />
    • I did this so that my config files are cleanly grouped into the C:\Program Files\CruiseControl.NET\server\config folder.
  • I edited dashboard.config
    • I commented out all unwanted <xslFileNames> entries from the <buildReportBuildPlugin> block
    • I commented out all unwanted <xslReportBuildPlugin> entries from the <buildPlugins> block
    • I did this to remove unused tests and builds from my dashboard.

The final step was to resolve a problem due to our SubVersion server using a self-signed certificate, which would cause an error when CruiseControl.NET tried to check out any of the projects (error message = “Server certificate verification failed: issuer is not trusted”).

  1. I tried various ways to accept the SubVersion server certificate without success by following the suggestions in the CruiseControl.NET documentation.
  2. I finally resolved the problem by importing the certificate using IE:  browsed to the SubVersion server, continued past the certificate error warning, entered my credentials, clicked the IE Certificate Error button (to the right of the URL), clicked the View Certificates link, clicked the Install Certificate button, and accepted all defaults.

That’s it for the overall setup steps on the CI prototype server.  In Part 2 I will describe how I configured my ccnet.config file to build and test my projects automatically.

No comments:

Post a Comment