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
diff --git a/sources/hv-collector-kafka-consumer/k8s-deployment.yaml b/tools/performance/cloud/consumer-deployment.yaml
similarity index 82%
rename from sources/hv-collector-kafka-consumer/k8s-deployment.yaml
rename to tools/performance/cloud/consumer-deployment.yaml
index 6a03145..9b03aca 100644
--- a/sources/hv-collector-kafka-consumer/k8s-deployment.yaml
+++ b/tools/performance/cloud/consumer-deployment.yaml
@@ -16,15 +16,6 @@
# limitations under the License.
# ============LICENSE_END=========================================================
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: kafka-servers-config
- namespace: onap
-data:
- kafka.bootstrapServers: message-router-kafka-0:9092,message-router-kafka-1:9092,message-router-kafka-2:9092
- kafka.topics: HV_VES_PERF3GPP
-
---
apiVersion: apps/v1
@@ -59,13 +50,13 @@
- name: KAFKA_BOOTSTRAP_SERVERS
valueFrom:
configMapKeyRef:
- name: kafka-servers-config
- key: kafka.bootstrapServers
+ name: performance-test-config
+ key: consumer.kafka.bootstrapServers
- name: KAFKA_TOPICS
valueFrom:
configMapKeyRef:
- name: kafka-servers-config
- key: kafka.topics
+ name: performance-test-config
+ key: consumer.kafka.topics
- name: DISABLE_PROCESSING
---
@@ -102,10 +93,10 @@
- name: KAFKA_BOOTSTRAP_SERVERS
valueFrom:
configMapKeyRef:
- name: kafka-servers-config
- key: kafka.bootstrapServers
+ name: performance-test-config
+ key: consumer.kafka.bootstrapServers
- name: KAFKA_TOPICS
valueFrom:
configMapKeyRef:
- name: kafka-servers-config
- key: kafka.topics
\ No newline at end of file
+ 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 0000000..75d0379
--- /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 0000000..9865339
--- /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
similarity index 100%
rename from tools/performance/configuration/base.json
rename to tools/performance/local/configuration/base.json
diff --git a/tools/performance/consul/configuration.hcl b/tools/performance/local/consul/configuration.hcl
similarity index 100%
rename from tools/performance/consul/configuration.hcl
rename to tools/performance/local/consul/configuration.hcl
diff --git a/tools/performance/docker-compose.yml b/tools/performance/local/docker-compose.yml
similarity index 98%
rename from tools/performance/docker-compose.yml
rename to tools/performance/local/docker-compose.yml
index 8214323..c0dfc47 100644
--- a/tools/performance/docker-compose.yml
+++ b/tools/performance/local/docker-compose.yml
@@ -98,7 +98,7 @@
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
similarity index 95%
rename from tools/performance/local-performance-test.sh
rename to tools/performance/local/local-performance-test.sh
index cad21ef..3c885a6 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_COUNT=1000
INTERVAL_MS=0
-
function usage() {
echo ""
echo "Run HV-VES performance test locally"
@@ -26,7 +24,7 @@
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 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 @@
--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 @@
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
similarity index 100%
rename from tools/performance/logs/.gitignore
rename to tools/performance/local/logs/.gitignore
diff --git a/tools/performance/prometheus.yml b/tools/performance/local/prometheus.yml
similarity index 100%
rename from tools/performance/prometheus.yml
rename to tools/performance/local/prometheus.yml