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 info about the grafana deployer action and api key #929

Merged
Merged
16 changes: 6 additions & 10 deletions docs/howto/operate/grafana.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,18 +78,14 @@ The key you create needs admin permissions.

**Keep this key safe as you won't be able to retrieve it!**

```{note}
In the future, we should define the scenarios where other engineers need this API key after the initial deployment and decide how to store and share it.
```
Encrypt and store this key using `sops` in `secrets/config/hubs/<cluster>.yaml` under `grafana_token` key.

Some default grafana dashboards for JupyterHub can then be deployed using [`jupyterhub/grafana-dashboards`](https://github.com/jupyterhub/grafana-dashboards).
This key will be used by the [`deploy-grafana-dashboards` workflow](https://github.com/2i2c-org/infrastructure/blob/HEAD/.github/workflows/deploy-grafana-dashboards.yaml) to deploy some default grafana dashboards for JupyterHub using [`jupyterhub/grafana-dashboards`](https://github.com/jupyterhub/grafana-dashboards).

1. Create a local clone of the repository
2. Install the [`jsonnet` binary](https://github.com/google/jsonnet#packages).
Once you've pushed the encrypted `grafana_token` to the GitHub repository, manually trigger the `deploy-grafana-dashboards` workflow using the "Run workflow" button [from here](https://github.com/2i2c-org/infrastructure/actions/workflows/deploy-grafana-dashboards.yaml) to deploy the dashboards.

```{note}
Homebrew is the best option if you're on MacOS.
The Python package will not suffice here as we directly call the `jsonnet` library.
```
The workflow only runs when manually triggered.

3. Follow the instructions in the [Deployment](https://github.com/jupyterhub/grafana-dashboards/blob/main/README.md#deployment) section of the README to create the grafana dashboards
Any re-triggering of the action after the initial deployment will overwrite any dashboard created from the Grafana UI and not stored in the [`jupyterhub/grafana-dashboards`](https://github.com/jupyterhub/grafana-dashboards) repository.
consideRatio marked this conversation as resolved.
Show resolved Hide resolved
```