Skip to content

Commit

Permalink
Add scaffolding code to install cost attribution dashboards if the cl…
Browse files Browse the repository at this point in the history
…uster is on AWS
  • Loading branch information
sgibson91 committed Oct 3, 2024
1 parent 513d2c1 commit 29ed4a9
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion deployer/commands/grafana/deploy_dashboards.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from deployer.cli_app import grafana_app
from deployer.utils.rendering import print_colour

from .utils import get_grafana_token, get_grafana_url
from .utils import get_cluster_cloud_provider, get_grafana_token, get_grafana_url


@grafana_app.command()
Expand All @@ -30,6 +30,7 @@ def deploy_dashboards(
"""
grafana_url = get_grafana_url(cluster_name)
grafana_token = get_grafana_token(cluster_name)
cluster_provider = get_cluster_cloud_provider(cluster_name)

print_colour("Cloning jupyterhub/grafana-dashboards...")
subprocess.check_call(
Expand Down Expand Up @@ -58,3 +59,8 @@ def deploy_dashboards(
# Might be because opening more than once of a temp file is tried
# (https://docs.python.org/3.8/library/tempfile.html#tempfile.NamedTemporaryFile)
shutil.rmtree("grafana-dashboards")

if cluster_provider == "aws":
# FIXME: Add code to deploy cost attribution dashboards here
pass

0 comments on commit 29ed4a9

Please sign in to comment.