aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkjaniak <kornel.janiak@nokia.com>2019-04-23 16:11:37 +0200
committerPiotr Jaszczyk <piotr.jaszczyk@nokia.com>2019-05-10 07:15:41 +0200
commitca77ff94532f69a4921e7fde8205711e7e1f4426 (patch)
treeab491025f5ddc226fdb5f346cc3c8ddcdf46529f
parent1a278216453d9d542078c212347940a9a88f9fc6 (diff)
Switch to DMaaP kafka image
Change-Id: Ib3d58aec92d66a291cf97d5a72d42e7579e265db Issue-ID: DCAEGEN2-1448 Signed-off-by: kjaniak <kornel.janiak@nokia.com> Signed-off-by: Piotr Jaszczyk <piotr.jaszczyk@nokia.com>
-rw-r--r--plans/dcaegen2-collectors-hv-ves/testsuites/docker-compose.yml28
-rwxr-xr-xplans/dcaegen2-collectors-hv-ves/testsuites/env.sh7
-rwxr-xr-xplans/dcaegen2-collectors-hv-ves/testsuites/env_local.sh6
-rwxr-xr-xplans/dcaegen2-collectors-hv-ves/testsuites/setup.sh1
-rw-r--r--tests/dcaegen2-collectors-hv-ves/testcases/libraries/KafkaLibrary.py3
-rw-r--r--tests/dcaegen2-collectors-hv-ves/testcases/resources/hv-ves-configuration-with-different-topic.json4
-rw-r--r--tests/dcaegen2-collectors-hv-ves/testcases/resources/hv-ves-configuration.json4
7 files changed, 45 insertions, 8 deletions
diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/docker-compose.yml b/plans/dcaegen2-collectors-hv-ves/testsuites/docker-compose.yml
index 1d34e9f8..eb61db97 100644
--- a/plans/dcaegen2-collectors-hv-ves/testsuites/docker-compose.yml
+++ b/plans/dcaegen2-collectors-hv-ves/testsuites/docker-compose.yml
@@ -30,21 +30,39 @@ services:
#
zookeeper:
- image: wurstmeister/zookeeper
+ image: ${ZOOKEEPER_IMAGE_FULL_NAME}
ports:
- "2181:2181"
networks:
- hv-ves-default
kafka:
- image: wurstmeister/kafka
+ image: ${KAFKA_IMAGE_FULL_NAME}
ports:
- "9092:9092"
+ - "9093:9093"
environment:
- KAFKA_ADVERTISED_HOST_NAME: "kafka"
- KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
+ HOST_IP: 127.0.0.1
+ KAFKA_BROKER_ID: 0
+ ENDPOINT_PORT: 30490
KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
- KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://kafka:9092"
+ KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
+ KAFKA_DELETE_TOPIC_ENABLE: "true"
+
+ KAFKA_LISTENERS: "INTERNAL_SASL_PLAINTEXT://0.0.0.0:9092,EXTERNAL_SASL_PLAINTEXT://0.0.0.0:9093"
+ KAFKA_ADVERTISED_LISTENERS: "INTERNAL_SASL_PLAINTEXT://:9092,EXTERNAL_SASL_PLAINTEXT://:9093"
+ KAFKA_ADVERTISED_HOST_NAME: "kafka"
+ KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "INTERNAL_SASL_PLAINTEXT:SASL_PLAINTEXT,EXTERNAL_SASL_PLAINTEXT:SASL_PLAINTEXT"
+ KAFKA_INTER_BROKER_LISTENER_NAME: "INTERNAL_SASL_PLAINTEXT"
+ KAFKA_SASL_ENABLED_MECHANISMS: "PLAIN"
+ KAFKA_SASL_MECHANISM_INTER_BROKER_PROTOCOL: "PLAIN"
+ KAFKA_AUTHORIZER_CLASS_NAME: "org.onap.dmaap.kafkaAuthorize.KafkaCustomAuthorizer"
+
+ aaf_locate_url: https://aaf-locate:8095
+ KAFKA_LOG_DIRS: /opt/kafka/data
+ KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
+ KAFKA_DEFAULT_REPLICATION_FACTOR: 1
+ KAFKA_NUM_PARTITIONS: 1
volumes:
- /var/run/docker.sock:/var/run/docker.sock
depends_on:
diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/env.sh b/plans/dcaegen2-collectors-hv-ves/testsuites/env.sh
index 05314841..c9e3ff06 100755
--- a/plans/dcaegen2-collectors-hv-ves/testsuites/env.sh
+++ b/plans/dcaegen2-collectors-hv-ves/testsuites/env.sh
@@ -24,8 +24,13 @@ export JAVA_OPTS="-Dio.netty.leakDetection.level=paranoid"
export CONSUL_HOST="consul-server"
export CONFIG_BINDING_SERVICE="config-binding-service"
-export DOCKER_REGISTRY="nexus3.onap.org:10001"
+export ONAP_NEXUS_REGISTRY="nexus3.onap.org:10001"
+export DOCKER_REGISTRY=${ONAP_NEXUS_REGISTRY}
export DOCKER_REGISTRY_PREFIX="${DOCKER_REGISTRY}/"
+
+export KAFKA_IMAGE_FULL_NAME="${DOCKER_REGISTRY_PREFIX}onap/dmaap/kafka111:0.0.6"
+export ZOOKEEPER_IMAGE_FULL_NAME="${DOCKER_REGISTRY_PREFIX}onap/dmaap/zookeeper:4.0.0"
+
export CONTAINERS_NETWORK="hv-ves-default"
export HV_VES_SERVICE_NAME="hv-ves-collector"
export UNENCRYPTED_HV_VES_SERVICE_NAME="unencrypted-hv-ves-collector"
diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/env_local.sh b/plans/dcaegen2-collectors-hv-ves/testsuites/env_local.sh
index 20b538b5..a2ae3356 100755
--- a/plans/dcaegen2-collectors-hv-ves/testsuites/env_local.sh
+++ b/plans/dcaegen2-collectors-hv-ves/testsuites/env_local.sh
@@ -24,8 +24,13 @@ export JAVA_OPTS="-Dio.netty.leakDetection.level=paranoid"
export CONSUL_HOST="consul-server"
export CONFIG_BINDING_SERVICE="config-binding-service"
+export ONAP_NEXUS_REGISTRY="nexus3.onap.org:10001"
export DOCKER_REGISTRY="docker.io"
export DOCKER_REGISTRY_PREFIX=""
+
+export KAFKA_IMAGE_FULL_NAME="${ONAP_NEXUS_REGISTRY}/onap/dmaap/kafka111:0.0.6"
+export ZOOKEEPER_IMAGE_FULL_NAME="${DOCKER_REGISTRY_PREFIX}onap/dmaap/zookeeper:4.0.0"
+
export CONTAINERS_NETWORK="hv-ves-default"
export HV_VES_SERVICE_NAME="hv-ves-collector"
export UNENCRYPTED_HV_VES_SERVICE_NAME="unencrypted-hv-ves-collector"
@@ -38,4 +43,3 @@ export HV_VES_VERSION="latest"
export HV_VES_IMAGE="hv-collector-main"
export DCAE_APP_SIMULATOR_IMAGE="hv-collector-dcae-app-simulator"
export XNF_SIMULATOR_IMAGE="hv-ves-collector-xnf-simulator"
-
diff --git a/plans/dcaegen2-collectors-hv-ves/testsuites/setup.sh b/plans/dcaegen2-collectors-hv-ves/testsuites/setup.sh
index 73fdbc23..eb7764e9 100755
--- a/plans/dcaegen2-collectors-hv-ves/testsuites/setup.sh
+++ b/plans/dcaegen2-collectors-hv-ves/testsuites/setup.sh
@@ -48,5 +48,6 @@ cd collector/ssl
cd ../..
docker-compose up -d
+docker images --digests
mkdir -p ${WORKSPACE}/archives/containers_logs
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/libraries/KafkaLibrary.py b/tests/dcaegen2-collectors-hv-ves/testcases/libraries/KafkaLibrary.py
index e262ff01..5c9ffb1c 100644
--- a/tests/dcaegen2-collectors-hv-ves/testcases/libraries/KafkaLibrary.py
+++ b/tests/dcaegen2-collectors-hv-ves/testcases/libraries/KafkaLibrary.py
@@ -17,9 +17,10 @@
# ============LICENSE_END=====================================
import docker
+import os
from robot.api import logger
-KAFKA_IMAGE_FULL_NAME = "wurstmeister/kafka"
+KAFKA_IMAGE_FULL_NAME = os.getenv("KAFKA_IMAGE_FULL_NAME")
KAFKA_ADDRESS = "kafka:9092"
ZOOKEEPER_ADDRESS = "zookeeper:2181"
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/hv-ves-configuration-with-different-topic.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/hv-ves-configuration-with-different-topic.json
index d3d1f4c3..7cd830d6 100644
--- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/hv-ves-configuration-with-different-topic.json
+++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/hv-ves-configuration-with-different-topic.json
@@ -2,6 +2,10 @@
"streams_publishes": {
"perf3gpp": {
"type": "kafka",
+ "aaf_credentials": {
+ "username": "admin",
+ "password": "admin_secret"
+ },
"kafka_info": {
"bootstrap_servers": "kafka:9092",
"topic_name": "TEST_HV_VES_PERF3GPP_BUT_WITH_EXTRA_WORDS"
diff --git a/tests/dcaegen2-collectors-hv-ves/testcases/resources/hv-ves-configuration.json b/tests/dcaegen2-collectors-hv-ves/testcases/resources/hv-ves-configuration.json
index 1c4e3439..d932b7d9 100644
--- a/tests/dcaegen2-collectors-hv-ves/testcases/resources/hv-ves-configuration.json
+++ b/tests/dcaegen2-collectors-hv-ves/testcases/resources/hv-ves-configuration.json
@@ -2,6 +2,10 @@
"streams_publishes": {
"perf3gpp": {
"type": "kafka",
+ "aaf_credentials": {
+ "username": "admin",
+ "password": "admin_secret"
+ },
"kafka_info": {
"bootstrap_servers": "kafka:9092",
"topic_name": "TEST_HV_VES_PERF3GPP"