Friday, April 20, 2007

CruiseControl.Net 101 - Installation

My plan is to start with few entries covering the basic setup, configuration and usage of CC.Net. This way, if I'm hit by a bus, someone else at work can take over as the BuildGuy. Or they can wipe the machine and turn it into an mp3 server. Their choice.

The server install (v1.2.1) is rather straightforward, though you'll want IIS loaded beforehand. During the install, check the boxes to install as a service, and to create a virtual directory in IIS. Note the service (CruiseControl.NET Server) is set to Manual startup, and eventually needs to be switched to Automatic. While configuring projects, however, you may find it easier to debug running the console.

Once installed, start the console or service and point your browser to http://localhost/ccnet/. If the Dashboard is displayed, good job. Your install went smoother than mine. Because I installed IIS after the .NET framework, I received an error stating "Failed to access IIS metabase." Running "aspnet_regiis -i -enable" took care of the issue.

Now that we have the server running, we need a project. Open ccnet.config - located in "C:\Program Files\CruiseControl.NET\server" on my box. Replace the contents with:

<cruisecontrol>
<project name="Project 1">
</project>
</cruisecontrol>

No, it doesn't do anything - I'm not in any hurry. Save the file and go back to the Dashboard. You should now see "Project 1" in the list.

With that in place, install the CC.NET TrayApp. One installed, we want to add Project 1 to the list of monitored projects. In CCTray, go to File > Settings. On the Build Projects tab, click Add. Click Add Server. The Build Server dialog now visible provides three methods of connecting to the server. Either the dashboard or remoting options will work.

Once you've selected a connection method, the Project list now contains the build server and a single project (Project 1.) Select the project and click OK. Click OK to close the settings, and you should now see the status of the project. This will match the info displayed on the Dashboard.

Well, that was fun. Maybe next time we'll have the server do something useful. But I make no promises...

2 comments:

  1. Good work man. I'm anxious to see what useful project you setup in part 2.

    ReplyDelete
  2. Thanks dude! the comment about running aspnet_regiis was exactly the tip i was looking for. Cheers =D

    ReplyDelete

Note: Only a member of this blog may post a comment.