Bitbucket Runners vs. Spot Fleet

0

Hello,

I have attempted to configure Bitbucket Runners by following this article, but I am experiencing an issue which I am unsure is intended or not.

When I run the TF script, AWS creates 3 spot instances based on the launch specification, resulting in the following list:

  1. build-runners-0
  2. build-runners-1
  3. build-runners-2

If I or AWS terminate the instance build-runners-0 (for example), the persistent spot request attempts to fill the empty space with a new instance.

However, sometimes it creates build-runners-0 again, and sometimes it creates build-runners-1 or build-runners-2 instead. This means I no longer have build-runners-0, and instead, I have duplicated build-runners-1 or build-runners-2. This is problematic for Bitbucket because each runner has a different UUID => docker cmd => user_data script. As a result, I have three running ec2 instances, but only one or two running Bitbucket runner(s).

According to the official AWS documentation, the allocation strategy diversified should evenly distribute instances within defined subnets and types. I was expecting that if, for example, the build-runners-0 of type t3.xlarge in subnet A is terminated, the persistent spot request should wait until a t3.xlarge in subnet A is available again. It should NOT create a duplicated instance such as r5.xlarge in subnet B again.

My question is whether this behaviour is expected, which would mean that a fleet cannot be used with different user_data configurations, or if it is unexpected, indicating a bug in the diversified allocation strategy.

I have tried the rest of the allocation strategies as well.

Thank you, Jozef

Jozef
질문됨 일 년 전77회 조회
답변 없음

로그인하지 않았습니다. 로그인해야 답변을 게시할 수 있습니다.

좋은 답변은 질문에 명확하게 답하고 건설적인 피드백을 제공하며 질문자의 전문적인 성장을 장려합니다.

질문 답변하기에 대한 가이드라인

관련 콘텐츠