diff options
author | Vijay Venkatesh Kumar <vv770d@att.com> | 2020-05-26 14:51:39 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2020-05-26 14:51:39 +0000 |
commit | d5c7cf6980a4e017324dde4cd041ba9496d67bf8 (patch) | |
tree | 80b47dd419d164e917d6cf9d46758fd2da7ee7a3 /performanceTests/k8s/Makefile | |
parent | 89e951208e78118bdf29ae90e465bd7c668b4462 (diff) | |
parent | a4d74cd90b7aae6d7ecf2a87b4048a96aa7677d9 (diff) |
Merge "Deployment Prometheus and Grafana on RKE for perf tests"
Diffstat (limited to 'performanceTests/k8s/Makefile')
-rw-r--r-- | performanceTests/k8s/Makefile | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/performanceTests/k8s/Makefile b/performanceTests/k8s/Makefile new file mode 100644 index 00000000..0802563a --- /dev/null +++ b/performanceTests/k8s/Makefile @@ -0,0 +1,45 @@ +all: create-configmaps deploy-prometheus deploy-grafana display-urls + +# Prometheus configuration +PROMETHEUS_DIRECTORY = ./prometheus +PROMETHEUS_DEPLOYMENT = deployment.yaml +PROMETHEUS_CONFIGMAP = configmap.yaml + +# Grafana configuration +GRAFANA_DIRECTORY = ./grafana +GRAFANA_DEPLOYMENT = deployment.yaml +DATASOURCE_CONFIGMAP = datasource.yaml +DASHBOARD_PROVIDER_CONFIGMAP = dashboards-provider.yaml +DASHBOARD_CONFIGMAP = dashboard.yaml + +clear: + @echo "\n##### Delete configmaps and $(GRAFANA_DEPLOYMENT)(grafana, prometheus)#####" + kubectl delete -f $(GRAFANA_DIRECTORY)/$(GRAFANA_DEPLOYMENT) || true + kubectl delete -f $(GRAFANA_DIRECTORY)/$(DASHBOARD_PROVIDER_CONFIGMAP) || true + kubectl delete -f $(GRAFANA_DIRECTORY)/$(DATASOURCE_CONFIGMAP) || true + kubectl delete -f $(GRAFANA_DIRECTORY)/$(DASHBOARD_CONFIGMAP) || true + kubectl delete -f $(PROMETHEUS_DIRECTORY)/$(PROMETHEUS_DEPLOYMENT) || true + kubectl delete -f $(PROMETHEUS_DIRECTORY)/$(PROMETHEUS_CONFIGMAP) || true + @echo "##### DONE #####" + +create-configmaps: + @echo "\n##### Create configmaps #####" + kubectl apply -f $(PROMETHEUS_DIRECTORY)/$(PROMETHEUS_CONFIGMAP) + kubectl apply -f $(GRAFANA_DIRECTORY)/$(DATASOURCE_CONFIGMAP) + kubectl apply -f $(GRAFANA_DIRECTORY)/$(DASHBOARD_PROVIDER_CONFIGMAP) + kubectl apply -f $(GRAFANA_DIRECTORY)/$(DASHBOARD_CONFIGMAP) + @echo "##### DONE #####" + +deploy-grafana: + @echo "\n##### Deploy grafana #####" + kubectl apply -f $(GRAFANA_DIRECTORY)/$(GRAFANA_DEPLOYMENT) + @echo "##### DONE #####" + +deploy-prometheus: + @echo "\n##### Deploy prometheus #####" + kubectl apply -f $(PROMETHEUS_DIRECTORY)/$(PROMETHEUS_DEPLOYMENT) + @echo "##### DONE #####" + +display-urls: + @echo "\e[32m##### Prometheus : http://<WORKER_IP>:30069/ #####\e[39m" + @echo "\e[32m##### Grafana http://<WORKER_IP>:30001/ #####\e[39m" |