summaryrefslogtreecommitdiffstats
path: root/tools/performance
diff options
context:
space:
mode:
authorJakub Dudycz <jakub.dudycz@nokia.com>2019-07-03 15:17:16 +0200
committerJakub Dudycz <jakub.dudycz@nokia.com>2019-07-05 10:31:24 +0200
commitcc27d520b71afc0e038bc529223dab8e8c91e678 (patch)
tree31bf7374682a85aa96020da40ef724779048aada /tools/performance
parent31360a4542e2cef73c1fe1ef004e3a3b0bba95bc (diff)
Add performance test producer deployment yaml
- create cloud performance test directory structure - move consumer deployment file to "tools/performence/cloud" directory Change-Id: Ia5c6d8ed15a2188ff9306cf788052f432dae1e33 Signed-off-by: Jakub Dudycz <jakub.dudycz@nokia.com> Issue-ID: DCAEGEN2-1652
Diffstat (limited to 'tools/performance')
-rw-r--r--tools/performance/cloud/consumer-deployment.yaml102
-rw-r--r--tools/performance/cloud/producer-pod.yaml61
-rw-r--r--tools/performance/cloud/test.properties24
-rw-r--r--tools/performance/local/configuration/base.json (renamed from tools/performance/configuration/base.json)0
-rw-r--r--tools/performance/local/consul/configuration.hcl (renamed from tools/performance/consul/configuration.hcl)0
-rw-r--r--tools/performance/local/docker-compose.yml (renamed from tools/performance/docker-compose.yml)2
-rwxr-xr-xtools/performance/local/local-performance-test.sh (renamed from tools/performance/local-performance-test.sh)17
-rw-r--r--tools/performance/local/logs/.gitignore (renamed from tools/performance/logs/.gitignore)0
-rw-r--r--tools/performance/local/prometheus.yml (renamed from tools/performance/prometheus.yml)0
9 files changed, 196 insertions, 10 deletions
diff --git a/tools/performance/cloud/consumer-deployment.yaml b/tools/performance/cloud/consumer-deployment.yaml
new file mode 100644
index 00000000..9b03aca6
--- /dev/null
+++ b/tools/performance/cloud/consumer-deployment.yaml
@@ -0,0 +1,102 @@
+# ============LICENSE_START=======================================================
+# dcaegen2-collectors-veshv
+# ================================================================================
+# Copyright (C) 2019 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: apps/v1
+kind: Deployment
+metadata:
+ name: kafka-counting-consumer-deployment
+ namespace: onap
+ labels:
+ app: hv-collector-kafka-consumer
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: hv-collector-kafka-consumer
+ template:
+ metadata:
+ labels:
+ app: hv-collector-kafka-consumer
+ annotations:
+ prometheus.io/port: "8080"
+ prometheus.io/scrape: "true"
+ prometheus.io/path: "/monitoring/prometheus"
+ spec:
+ containers:
+ - name: kafka-consumer-counting
+ image: hv-collector-kafka-consumer:1.3.0-SNAPSHOT
+ ports:
+ - containerPort: 8080
+ env:
+ - name: LISTEN_PORT
+ value: 8080
+ - name: KAFKA_BOOTSTRAP_SERVERS
+ valueFrom:
+ configMapKeyRef:
+ name: performance-test-config
+ key: consumer.kafka.bootstrapServers
+ - name: KAFKA_TOPICS
+ valueFrom:
+ configMapKeyRef:
+ name: performance-test-config
+ key: consumer.kafka.topics
+ - name: DISABLE_PROCESSING
+
+---
+
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+ name: kafka-processing-consumer-deployment
+ namespace: onap
+ labels:
+ app: hv-collector-kafka-consumer
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: hv-collector-kafka-consumer
+ template:
+ metadata:
+ labels:
+ app: hv-collector-kafka-consumer
+ annotations:
+ prometheus.io/port: "8080"
+ prometheus.io/scrape: "true"
+ prometheus.io/path: "/monitoring/prometheus"
+ spec:
+ containers:
+ - name: kafka-processing-consumer
+ image: hv-collector-kafka-consumer:1.3.0-SNAPSHOT
+ ports:
+ - containerPort: 8080
+ env:
+ - name: LISTEN_PORT
+ value: 8080
+ - name: KAFKA_BOOTSTRAP_SERVERS
+ valueFrom:
+ configMapKeyRef:
+ name: performance-test-config
+ key: consumer.kafka.bootstrapServers
+ - name: KAFKA_TOPICS
+ valueFrom:
+ configMapKeyRef:
+ name: performance-test-config
+ key: consumer.kafka.topics \ No newline at end of file
diff --git a/tools/performance/cloud/producer-pod.yaml b/tools/performance/cloud/producer-pod.yaml
new file mode 100644
index 00000000..75d03795
--- /dev/null
+++ b/tools/performance/cloud/producer-pod.yaml
@@ -0,0 +1,61 @@
+# ============LICENSE_START=======================================================
+# dcaegen2-collectors-veshv
+# ================================================================================
+# Copyright (C) 2019 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: Pod
+metadata:
+ name: hv-collector-producer
+ namespace: onap
+ labels:
+ app: hv-collector-producer
+spec:
+ containers:
+ - name: hv-collector-producer
+ image: the-a-team-registry-local.esisoj70.emea.nsn-net.net/onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-rust-client:latest
+ env:
+ - name: HV_VES_ADDRESS
+ valueFrom:
+ configMapKeyRef:
+ name: performance-test-config
+ key: producer.hvVesAddress
+ - name: CLIENTS_COUNT
+ valueFrom:
+ configMapKeyRef:
+ name: performance-test-config
+ key: producer.client.count
+ - name: MSG_SIZE
+ valueFrom:
+ configMapKeyRef:
+ name: performance-test-config
+ key: producer.message.size
+ - name: MSG_COUNT
+ valueFrom:
+ configMapKeyRef:
+ name: performance-test-config
+ key: producer.message.count
+ - name: INTERVAL_MS
+ valueFrom:
+ configMapKeyRef:
+ name: performance-test-config
+ key: producer.message.interval
+ args: ["--ssl-disable",
+ "--address", "$HV_VES_ADDRESS",
+ "--clients", "$CLIENTS_COUNT",
+ "--msgsize", "$MSG_SIZE",
+ "--msgcount", "$MSG_COUNT",
+ "--intervalms", "$INTERVAL_MS"] \ No newline at end of file
diff --git a/tools/performance/cloud/test.properties b/tools/performance/cloud/test.properties
new file mode 100644
index 00000000..9865339c
--- /dev/null
+++ b/tools/performance/cloud/test.properties
@@ -0,0 +1,24 @@
+# TODO: in script create configmap from that file
+
+# PRODUCER CONFIGURATION
+
+# HV-VES address
+producer.hvVesAddress=ves-hv-collector:6061
+# Number of pods to create
+producer.pod.count=1
+# Number of clients per pod
+producer.client.count=1
+# Size in bytes of a single message
+producer.message.size=16384
+# Amount of messages to sent by one client in a single pod
+producer.message.count=1000
+# Interval between messages
+producer.message.interval=0
+
+
+# CONSUMER CONFIGURATION
+
+# Addresses of Kafka services to consume from
+consumer.kafka.bootstrapServers=message-router-kafka-0:9092,message-router-kafka-1:9092,message-router-kafka-2:9092
+# Kafka topics to subscribe to
+consumer.kafka.topics=HV_VES_PERF3GPP
diff --git a/tools/performance/configuration/base.json b/tools/performance/local/configuration/base.json
index 2a806adb..2a806adb 100644
--- a/tools/performance/configuration/base.json
+++ b/tools/performance/local/configuration/base.json
diff --git a/tools/performance/consul/configuration.hcl b/tools/performance/local/consul/configuration.hcl
index f975955e..f975955e 100644
--- a/tools/performance/consul/configuration.hcl
+++ b/tools/performance/local/consul/configuration.hcl
diff --git a/tools/performance/docker-compose.yml b/tools/performance/local/docker-compose.yml
index 82143235..c0dfc478 100644
--- a/tools/performance/docker-compose.yml
+++ b/tools/performance/local/docker-compose.yml
@@ -98,7 +98,7 @@ services:
volumes:
- ./configuration/:/etc/ves-hv/configuration/
- ./logs:/var/log/ONAP/dcae-hv-ves-collector
- - ../ssl/:/etc/ves-hv/ssl/
+ - ../../ssl/:/etc/ves-hv/ssl/
kafka-consumer:
image: onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-kafka-consumer
diff --git a/tools/performance/local-performance-test.sh b/tools/performance/local/local-performance-test.sh
index cad21ef8..3c885a64 100755
--- a/tools/performance/local-performance-test.sh
+++ b/tools/performance/local/local-performance-test.sh
@@ -1,7 +1,6 @@
#!/usr/bin/env bash
-cd "$(dirname "$0")"
-
+SCRIPT_DIRECTORY="$(dirname "$0")"
CERT_FILE=${CERT_FILE:-/ssl/client.p12}
CERT_PASS_FILE=${CERT_PASS_FILE:-/ssl/client.pass}
HV_VES_NETWORK=${HV_VES_NETWORK:-performance_default}
@@ -16,7 +15,6 @@ MSG_SIZE=16384
MSG_COUNT=1000
INTERVAL_MS=0
-
function usage() {
echo ""
echo "Run HV-VES performance test locally"
@@ -26,7 +24,7 @@ function usage() {
echo " Optional parameters:"
echo " --address : HV-VES address in host:port format (ves-hv-collector:6061)"
echo " --containers : number of docker containers to create (1)"
- echo " --clients : number of clients in single container (1)"
+ echo " --clients : number of clients in a single container (1)"
echo " --msg-size : size in bytes of a single message (16384)"
echo " --msg-count : amount of messages to sent by one client in single container (1000)"
echo " --interval : interval between messages (0)"
@@ -41,9 +39,9 @@ function usage() {
function setup_environment(){
echo "Setting up"
- cd ../ssl
+ cd ../../ssl
./gen-certs.sh
- cd ../performance
+ cd "$SCRIPT_DIRECTORY"
docker-compose up -d
echo "Waiting for components to be healthy.."
@@ -101,7 +99,6 @@ function create_containers(){
--address "$HV_VES_ADDRESS" \
--certfile "$CERT_FILE" \
--certpass "$CERT_PASS_FILE" \
- --containers "$CONTAINERS_COUNT" \
--clients "$CLIENTS_PER_CONTAINER" \
--msgsize "$MSG_SIZE" \
--msgcount "$MSG_COUNT" \
@@ -116,15 +113,17 @@ function clean(){
docker rm --force $(docker ps -aqf "label=app=$PRODUCER_APP_NAME")
echo "Clearing generated certs"
- cd ../ssl
+ cd ../../ssl
./gen-certs.sh clean
- cd ../performance
+ cd "$SCRIPT_DIRECTORY"
echo "Removing HV-VES components"
docker-compose down
exit 0
}
+cd "$SCRIPT_DIRECTORY"
+
if [[ $# -eq 0 ]]; then
usage
else
diff --git a/tools/performance/logs/.gitignore b/tools/performance/local/logs/.gitignore
index 1287e9bd..1287e9bd 100644
--- a/tools/performance/logs/.gitignore
+++ b/tools/performance/local/logs/.gitignore
diff --git a/tools/performance/prometheus.yml b/tools/performance/local/prometheus.yml
index b9a937c2..b9a937c2 100644
--- a/tools/performance/prometheus.yml
+++ b/tools/performance/local/prometheus.yml