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

Add commands to generate cost of each GCP project #1947

Merged
merged 29 commits into from
Mar 30, 2023

Conversation

yuvipanda
Copy link
Member

@yuvipanda yuvipanda commented Nov 23, 2022

Fixes #1921

Things left to do:

  • Document, step by step, how to ensure that every new project has proper billing info set up
  • Document how the generator script can be run
  • Document who should have access to this google sheet

@github-actions
Copy link

github-actions bot commented Nov 24, 2022

Merging this PR will trigger the following deployment actions.

Support and Staging deployments

Cloud Provider Cluster Name Upgrade Support? Reason for Support Redeploy Upgrade Staging? Reason for Staging Redeploy
gcp callysto No Yes Core infrastructure has been modified
gcp 2i2c No Yes Core infrastructure has been modified
gcp cloudbank No Yes Core infrastructure has been modified
aws 2i2c-aws-us No Yes Core infrastructure has been modified
aws openscapes No Yes Core infrastructure has been modified
aws nasa-veda No Yes Core infrastructure has been modified
aws gridsst No Yes Core infrastructure has been modified
gcp pangeo-hubs No Yes Core infrastructure has been modified
gcp linked-earth No Yes Core infrastructure has been modified
gcp meom-ige No Yes Core infrastructure has been modified
kubeconfig utoronto No Yes Core infrastructure has been modified
aws carbonplan No Yes Core infrastructure has been modified
gcp m2lines No Yes Core infrastructure has been modified
aws victor No Yes Core infrastructure has been modified
gcp leap No Yes Core infrastructure has been modified
gcp awi-ciroh No Yes Core infrastructure has been modified
gcp qcl No Yes Core infrastructure has been modified
gcp 2i2c-uk No Yes Core infrastructure has been modified
aws ubc-eoas No Yes Core infrastructure has been modified
aws nasa-cryo No Yes Core infrastructure has been modified

Production deployments

Cloud Provider Cluster Name Hub Name Reason for Redeploy
gcp callysto prod Core infrastructure has been modified
gcp 2i2c demo Core infrastructure has been modified
gcp 2i2c ohw Core infrastructure has been modified
gcp 2i2c pfw Core infrastructure has been modified
gcp 2i2c peddie Core infrastructure has been modified
gcp 2i2c catalyst-cooperative Core infrastructure has been modified
gcp 2i2c earthlab Core infrastructure has been modified
gcp 2i2c paleohack2021 Core infrastructure has been modified
gcp 2i2c aup Core infrastructure has been modified
gcp 2i2c temple Core infrastructure has been modified
gcp 2i2c ucmerced Core infrastructure has been modified
gcp 2i2c cosmicds Core infrastructure has been modified
gcp cloudbank ccsf Core infrastructure has been modified
gcp cloudbank csm Core infrastructure has been modified
gcp cloudbank elcamino Core infrastructure has been modified
gcp cloudbank glendale Core infrastructure has been modified
gcp cloudbank howard Core infrastructure has been modified
gcp cloudbank miracosta Core infrastructure has been modified
gcp cloudbank skyline Core infrastructure has been modified
gcp cloudbank demo Core infrastructure has been modified
gcp cloudbank fresno Core infrastructure has been modified
gcp cloudbank laney Core infrastructure has been modified
gcp cloudbank lassen Core infrastructure has been modified
gcp cloudbank sbcc Core infrastructure has been modified
gcp cloudbank lacc Core infrastructure has been modified
gcp cloudbank mills Core infrastructure has been modified
gcp cloudbank palomar Core infrastructure has been modified
gcp cloudbank pasadena Core infrastructure has been modified
gcp cloudbank sjcc Core infrastructure has been modified
gcp cloudbank tuskegee Core infrastructure has been modified
gcp cloudbank avc Core infrastructure has been modified
gcp cloudbank csu Core infrastructure has been modified
aws 2i2c-aws-us researchdelight Core infrastructure has been modified
aws openscapes prod Core infrastructure has been modified
aws nasa-veda prod Core infrastructure has been modified
aws gridsst prod Core infrastructure has been modified
gcp pangeo-hubs prod Core infrastructure has been modified
gcp linked-earth prod Core infrastructure has been modified
gcp meom-ige prod Core infrastructure has been modified
gcp meom-ige drakkar-demo Core infrastructure has been modified
kubeconfig utoronto prod Core infrastructure has been modified
kubeconfig utoronto r-prod Core infrastructure has been modified
aws carbonplan prod Core infrastructure has been modified
gcp m2lines prod Core infrastructure has been modified
aws victor prod Core infrastructure has been modified
gcp leap prod Core infrastructure has been modified
gcp awi-ciroh prod Core infrastructure has been modified
gcp qcl prod Core infrastructure has been modified
gcp 2i2c-uk lis Core infrastructure has been modified
aws ubc-eoas prod Core infrastructure has been modified
aws nasa-cryo prod Core infrastructure has been modified

Copy link
Contributor

@pnasrat pnasrat left a comment

Choose a reason for hiding this comment

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

I did a first pass and I've a few structural questions around this change in terms of where config should live, and more minor suggestions

deployer/billing.py Show resolved Hide resolved
deployer/billing.py Outdated Show resolved Hide resolved
config/billing-accounts.yaml Outdated Show resolved Hide resolved
deployer/billing.py Show resolved Hide resolved
deployer/billing.py Outdated Show resolved Hide resolved
This is done via JSON Schema now
@yuvipanda
Copy link
Member Author

I want to open an issue for tracking the 'single source of truth' about our contracts and which ones are cloud cost pass through, but I see it's already a line item in #2431

deployer/billing.py Outdated Show resolved Hide resolved
Copy link
Contributor

@pnasrat pnasrat left a comment

Choose a reason for hiding this comment

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

Two minor comments but basically looks good, this is looking good and I've already been testing out the functionality.

"""
match = re.match(r"(\d\d\d\d)-(\d\d)", month_str)
if not match:
raise typer.BadParameter(f"{month_str} should be formatted as YYYY-MM")
Copy link
Contributor

Choose a reason for hiding this comment

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

give an example should be formatted as YYYY-MM e.g. 2022-01

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

Copy link
Contributor

@pnasrat pnasrat left a comment

Choose a reason for hiding this comment

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

lgtm

@yuvipanda
Copy link
Member Author

yay!

@yuvipanda yuvipanda merged commit bc7eb18 into 2i2c-org:master Mar 30, 2023
@github-actions
Copy link

🎉🎉🎉🎉

Monitor the deployment of the hubs here 👉 https://github.com/2i2c-org/infrastructure/actions/runs/4568225181

@yuvipanda
Copy link
Member Author

yay thank you for your review and encouragement in getting this done, @pnasrat!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Archived in project
Development

Successfully merging this pull request may close these issues.

[Billing] Automatically figure out how much a dedicated GCP project spends in a month
2 participants