-all: copy-performanceTests run-performanceTests copy-jmeter copy-collectd install-collectd
+include environment.config
+# Additional configuration
+PERFORMANCE_TESTS_ENV_DIRECTORY = vesPerformanceTestsEnv
+RKE_KUBECONFIG_FILE_PATH = ~/.kube/config.onap
-RKE_NODE_USER_AND_HOSTNAME = <RKE_USER>@<RKE_IP> # for example ubuntu@10.183.36.205
-RKE_PRIVATE_KEY = <PEM_PRIVATE_KEY_FILE_PATH> # for example ~/.ssh/onap-5802.pem
-PERFORMANCE_TESTS_DIRECTORY = vesPerformanceTestsEnv
-RKE_KUBECONFIG_FILE_PATH = /home/ubuntu/.kube/config.onap
+# Targets
+all: --copy-k8s-performance-tests-env --copy-jmeter-vm-env --install-k8s-performance-tests-env --install-jmeter-vm-env
+clear: --uninstall-k8s-performance-tests-env --remove-k8s-performance-tests-env --remove-jmeter-vm-env
+restart: clear all
-#Configuration for jMeter
-JMETER_VM_USER_AND_HOSTNAME = <RKE_USER>@<VM_IP> # for example root@10.183.36.50
-JMETER_VM_PRIVATE_KEY = <PEM_PRIVATE_KEY_FILE_PATH> # for example ~/.ssh/onap-5802.pem
-
-
-restart: clear-performanceTests remove-performanceTests remove-jmeter remove-collectd all
-
-copy-performanceTests:
- @echo "\n##### Copy performance tests directory to lab environment #####"
- scp -r -i $(RKE_PRIVATE_KEY) ./k8s $(RKE_NODE_USER_AND_HOSTNAME):$(PERFORMANCE_TESTS_DIRECTORY)
+# K8s environment
+--copy-k8s-performance-tests-env:
+ @echo "\n##### Copy performance tests environment directory to k8s environment #####"
+ scp -r -i $(RKE_PRIVATE_KEY) ./environment/k8s $(RKE_NODE_USER_AND_HOSTNAME):$(PERFORMANCE_TESTS_ENV_DIRECTORY)
@echo "##### DONE #####"
-run-performanceTests:
- @echo "\n##### Run prometheus and grafana in lab environment #####"
- ssh -i $(RKE_PRIVATE_KEY) $(RKE_NODE_USER_AND_HOSTNAME) 'bash -c "export KUBECONFIG=$(RKE_KUBECONFIG_FILE_PATH) && cd $(PERFORMANCE_TESTS_DIRECTORY) && make all"'
+--install-k8s-performance-tests-env:
+ @echo "\n##### Deploy components(grafana, influxdb, prometheus, node exporter) on k8s #####"
+ ssh -i $(RKE_PRIVATE_KEY) $(RKE_NODE_USER_AND_HOSTNAME) 'bash -c "export KUBECONFIG=$(RKE_KUBECONFIG_FILE_PATH) && cd $(PERFORMANCE_TESTS_ENV_DIRECTORY) && make all WORKER_IP=$(WORKER_IP)"'
@echo "##### DONE #####"
-clear-performanceTests:
- @echo "\n##### Stop and clear prometheus and grafana in lab environment #####"
- ssh -i $(RKE_PRIVATE_KEY) $(RKE_NODE_USER_AND_HOSTNAME) 'bash -c "export KUBECONFIG=$(RKE_KUBECONFIG_FILE_PATH) && cd $(PERFORMANCE_TESTS_DIRECTORY) && make clear"'
+--uninstall-k8s-performance-tests-env:
+ @echo "\n##### Undeploy components(grafana, influxdb, prometheus, node exporter) from k8s #####"
+ ssh -i $(RKE_PRIVATE_KEY) $(RKE_NODE_USER_AND_HOSTNAME) 'bash -c "export KUBECONFIG=$(RKE_KUBECONFIG_FILE_PATH) && cd $(PERFORMANCE_TESTS_ENV_DIRECTORY) && make clear"'
@echo "##### DONE #####"
-remove-performanceTests:
- @echo "\n##### Remove performance tests #####"
- ssh -i $(RKE_PRIVATE_KEY) $(RKE_NODE_USER_AND_HOSTNAME) 'bash -c "export KUBECONFIG=$(RKE_KUBECONFIG_FILE_PATH) && rm -rf $(PERFORMANCE_TESTS_DIRECTORY)"'
+--remove-k8s-performance-tests-env:
+ @echo "\n##### Remove performance tests environment directory from k8s environment #####"
+ ssh -i $(RKE_PRIVATE_KEY) $(RKE_NODE_USER_AND_HOSTNAME) 'bash -c "export KUBECONFIG=$(RKE_KUBECONFIG_FILE_PATH) && rm -rf $(PERFORMANCE_TESTS_ENV_DIRECTORY)"'
@echo "##### DONE #####"
-copy-collectd:
- @echo "\n##### Copy collectd to JMeter VM #####"
- scp -r -i $(JMETER_VM_PRIVATE_KEY) ./k8s/collectd $(JMETER_VM_USER_AND_HOSTNAME):collectd
+# JMeter VM environment
+--copy-jmeter-vm-env:
+ @echo "\n##### Copy JMeter environment directory to VM #####"
+ scp -r -i $(JMETER_VM_PRIVATE_KEY) ./environment/jmeterVM $(JMETER_VM_USER_AND_HOSTNAME):$(PERFORMANCE_TESTS_ENV_DIRECTORY)
@echo "##### DONE #####"
-install-collectd:
- @echo "\n##### Install collectd on JMeter VM #####"
- ssh -i $(JMETER_VM_PRIVATE_KEY) $(JMETER_VM_USER_AND_HOSTNAME) 'cd collectd && make'
+--install-jmeter-vm-env:
+ @echo "\n##### Install collectd on VM #####"
+ ssh -i $(JMETER_VM_PRIVATE_KEY) $(JMETER_VM_USER_AND_HOSTNAME) 'sed -i 's/WORKER_IP/$(WORKER_IP)/g' $(PERFORMANCE_TESTS_ENV_DIRECTORY)/jmeter/test_scenario.jmx'
+ ssh -i $(JMETER_VM_PRIVATE_KEY) $(JMETER_VM_USER_AND_HOSTNAME) 'sed -i 's/WORKER_IP/$(WORKER_IP)/g' $(PERFORMANCE_TESTS_ENV_DIRECTORY)/collectd/collectd.conf'
+ ssh -i $(JMETER_VM_PRIVATE_KEY) $(JMETER_VM_USER_AND_HOSTNAME) 'bash -c $(PERFORMANCE_TESTS_ENV_DIRECTORY)/collectd/install_collectd.sh'
@echo "##### DONE #####"
-remove-collectd:
- @echo "\n##### Remove collectd #####"
- ssh -i $(JMETER_VM_PRIVATE_KEY) $(JMETER_VM_USER_AND_HOSTNAME) 'rm -rf collectd'
+--remove-jmeter-vm-env:
+ @echo "\n##### Remove JMeter environment directory from VM #####"
+ ssh -i $(JMETER_VM_PRIVATE_KEY) $(JMETER_VM_USER_AND_HOSTNAME) 'rm -rf $(PERFORMANCE_TESTS_ENV_DIRECTORY)'
@echo "##### DONE #####"
-copy-jmeter:
- @echo "\n##### Copy JMeter #####"
- scp -r -i $(JMETER_VM_PRIVATE_KEY) ./k8s/testScenario $(JMETER_VM_USER_AND_HOSTNAME):$(PERFORMANCE_TESTS_DIRECTORY)
+# Execute test scenario
+execute-test:
+ @echo "\n##### Run test scenario #####"
+ ssh -i $(JMETER_VM_PRIVATE_KEY) $(JMETER_VM_USER_AND_HOSTNAME) '/bin/bash $(PERFORMANCE_TESTS_ENV_DIRECTORY)/jmeter/run_jmeter.sh $(PERFORMANCE_TESTS_ENV_DIRECTORY) $(TEST_SCENARIO_FILE)'
@echo "##### DONE #####"
-
-run-jmeter:
- @echo "\n##### Run test scenario #####"
- ssh -i $(JMETER_VM_PRIVATE_KEY) $(JMETER_VM_USER_AND_HOSTNAME) '/bin/bash ./$(PERFORMANCE_TESTS_DIRECTORY)/run_jmeter.sh'
- @echo "##### DONE #####"
-
-remove-jmeter:
- @echo "\n##### Remove JMeter #####"
- ssh -i $(JMETER_VM_PRIVATE_KEY) $(JMETER_VM_USER_AND_HOSTNAME) 'rm -rf $(PERFORMANCE_TESTS_DIRECTORY)'
- @echo "##### DONE #####"
\ No newline at end of file
-DCAE VESCollector PerformanceTests Environment
-==============================================
+DCAE VESCollector PerformanceTests
+==================================
-This section describes how to configure VES Performance Tests environment on the RKE node
+This directory contains all files needed for setting up VES Collector performance tests environment and performance tests execution.
+JMeter was selected as load testing tool.
-### Prerequisites
+Following sections contain:
+* brief architecture description
+* performance tests environment setup procedure
+* performance tests execution procedure
-First of all you have to change variable in file **ves/performanceTests/Makefile:**
-```
-#Configuration for RKE
-RKE_NODE_USER_AND_HOSTNAME = <RKE_USER>@<RKE_IP>
-RKE_PRIVATE_KEY = <PEM_PRIVATE_KEY_FILE_PATH>
-RKE_KUBECONFIG_FILE_PATH = <KUBECONFIG_FILE_PATH_ON_RKE>
+# Architecture
+Architecture diagram:
+https://wiki.onap.org/display/DW/VES+Collector+Performance+Test#VESCollectorPerformanceTest-Architecture
-#Configuration for JMeter
-JMETER_VM_USER_AND_HOSTNAME = <RKE_USER>@<VM_IP>
-JMETER_VM_PRIVATE_KEY = <PEM_PRIVATE_KEY_FILE_PATH>
-```
-Secondly change ip (**<WORKER_IP>**) in file **ves/performanceTests/testScenario/test_scenario.jmx:**
-```
-###Ves collector address
-<stringProp name="HTTPSampler.domain"><WORKER_IP></stringProp>
-<stringProp name="HTTPSampler.port">30417</stringProp>
-<stringProp name="HTTPSampler.protocol">https</stringProp>
+The architecture consists of three parts:
+* VM - which contains:
+ * JMeter - executes performance test scenarios
+ * Collectd - collects CPU and RAM metrics from the VM
+* K8s with ONAP installed - which contains:
+ * NodeExporter - collects metrics from K8s cluster worker nodes
+ * Prometheus - collects metrics from VES Collector and NodeExporter
+ * InfluxDB - collects metrics from Collectd and tests results from JMeter
+ * Grafana - displays all metrics collected from Prometheus and Influxdb
+* User environment - local environment with VES repository downloaded, from which:
+ * test environment can be set up
+ * test can be executed
-###Ves collector address
-<elementProp name="" elementType="Authorization">
- <stringProp name="Authorization.url">https://<WORKER_IP>:30417/eventListener/v7</stringProp>
+# Usage
+1. Prerequisites
+- K8s environment with:
+ - ONAP installed
+ - VES Collector with Maven profile `buildForPerfTests` enabled (See `How to setup VES for performance tests` section)
+- VM with minimum 16GB RAM and 4 cores
-### Influxdb address
-<elementProp name="influxdbUrl" elementType="Argument">
- <stringProp name="Argument.name">influxdbUrl</stringProp>
- <stringProp name="Argument.value">http://<WORKER_IP>:30002/write?db=jmeter</stringProp>
-```
+2. Setup
+- Edit `enrivonment.config` file to match your environment:
+ - RKE_NODE_USER_AND_HOSTNAME - user and hostname for ssh connection to RKE node
+ - RKE_PRIVATE_KEY - private key for ssh connection to RKE node
+ - WORKER_IP - IP address to any of K8s worker nodes
+ - JMETER_VM_USER_AND_HOSTNAME - user and hostname for ssh connection to VM
+ - JMETER_VM_PRIVATE_KEY - private key for ssh connection to VM
+ - TEST_SCENARIO_FILE - name of test scenario file to be executed. Available test scenarios are located in `performanceTests/environment/jmeterVM/jmeter`
+- Install performance tests environment:
+ - `make all` - copies all files to K8s and VM, installs all components and prints links to Grafana and Prometheus GUI
-Important:
-Make sure you have entered the correct configuration path(**RKE_KUBECONFIG_FILE_PATH**),
-because it is necessary for kubectl to work properly on RKE over ssh.
+3. Performance test execution
+ - `make execute-test` - triggers JMeter on VM to execute performance test scenario defined in `enrivonment.config`
+
+4. Performance test results and metrics
+ Open up Grafana in browser - link to Grafana is printed at the end of `make all` command output
+
+5. Other useful commands:
+ - `make clear` - uninstalls and removes everything related to performance tests from K8s and VM
+ - `make restart` - recreates performance tests environment from scratch by invoking `make clear` and `make all`
-The VES image being tested must have the buildForPerfTests profile enabled
-(how to do this is described below).
-### Build VES Collector with buildForPerfTests profile enabled:
-Download project VES collector (**If you didn't do it before**)
-```
-git clone "https://gerrit.onap.org/r/dcaegen2/collectors/ves"
-```
-and build project with buildForPerfTests profile
-```
-mvn clean package -PbuildForPerfTests docker:build
-```
-Push docker image to docker repository for example JFrog Artifactory.
+# How to setup VES for performance tests
+The VES image being tested must have the buildForPerfTests profile enabled.
-### Change VES Collector image on k8s
+1. Build VES Collector with buildForPerfTests profile enabled:
+ - download project VES collector (**If you didn't do it before**)
+ ```
+ git clone "https://gerrit.onap.org/r/dcaegen2/collectors/ves"
+ ```
+ - build project with buildForPerfTests profile
+ ```
+ mvn clean package -PbuildForPerfTests docker:build
+ ```
+ - push docker image to docker repository for example JFrog Artifactory.
-Go to RKE node and edit deployment:
-```
-kubectl edit deployment dep-dcae-ves-collector
-```
-change image :
-```
-image: <IMAGE_NAME_FROM_REPOSITORY>
-imagePullPolicy: IfNotPresent
-```
-after saving changes VES Collector pod should restarted automatically
-
-
-###Automatic configuration and run performance tests on RKE
-
-In this step, the performance tests environment will be copied to your RKE node and Prometheus, Grafana and Influxdb will be deployed
-```
-make all
-```
-###Run test scenario
-```
-make run-jmeter
-```
-### Step by step configuration performance tests on RKE
-
-###1. Copy performance tests environment to RKE
-```
-make copy-performanceTests
-```
-###2. Run performance tests environment on RKE
-```
-make run-performanceTests
-```
-###3. Clear performance tests environment on RKE
-```
-make clear-performanceTests
-```
-###4. Remove performance tests environment from RKE
-```
-make remove-performanceTests
-```
-###5. Copy JMeter to VM
-```
-make copy-jmeter
-```
-###6. Run JMeter test scenario on VM
-```
-make run-jmeter
-```
-###7. Remove JMeter from VM
-```
-make remove-jmeter
-```
\ No newline at end of file
+2. Change VES Collector image on k8s
+ - go to RKE node and edit deployment:
+ ```
+ kubectl edit deployment dep-dcae-ves-collector
+ ```
+ - change image :
+ ```
+ image: <IMAGE_NAME_FROM_REPOSITORY>
+ imagePullPolicy: IfNotPresent
+ ```
+ - after saving changes VES Collector pod should restarted automatically
\ No newline at end of file
--- /dev/null
+# K8s environment configuration
+RKE_NODE_USER_AND_HOSTNAME = <RKE_USER>@<RKE_IP> # for example ubuntu@10.183.36.205
+RKE_PRIVATE_KEY = <PEM_PRIVATE_KEY_FILE_PATH> # for example ~/.ssh/onap-5802.pem
+WORKER_IP = <ANY_WORKER_NODE_IP> # for example 10.183.39.145
+
+# JMeter VM environment configuration
+JMETER_VM_USER_AND_HOSTNAME = <RKE_USER>@<VM_IP> # for example root@10.183.36.50
+JMETER_VM_PRIVATE_KEY = <PEM_PRIVATE_KEY_FILE_PATH> # for example ~/.ssh/onap-5802.pem
+
+# Test scenario to run
+TEST_SCENARIO_FILE = test_scenario.jmx # see performanceTests/environment/jmeterVM/jmeter for other scenarios
\ No newline at end of file
</Plugin>
<Plugin network>
- Server "10.183.39.145" "30003"
+ Server WORKER_IP "30003"
</Plugin>
<Include "/etc/collectd/collectd.conf.d">
#! /bin/bash
sudo apt-get update && sudo apt-get install collectd -y
-sudo cp config/collectd.conf /etc/collectd/collectd.conf
+sudo cp vesPerformanceTestsEnv/collectd/collectd.conf /etc/collectd/collectd.conf
sudo service collectd restart
--- /dev/null
+#!/bin/bash
+
+if [ "$#" -ne 2 ]; then
+ echo "Illegal number of parameters. Expected two parameters - performance tests env directory name and test scenario file name"
+ exit 1
+fi
+
+performance_tests_env_directory=$1
+test_scenario_file=$2
+
+docker pull justb4/jmeter
+export volume_path=~/${performance_tests_env_directory}/jmeter && \
+ export jmeter_path=/mnt/jmeter && \
+ docker run \
+ --volume "${volume_path}":${jmeter_path} \
+ justb4/jmeter \
+ -n -X \
+ -t ${jmeter_path}/${test_scenario_file}
\ No newline at end of file
<boolProp name="LoopController.continue_forever">false</boolProp>
<stringProp name="LoopController.loops">1</stringProp>
</elementProp>
- <stringProp name="ThreadGroup.num_threads">1000</stringProp>
- <stringProp name="ThreadGroup.ramp_time">60</stringProp>
+ <stringProp name="ThreadGroup.num_threads">250</stringProp>
+ <stringProp name="ThreadGroup.ramp_time">10</stringProp>
<boolProp name="ThreadGroup.scheduler">false</boolProp>
<stringProp name="ThreadGroup.duration"></stringProp>
<stringProp name="ThreadGroup.delay"></stringProp>
</elementProp>
</collectionProp>
</elementProp>
- <stringProp name="HTTPSampler.domain">10.183.39.145</stringProp>
+ <stringProp name="HTTPSampler.domain">WORKER_IP</stringProp>
<stringProp name="HTTPSampler.port">30417</stringProp>
<stringProp name="HTTPSampler.protocol">https</stringProp>
<stringProp name="HTTPSampler.contentEncoding"></stringProp>
<AuthManager guiclass="AuthPanel" testclass="AuthManager" testname="HTTP Authorization Manager" enabled="true">
<collectionProp name="AuthManager.auth_list">
<elementProp name="" elementType="Authorization">
- <stringProp name="Authorization.url">https://10.183.39.145:30417/eventListener/v7</stringProp>
+ <stringProp name="Authorization.url">https://WORKER_IP:30417/eventListener/v7</stringProp>
<stringProp name="Authorization.username">sample1</stringProp>
<stringProp name="Authorization.password">sample1</stringProp>
<stringProp name="Authorization.domain"></stringProp>
</elementProp>
<elementProp name="influxdbUrl" elementType="Argument">
<stringProp name="Argument.name">influxdbUrl</stringProp>
- <stringProp name="Argument.value">http://10.183.39.145:30002/write?db=jmeter</stringProp>
+ <stringProp name="Argument.value">http://WORKER_IP:30002/write?db=jmeter</stringProp>
<stringProp name="Argument.metadata">=</stringProp>
</elementProp>
<elementProp name="application" elementType="Argument">
-all: create-configmaps deploy-influxdb deploy-prometheus deploy-grafana display-urls
+all: --deploy-influxdb --deploy-prometheus --deploy-node-exporter --deploy-grafana --display-urls
# Prometheus configuration
PROMETHEUS_DIRECTORY = ./prometheus
DASHBOARD_PROVIDER_CONFIGMAP = dashboards-provider.yaml
DASHBOARD_CONFIGMAP = dashboard.yaml
-#INFLUXDB configuration
+# Influxdb configuration
INFLUXDB_DIRECTORY = ./influxdb
INFLUXDB_DEPLOYMENT = deployment.yaml
INFLUXDB_CONFIGMAP = configmap.yaml
-#Node exporter configuration
-NODE_EXPORTER = node-exporter.yaml
+# Node exporter configuration
+NODE_EXPORTER_DIRECTORY = ./nodeExporter
+NODE_EXPORTER_DEPLOYMENT = deployment.yaml
clear:
- @echo "\n##### Delete configmaps and $(GRAFANA_DEPLOYMENT)(grafana, prometheus)#####"
+ @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 -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) || true
+ kubectl delete -f $(NODE_EXPORTER_DIRECTORY)/$(NODE_EXPORTER_DEPLOYMENT) || 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 $(INFLUXDB_DIRECTORY)/$(INFLUXDB_CONFIGMAP)
- kubectl apply -f $(NODE_EXPORTER)
- kubectl create configmap ves-grafana-dashboards -n onap --from-file grafana/dashboards/
+--deploy-node-exporter:
+ @echo "\n##### Deploy node exporter #####"
+ kubectl apply -f $(NODE_EXPORTER_DIRECTORY)/$(NODE_EXPORTER_DEPLOYMENT)
@echo "##### DONE #####"
-deploy-grafana:
+--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:
+--deploy-prometheus:
@echo "\n##### Deploy prometheus #####"
+ kubectl apply -f $(PROMETHEUS_DIRECTORY)/$(PROMETHEUS_CONFIGMAP)
kubectl apply -f $(PROMETHEUS_DIRECTORY)/$(PROMETHEUS_DEPLOYMENT)
@echo "##### DONE #####"
-deploy-influxdb:
+--deploy-influxdb:
@echo "\n##### Deploy influxdb #####"
+ kubectl apply -f $(INFLUXDB_DIRECTORY)/$(INFLUXDB_CONFIGMAP)
kubectl apply -f $(INFLUXDB_DIRECTORY)/$(INFLUXDB_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"
+--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"
namespace: onap
data:
dashboards.yaml: |-
- - name: 'ves-dashboards'
+ - name: 'ves-performance-tests-dashboards'
folder: ''
type: file
disableDeletion: false
"editable": true,
"gnetId": 4026,
"graphTooltip": 0,
- "iteration": 1591286038841,
+ "iteration": 1591703765642,
"links": [],
"panels": [
{
"type": "dashboard"
},
{
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"enable": true,
"expr": "resets(process_uptime_seconds{application=\"$application\", instance=\"$instance\"}[1m]) > 0",
"iconColor": "rgba(255, 96, 96, 1)",
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"decimals": 1,
"editable": true,
"error": false,
"rgba(237, 129, 40, 0.89)",
"rgba(50, 172, 45, 0.97)"
],
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"decimals": null,
"editable": true,
"error": false,
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"decimals": 2,
"editable": true,
"error": false,
"rgba(237, 129, 40, 0.89)",
"rgba(245, 54, 54, 0.9)"
],
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"decimals": 2,
"editable": true,
"error": false,
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"fieldConfig": {
"defaults": {
"custom": {}
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"fieldConfig": {
"defaults": {
"custom": {}
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"fieldConfig": {
"defaults": {
"custom": {}
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"description": "",
"fieldConfig": {
"defaults": {
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"editable": true,
"error": false,
"fieldConfig": {
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"editable": true,
"error": false,
"fieldConfig": {
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"editable": true,
"error": false,
"fieldConfig": {
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"editable": true,
"error": false,
"fieldConfig": {
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"editable": true,
"error": false,
"fieldConfig": {
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"editable": true,
"error": false,
"fieldConfig": {
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"editable": true,
"error": false,
"fieldConfig": {
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"fieldConfig": {
"defaults": {
"custom": {}
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"editable": true,
"error": false,
"fieldConfig": {
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"editable": true,
"error": false,
"fieldConfig": {
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"editable": true,
"error": false,
"fieldConfig": {
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"editable": true,
"error": false,
"fieldConfig": {
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"editable": true,
"error": false,
"fieldConfig": {
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"editable": true,
"error": false,
"fieldConfig": {
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"editable": true,
"error": false,
"fieldConfig": {
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"editable": true,
"error": false,
"fieldConfig": {
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"editable": true,
"error": false,
"fieldConfig": {
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"editable": true,
"error": false,
"fieldConfig": {
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"fieldConfig": {
"defaults": {
"custom": {}
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"fieldConfig": {
"defaults": {
"custom": {}
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"fieldConfig": {
"defaults": {
"custom": {}
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"editable": true,
"error": false,
"fieldConfig": {
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"editable": true,
"error": false,
"fieldConfig": {
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"editable": true,
"error": false,
"fieldConfig": {
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"editable": true,
"error": false,
"fieldConfig": {
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"editable": true,
"error": false,
"fieldConfig": {
"bars": false,
"dashLength": 10,
"dashes": false,
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"editable": true,
"error": false,
"fieldConfig": {
"text": "None",
"value": ""
},
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"definition": "",
"hide": 0,
"includeAll": false,
"text": "dcae-ves-collector.onap:8443",
"value": "dcae-ves-collector.onap:8443"
},
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"definition": "",
"hide": 0,
"includeAll": false,
"text": "All",
"value": "$__all"
},
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"definition": "",
"hide": 0,
"includeAll": true,
"text": "All",
"value": "$__all"
},
- "datasource": "Prometheus",
+ "datasource": "prometheus",
"definition": "",
"hide": 0,
"includeAll": true,
labels:
name: ves-grafana-datasources
data:
- datasource.yaml: |-
+ prometheusDatasource.yaml: |-
apiVersion: 1
datasources:
- - name: Prometheus
+ - name: prometheus
type: prometheus
- url: http://prometheus-service:8080
+ url: http://ves-prometheus:8080
access: proxy
isDefault: true
jmeterDatasource.yaml: |-
- name: jmeter
type: influxdb
database: jmeter
- url: http://influxdb-service:8086
+ url: http://ves-influxdb:8086
access: proxy
editable: true
jsonData:
- name: jmeterVM
type: influxdb
database: collectd
- url: http://influxdb-service:8086
+ url: http://ves-influxdb:8086
access: proxy
editable: true
jsonData:
# limitations under the License.
# ============LICENSE_END=========================================================
+apiVersion: v1
+kind: Service
+metadata:
+ name: ves-grafana
+ namespace: onap
+ labels:
+ app: ves-grafana
+ annotations:
+ prometheus.io/scrape: 'true'
+ prometheus.io/port: '3000'
+spec:
+ selector:
+ app: ves-grafana
+ type: NodePort
+ ports:
+ - port: 3000
+ targetPort: 3000
+ nodePort: 30001
+---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
- name: grafana-ves-deployment
+ name: ves-grafana
namespace: onap
labels:
- app: collector-grafana
+ app: ves-grafana
spec:
replicas: 1
selector:
matchLabels:
- app: collector-grafana
+ app: ves-grafana
template:
metadata:
labels:
- app: collector-grafana
+ app: ves-grafana
spec:
containers:
- - name: collector-grafana
+ - name: ves-grafana
image: grafana/grafana
env:
- name: GF_AUTH_DISABLE_LOGIN_FORM
name: ves-grafana-dashboards-provider
- name: ves-grafana-dashboards
configMap:
- name: ves-grafana-dashboards
----
-apiVersion: v1
-kind: Service
-metadata:
- name: grafana-service
- namespace: onap
- labels:
- app: collector-grafana
- annotations:
- prometheus.io/scrape: 'true'
- prometheus.io/port: '3000'
-spec:
- selector:
- app: collector-grafana
- type: NodePort
- ports:
- - port: 3000
- targetPort: 3000
- nodePort: 30001
\ No newline at end of file
+ name: ves-grafana-dashboards
\ No newline at end of file
# limitations under the License.
# ============LICENSE_END=========================================================
+
+apiVersion: v1
+kind: Service
+metadata:
+ name: ves-influxdb
+ namespace: onap
+ labels:
+ app: ves-influxdb
+spec:
+ selector:
+ app: ves-influxdb
+ type: NodePort
+ ports:
+ - port: 8086
+ name: influx-db
+ targetPort: 8086
+ nodePort: 30002
+ - port: 25826
+ protocol: UDP
+ name: collectd-port
+ targetPort: 25826
+ nodePort: 30003
+---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
- name: influxdb-ves-deployment
+ name: ves-influxdb
namespace: onap
labels:
- app: collector-influxdb
+ app: ves-influxdb
spec:
replicas: 1
selector:
matchLabels:
- app: collector-influxdb
+ app: ves-influxdb
template:
metadata:
labels:
- app: collector-influxdb
+ app: ves-influxdb
spec:
containers:
- - name: collector-influxdb
+ - name: ves-influxdb
image: influxdb
env:
- name: INFLUXDB_DB
name: ves-influxdb-conf
- name: ves-influxdb-types
configMap:
- name: ves-influxdb-types
----
-apiVersion: v1
-kind: Service
-metadata:
- name: influxdb-service
- namespace: onap
- labels:
- app: collector-influxdb
-spec:
- selector:
- app: collector-influxdb
- type: NodePort
- ports:
- - port: 8086
- name: influx-db
- targetPort: 8086
- nodePort: 30002
- - port: 25826
- protocol: UDP
- name: collectd-port
- targetPort: 25826
- nodePort: 30003
\ No newline at end of file
+ name: ves-influxdb-types
\ No newline at end of file
--- /dev/null
+# ============LICENSE_START=======================================================
+# dcaegen2-collectors-ves
+# ================================================================================
+# Copyright (C) 2020 NOKIA
+# ================================================================================
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+# ============LICENSE_END=========================================================
+
+apiVersion: v1
+kind: Service
+metadata:
+ annotations:
+ prometheus.io/scrape: 'true'
+ labels:
+ app: ves-node-exporter
+ name: ves-node-exporter
+ name: ves-node-exporter
+spec:
+ clusterIP: None
+ ports:
+ - name: scrape
+ port: 9100
+ protocol: TCP
+ selector:
+ app: ves-node-exporter
+ type: ClusterIP
+---
+apiVersion: extensions/v1beta1
+kind: DaemonSet
+metadata:
+ name: ves-node-exporter
+spec:
+ template:
+ metadata:
+ labels:
+ app: ves-node-exporter
+ name: ves-node-exporter
+ spec:
+ containers:
+ - image: prom/node-exporter
+ name: ves-node-exporter
+ ports:
+ - containerPort: 9100
+ hostPort: 9100
+ name: scrape
+ hostNetwork: true
+ hostPID: true
apiVersion: v1
kind: ConfigMap
metadata:
- name: ves-prometheus-configuration
+ name: ves-prometheus-config
labels:
- name: ves-prometheus-configuration
+ name: ves-prometheus-config
namespace: onap
data:
prometheus.yml: |-
monitor: 'my-monitor'
scrape_configs:
- - job_name: 'prometheus'
- static_configs:
- - targets: ['localhost:9090']
-
- job_name: 'ves-collector'
metrics_path: '/actuator/prometheus'
scheme: https
# limitations under the License.
# ============LICENSE_END=========================================================
+apiVersion: v1
+kind: Service
+metadata:
+ name: ves-prometheus
+ namespace: onap
+ labels:
+ app: ves-prometheus
+ annotations:
+ prometheus.io/scrape: 'true'
+ prometheus.io/port: '9090'
+spec:
+ selector:
+ app: ves-prometheus
+ type: NodePort
+ ports:
+ - port: 8080
+ targetPort: 9090
+ nodePort: 30069
+---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
- name: prometheus-ves-deployment
+ name: ves-prometheus
namespace: onap
labels:
- app: collector-prometheus
+ app: ves-prometheus
spec:
replicas: 1
selector:
matchLabels:
- app: collector-prometheus
+ app: ves-prometheus
template:
metadata:
labels:
- app: collector-prometheus
+ app: ves-prometheus
spec:
containers:
- - name: collector-prometheus
+ - name: ves-prometheus
image: prom/prometheus
args:
- "--config.file=/etc/prometheus/prometheus.yml"
ports:
- containerPort: 9090
volumeMounts:
- - name: prometheus-config-volume
+ - name: ves-prometheus-config
mountPath: /etc/prometheus/
- - name: prometheus-storage-volume
+ - name: ves-prometheus-storage
mountPath: /prometheus/
volumes:
- - name: prometheus-config-volume
+ - name: ves-prometheus-config
configMap:
defaultMode: 420
- name: ves-prometheus-configuration
-
- - name: prometheus-storage-volume
+ name: ves-prometheus-config
+ - name: ves-prometheus-storage
emptyDir: {}
----
-apiVersion: v1
-kind: Service
-metadata:
- name: prometheus-service
- namespace: onap
- labels:
- app: collector-prometheus
- annotations:
- prometheus.io/scrape: 'true'
- prometheus.io/port: '9090'
-
-spec:
- selector:
- app: collector-prometheus
- type: NodePort
- ports:
- - port: 8080
- targetPort: 9090
- nodePort: 30069
+++ /dev/null
-DCAE VESCollector Performance Tests environment
-===============================================
-
-### Prerequisites
-Copy performance tests environment to RKE node (**If you didn't do it before**)
-```
-See step: "1. Copy performance tests environment to RKE" in ves/performanceTests/README.md
-```
-###Automatic Prometheus and Grafana configuration at the RKE
-```
-make all
-```
-### Step by step ruinning performance tests at the RKE
-
-###1. Clear environment(delete configmaps and deployment for Prometheus and Grafana)
-```
-make clear
-```
-###2. Create configmaps for Prometheus and Grafana
-```
-make create-configmaps
-```
-###3. Deploy grafana
-```
-make deploy-grafana
-```
-###4. Deploy prometheus
-```
-make deploy-prometheus
-```
-###5. Deploy influxdb
-```
-make deploy-influxdb
-```
-###6. Display URL of the graphical user interface Prometheus and Grafana
-```
-make display-urls
-```
\ No newline at end of file
+++ /dev/null
-
-install-collectd:
- @echo "\n##### Install collectd #####"
- @bash config/install_collectd.sh
- @echo "##### DONE #####"
+++ /dev/null
-apiVersion: v1
-kind: Service
-metadata:
- annotations:
- prometheus.io/scrape: 'true'
- labels:
- app: node-exporter
- name: node-exporter
- name: node-exporter
-spec:
- clusterIP: None
- ports:
- - name: scrape
- port: 9100
- protocol: TCP
- selector:
- app: node-exporter
- type: ClusterIP
----
-apiVersion: extensions/v1beta1
-kind: DaemonSet
-metadata:
- name: node-exporter
-spec:
- template:
- metadata:
- labels:
- app: node-exporter
- name: node-exporter
- spec:
- containers:
- - image: prom/node-exporter
- name: node-exporter
- ports:
- - containerPort: 9100
- hostPort: 9100
- name: scrape
- hostNetwork: true
- hostPID: true
+++ /dev/null
-#!/bin/bash
-docker pull justb4/jmeter
-
-export volume_path=/root/vesPerformanceTestsEnv && \
-export jmeter_path=/mnt/jmeter && \
-export test_scenario_file=test_scenario.jmx && \
-docker run \
- --volume "${volume_path}":${jmeter_path} \
- justb4/jmeter \
- -n -X \
- -t ${jmeter_path}/${test_scenario_file}
\ No newline at end of file