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

Cluster graviton savings to non-graviton instances #852

Merged
merged 2 commits into from
Oct 10, 2024

Conversation

athiruma
Copy link
Collaborator

@athiruma athiruma commented Oct 9, 2024

Type of change

Note: Fill x in []

  • bug
  • enhancement
  • documentation
  • dependencies
    Added the Gravtion savings, if the cluster is running the non-gravitation instances.

Description

For security reasons, all pull requests need to be approved first before running any automated CI

@athiruma athiruma added enhancement New feature or request ok-to-test PR ok to test labels Oct 9, 2024
@athiruma athiruma requested a review from ebattat October 9, 2024 12:37
@athiruma athiruma self-assigned this Oct 9, 2024
@@ -21,3 +21,31 @@
EC2_NAMESPACE = 'AWS/EC2'
CLOUDWATCH_METRICS_AVAILABLE_DAYS = 14
AWS_DEFAULT_GLOBAL_REGION = 'us-east-1'

Copy link
Collaborator

Choose a reason for hiding this comment

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

can we fetch it from AWS automatically and not use it manually ?

@@ -54,6 +56,8 @@ def run_policy_operations(self):
else:
running_instances = 1
creation_date = ''
rosa_cluster = True if self.get_tag_name_from_tags(tags=tags, tag_name='red-hat-managed') else False
using_graviton = True if '.g' in instance.get('InstanceType') else False
Copy link
Collaborator

Choose a reason for hiding this comment

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

a1 is also graviton, is it good for cluster ?

@athiruma athiruma force-pushed the cluster_graviton_savings branch 3 times, most recently from 32692de to 27fd96d Compare October 9, 2024 14:00
cloud_governance/common/utils/configs.py Show resolved Hide resolved
cloud_governance/policy/aws/monitor/cluster_run.py Outdated Show resolved Hide resolved
instance_types_count = instance_types.count(instance_type)
unit_price = self._resource_pricing.get_ec2_price(region_name=self._region,
instance_type=instance_type)
total_cost += unit_price * 24 * running_hours * instance_types_count
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

unit_price * running_hours * instance_types_count

cloud_governance/policy/aws/monitor/cluster_run.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@ebattat ebattat left a comment

Choose a reason for hiding this comment

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

/LGTM

@ebattat ebattat merged commit dbb2801 into redhat-performance:main Oct 10, 2024
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request ok-to-test PR ok to test
Projects
Development

Successfully merging this pull request may close these issues.

2 participants