Cloud profile terminate instance to start a new one

We have a cloud profile with 2 images in it using vSphere integration.

Most of our builds can be done on the first image and we have a few builds that require the second image. Ideally we'd like to make as much use as possible of our 5 licences so have set the maximum instance count to 5.

The problem here is that if 5 instances of the first image start up then it seems like until we hit the idle timeout teamcity wont terminate any idle instances so that it can start up the other image to complete the other builds. Ideally we'd like to make use of the idle timeout as there are various caches that get populated that would need to be restored each time we spin up a new image so keeping them as long lived as possible is ideal.

Is there a way to get teamcity to terminate say the oldest idle (but potentially hasn't hit the idle timeout) instance if there is another build that requires a different image?

1 comment

Hi Daniel,

 

This feature isn't available right now. What would make the most sense in your scenario would be to have instances that can be started/stopped instead of having images that spawn fresh instances every time. If you need to keep a cache in there, that makes more sense than having the images spawn fresh every time. You can then set them to just start up and finish after the build, instead of having to keep them alive.

0

Please sign in to leave a comment.