summaryrefslogtreecommitdiffstats
path: root/development
diff options
context:
space:
mode:
authorFilip Krzywka <filip.krzywka@nokia.com>2019-01-08 07:53:25 +0100
committerFilip Krzywka <filip.krzywka@nokia.com>2019-01-08 12:11:26 +0100
commit5180f3f32a2cdd35206f728e0fd7dd6ad62b567a (patch)
tree3929c3327086a1d9381994e6572b43200519ca20 /development
parent8b4e282df3863042c69dae60460ec2397e12562e (diff)
Merge Healthcheck descriptions
- start new API server for healthchecks in xNF simulator on port 6063 - changed DCAE App default port to 6064 - switched to InetSocketAddresses usage in components configurations Change-Id: I398f9ea6e887f78d88286ed717d310d3297b1571 Issue-ID: DCAEGEN2-1063 Signed-off-by: Filip Krzywka <filip.krzywka@nokia.com>
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.yml12
6 files changed, 47 insertions, 8 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..8b5854ca 100644
--- a/development/docker-compose.yml
+++ b/development/docker-compose.yml
@@ -91,12 +91,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 +113,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: