1d34e9f8634392b99e06e60f311502846c017f22
[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: wurstmeister/zookeeper
34     ports:
35       - "2181:2181"
36     networks:
37       - hv-ves-default
38
39   kafka:
40     image: wurstmeister/kafka
41     ports:
42       - "9092:9092"
43     environment:
44       KAFKA_ADVERTISED_HOST_NAME: "kafka"
45       KAFKA_AUTO_CREATE_TOPICS_ENABLE: 'true'
46       KAFKA_ZOOKEEPER_CONNECT: "zookeeper:2181"
47       KAFKA_ADVERTISED_LISTENERS: "PLAINTEXT://kafka:9092"
48     volumes:
49       - /var/run/docker.sock:/var/run/docker.sock
50     depends_on:
51       - zookeeper
52     networks:
53       - hv-ves-default
54
55   #
56   # Consul / CBS
57   #
58
59   consul-server:
60     image: docker.io/consul:1.0.6
61     ports:
62       - "8500:8500"
63     volumes:
64       - ./consul/:/consul/config
65     networks:
66       - hv-ves-default
67
68   config-binding-service:
69     image: nexus3.onap.org:10001/onap/org.onap.dcaegen2.platform.configbinding.app-app:2.2.4
70     ports:
71       - "10000:10000"
72     environment:
73       - CONSUL_HOST
74     depends_on:
75       - consul-server
76     networks:
77       - hv-ves-default
78
79   #
80   # DCAE HV VES Collector
81   #
82
83   hv-ves-collector:
84     image: ${DOCKER_REGISTRY}/${HV_VES_COLLECTOR_NAMESPACE}/${HV_VES_GROUP_ID}.${HV_VES_IMAGE}:${HV_VES_VERSION}
85     ports:
86       - "6060:6060"
87       - "6061:6061/tcp"
88     command: ["--configuration-file", "/etc/hv-ves/configuration/secure.json"]
89     environment:
90       - JAVA_OPTS
91       - HOSTNAME=${HV_VES_HOSTNAME}
92       - CONSUL_HOST
93       - CONFIG_BINDING_SERVICE
94     healthcheck:
95       interval: 10s
96       timeout: 5s
97       retries: 2
98       test: ${HV_VES_HEALTHCHECK_CMD}
99     volumes:
100       - ./collector/:/etc/hv-ves/
101     depends_on:
102       - config-binding-service
103       - kafka
104     networks:
105       - hv-ves-default
106
107   unencrypted-hv-ves-collector:
108     image: ${DOCKER_REGISTRY}/${HV_VES_COLLECTOR_NAMESPACE}/${HV_VES_GROUP_ID}.${HV_VES_IMAGE}:${HV_VES_VERSION}
109     ports:
110       - "7060:6060"
111       - "7061:6061/tcp"
112     command: ["--configuration-file", "/etc/hv-ves/configuration/insecure.json"]
113     environment:
114       - JAVA_OPTS
115       - HOSTNAME=${HV_VES_HOSTNAME}
116       - CONSUL_HOST
117       - CONFIG_BINDING_SERVICE
118     healthcheck:
119       interval: 10s
120       timeout: 5s
121       retries: 2
122       test: ${HV_VES_HEALTHCHECK_CMD}
123     volumes:
124       - ./collector/:/etc/hv-ves/
125     depends_on:
126       - config-binding-service
127       - kafka
128     networks:
129       - hv-ves-default
130
131   dcae-app-simulator:
132     image: ${DOCKER_REGISTRY}/${HV_VES_COLLECTOR_NAMESPACE}/${HV_VES_GROUP_ID}.${DCAE_APP_SIMULATOR_IMAGE}:${HV_VES_VERSION}
133     ports:
134       - "6063:6063/tcp"
135     command: ["--listen-port", "6063", "--kafka-bootstrap-servers", "kafka:9092", "--kafka-topics", "non-existing-topic"]
136     healthcheck:
137       interval: 10s
138       timeout: 5s
139       retries: 2
140       test: "curl --request GET --fail --silent --show-error localhost:6063/healthcheck"
141     depends_on:
142       - kafka
143     networks:
144       - hv-ves-default
145