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

Run reports automatically & publish them to a repo #2711

Closed
wants to merge 18 commits into from
Closed

Conversation

yuvipanda
Copy link
Member

@yuvipanda yuvipanda commented Jun 24, 2023

Background

Regularly scheduled 'reports' can help the team keep track of the status of various
parts of our infrastructure. Examples of code written in the recent past that would be
useful as a report include:

  1. Producing a list of all our clusters, the kubernetes version they are in (both master
    and nodes) for Migrate existing GCP GKE based hubs from k8s 1.22+ to 1.24+ #2157 (comment)
  2. Produce a list of all images and the hubs they are used in, taking into account the
    different ways images can be specified for the hub (and a bunch of others) for
    Identify where 2i2c engineers spend time on image management #2582

The code used for generating these is scattered in gists and slack, and also require
someone with appropriate credentials to run the code, and upload the result somewhere.
There is also no easy way to trace a particular output back to the code that produced it,
nor a way to discover these.

Automated reports

This PR adds a reports/ directory, which can contain any number of Jupyter Notebooks.
Each notebook comprises a 'report', and a GitHub Action will run every week that will:

  1. Execute the notebook with papermill, generating a copy with the filename being the current date. This has access to the same context as our hub deployment script, so can access all the kubernetes clusters, prometheus API, etc.
  2. Push that output to a separate repository (currently https://github.com/yuvipanda/2i2c-reports/, should be moved into the 2i2c org). A sops encrypted deploy-key is used to do this pushing.
  3. The target repository uses sphinx + nb-myst to build a static site, currently published here. You can see the output of an individual notebook like https://yuvipanda.github.io/2i2c-reports/kubernetes-versions/2023/06/24-07h33m32sUTC/index.html. Using myst-nb allows us to use tags like hide-cell and hide-input to control what gets shown in the output.

TODO

  • Generate a ToC appropriately
  • Add docs on the reporting system to this repo
  • Move the repo containing the reports into the 2i2c org

@github-actions
Copy link

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 linked-earth No Yes Core infrastructure has been modified
aws carbonplan No Yes Core infrastructure has been modified
aws ubc-eoas No Yes Core infrastructure has been modified
gcp m2lines No Yes Core infrastructure has been modified
kubeconfig utoronto No Yes Core infrastructure has been modified
gcp qcl No Yes Core infrastructure has been modified
aws jupyter-meets-the-earth 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 2i2c-uk No Yes Core infrastructure has been modified
gcp callysto No Yes Core infrastructure has been modified
aws smithsonian No Yes Core infrastructure has been modified
aws openscapes No Yes Core infrastructure has been modified
aws 2i2c-aws-us No Yes Core infrastructure has been modified
gcp cloudbank 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
aws nasa-cryo No Yes Core infrastructure has been modified
gcp 2i2c No Yes Core infrastructure has been modified
gcp meom-ige No Yes Core infrastructure has been modified
gcp pangeo-hubs No Yes Core infrastructure has been modified
gcp awi-ciroh No Yes Core infrastructure has been modified

Production deployments

Cloud Provider Cluster Name Hub Name Reason for Redeploy
gcp linked-earth prod Core infrastructure has been modified
aws carbonplan prod Core infrastructure has been modified
aws ubc-eoas prod Core infrastructure has been modified
gcp m2lines prod Core infrastructure has been modified
kubeconfig utoronto prod Core infrastructure has been modified
kubeconfig utoronto r-prod Core infrastructure has been modified
gcp qcl prod Core infrastructure has been modified
aws jupyter-meets-the-earth prod Core infrastructure has been modified
aws nasa-veda prod Core infrastructure has been modified
aws gridsst prod Core infrastructure has been modified
gcp 2i2c-uk lis Core infrastructure has been modified
gcp callysto prod Core infrastructure has been modified
aws smithsonian prod Core infrastructure has been modified
aws openscapes prod Core infrastructure has been modified
aws 2i2c-aws-us researchdelight Core infrastructure has been modified
aws 2i2c-aws-us ncar-cisl Core infrastructure has been modified
gcp cloudbank bcc 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 humboldt Core infrastructure has been modified
gcp cloudbank laney 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 sacramento Core infrastructure has been modified
gcp cloudbank srjc Core infrastructure has been modified
gcp cloudbank santiago Core infrastructure has been modified
gcp cloudbank tuskegee Core infrastructure has been modified
gcp cloudbank csu Core infrastructure has been modified
gcp cloudbank csulb Core infrastructure has been modified
aws victor prod Core infrastructure has been modified
gcp leap prod Core infrastructure has been modified
aws nasa-cryo prod Core infrastructure has been modified
gcp 2i2c hackanexoplanet 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 catalyst-cooperative 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 2i2c climatematch Core infrastructure has been modified
gcp meom-ige prod Core infrastructure has been modified
gcp pangeo-hubs prod Core infrastructure has been modified
gcp awi-ciroh prod Core infrastructure has been modified

@damianavila
Copy link
Contributor

This is a really nice idea, @yuvipanda!

@yuvipanda
Copy link
Member Author

I'm not going to be working on this anytime soon, we can pick this back up later if it gets prioritized via our sprint process.

@yuvipanda yuvipanda closed this Feb 22, 2024
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
Status: Done 🎉
Development

Successfully merging this pull request may close these issues.

2 participants