blob: 55bb148350f2973764232fdf22e5461810c04e3c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
all: --deploy-influxdb --deploy-prometheus --deploy-node-exporter --deploy-grafana --deploy-dmaap-simulator --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
# Influxdb configuration
INFLUXDB_DIRECTORY = ./influxdb
INFLUXDB_DEPLOYMENT = deployment.yaml
INFLUXDB_CONFIGMAP = configmap.yaml
# Node exporter configuration
NODE_EXPORTER_DIRECTORY = ./nodeExporter
NODE_EXPORTER_DEPLOYMENT = deployment.yaml
# DMaaaP Simulator configuration
DMAAP_SIMULATOR_DIRECTORY = ./dmaapSimulator
DMAAP_SIMULATOR_DEPLOYMENT = deployment.yaml
DMAAP_SIMULATOR_IMAGE_ESCAPED := $(shell echo $(DMAAP_SIMULATOR_IMAGE) | sed 's/\//\\\//g')
clear:
@echo "\n##### Delete configmaps and deployments (prometheus, grafana, influxdb, node exporter) #####"
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 -n onap configmap ves-grafana-dashboards || true
kubectl delete -f $(PROMETHEUS_DIRECTORY)/$(PROMETHEUS_DEPLOYMENT) || true
kubectl delete -f $(PROMETHEUS_DIRECTORY)/$(PROMETHEUS_CONFIGMAP) || true
kubectl delete -f $(INFLUXDB_DIRECTORY)/$(INFLUXDB_DEPLOYMENT) || true
kubectl delete -f $(INFLUXDB_DIRECTORY)/$(INFLUXDB_CONFIGMAP) || true
kubectl delete -f $(NODE_EXPORTER_DIRECTORY)/$(NODE_EXPORTER_DEPLOYMENT) || true
kubectl delete -f $(DMAAP_SIMULATOR_DIRECTORY)/$(DMAAP_SIMULATOR_DEPLOYMENT) || true
@echo "##### DONE #####"
--deploy-node-exporter:
@echo "\n##### Deploy node exporter #####"
kubectl apply -f $(NODE_EXPORTER_DIRECTORY)/$(NODE_EXPORTER_DEPLOYMENT)
@echo "##### DONE #####"
--deploy-grafana:
@echo "\n##### Deploy grafana #####"
kubectl apply -f $(GRAFANA_DIRECTORY)/$(DATASOURCE_CONFIGMAP)
kubectl apply -f $(GRAFANA_DIRECTORY)/$(DASHBOARD_PROVIDER_CONFIGMAP)
kubectl create configmap ves-grafana-dashboards -n onap --from-file grafana/dashboards/
kubectl apply -f $(GRAFANA_DIRECTORY)/$(GRAFANA_DEPLOYMENT)
@echo "##### DONE #####"
--deploy-prometheus:
@echo "\n##### Deploy prometheus #####"
kubectl apply -f $(PROMETHEUS_DIRECTORY)/$(PROMETHEUS_CONFIGMAP)
kubectl apply -f $(PROMETHEUS_DIRECTORY)/$(PROMETHEUS_DEPLOYMENT)
@echo "##### DONE #####"
--deploy-influxdb:
@echo "\n##### Deploy influxdb #####"
kubectl apply -f $(INFLUXDB_DIRECTORY)/$(INFLUXDB_CONFIGMAP)
kubectl apply -f $(INFLUXDB_DIRECTORY)/$(INFLUXDB_DEPLOYMENT)
@echo "##### DONE #####"
--deploy-dmaap-simulator:
@echo "\n##### Deploy dmaap simulator #####"
sed -i "s/DMAAP_SIMULATOR_IMAGE/$(DMAAP_SIMULATOR_IMAGE_ESCAPED)/g" $(DMAAP_SIMULATOR_DIRECTORY)/$(DMAAP_SIMULATOR_DEPLOYMENT)
kubectl apply -f $(DMAAP_SIMULATOR_DIRECTORY)/$(DMAAP_SIMULATOR_DEPLOYMENT)
@echo "##### DONE #####"
--display-urls:
@echo "Waiting for Grafana to start up..."
@sleep 10
@echo "\e[32m##### Prometheus : http://$(WORKER_IP):30069/ #####\e[39m"
@echo "\e[32m##### Grafana http://$(WORKER_IP):30001/ #####\e[39m"
|