Skip to content

feat(stack): add spot instance support via MixedInstancesPolicy#184

Merged
hamir-suspect merged 2 commits intorenderedtext:masterfrom
Yashprime1:support-spot-configuration
Nov 19, 2025
Merged

feat(stack): add spot instance support via MixedInstancesPolicy#184
hamir-suspect merged 2 commits intorenderedtext:masterfrom
Yashprime1:support-spot-configuration

Conversation

@Yashprime1
Copy link
Copy Markdown
Contributor

Add support for EC2 Spot instances in the Auto Scaling Group using MixedInstancesPolicy. This allows users to configure spot instance allocation strategy and on-demand capacity settings.

New environment variables:

  • SEMAPHORE_AGENT_ON_DEMAND_BASE_CAPACITY: Minimum on-demand instances (default: 0)
  • SEMAPHORE_AGENT_ON_DEMAND_PERCENTAGE_ABOVE_BASE: Percentage of on-demand instances above base capacity (default: 100)
  • SEMAPHORE_AGENT_SPOT_ALLOCATION_STRATEGY: Spot allocation strategy (optional, e.g., 'price-capacity-optimized')

The Auto Scaling Group now uses MixedInstancesPolicy instead of a simple launch template, enabling spot instance support while maintaining backward compatibility with existing configurations.

@Yashprime1
Copy link
Copy Markdown
Contributor Author

I have raised a support issue for this - https://support.semaphoreci.com/hc/en-us/requests/14811
for the conversation related to this new feature that we requested. And also these are supporting screenshots which I have tested with the forked repo -

Screenshot 2025-11-06 at 3 35 52 PM Screenshot 2025-11-06 at 3 35 42 PM

please do let me know if any more info is needed over here?

@dexyk
Copy link
Copy Markdown
Contributor

dexyk commented Nov 10, 2025

@Yashprime1 thanks a lot for the PR! 👍 Before we can merge, please sign your commits (we require signed commits for all contributions). Once they’re signed, just push again and we’ll review. Thanks!

Add support for EC2 Spot instances in the Auto Scaling Group using
MixedInstancesPolicy. This allows users to configure spot instance
allocation strategy and on-demand capacity settings.

New environment variables:
- SEMAPHORE_AGENT_ON_DEMAND_BASE_CAPACITY: Minimum on-demand instances (default: 0)
- SEMAPHORE_AGENT_ON_DEMAND_PERCENTAGE_ABOVE_BASE: Percentage of on-demand
  instances above base capacity (default: 100)
- SEMAPHORE_AGENT_SPOT_ALLOCATION_STRATEGY: Spot allocation strategy
  (optional, e.g., 'price-capacity-optimized')

The Auto Scaling Group now uses MixedInstancesPolicy instead of a simple
launch template, enabling spot instance support while maintaining backward
compatibility with existing configurations.

Signed-off-by: yashdeep <yashdeep@clevertap.com>
…mbers

Signed-off-by: yashdeep <yashdeep@clevertap.com>
@Yashprime1 Yashprime1 force-pushed the support-spot-configuration branch from 5af3b0a to 26b0a75 Compare November 12, 2025 18:05
@Yashprime1
Copy link
Copy Markdown
Contributor Author

@Yashprime1 thanks a lot for the PR! 👍 Before we can merge, please sign your commits (we require signed commits for all contributions). Once they’re signed, just push again and we’ll review. Thanks!

@dexyk done signed please review now?

@dexyk
Copy link
Copy Markdown
Contributor

dexyk commented Nov 12, 2025

/sem-approve

@Yashprime1
Copy link
Copy Markdown
Contributor Author

@dexyk can you please help? I am unable to see the test results, but can you confirm since I could see all test cases passing in the GitHub check status here

Copy link
Copy Markdown
Contributor

@hamir-suspect hamir-suspect left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hey @Yashprime1 thanks for the PR, looks good, I'll merge this and create a new release so you can start using it.

@hamir-suspect hamir-suspect merged commit 5c89695 into renderedtext:master Nov 19, 2025
1 check passed
@Yashprime1
Copy link
Copy Markdown
Contributor Author

hey @Yashprime1 thanks for the PR, looks good, I'll merge this and create a new release so you can start using it.

Thanks @hamir-suspect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants