...
First we have to generate certificates in ~/tools/ssl folder by using gen_certs. This step only needs to be performed during the first test setup (or if the generated files have been deleted).
Code Block title Generating certificates ./cloud-based-performance-test.sh gen_certs
Then we call setup in order to send certificates to HV-VES, and deploy Consumers, Prometheus, Grafana and create their ConfigMaps.
Code Block title Setting up the test environment ./cloud-based-performance-test.sh setup
After that we have to change HV-VES configuration in Consul KEY/VALUE tab (typically we can access Consul at port 32427 of any Controller node, i.e. http://slave1:32427/ui/#/dc1/kv/dcae-hv-ves-collector/edit).
Code Block title HV-VES Consul configuration {"security.sslDisable": false, "logLevel": "INFO", "server.listenPort": 6061, "server.idleTimeoutSec": 300, "cbs.requestIntervalSec": 5, "streams_publishes": { "perf3gpp": { "type": "kafka", "aaf_credentials": { "username": "admin", "password": "admin_secret" }, "kafka_info": { "bootstrap_servers": "message-router-kafka:9092", "topic_name": "HV_VES_PERF3GPP" } } }, "security.keys.trustStoreFile": "/etc/ves-hv/ssl/custom/trust.p12", "security.keys.keyStoreFile": "/etc/ves-hv/ssl/custom/server.p12", "security.keys.trustStorePasswordFile":"/etc/ves-hv/ssl/custom/trust.pass", "security.keys.keyStorePasswordFile": "/etc/ves-hv/ssl/custom/server.pass"}
After completing previous steps we can run the test. The table below contains the parameters that can be passed to cloud-based-performance-test.sh script.
gen_certs generate certs in ../../ssl directory setup set up ConfigMaps and consumers setup_all set up ConfigMaps consumers and producers send_config send producers configuration (message interval and payload), located in producers-config/producer-config.json to each producer start_interval start interval mode, config file is located in producers-config/interval-config.json
Optional parameters:
--producers : number of producers in deployment (10)
--retention-time-minutes : messages retention time on kafka in minutes (60)start_instant start_instant : start instant mode, config file is located in producers-config/instant-config.json
Optional parameters:
--producers : number of producers in deployment (10)
--retention-time-minutes : messages retention time on kafka in minutes (60)scale_producers scale producer deployment to number provide in argument stop stop all producers reset_producers reset all metrics on each producer clean remove ConfigMap, HV-VES consumers clean_all remove ConfigMap, HV-VES consumers and producers help print usage Code Block title Performing the test ./cloud-based-performance-test.sh start_interval --producers 10
The command above starts the test that creates 10 producers which send messages with in the interval given in producers-config/interval-config.json configuration file. For example:mode. The parameters can be changed in configuration files located in producers-config folder.
Code Block language js title interval-config.json collapse true { "intervalConfigs": [ { "duration": 1, "interval": 100 }, { "duration": 2, "interval": 100 } ] }
Above request body queues a task to create new connections for 1 second with 100 milliseconds interval and then for 2 seconds with 100 milliseconds interval, meaning that overall of 30 connections should be setup over 3 seconds.
Code Block language js title producer-config.json collapse true { "payloadSize": 8192, "messageIntervalMs": 100 }
Above request updates configuration of producers to send messages with 8192 bytes with 100 milliseconds interval.
It is also possible to run the test in instant mode.
Code Block language js title instant-config.json collapse true { "connections": 500 }
Above request queues a task to create 500 connections without intervals between them.
The test.properties file contains Producers and Consumers configurations and it allows setting following properties:
Producer | |
---|---|
hvVesAddress | HV-VES address (dcae-hv-ves-collector.onap:6061) |
Certificates paths | |
client.cert.path | Path to cert file (/ssl/client.p12) |
client.cert.pass.path | Path to cert's pass file (/ssl/client.pass) |
Consumer | |
kafka.bootstrapServers | Adress of Kafka service to consume from (message-router-kafka:9092) |
kafka.topics | Kafka topics to subscribe to (HV_VES_PERF3GPP) |
Results can be accessed under following links:
- Prometheus: http://slave1:30000/graph?g0.range_input=1h&g0.expr=hv_kafka_consumer_travel_time_seconds_count&g0.tab=1
- Grafana: http://slave1:30001/d/V94Kjlwmz/hv-ves-processing?orgId=1&refresh=5s
To remove created ConfigMaps, Consumers, Producers, Grafana and Prometheus from Kubernetes cluster we call clean function. Note: clean doesn't remove certificates from HV-VES.
Code Block title Cleaning the environment ./cloud-based-performance-test.sh clean
...