The official TeamCity Azure Resource Manager template

We are happy to announce the Azure Resource Manager template for TeamCity. You can now deploy TeamCity to Azure cloud services and save time on configuration tasks. Get ready to start using TeamCity in several minutes!

teamcity_azure

Deploy TeamCity to Azure Cloud Services

The template performs the following tasks:

  • Setting up of an external database
  • Creating a virtual machine for the TeamCity server
  • Configuring the TeamCity server machine
  • Installing the TeamCity server
  • Installing a TeamCity build agent

Depending on your team size, you can select the appropriate TeamCity installation size for evaluation or production usage:

  • Small – suitable for small teams, typically 3 users, 100 builds/day.
  • Medium – suitable for medium sized teams, typically 5 users, 300 builds/day.
  • Large – is intended for large teams, typically 20 users, 1000 builds/day.

To get started, perform the following steps:

  • Specify the resource group name
  • Enter a public SSH key for the TeamCity server machine
  • Enter a password for the database
  • Click Purchase.

azure-template-deployment

Wait for about 10 minutes and you will be able to navigate to the TeamCity URL received from the template outputs:

azure-template-outputs

After opening the TeamCity page, you’ll need to accept the license agreement and set the root account credentials. Now you are ready to use TeamCity.

Configure additional Azure integrations

Your TeamCity server comes with preinstalled plugins which can be used to configure tighter integration with Azure services:

How it works

During the deployment process, the service allocates a Linux virtual machine. The VM is powered by CoreOS with Docker support enabled. It exposes port 80 for the web access and 22 for maintenance in the network security group, so you’ll be able to connect to it via SSH.

Configuration and data files are stored on the disk attached to this VM. The TeamCity server and build agent are started from the official Docker images.

An instance of the Azure database for MySQL is created with the teamcitydb schema. Network security rules are set to make the database accessible from the TeamCity server machine.

In the virtual machine, the TeamCity operation is controlled by the following systemd services:

  • teamcity-server.service controls the lifecycle of TeamCity server
  • teamcity-agent.service controls the lifecycle of TeamCity build agent
  • teamcity-update.service handles the TeamCity updates.

TeamCity upgrade

When a TeamCity VM is created, it has a teamcity-version tag. By updating its value, you can control the current version of the TeamCity server and build agent. After the update, you need to restart the VM entirely or restart the server and agent services via the following commands:

> sudo systemctl restart teamcity-server.service
> sudo systemctl restart teamcity-agent.service

Note: The update could take a few minutes to pull the new version of TeamCity Docker images.

How to diagnose problems

You can connect to the VM and use default systemd tools to control TeamCity services. For instance, during the upgrade you can view the server log using the following command:

> sudo systemctl status teamcity-server.service

Feedback

Please feel free to leave a comment to this post or file an issue in the TeamCity issue tracker.

Run TeamCity on Azure

Happy building in Azure Cloud!

This entry was posted in Features, FYI, News & Events. Bookmark the permalink.

7 Responses to The official TeamCity Azure Resource Manager template

  1. Eros Stein says:

    I can’t quite understand the process. It’s requesting for the SSH Key Data on the template but as far as I understand that key can only be generated after its creation. I’m using the azure template. Am I doing something wrong or is it the process? Thanks

    • Dmitry Tretyakov says:

      The public ssh key is required to setup access for virtual machine where TeamCity is placed. By leveraging private ssh key you will be able to establish ssh connection to it, so it could be considered as a “password” for VM. That’s why it is required to generate SSH key on your machine to specify public ssh key while TeamCity deployment.

  2. Nikolay says:

    I have AzurePack (standalone azure installation by msft) in my company. Can i use this ARM integration with my AzurePack or it’s available only for original Azure Cloud?

    • Dmitry Tretyakov says:

      The problem is that Azure Pack does not include marketplace images. In this template as a base image used CoreOS, so if you could make it available in your Azure Pack and then tune image reference in the template it seems that you will be able to use this template for TeamCity deployment.

Leave a Reply

Your email address will not be published. Required fields are marked *