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
Cloud profiles are configured in the Cloud Profiles section of the Project Settings.
Specifying Profile Settings
The following profile settings have to be provided:
Setting | Description |
---|---|
Profile name | Provide a name for the profile. |
Description | Provide an optional profile description. |
Cloud type | Select the cloud provider type from the drop-down menu. |
Server URL | The URL that the agents cloned from the image will use to connect to the TeamCity server. This URL must be available from the build agent machine. |
Terminate instance idle time | Instruct TeamCity to stop a cloud agent machine using this setting and the Additional terminate conditions options. Specify the period (in minutes) for TeamCity to wait before stopping an idle build agent. When a cloud agent is in maintenance mode, terminate conditions will not work. When you enable the cloud agent again, the settings will be applied. |
Additional terminate conditions |
|
Next, you need to provide the cloud access information which will differ depending on the provider. After that, you can check the connection and add an image to be used as a source for TeamCity cloud agents.
You can limit the number of instances across all images in the cloud profile (Maximum instances count) and/or set the limit per image (in image settings).
Adding Agent Image
Click Add Image and configure the required options for the image.
You can specify which agent pool the agents should belong to. You can only select the pool that contains the current project and/or its subprojects. Pools containing projects other than the current one and its subprojects will not be available for assignment. If the selected agent pool is changed in the future so that the criteria are not met or if the agent pool is not specified, TeamCity will automatically assign the cloud agents to the project pool. You can also select the <Project pool> in the drop-down menu manually.
TeamCity automatically composes the project pool containing agents from all cloud profiles of the current project and all its subprojects. Thus, the added image will be available to all the subprojects as well. On the Agents | Pools page, this pool is marked as "<Project name> project pool". Project pools cannot be deleted or modified.
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 menu.
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.