d89e82bb69b751b68c1158def0402a5da7e1803b
[integration/csit.git] / plans / dcaegen2-collectors-hv-ves / testsuites / docker-compose.yml
1 version: "3"
2 # ============LICENSE_START=======================================================
3 # csit-dcaegen2-collectors-hv-ves
4 # ================================================================================
5 # Copyright (C) 2018-2019 NOKIA
6 # ================================================================================
7 # Licensed under the Apache License, Version 2.0 (the "License");
8 # you may not use this file except in compliance with the License.
9 # You may obtain a copy of the License at
10 #
11 #      http://www.apache.org/licenses/LICENSE-2.0
12 #
13 # Unless required by applicable law or agreed to in writing, software
14 # distributed under the License is distributed on an "AS IS" BASIS,
15 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16 # See the License for the specific language governing permissions and
17 # limitations under the License.
18 # ============LICENSE_END=========================================================
19
20
21 networks:
22   hv-ves-default:
23     external:
24       name: $CONTAINERS_NETWORK
25
26 services:
27
28   #
29   # DMaaP Message Router
30   #
31
32   zookeeper:
33     image: ${ZOOKEEPER_IMAGE_FULL_NAME}
34     ports:
35       - "2181:2181"
36     networks:
37       - hv-ves-default
38
39   kafka:
40     image: ${KAFKA_IMAGE_FULL_NAME}
41     ports:
42       - "9092:9092"
43       - "9093:9093"
44     environment:
45       HOST_IP: 127.0.0.1
46       KAFKA_BROKER_ID: 0
47       ENDPOINT_PORT: 30490
48       KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
49       KAFKA_AUTO_CREATE_TOPICS_ENABLE: "true"
50       KAFKA_DELETE_TOPIC_ENABLE: "true"
51
52       KAFKA_LISTENERS: "INTERNAL_SASL_PLAINTEXT://0.0.0.0:9092,EXTERNAL_SASL_PLAINTEXT://0.0.0.0:9093"
53       KAFKA_ADVERTISED_LISTENERS: "INTERNAL_SASL_PLAINTEXT://:9092,EXTERNAL_SASL_PLAINTEXT://:9093"
54       KAFKA_ADVERTISED_HOST_NAME: "kafka"
55       KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: "INTERNAL_SASL_PLAINTEXT:SASL_PLAINTEXT,EXTERNAL_SASL_PLAINTEXT:SASL_PLAINTEXT"
56       KAFKA_INTER_BROKER_LISTENER_NAME: "INTERNAL_SASL_PLAINTEXT"
57       KAFKA_SASL_ENABLED_MECHANISMS: "PLAIN"
58       KAFKA_SASL_MECHANISM_INTER_BROKER_PROTOCOL: "PLAIN"
59       KAFKA_AUTHORIZER_CLASS_NAME: "org.onap.dmaap.kafkaAuthorize.KafkaCustomAuthorizer"
60
61       aaf_locate_url: https://aaf-locate:8095
62       KAFKA_LOG_DIRS: /opt/kafka/data
63       KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
64       KAFKA_DEFAULT_REPLICATION_FACTOR: 1
65       KAFKA_NUM_PARTITIONS: 1
66     volumes:
67       - /var/run/docker.sock:/var/run/docker.sock
68     depends_on:
69       - zookeeper
70     networks:
71       - hv-ves-default
72
73   #
74   # Consul / CBS
75   #
76
77   consul-server:
78     image: docker.io/consul:1.0.6
79     ports:
80       - "8500:8500"
81     volumes:
82       - ./consul/:/consul/config
83     networks:
84       - hv-ves-default
85
86   config-binding-service:
87     image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding:2.5.2
88     ports:
89       - "10000:10000"
90     environment:
91       - CONSUL_HOST
92     depends_on:
93       - consul-server
94     networks:
95       - hv-ves-default
96
97   #
98   # DCAE HV VES Collector
99   #
100
101   hv-ves-collector:
102     image: ${DOCKER_REGISTRY}/${HV_VES_COLLECTOR_NAMESPACE}/${HV_VES_GROUP_ID}.${HV_VES_IMAGE}:${HV_VES_VERSION}
103     ports:
104       - "6060:6060"
105       - "6061:6061/tcp"
106     command: ["--configuration-file", "/etc/ves-hv/configuration/secure.json"]
107     environment:
108       - JAVA_OPTS
109       - HOSTNAME=${HV_VES_HOSTNAME}
110       - CONSUL_HOST
111       - CONFIG_BINDING_SERVICE
112       - CONFIG_BINDING_SERVICE_SERVICE_PORT
113     healthcheck:
114       interval: 10s
115       timeout: 5s
116       retries: 2
117       test: ${HV_VES_HEALTHCHECK_CMD}
118     volumes:
119       - ./collector/:/etc/ves-hv/
120     depends_on:
121       - config-binding-service
122       - kafka
123     networks:
124       - hv-ves-default
125
126   unencrypted-hv-ves-collector:
127     image: ${DOCKER_REGISTRY}/${HV_VES_COLLECTOR_NAMESPACE}/${HV_VES_GROUP_ID}.${HV_VES_IMAGE}:${HV_VES_VERSION}
128     ports:
129       - "7060:6060"
130       - "7061:6061/tcp"
131     command: ["--configuration-file", "/etc/ves-hv/configuration/insecure.json"]
132     environment:
133       - JAVA_OPTS
134       - HOSTNAME=${HV_VES_HOSTNAME}
135       - CONSUL_HOST
136       - CONFIG_BINDING_SERVICE
137       - CONFIG_BINDING_SERVICE_SERVICE_PORT
138     healthcheck:
139       interval: 10s
140       timeout: 5s
141       retries: 2
142       test: ${HV_VES_HEALTHCHECK_CMD}
143     volumes:
144       - ./collector/:/etc/ves-hv/
145     depends_on:
146       - config-binding-service
147       - kafka
148     networks:
149       - hv-ves-default
150
151   dcae-app-simulator:
152     image: ${DOCKER_REGISTRY}/${HV_VES_COLLECTOR_NAMESPACE}/${HV_VES_GROUP_ID}.${DCAE_APP_SIMULATOR_IMAGE}:${HV_VES_VERSION}
153     ports:
154       - "6063:6063/tcp"
155     command: ["--listen-port", "6063", "--kafka-bootstrap-servers", "kafka:9092", "--kafka-topics", "non-existing-topic"]
156     healthcheck:
157       interval: 10s
158       timeout: 5s
159       retries: 2
160       test: "curl --request GET --fail --silent --show-error localhost:6063/healthcheck"
161     depends_on:
162       - kafka
163     networks:
164       - hv-ves-default
165