JM (Jason Meridth)

JM (Jason Meridth)

Learn, Converse, Share

02 Oct 2007

Installing 2 CruiseControl services/web dashboards on 1 server/PC

Why? I am currently hosting CruiseControl for an open-source project and I don’t want my personal projects to show up on their web dashboard.  I also want a complete separation.  That means theirs is running on its own port number and they have their own Virtual Directory (ccnet) on the Default website. The given CruiseControl.msi file does an excellent job of setting up the first CruiseControl service and virtual directory for you.  I won’t go into this much, but you will learn a little bit about what it does because I’m installing my instance manually.

FILE STRUCTURE

1. First (easiest way), copy the folder structure created by the msi install and copy it to another folder.

image
copies to
image

SERVICE

1. Next edit the following files and the specific lines in your new folder structure: …CruiseControl.NET2/server/ ccnet.exe.config : Change the port to a new port (default was 21234) ccservice.exe.config : Change the port to a new port (default was 21234) (both files have the following schema)

image
4. Create your new CruiseControl.NET Server service Currently you should have the following in your services manager (Start-> Run: services.msc) (I’m a keyboard junkie, I use Start->Run for mostly everything)
image
Now if you run the following command in the command line you will create another service for your new CruiseControl.NET Server:
image
This is using the service command (details here) to install the new service via command line. ***BEWARE:  You have to leave a space after the equals signs or you will get a usage notice (error).  Took me a while to figure that one out. Here is what you should see inside the properties dialog of the new service.
image
You should be able to right click the service and choose start.  If you receive an error, be sure to check the ccservice.exe.config file and that the port is different than your other service that is most likely already started.  This is a common error for not starting.
image

WEB DASHBOARD

1. Edit the …CruiseControl.NET2webdashboarddashboard.config file with the new port number: Change tcp://localhost:21234/CruiseManager.rem to tcp://localhost:<yourPort#>/CruiseManager.rem

image
2. Create a new virtual directory on your server/PC for your new dashboard:
image
Outside of the default settings created by creating a new Virtual Directory, be aware of the following:
image
Local path: C:Program FilesCruiseControl.NET2webdashboard Execure Permissions: Scripts only I also use a unique Application Pool for all my Virtual Directories and Sites. I created a CCNet App Pool for this and my other ccnet Virtual Directory.
image
Default Document: default.aspx
image
Make sure the site is using ASP.NET 2.0 This should be all you need. When you type: http://localhost/ccnet2
image
Just be aware that when you want to use the latest CCTray, you will need to include the port number if you are going to connect via remoting:
image
Connection for dashboard: http://localhost/ccnet2 Connection for .NET remoting: localhost:43555 I haven’t used the last one but for those out there that need to, you can connect to non-CruiseControl.NET build servers (CruiseControl for Java).   I know this is brute force and I’m open to all suggestions for a more elegant solution. I’m blogging this for memory and for anyone else who might need it.

Comments

Jimmy Bogard: I recently had to do this also, as we have different service accounts for each environment we deploy to. I had to create a different CC.NET service for each service account, but I kept just the one dashboard to monitor all of them. In that case, I just copied the “server” folder inside the CruiseControl.NET folder. But by creating separate dashboards, you can also apply separate IIS authentication and NTFS permissions to each set of CCNET servers it monitors, to give some level of security over who can set off builds.