Agent Cloud Profile
A cloud profile is a collection of settings for TeamCity to start virtual machines with installed TeamCity agents on-demand while distributing a build queue. Configuring a cloud provider profile is one of the steps required to enable agent cloud integration between TeamCity and a cloud provider. The settings of profiles slightly vary depending on the cloud type.
Configuring Cloud Profile
Prior to TeamCity 2017.1, profiles are configured on the TeamCity | Administration | Agent Cloud page. In the later versions, cloud profiles are configured in the "Cloud Profiles" section of the project settings allowing Project administrators to configure their own cloud profiles without bothering System administrators.
Specifying profile settings
The following profile settings have to be provided:
Provide a name for the profile
Provide an optional profile description.
Select the cloud provider type from the drop-down
This is the URL that the agents cloned from the image will use to connect to the TeamCity server. This URL has to be available from the build agent machine. By default, the TeamCity server URL specified on the Global Settings page of the Administration UI is used. A custom URL can be specified.
Instruct TeamCity to stop a cloud agent machine using this setting and the options below. Here specify the period (in minutes) for TeamCity to wait before stopping an idle build agent. More than one build may run on the same virtual machine. Leave empty to have no timeout.
Additional terminate conditions
Next, you need to provide the cloud access information which will differ depending on the provider. After that, you check the connection and add an image to be used as a source for TeamCity cloud agents.
Adding Agent Image
You need to configure the required options for the image.
Using the maximum instances number settings, you can limit the number of instances across all images (in the cloud profile) and /or set the limit per image (in image settings).
When configuring the image, it is possible to specify which agent pool the agents should belong to. It is possible if the pool contains this project and/or its subprojects only. Pools containing projects other than the current one and its subprojects will not be available for assignment. If the assigned pool is changed in future so that the criteria are not met or if the agent pool is not specified, the cloud agents will be assigned to a special read-only pool containing only this project and its subprojects. The idea is to restrict the cloud agents pool only to a given project with its subprojects to track cloud costs by project.
After an Agent Cloud profile is created with one or several sources for virtual machines, TeamCity does a test start for all the virtual machines specified in the profile to learn about the agents configured on them. Once agents are connected, TeamCity calculates their build configurations-to-agents compatibility and stores this information.
When a cloud profile is changed, TeamCity detects modifications immediately and forces shutdown of the agents started prior to these changes once the agents finish the current build.
Viewing Cloud Agent Information
The agents' information is displayed on the Agents | Cloud page under the <Profile name> drop-down.
Enabling/disabling Cloud Integration in Project
You can enable or disable integration for a project and/or its subprojects via the TeamCity web UI using the Change cloud integration status option on the Cloud profiles page.