-
Notifications
You must be signed in to change notification settings - Fork 66
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
AWS cost attribution (2c/4): convert Grafana dashboard into a .jsonnet template and version control it #4875
Comments
@consideRatio, I am correct to think that the intention is for the jssonet to live in juptyerhub/grafana-dashboards, right? |
@GeorgianaElena no as that project is part of the jupyterhub org, and its inclusion there means also aws-ce-grafana-backend needs go be available and open sourced properly. Let this be entirely 2i2c specific for now, but do make use of the jupyterhub/grafana-dashboard's deploy script to render and deploy the dashboard. |
Should we go for a timeboxed 15 min chat to get started, with the goal to have an empty dummy dashboard to deploy? |
The definition of done was respected for the first 3 panels. The reaming depend on the existence of a variable that I could not figure out and I've opened to track this work #4944. |
The cost attribution dashboard central source of truth is currently in https://grafana.openscapes.2i2c.cloud where Grafana has it written to a small disk after being developed in the UI. But, we need to deploy it to more places and keep those places updated. So, how do we do that?
Technical context
The https://github.com/jupyterhub/grafana-dashboards project version controlls a few dashboards in .jsonnet format. They are rendered into the Grafana JSON format using the
go-jsonnet
'sjsonnet
CLI using the GoLanggraffonet
library.Its nicer to work with a dashboard in a
.jsonnet
format than the big JSON blob it is by default, but its a bit of work to convert the Grafana JSON blob to its equivalent in.jsonnet
.Dashboard ID issue
Currently the documented procedure to deploy the dashboard involves updating a dashboard ID. I think maybe that can be avoided by introducing a dashboard variable that gets autopopulated, and then we reference the variable. I think this is how the jupyterhub/grafana-dashboard function currently with the prometheus datasource - they reference a datasource variable.
Definition of done
.jsonnet
dashboard file.jsonnet
dashboard is verified to look and behave alike the original by deploying it using thedeploy.py
script from jupyterhub/grafana-dashboardsUse flags like
--dashboards-dir=<a folder where we have the .jsonnet file>
,--folder-name=<Some grafana folder name>
,--folder-uid=aws-ce-grafana-backend
.jsonnet
file is version controlled somewhereIts fine and perhaps suitable to initially do it in this repository.
The text was updated successfully, but these errors were encountered: