Adaptations to docker-compose V2
[nonrtric.git] / test / simulator-group / dmaapmr / docker-compose.yml
1 #  ============LICENSE_START===============================================
2 #  Copyright (C) 2020 Nordix Foundation. All rights reserved.
3 #  ========================================================================
4 #  Licensed under the Apache License, Version 2.0 (the "License");
5 #  you may not use this file except in compliance with the License.
6 #  You may obtain a copy of the License at
7 #
8 #       http://www.apache.org/licenses/LICENSE-2.0
9 #
10 #  Unless required by applicable law or agreed to in writing, software
11 #  distributed under the License is distributed on an "AS IS" BASIS,
12 #  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 #  See the License for the specific language governing permissions and
14 #  limitations under the License.
15 #  ============LICENSE_END=================================================
16 #
17
18 version: '3.0'
19 networks:
20   default:
21     external: true
22     name: ${DOCKER_SIM_NWNAME}
23 services:
24   zookeeper:
25     image: $ONAP_ZOOKEEPER_IMAGE
26     container_name: $MR_ZOOKEEPER_APP_NAME
27     ports:
28       - "$MR_ZOOKEEPER_PORT:$MR_ZOOKEEPER_PORT"
29     environment:
30      ZOOKEEPER_REPLICAS: 1
31      ZOOKEEPER_TICK_TIME: 2000
32      ZOOKEEPER_SYNC_LIMIT: 5
33      ZOOKEEPER_INIT_LIMIT: 10
34      ZOOKEEPER_MAX_CLIENT_CNXNS: 200
35      ZOOKEEPER_AUTOPURGE_SNAP_RETAIN_COUNT: 3
36      ZOOKEEPER_AUTOPURGE_PURGE_INTERVAL: 24
37      ZOOKEEPER_CLIENT_PORT: $MR_ZOOKEEPER_PORT
38      KAFKA_OPTS: -Djava.security.auth.login.config=/etc/zookeeper/secrets/jaas/zk_server_jaas.conf -Dzookeeper.kerberos.removeHostFromPrincipal=true -Dzookeeper.kerberos.removeRealmFromPrincipal=true -Dzookeeper.authProvider.1=org.apache.zookeeper.server.auth.SASLAuthenticationProvider -Dzookeeper.requireClientAuthScheme=sasl -Dzookeeper.4lw.commands.whitelist=*
39      ZOOKEEPER_SERVER_ID: 1
40     volumes:
41       -  .${MR_DMAAP_HOST_MNT_DIR}/zk/zk_server_jaas.conf:/etc/zookeeper/secrets/jaas/zk_server_jaas.conf
42     networks:
43       - default
44     labels:
45       - "nrttest_app=DMAAPMR"
46       - "nrttest_dp=ZooKeeper"
47
48   kafka:
49    image: $ONAP_KAFKA_IMAGE
50    container_name: $MR_KAFKA_APP_NAME
51    ports:
52     - "$MR_KAFKA_PORT:$MR_KAFKA_PORT"
53    environment:
54     enableCadi: 'false'
55     KAFKA_ZOOKEEPER_CONNECT: $MR_ZOOKEEPER_APP_NAME:$MR_ZOOKEEPER_PORT
56     KAFKA_ZOOKEEPER_CONNECTION_TIMEOUT_MS: 40000
57     KAFKA_ZOOKEEPER_SESSION_TIMEOUT_MS: 40000
58     KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL_PLAINTEXT:PLAINTEXT,EXTERNAL_PLAINTEXT:PLAINTEXT
59     KAFKA_ADVERTISED_LISTENERS: INTERNAL_PLAINTEXT://$MR_KAFKA_SERVICE_PATH
60     KAFKA_LISTENERS: INTERNAL_PLAINTEXT://0.0.0.0:$MR_KAFKA_PORT
61     KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL_PLAINTEXT
62     KAFKA_CONFLUENT_SUPPORT_METRICS_ENABLE: 'false'
63     KAFKA_OPTS: -Djava.security.auth.login.config=/etc/kafka/secrets/jaas/zk_client_jaas.conf
64     KAFKA_ZOOKEEPER_SET_ACL: 'true'
65     KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
66     # Reduced the number of partitions only to avoid the timeout error for the first subscribe call in slow environment
67     KAFKA_OFFSETS_TOPIC_NUM_PARTITIONS: 1
68    volumes:
69      -  .${MR_DMAAP_HOST_MNT_DIR}/kafka/zk_client_jaas.conf:/etc/kafka/secrets/jaas/zk_client_jaas.conf
70    networks:
71     - default
72    depends_on:
73     - zookeeper
74    labels:
75     - "nrttest_app=DMAAPMR"
76     - "nrttest_dp=Kafka"
77
78   dmaap:
79     image: $ONAP_DMAAPMR_IMAGE
80     container_name: $MR_DMAAP_APP_NAME
81     ports:
82       - ${MR_DMAAP_LOCALHOST_PORT}:${MR_INTERNAL_PORT}
83       - ${MR_DMAAP_LOCALHOST_SECURE_PORT}:${MR_INTERNAL_SECURE_PORT}
84     environment:
85      enableCadi: 'false'
86     volumes:
87       - .${MR_DMAAP_HOST_MNT_DIR}/mr/MsgRtrApi.properties:/appl/dmaapMR1/bundleconfig/etc/appprops/MsgRtrApi.properties
88       - .${MR_DMAAP_HOST_MNT_DIR}/mr/logback.xml:/appl/dmaapMR1/bundleconfig/etc/logback.xml
89       - .${MR_DMAAP_HOST_MNT_DIR}/mr/cadi.properties:/appl/dmaapMR1/etc/cadi.properties
90     networks:
91       - default
92     depends_on:
93       - zookeeper
94       - kafka
95     labels:
96       - "nrttest_app=DMAAPMR"
97       - "nrttest_dp=DMAAP Message Router"