The Installation Process
You're going to need several elements to pull this all off, so lets list them all out up front:
You will need a Version control system
CruiseControl.NET doesn't need a version control system to work, but frankly, there isn't much point continuing reading this article if you don't use a version control system. They are absolutely essential to even the most disorganized code shop (and probably even more essential for disorganized code shops!).
So go out and install one first, then come back to continue reading about how to set up CruiseControl.NET.
By the way -- I highly recommend SVN:
You will need CruiseControl.NET itself
You will need free console applications that CruiseControl.NET will invoke
- MSBuild.exe (look in your %WINDOWS%\Microsoft.NET\ directory for this -- it comes with the 2.0 and 3.5 framework).
- MSBuild Community Extensions.
Optionally you'll also probably end up downloading the following at some point in the near future (so why not today?)
Other free and not so free parts of the puzzle you may consider adding to your quiver are:
- VisualSVN plugin for VS2005 or VS2008.
(at time of writing its better than the AnkhSVN plugin for VS2005/2008, although not as free).
You will need to install all of the above on two boxes -- your work computer and a server.
Now...the reality is that you, as the manager of the CruiseControl.NET server will have to install all this on a CruiseControl.NET box, but because you are designing the project.build files as well, where you will want to test them, you'll have to install all that on your workstation as well...
For very small shops, no, you don't need a second computer, but I strongly recommend one, even if only for the security of having your source code on two separate boxes.
Installing CruiseControl
Installing and Setting up SVN before CC.NET
This is a subject in itself, and not the place to go into the specs of SVN.
Installing IIS
Did I mention that CC.NET is accessed via webpages? That means the pages need to be Served. By a webserver. Since the pages are ASP.NET pages, that means you need IIS installed and running on the box you will be putting CC.NET.
Again, this is not the place to be discussing how to get IIS up and running.
Installing the console apps that CC.NET will invoke
I am assuming that you will have no trouble installing MSBuild (a, it's delivered with each .NET framework), FxCop, NUnit, etc. (you'll just have to follow the instructions of each software provider).
Prepare a directory where to install CC.NET
Although I haven't yet explained any of this, we might as well start on a good footing, and try to get a good installation. So I'm just going to ask that you trust me on this and make the following directory tree, and I'll explain as we go what we did.
- E:\ [A directory that is *not* the c:\ drive where the OS is]
- CI [A common dir for your Continuous Integration build system]
- CruiseControl.NET [the directory where we will be installing CC.NET]
- BuildArea [The area CC.NET will use to check out and build the solutions/projects]
- BuildArtifacts [An area for CC.NET to save build reports and other metadata it needs]
- ProjectConfigs [A directory containing project build configurations]
As I said, if the above doesn't make sense yet, I will explain as I go.
Installation of the CruiseControl.msi
I recommend that CruiseControl.NET is installed on the same box as the SVN server, but if you have the big bucks you may consider installing it on its own box since it will be triggering a lot of builds, which you definitely will feel at some point.
But installation couldn't be more straight forward.
It's mostly just an issue of clicking Next, Next, Next really, except for the next crucial part:
Important:
Make sure that you install the software not in
C:\Program Files\CruiseControl.NET, which is where I think it defaults to,
but instead choose the directory you created above.
In our case "e:\CI\CruiseControl.NET".
The install create 2 important subdirectories, and a couple of other support ones:
- server
- webdashboard
- some others (tools, examples, etc.)
What to notice here is that in addition to the website (in the webdashboard directory), two exes are installed in the server directory:
- ccnet.exe: the console app.
- ccservice.exe: the service which does exactly the same thing, but as a service.
Most of the time -- other than for configuration purposes -- you will be using the webdashboard, which will invoke the ccservice.exe.
Check that Services and Website are up and running
So what you will be wanting to do, in most circumstances, is:
- use Microsoft's Services interface to ensure that the service is enabled and running,
- use the IIS interface to register a binding to the website.
If you now go to the website, you will probably get a page... but because CC.NET has not been configured, the page really means nothing.
We need to configure ccservice.exe first.