From 29ed4a95bc23d117bf40b78942da7afdabde5a26 Mon Sep 17 00:00:00 2001 From: Sarah Gibson Date: Thu, 3 Oct 2024 16:42:20 +0100 Subject: [PATCH] Add scaffolding code to install cost attribution dashboards if the cluster is on AWS --- deployer/commands/grafana/deploy_dashboards.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/deployer/commands/grafana/deploy_dashboards.py b/deployer/commands/grafana/deploy_dashboards.py index f30e1f306c..04c2e1de2d 100644 --- a/deployer/commands/grafana/deploy_dashboards.py +++ b/deployer/commands/grafana/deploy_dashboards.py @@ -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() @@ -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( @@ -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 + \ No newline at end of file