0

TeamCity via IIS on port 80, using a reverse proxy, Part 2 host filtering so you can access Teamcity and other sites in IIS at the same time

by Jon 30. October 2010 23:29

If you followed my previous post how to setup ARR Routing to set up a reverse Proxy top access TeamCity over IIS 7.5 it will work perfectly and you will be able to access TeamCity on a different port.  However…. if you create a website under IIS on the same server you wont be able to access it because the reverse proxy is forwarding every site to TeamCity!  This might work for you but its not ideal if you want to run other IIS sites on the same server, the following steps will take you through setting up a condition so only url you specify will take you to TeamCity.

  1. Open up the Server Farm you just Created, and double click on Routing Rules
  2. Click on Url Rewrite
  3. Select the first Inbound Route and Press Edit
  4. Press the Add.. Button in the conditions pane
  5. Type {HTTP_HOST} into the condition input
  6. Ender the domain you want to want to forward into the pattern, all other domains will be passed to IIS normally
  7. Press Ok
  8. Press Apply and your done

Click on Routing RulesClick on Url Rewrite

Edit the Existing RuleSpecify the Host you want to Filter By

Tags: , , ,

Continuous Integration | development | IIS | TeamCity.Net

0

TeamCity via IIS on port 80, using a reverse proxy in IIS7, 30 second job, Part 1

by Jon 23. October 2010 06:55

So you have your TeamCity system, but annoyingly if you already have IIS on the server your TeamCity probably won’t be accessible on standard web port.  Wouldn’t it be nice to be able to host or access TeamCity via IIS 7.5 via one firewall rule, and get access to TeamCity from any coffee shop or site with restricted internet in the world?  Its much easier than you think in IIS 7.5, a real 30 second job to get it working using Application Request Routing (which is normally used to load balance webfarms) to setup a reverse proxy.

1. Download and Install Application Request Routing for IISS (2.0), using the web platform installer

Web Platform Installer

2. Start Internet Information Services Manager (IIS Manager).  Left Click on the Server Name Node to bring up the server configuration in the right pan and double click on Application Request Routing in the IIS Section.

 Click On Application Requestion Routing 

3. A Server Farms Node will Appear in the left hand side treeview, right click on the node and select Create Server Farm.  Give your new server Farm/reverse proxy a name

Enter a Name for TeamCity Server Farm

4. Press Next, enter localhost or your TeamCity server name, press advanced and change the port to the port that your TeamCity currently runs under.

Expand Advanced Settings, and Enter the port that TeamCity is running under

5. Press Finish, and press yes when prompted if you want the rewrite rules written for you.

Allow IIS to automatically rewrite the URLs

6. Finally navigate to your TeamCity Installation using a port free url go to administration->Server Configuration and remove the port from the Server Url and your done.

7. If you want to run other websites on this IIS Server you will need to continue onto Part 2- setup filtering so only specific hosts are forwarded onto TeamCity.

Tags: , , ,

Continuous Integration | development | IIS | TeamCity.Net

0

Using MsBuild with TeamCity, (dotnet 3.5). Look Ma no Visual Studio!

by Jon 12. September 2010 01:08

I am currently moving our TeamCity to a different Virtual Server using this post by Mikael Henriksson.  Its is a fresh server install I thought it would be a great excuse to blog the steps you need to take to get MsBuild Working on your TeamCity.  In my previous post I described how to get started with Team City in under 5 Minutes, this short post follows on from that.

MsBuild gives you more flexibility when compiling your projects/solution.  However it isn't especially clear from documentation how you get your server configured to use MSBuild, or even what a basic MsBuild file will look like.  I got there painfully through trial and error, if you want to get up and running with MSBuild in TeamCity without having to install Visual Studio 2008 at all on your server follow the following six steps:

1. Install the MsBuild Community Tasks via the Msi Installer

2. Download an Install Windows SDK for Windows Server 2008 and .NET Framework 3.5 on your server.  During the install you only need to Select the DotNet Development Tools to be installed.

