summaryrefslogtreecommitdiffstats
path: root/development
diff options
context:
space:
mode:
Diffstat (limited to 'development')
-rwxr-xr-xdevelopment/bin/constants.sh22
-rwxr-xr-xdevelopment/bin/dcae-msgs.sh5
-rwxr-xr-xdevelopment/bin/dcae-reset.sh7
-rwxr-xr-xdevelopment/bin/dcae-topic.sh7
-rwxr-xr-xdevelopment/bin/start-simulation.sh2
-rw-r--r--development/docker-compose.yml16
6 files changed, 50 insertions, 9 deletions
diff --git a/development/bin/constants.sh b/development/bin/constants.sh
new file mode 100755
index 00000000..f0df9b00
--- /dev/null
+++ b/development/bin/constants.sh
@@ -0,0 +1,22 @@
+#!/usr/bin/env bash
+# ============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=========================================================
+
+DCAE_APP_HOSTNAME=localhost
+DCAE_APP_PORT=6064
+DCAE_APP_ADDRESS=${DCAE_APP_HOSTNAME}:${DCAE_APP_PORT} \ No newline at end of file
diff --git a/development/bin/dcae-msgs.sh b/development/bin/dcae-msgs.sh
index cb05a8c3..964be14f 100755
--- a/development/bin/dcae-msgs.sh
+++ b/development/bin/dcae-msgs.sh
@@ -56,9 +56,12 @@ while getopts "$optspec" arg; do
done
shift $((OPTIND-1))
+DEVELOPMENT_BIN_DIRECTORY=$(realpath $(dirname "$0"))
+source ${DEVELOPMENT_BIN_DIRECTORY}/constants.sh
+
if [ -n "${VERBOSE+x}" ]; then
echo "All messages count currently consumed by dcae app simulator: "
fi
-curl --request GET localhost:6063/messages/all/count
+curl --request GET ${DCAE_APP_ADDRESS}/messages/all/count
echo
diff --git a/development/bin/dcae-reset.sh b/development/bin/dcae-reset.sh
index e5b7b056..03baf97a 100755
--- a/development/bin/dcae-reset.sh
+++ b/development/bin/dcae-reset.sh
@@ -57,9 +57,12 @@ while getopts "$optspec" arg; do
done
shift $((OPTIND-1))
+DEVELOPMENT_BIN_DIRECTORY=$(realpath $(dirname "$0"))
+source ${DEVELOPMENT_BIN_DIRECTORY}/constants.sh
+
if [ -n "${VERBOSE+x}" ]; then
- echo "Requesting DCAE app running on port 6063 to reset messages count"
+ echo "Requesting DCAE app running on port ${DCAE_APP_PORT} to reset messages count"
fi
-curl --request DELETE localhost:6063/messages
+curl --request DELETE ${DCAE_APP_ADDRESS}/messages
echo
diff --git a/development/bin/dcae-topic.sh b/development/bin/dcae-topic.sh
index 8c176221..aefb1d0b 100755
--- a/development/bin/dcae-topic.sh
+++ b/development/bin/dcae-topic.sh
@@ -56,11 +56,14 @@ while getopts "$optspec" arg; do
done
shift $((OPTIND-1))
+DEVELOPMENT_BIN_DIRECTORY=$(realpath $(dirname "$0"))
+source ${DEVELOPMENT_BIN_DIRECTORY}/constants.sh
+
TOPIC=${1:-HV_VES_PERF3GPP}
if [ -n "${VERBOSE+x}" ]; then
- echo "Requesting DCAE app running on port 6063 to consume messages from topic: ${TOPIC}"
+ echo "Requesting DCAE app running on ${DCAE_APP_ADDRESS} to consume messages from topic: ${TOPIC}"
fi
-curl --request PUT localhost:6063/configuration/topics -d ${TOPIC}
+curl --request PUT ${DCAE_APP_ADDRESS}/configuration/topics -d ${TOPIC}
echo \ No newline at end of file
diff --git a/development/bin/start-simulation.sh b/development/bin/start-simulation.sh
index beede920..dfb63e65 100755
--- a/development/bin/start-simulation.sh
+++ b/development/bin/start-simulation.sh
@@ -114,7 +114,7 @@ function wait_for_containers_startup_or_fail() {
function start_simulation() {
verbose_log "Simulation: every xNF will send ${MESSAGES_IN_BATCH} messages to hv-ves
- ${MESSAGE_BATCHES_AMOUNT} times, once every ${MESSAGES_SENDING_INTERVAL}"
+ ${MESSAGE_BATCHES_AMOUNT} times, once every ${MESSAGES_SENDING_INTERVAL}s"
for port in ${CREATED_XNF_SIMULATORS_PORTS[@]}; do
start_single_simulation $port $MESSAGES_IN_BATCH &
done
diff --git a/development/docker-compose.yml b/development/docker-compose.yml
index adf8947d..284199d0 100644
--- a/development/docker-compose.yml
+++ b/development/docker-compose.yml
@@ -67,7 +67,9 @@ services:
"--config-url", "http://consul-server:8500/v1/kv/veshv-config?raw=true",
"--kafka-bootstrap-servers", "message-router-kafka:9092",
"--key-store-password", "onaponap",
- "--trust-store-password", "onaponap"]
+ "--trust-store-password", "onaponap",
+ "--first-request-delay", "2",
+ "--log-level", "DEBUG"]
environment:
JAVA_OPTS: "-Dio.netty.leakDetection.level=paranoid"
healthcheck:
@@ -91,12 +93,20 @@ services:
image: onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-xnf-simulator
ports:
- "6062:6062/tcp"
+ - "6063:6063"
command: ["--listen-port", "6062",
+ "--health-check-api-port", "6063",
"--ves-host", "ves-hv-collector",
"--ves-port", "6061",
"--key-store", "/etc/ves-hv/client.p12",
"--key-store-password", "onaponap",
"--trust-store-password", "onaponap"]
+ healthcheck:
+ test: curl -f http://localhost:6063/health/ready || exit 1
+ interval: 10s
+ timeout: 3s
+ retries: 3
+ start_period: 10s
depends_on:
- ves-hv-collector
volumes:
@@ -105,8 +115,8 @@ services:
dcae-app-simulator:
image: onap/org.onap.dcaegen2.collectors.hv-ves.hv-collector-dcae-app-simulator
ports:
- - "6063:6063/tcp"
- command: ["--listen-port", "6063",
+ - "6064:6064/tcp"
+ command: ["--listen-port", "6064",
"--kafka-bootstrap-servers", "message-router-kafka:9092",
"--kafka-topics", "HV_VES_PERF3GPP"]
depends_on: