Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ec2_asg: add support for Spot allocation #418

Closed
wants to merge 1 commit into from

Conversation

s19n
Copy link

@s19n s19n commented Feb 16, 2021

SUMMARY

This should allow to create an AutoScalingGroup with 100% spot allocation.

ISSUE TYPE
  • Feature Pull Request
COMPONENT NAME

ec2_asg

ADDITIONAL INFORMATION

Very quick and dirty.

@ansibullbot
Copy link

@ansibullbot ansibullbot added community_review feature This issue/PR relates to a feature request module module needs_triage new_contributor Help guide this first time contributor plugins plugin (any type) labels Feb 16, 2021
@s19n s19n changed the title Add support for Spot allocation ec2_asg: add support for Spot allocation Feb 16, 2021
@ansibullbot ansibullbot added needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR and removed community_review labels Apr 12, 2021
Copy link
Contributor

@tremble tremble left a comment

Choose a reason for hiding this comment

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

Thanks for taking the time to open this PR. I'm sorry it's taken a while to get this reviewed

A couple of minor comments inline.

Additionally:

@@ -1661,6 +1677,8 @@ def main():
type='list',
elements='str'
),
ondemand_percentage_above_base=dict(type='int'),
ondemand_base=dict(type='int')
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
ondemand_base=dict(type='int')
ondemand_base=dict(type='int'),

By leaving the comma at the end it simplifies patches for future features (they don't need to change this line, they just add the next one). Which then helps if you ever need to use git blame

@@ -93,6 +93,14 @@
- A list of instance_types.
type: list
elements: str
ondemand_base:
description:
- the minimum amount of capacity that must be fulfilled by On-Demand instances
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- the minimum amount of capacity that must be fulfilled by On-Demand instances
- "A baseline of the ASG's capacity which will be fulfilled using only on-demand instances."

type: int
ondemand_percentage_above_base:
description:
- percentages of on-demand instances beyond OnDemandBaseCapacity
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
- percentages of on-demand instances beyond OnDemandBaseCapacity
- Defines the percentage of Instances above I(ondemand_base) which will be provisioned using on-demand Instances.
- The first I(ondemand_base) instances will be provisioned using on-demand instances.
- Capacity above I(ondemand_base) will be split between on-demand- and spot- instances based upon I(ondemand_percentage_above_base).

@gravesm gravesm added waiting_on_contributor Needs help. Feel free to engage to get things unblocked and removed needs_triage labels Apr 14, 2021
@markuman markuman mentioned this pull request Feb 1, 2022
1 task
@mandar242
Copy link
Contributor

This functionality seem to be already added and supported in the current ec2_asg module by #232.

@mandar242 mandar242 closed this Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature This issue/PR relates to a feature request module module needs_rebase https://docs.ansible.com/ansible/devel/dev_guide/developing_rebasing.html needs_revision This PR fails CI tests or a maintainer has requested a review/revision of the PR new_contributor Help guide this first time contributor plugins plugin (any type) waiting_on_contributor Needs help. Feel free to engage to get things unblocked
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants