Agent Requirements: Wait for available Build Toolchain License

Hi,

I am wondering how to solve this:

I have TeamCity on premise with a virtual machine (VM) for the server and another VM for the build agent. 

The build agent VM has installed:
- Build Agent 1 running as BuildAgent1 service under User Account 1
- Build Agent 2 running as BuildAgent2 service under User Account 2
- Build Toolchain 1 without license restrictions
- Build Toolchain 2 with 1 license linked and dedicated to the machine
- Build Toolchain 3 with 6 network licenses shared with developers

I have:

- Project 1 built with Build Toolchain 1
- Project 2 built with Build Toolchain 1
- Project 3 built with Build Toolchain 2
- Project 4 built with Build Toolchain 2
- Project 5 built with Build Toolchain 3
- Project 6 built with Build Toolchain 3

Both Build Agents can build all projects. I would like to keep it like that for flexibility reasons.

What is possible?

1) Project 1 and Project 2 can be built concurrently, since there are no license restrictions.
2) Project 3 and Project 4 can be built only one at a time, since there is only one Toolchain license.
3) Project 5 and Project 6 can either not be built at all or one at a time or concurrently depending on the number of available network licenses.

I wouldn't like to see the build fail due to unavailable toolchain licenses.

reg. 2) How can I prevent that an agent processes the build if another build with the same toolchain is currently running? This can easily happen and has the highest priority for me.

reg. 3) In this case I assume a way to check for available network licenses before starting the build is required. This of course depends on the licensing tool of the Build Toolchain 3. Running out of available licenses in this case is relatively unlikely.

The "Maximum Agents" setting in the Agent Pool doesn't seem a way to solve 2). 

Currently I have both Agents and all Projects in the same Pool.

Any ideas? Do I oversee something?

Best regards,
Ralph

0
2 comments

Hello Ralph,

This sounds like a case for Shared Resources feature. It allows you to define a virtual resource which may then be consumed and released by the builds - for example, you could have this feature enabled for all builds that use toolchain 2 so that only one build using this toolchain runs at a time. (Perhaps you would also prefer to isolate the actual toolchain execution into a separate build, so that the other steps may still run concurrently.)

For the network licenses, this is more tricky since there is no way to control the resource usage with external entities using the same resource out of the build context at the moment. This feature request is semi-related; please consider voting and/or commenting on it as you see fit.

0

Hi Fedor,

thank you for the useful hint. I have never taken notice of this feature before. It sounds like case 2) can be solved with that.

Best regards,
Ralph

0

Please sign in to leave a comment.