Thursday 10 December 2015

How to upgrade TeamCity

I’m assuming you have already installed JetBrains TeamCity and you are looking to upgrade an existing installation. You can check what version of TeamCity you are running by looking in the footer of the web interface.

SNAGHTMLa7376f

At the time of writing TeamCity is in version 9.1.4.

So, assuming you don’t have the latest version and need to upgrade let’s press on. Grab the installer from the JetBrains site and follow the steps below.

Step 1 – Backup TeamCity

Make sure that TeamCity is running and access the web user interface. Under Administration – which can be found top-right - choose Backup from the Server Administration section – bottom-left. Select an appropriate Backup scope and click Start Backup.

SNAGHTML9b5d7f

Wait patiently until your backup completes. You can see where TeamCity has put the backup file in the report section at the bottom of the page.

SNAGHTML9eb67e

Step 2 – Install the latest version of TeamCity

Double-click on the installer and follow the wizard.

image

Follow the wizard through. It is very likely you’ll be prompted to uninstall the previous version of TeamCity. I always do so.

image

Uninstall the previous version.

image

Hopefully the previous version will have been uninstalled.

image 

Now we can start installing the new version.

image

Keep running through the wizard. Eventually you’ll be asked to allocate an account to the TeamCity server and the build agent. I always use the system account for each.

image

image

Keep ploughing through the wizard until you hit the final step.

image

Check the “Open TeamCity Web UI after Setup is completed” checkbox and click Finish. The web UI should open for you.

Step 3 – Data upgrade

It is quite possible that when you view the TeamCity web UI you’ll be notified that data upgrade is required.

SNAGHTMLd86cf7

Assuming you are an administrator, click the “I’m a server administrator, show me the details” link. On the page that follows you’ll be prompted for a token that’s in the TeamCity server log. On my system – and I use default TeamCity settings – that’s found in C:\TeamCity\logs and is called teamcity-server.log.

SNAGHTMLdbedb2

Copy the token and paste it into the first on the form before clicking Confirm.

SNAGHTMLd93fc8

On the next form click Upgrade and cross your fingers.

SNAGHTMLdcec46

Hopefully TeamCity will now start.

SNAGHTMLde0910

Once it has started you should be dropped back in the management UI.

SNAGHTMLdf445f

Job done. Congratulate yourself on how awesome you are.

What if it all went wrong?

If you are unlucky enough for there to have been a problem you might have to restore TeamCity from the backup you took at the start of the process.