Add support for setting performance-dashboards on Kubernetes

This commit is contained in:
Naga Ravi Chaitanya Elluri
2022-05-20 18:28:06 -04:00
parent e5fb639aa0
commit 90e1f20d50
2 changed files with 10 additions and 3 deletions

View File

@@ -1,11 +1,18 @@
import subprocess
import logging
import git
import sys
# Installs a mutable grafana on the Kubernetes/OpenShift cluster and loads the performance dashboards
def setup(repo):
command = "cd /tmp/performance-dashboards/dittybopper && ./deploy.sh"
def setup(repo, distribution):
if distribution == "kubernetes":
command = "cd /tmp/performance-dashboards/dittybopper && ./k8s-deploy.sh"
elif distribution == "openshift":
command = "cd /tmp/performance-dashboards/dittybopper && ./deploy.sh"
else:
logging.error("Provided distribution: %s is not supported" % (distribution))
sys.exit(1)
delete_repo = "rm -rf /tmp/performance-dashboards || exit 0"
logging.info("Cloning, installing mutable grafana on the cluster and loading the dashboards")
try:

View File

@@ -106,7 +106,7 @@ def main(cfg):
# Deploy performance dashboards
if deploy_performance_dashboards:
performance_dashboards.setup(dashboard_repo)
performance_dashboards.setup(dashboard_repo, distribution)
# Generate uuid for the run
if run_uuid: