Here are the requirements for an image that can be used for TeamCity cloud integration: Preparing Image with Installed TeamCity Agent View information on example policies for Linux and Windows on the Amazon website. See the section below for permissions to set IAM roles on an agent instance. To use encrypted EBS volumes, the following additional permissions are required:Īn example of custom IAM policy definition (allows all EC2 operations from a specified IP address): To launch an instance with the IAM Role (applicable to instances cloned from AMIs and launch templates), the following additional permissions are required: To use spot fleets, the following additional permissions are required: To use spot instances, grant the following permissions in addition to those listed above: TeamCity requires the following permissions for Amazon EC2 Resources: Make sure the server URL specified on the Administration | Global Settings page is correct since agents will use it to connect to the server, if a custom server URL is not specified in the cloud profile settings. Note that the number of EC2 agents is limited by the total number of agent licenses you have in TeamCity. Preparing an Amazon EC2 image (AMI) with an installed TeamCity agentĬonfiguring EC2 integration on TeamCity server Understanding Amazon EC2 and ability to perform EC2 tasks is a prerequisite for configuring and using TeamCity Amazon EC2 integration. TeamCity supports Amazon EC2 spot instances and spot fleets. On the instance terminating/stopping, its disconnected agent is removed from the authorized agents list and is deleted from the system. If running timeout is configured on the cloud profile and it is reached, the instance is terminated (or stopped, if an existing Amazon instance has been selected as an image source). After that, the agent is processed as a regular agent. Once an agent is connected from a cloud instance started by TeamCity, it is automatically authorized (provided there are available agent licenses). TeamCity ensures that the running instances limit configured in the cloud profile is not exceeded. If there are no usual agents available, TeamCity finds a matching cloud image with a compatible agent and starts a new instance for the image. Once the agents are connected, TeamCity stores their parameters to be able to process the build configurations-to-agents compatibility correctly.įor each queued build, TeamCity first tries to start it on one of the regular, non-cloud agents. Once a cloud profile is configured in TeamCity with one or several images, TeamCity does a test start for all the new images to learn about the agents on them. It is assumed that the machine images are preconfigured to start TeamCity agent on boot (see details below). Integrations with other cloud solutions are available. TeamCity Amazon EC2 integration allows you to configure TeamCity with your Amazon account and then start and stop images with TeamCity agents on-demand based on the queued builds.
0 Comments
Leave a Reply. |