2i2c-org / infrastructure

Infrastructure for configuring and deploying our community JupyterHubs.
https://infrastructure.2i2c.org
BSD 3-Clause "New" or "Revised" License
103 stars 63 forks source link

[Spike] Investigate if GCP billing alerting can consider credits as well (refinement needed) #4352

Closed consideRatio closed 3 months ago

consideRatio commented 3 months ago

I believe LEAP relies on GCP credits, and I think that could explain the zero value reported in the comment below:

https://github.com/2i2c-org/infrastructure/blob/2d542b9e53bbd733fcc5a49925572b78ee1e93ea/terraform/gcp/projects/leap.tfvars#L7-L11

But independent if communities use credits or dollars to pay their bills, this functionality is relevant.

I think it could make sense to spike an investigation if it can be adjusted to work with the combination of credits and dollars instead of just dollars.

Independently of alerting related to credits+dollar consumption, alerting if any dollar is expected to be charged would also a relevant alert.


@yuvipanda I consider this a draft task in need of further refinment.

consideRatio commented 3 months ago

This is a relevant question to think about for AWS budget alerts as well, where I've seen a differentiator between "cost" and "usage" when configuring a budget

yuvipanda commented 3 months ago

Since the overall current goal is to focus on places where we are 'passing through' cost (aka, paying for it ourselves and then billing for it), I'd say projects like LEAP are out of scope for this epic, and should not have alerts coming to us. So the focus should be on 'what $$$ will go out of 2i2c\'s credit card' (for this EPIC).

Does that match what the current code does?

sgibson91 commented 3 months ago

Does that match what the current code does?

Ah, I might've turned it on for linked-earths and the new awi-ciroh project. I just systematically went through them all.

yuvipanda commented 3 months ago

I've opened https://github.com/2i2c-org/meta/issues/1257 to scope what this should be for this current epic. I've added that task to the refined column, and I am going to close this one for now. We should consider some alerting for community managed cloud provider accounts, but that needs input from communities first and we don't have that yet.

Thanks for noticing and bringing this up, @consideRatio!

consideRatio commented 2 months ago

image

I ended up learning about this while doing https://github.com/2i2c-org/meta/issues/1277, and it seems that when setting things up one can checkbox credits or not.