TeamCity Support for AWS EC2 Container Service
TeamCity has been able to run build agents on AWS EC2 instances for ages.
Next, create a cloud profile in your project
Specify the AWS region and enter credentials to access AWS API and test your connection.
To make the plugin work, the provided credentials need the IAM role with the following permissions granted:
Finally, create a cloud image which will correspond to the build agent configuration you need by specifying the task definition, cluster to run build agent tasks, and agent pool for your agents.
In contrast to using EC2 as a cloud provider (which allows using almost infinite computation resources with no additional configuration required), using the TeamCity ECS plugin in production requires the ECS cluster to be configured properly.
The following aspects should be considered:
- Cluster capacity (cpu, disk)
- Cluster scale in and scale out
- Build agent logs collecting
Even when configured properly, the ECS cluster will likely be limited in terms of available resources. So, when TeamCity tries to start one more cloud build agent in the cluster, there might be no CPU or RAM available. You can specify the “Max cluster CPU reservation” percentile in the cloud image to make TeamCity stop running new cloud agents when the CPU reservation limit is reached. This requires the additional AIM role: cloudwatch:GetMetricStatistics.
Happy building with TeamCity!
Subscribe to Blog updates
Thanks, we've got you!
Introducing AWS Connection: A New Approach for Working With AWS in TeamCity
We’ve introduced a new feature called the AWS Connection, which makes it possible to work with AWS credentials more flexibly and safely.
TeamCity 2022.10: Sakura UI, Improved Integration With Amazon AWS, Out-of-the-Box HTTPS Support, Google OAuth Authentication, and More.
TeamCity 2022.10 comes with the Sakura UI enabled by default, introduces many cloud-related features including the AWS credentials management system and out-of-the-box terminal access to AWS EC2-based build agents, and adds important improvements to VCS integrations. Server administrators will love the new streamlined way to implement HTTPS for on-premises TeamCity installations. Also, a new authentication module for using Google accounts and a number of long-requested features have been implemented.
Transition to native Git in TeamCity 2022.04 brings 10x fetch time reduction to IntelliJ Platform
Starting from version 2022.04, TeamCity switched to native Git on the server side for Git VCS connections. The switch should positively impact both performance and overall experience of working with Git repositories on the TeamCity server side.In this blog post, we’ll talk about the reasons for the …
TeamCity 2022.04: Parallel Tests, Improved Integration with Amazon AWS, Built-in Code Quality Analysis, Updated VCS Integrations, and more
TeamCity 2022.04 introduces the new Parallel Tests feature that delivers an extraordinary speed boost when testing your projects. New powerful code analysis features will cut the time you spend on code reviews and increase the maintainability of your projects. Users who run their builds in the cloud…