Saturday, May 19, 2012

Setup TeamCity CI Server Step-by-Step

 

tc

TeamCity is one of the great CI tools out there. It’s pricing is affordable providing different licensing scenarios and being free for small teams with less that 20 build configurations. Clean interface and easy to setup, configure and use, is an excellent option to get your CI process in place without paying expensive fees or requiring expensive dedicated servers and maintenance resources.

I wanted to write a simple step by step guide on how to install TeamCity that you can follow along easily. Hopefully you will find it straight forward and helpful.

Before you start downloading and installing TeamCity, you should first take the time to discuss it in your company with your superiors, tech gurus and team colleagues. Remember that there is never one solution for every scenario, and although TeamCity is a great easy to setup-and-use product, it might not be the best fit for your specific needs. There are several other CI tools out there, so my advise is to first gather your CI requirements and discuss with your team what is the best CI strategy and tools for your particular needs.

If you choose TeamCity as your CI server, welcome on-board!

First, you need to have a server where you can install TeamCity to run the CI builds. Generally this is the same server you use for your development environments. Although it is recommended that you dedicate a server for the CI builds, you will find it quite common to use your development server also for the CI server without issues. 

By this point, you should have also defined your source control (also known as revision control) tools defined and in use. TeamCity plays well with the most popular source control tools such as SVN.

Then, you will need to download the latest TeamCity bits from the JetBrains site.

teamcity_setup_00

teamcity_setup_01

Now that you have your server, source control tools and the TeamCity installer ready, let’s get started with the installation process.

Go ahead and run the TeamCity installer executable. You will be presented with a the license agreement. Read through it and then accept it.

teamcity_setup_03

Next, choose a location for the files.

teamcity_setup_05

Choose the components to install.

teamcity_setup_06

Specify the configuration directory. You can leave the default one.

teamcity_setup_07

Click next and TeamCity will begin the installation.

teamcity_setup_08

Once the installation is about to finish, the wizard will ask you to define the port for the TeamCity web administration interface. It is recommended that you use port 8080 for it.

teamcity_setup_09

Then configure the Build Agent properties.

teamcity_setup_10

When clicking Save, the wizard will display a saving confirmation with the path to the properties file.

teamcity_setup_11

The next step is for you to define the TeamCity service account. Generally you will leave to the default, SYSTEM Account, but you can make it run under a user account too if needed.

teamcity_setup_12

Then select to start the TeamCity services.

teamcity_setup_13

You are done with the installation process.

teamcity_setup_14

If the admin web console doesn’t open automatically, you can start it by opening your browser and going to http://localhost:8080. Your first task is to create the administrator user account.

teamcity_setup_15

Click on the proceed button.

teamcity_setup_16

Rad and accept the agreement.

teamcity_setup_17

Enter the details for the Administrator account. This will be the master admin account for the TeamCity CI server. Make sure to securely save this information and communicate it to your team colleagues that will need access.

teamcity_setup_18

Once you are done, you will be redirected to TeamCity’s main page and you are ready to create your CI builds!

teamcity_setup_20

Congratulations! You have installed your TeamCity CI server and you are ready to implement your CI Builds and practices on your development process. Make sure to check TeamCity’s documentation, installation reference, general CI topics and CI common practices.

I’ll hopefully publish a few posts on build configuration techniques, but please leave me a comment if you are interested in more advance TeamCity build configuration topics.

1 comment:

  1. Hi,
    Nice article for a newb like me :P
    I am trying to create an CI environment with SVN, TeamCity and for Asp.Net.
    Can you please help me out with step step kinda thing to set the environment up ?

    Thanks a lot

    ReplyDelete