3. Update the Build Targets so you can build the projects you work on your Server.  You need to copy the relevant files from your development machine to your Build Server by updating files in "C:\Program Files (x86)\MSBuild\Microsoft\"

4. Create the SolutionName.msbuild in the root directory of your solution, where SolutionName is the name of your solution.  You will need to update "SolutionName.sln" inside the MsBuild File to point at your solution.

<?xml version="1.0" encoding="utf-8"?> 

<Project DefaultTargets="ReleaseBuild" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> 

<Import Project="$(MSBuildExtensionsPath)\MSBuildCommunityTasks\MSBuild.Community.Tasks.Targets"/> 

    <Target Name="ReleaseBuild"> 

        <Message Text="Building Your Solution"/> 

        <MSBuild Projects="SolutionName.sln" Targets="Rebuild" />

    </Target> 

</Project>

5. Go to your TeamCity and Edit your Build Runner so is is MsBuild, Change your Target to Release Build to Match the Target in the MsBuildFile, and update any command line parameters you may need. I am using an additional commandline parameter /p:OutDir=%teamcity.build.checkoutDir%\target\ which will compile a solution full of separate webapplications to a single target directory.

6. When you are happy you have the MsBuild File and TeamCity Build Runner correctly matching, commit your msbuild file to SVN.  Your Build will be automatically trigggered and MsBuild will be used to compile your solution instead of Visual Studio.  

This should give you alot more flexibility in future.  If this doesn't work for you or if I have made a mistake just leave me a comment and I will improve the post for others in future.

Tags: , ,

ddd | MsBuild | SVN | TeamCity.Net

0

Getting Started with Continuous Integration with TeamCity in under 5 minutes!

by Jon 31. August 2010 22:17

Continuous integration is a way of increasing your productivity by automating the repetitive tasks you perform each day and as a function will improve the quality of the code you check into your source control system. It will give you more free time to develop better code, and will help you constantly improve yourself. If you find yourself doing the same thing day after day as a developer you really start automating those steps.

The good thing is it is really easy to setup a Continuous Integration. Within 5 minutes you could have installed and configured a system that will automatically compiled your code on a server when you perform a check-in and have any problems automatically reported back to you! What are you waiting for:

Make sure you choose a free TCP Port
Make sure you choose a free TCP port

Confirm the url for the Team City Installation has the correct port
Confirm the url for the Team City Installation has the correct port

Start the Services, and start TeamCity
Start the Services, and start TeamCity

Team City Starts
Team City Start

Accept the licence
Accept the licence

Enter an administrators details
Enter an administrators details

Team City is Started, and is prompting you to create a project
Team City is Started

Enter a project name
Enter a project name

Create a Build Configuration Called Build
Create a Build Configuration Called Build

Enter your SVN Settings for the project
Enter your SVN Settings for the project

Test the SVN Connection
Test the SVN Connection

Choose VisualStudio (2005/2008 or 2010) as a Build Runner, and Enter the Solution you want to Build
Choose VisualStudio as a Build Runner, and Enter the Solution you want to Build

Confirm the solution Builds from the Projects Screen, and then edit the Build
Confirm the solution Builds from the Projects Screen, and then edit the Build

Set the build to be automatically triggered when you Commit changes to SVN
Set the build to be automatically triggered when you Commit changes to SVN

and that's it, your Continuous Integration Server is up and running. Every time you commit a code change to SVN your solution will be automatically compiled. The sky is the limit, you can move over to a MSBuild Build Runner, perform automated tests, Generate Documentation, Code Statistics, Build and Install Deployment Packages. I've only just started using CI/TeamCity in my day job but I plan to Blog about my experiences as I implement more features. So far I have moved the office Build over to msBuild, automated developer statistics and RSS feed, and automated deployment to our test server. So expect some Blog entries on this in the coming weeks...

Powered by BlogEngine.NET 2.0.0.36
Original Design by Laptop Geek, Adapted by onesoft, and finally some tiny tweaks by JonAlb