It's a snap!
If you have decided to install your own instance of TeamCity, then it is your responsibility to ensure that it is kept up to date. JetBrains have a fairly aggressive release cadence, with updates coming out every couple of months. This is great, as you get a host of new features and bug fixes on a regular basis.
When performing an upgrade, the most important thing to do is to back up the database and configuration settings. Luckily, this is a built-in process within the administration section of TeamCity.
This blog post steps through the full upgrade process.
**NOTE: **The following installation steps and screenshots were taken from a virtual machine with Windows Server 2008 R2 Service Pack 1, running in Hyper-V on a Windows 8 Host Machine.
These instructions are specific to version 7.1.3 of TeamCity, however, later versions will likely follow very similar steps. In addition, these installation instructions will install both the TeamCity Server and Build Agent onto the same machine. Ideally, you would want to have a separate Build Agent Machine.
You can see screenshots of each of these steps in the galley at the bottom of this blog post.
- Assumption is that you already have TeamCity installed (otherwise, why would you be looking to upgrade it :-)
- Assumption is that you have already downloaded the new version of TeamCity, in this case 7.1.4.
- Log into TeamCity using an account that has Administrator privileges
- Click on the Backup link near the bottom left hand corner
- When the Run Backup Tab opens, click on "Start Backup"
- The backup should complete successfully
- Double Click the installation *.exe which was downloaded in Step 2 above
- At the first step in the installation wizard simply click Next
- Read the License Agreement and assuming you are happy with it, click “I Agree”
- In the “Choose Install Location” window, assuming you are happy with the default installation folder, simply click Next, otherwise change it first
- In order to install the latest version of TeamCity, you have to first uninstall the current version. Click "Next"
- On this screen simply click Next once the current installation has been located
- Typically, since you are doing an upgrade, you want to keep both the build configuration and working directory, but the log files can be removed. Click Uninstall
- The un-installation will continue
- After a short period, the un-installation will complete
- In the “Choose Components” window choose the components that you want to install. As already mentioned, we will be installing both the Server and Build Agent on one server. Click Next
- In the “Specify server configuration directory” window assuming you are happy with the default location click Next, otherwise change it first
- The main portion of the installation will start now
- The “Configure Build Agent Properties” window will then open, giving you the opportunity to add/edit build agent properties. For now, you can leave this as the default. If needed, this can be changed later. Click Save.
- Simply click OK on the “TeamCity Build Agent Properties” pop-up
- In the “Select Service Account for Server” window decide what user account you want to run the TeamCity Server, I chose to use the SYSTEM account. Click Next
- In the “Select Service Account for Agent” window decide what user account you want to run the TeamCity Build Agent, I chose to use the SYSTEM account. Click Next
- In the “Services” window, choose to start both the Server and Build Agent Services, and click Next
- In the final screen, ensure that the option to open TeamCity Website after exit is checked and click Finish.
- A web page will open saying “TeamCity is starting”
- The login screen will then be presented
- On logging in, you will see the latest version number displayed