Upgraded test env with Kubernetes support
[nonrtric.git] / test / simulator-group / dmaapmr / docker-compose.yaml
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.5'
19 networks:
20   default:
21     external:
22       name: ${DOCKER_SIM_NWNAME}
23
24 services:
25   zookeeper:
26     image: $ONAP_ZOOKEEPER_IMAGE
27     container_name: $MR_ZOOKEEPER_APP_NAME
28     ports:
29       - "2181:2181"
30     environment:
31      ZOOKEEPER_REPLICAS: 1
32      ZOOKEEPER_TICK_TIME: 2000
33      ZOOKEEPER_SYNC_LIMIT: 5
34      ZOOKEEPER_INIT_LIMIT: 10
35      ZOOKEEPER_MAX_CLIENT_CNXNS: 200
36      ZOOKEEPER_AUTOPURGE_SNAP_RETAIN_COUNT: 3
37      ZOOKEEPER_AUTOPURGE_PURGE_INTERVAL: 24
38      ZOOKEEPER_CLIENT_PORT: 2181
39      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
40      ZOOKEEPER_SERVER_ID: 1
41     volumes:
42       -  ./mnt/zk/zk_server_jaas.conf:/etc/zookeeper/secrets/jaas/zk_server_jaas.conf
43     networks:
44       - default
45
46   kafka:
47    image: $ONAP_KAFKA_IMAGE
48    container_name: $MR_KAFKA_APP_NAME
49    ports:
50     - "9092:9092"
51    environment:
52     enableCadi: 'false'
53     KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
54     KAFKA_ZOOKEEPER_CONNECTION_TIMEOUT_MS: 40000
55     KAFKA_ZOOKEEPER_SESSION_TIMEOUT_MS: 40000
56     KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL_PLAINTEXT:PLAINTEXT,EXTERNAL_PLAINTEXT:PLAINTEXT
57     KAFKA_ADVERTISED_LISTENERS: INTERNAL_PLAINTEXT://kafka:9092
58     KAFKA_LISTENERS: INTERNAL_PLAINTEXT://0.0.0.0:9092
59     KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL_PLAINTEXT
60     KAFKA_CONFLUENT_SUPPORT_METRICS_ENABLE: 'false'
61     KAFKA_OPTS: -Djava.security.auth.login.config=/etc/kafka/secrets/jaas/zk_client_jaas.conf
62     KAFKA_ZOOKEEPER_SET_ACL: 'true'
63     KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
64     # Reduced the number of partitions only to avoid the timeout error for the first subscribe call in slow environment
65     KAFKA_OFFSETS_TOPIC_NUM_PARTITIONS: 1
66    volumes:
67      -  ./mnt/kafka/zk_client_jaas.conf:/etc/kafka/secrets/jaas/zk_client_jaas.conf
68    networks:
69       - default
70    depends_on:
71     - zookeeper
72
73   dmaap:
74     image: $ONAP_DMAAPMR_IMAGE
75     container_name: $MR_DMAAP_APP_NAME
76     ports:
77       - ${MR_DMAAP_LOCALHOST_PORT}:${MR_INTERNAL_PORT}
78       - ${MR_DMAAP_LOCALHOST_SECURE_PORT}:${MR_INTERNAL_SECURE_PORT}
79     environment:
80      enableCadi: 'false'
81     volumes:
82       - ./mnt/mr/MsgRtrApi.properties:/appl/dmaapMR1/bundleconfig/etc/appprops/MsgRtrApi.properties
83       - ./mnt/mr/logback.xml:/appl/dmaapMR1/bundleconfig/etc/logback.xml
84       - ./mnt/mr/cadi.properties:/appl/dmaapMR1/etc/cadi.properties
85     networks:
86       - default
87     depends_on:
88       - zookeeper
89       - kafka