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. Profiles allow TeamCity to automatically scale the number of active build agents depending on the current workload.
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.
tip
If you use Kotlin DSL for your TeamCity project settings, you need to update your DSL after upgrading as described here.
To configure a cloud profile, go to Administration | Project | Cloud Profiles. A cloud profile stores such settings as:
Credentials required to connect to a cloud provider.
The maximum number of simultaneously active cloud agents.
Conditions that specify when active agents should be terminated or stopped.
TeamCity server URL that should be passed to new cloud agents when they start.
For each cloud profile, create one or more cloud image. Images store such settings as:
An ID of a cloud instance to start or instance image to use.
The container image to pull when an instance/node starts.
Post-launch scripts.
An agent pool that should own cloud agents spawned from this image.
note
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 (or if this field is blank), TeamCity will automatically assign the cloud agents to the project pool.
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.
When a build is queued, TeamCity attempts to run queued builds on regular (non-cloud) agents first. If none are currently available, TeamCity finds a compatible cloud image and (if the limit of simultaneously running instances is not yet reached) starts a new cloud instance.
TeamCity supports integration with the following cloud providers:
- Amazon EC2
TeamCity can manage static EC2 instances, start and terminate instances from a machine image (AMI), and request Spot Fleet instances.
- Kubernetes
TeamCity supports all types of Kubernetes clusters: hosting service (such as GKE from Google Cloud or Amazon EKS), self-hosted cloud clusters, and bare metal servers.
- VMware vSphere and vCenter
TeamCity can start and stop TeamCity agents installed on VMware virtual machines.
Common Information | Setting Up TeamCity for VMware vSphere and vCenter
- Microsoft Azure
TeamCity supports both Azure Classic and Azure Resource Manager deployment models via external plugins.
A cloud profile configured in a project is available for all subprojects as well. That is, if you configure a profile in the <Root project>, all TeamCity projects will be able to start new cloud agents.
You can prevent all or individual subprojects from using cloud profiles inherited from a parent project. To do this, go to Administration | Project | Cloud profiles and click Change cloud integration status.
For a parent project: uncheck Enable cloud integration in subprojects.
For a child a subproject: uncheck Enable cloud integration in this project.
Instead of setting up and maintaining your own build agents, you can delegate this task to an external orchestrator. Currently, only Kubernetes clusters are supported. See this article for more information: Executor Mode: Agentless Kubernetes Integration.
Thanks for your feedback!