6b41996057c2dc2bc0113a7f191aa84241ae73db
[dmaap/messagerouter/messageservice.git] / src / main / resources / docker-compose / docker-compose.yml
1 version: '2'
2 services:
3   zookeeper:
4     image: nexus3.onap.org:10001/onap/dmaap/zookeeper:latest
5     ports:
6       - "2181:2181"
7     environment:
8      ZOOKEEPER_REPLICAS: 1
9      ZOOKEEPER_TICK_TIME: 2000
10      ZOOKEEPER_SYNC_LIMIT: 5
11      ZOOKEEPER_INIT_LIMIT: 10
12      ZOOKEEPER_MAX_CLIENT_CNXNS: 200
13      ZOOKEEPER_AUTOPURGE_SNAP_RETAIN_COUNT: 3
14      ZOOKEEPER_AUTOPURGE_PURGE_INTERVAL: 24
15      ZOOKEEPER_CLIENT_PORT: 2181
16      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
17      ZOOKEEPER_SERVER_ID: 1
18     volumes:
19       -  ./zk/zk_server_jaas.conf:/etc/zookeeper/secrets/jaas/zk_server_jaas.conf
20     networks:
21       net:
22         aliases:
23         - zookeeper
24
25   kafka:
26    image: nexus3.onap.org:10001/onap/dmaap/kafka111:latest
27    ports:
28     - "9092:9092"
29    environment:
30     enableCadi: 'false'
31     KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
32     KAFKA_ZOOKEEPER_CONNECTION_TIMEOUT_MS: 40000
33     KAFKA_ZOOKEEPER_SESSION_TIMEOUT_MS: 40000
34     KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL_PLAINTEXT:PLAINTEXT,EXTERNAL_PLAINTEXT:PLAINTEXT
35     KAFKA_ADVERTISED_LISTENERS: INTERNAL_PLAINTEXT://kafka:9092
36     KAFKA_LISTENERS: INTERNAL_PLAINTEXT://0.0.0.0:9092
37     KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL_PLAINTEXT
38     KAFKA_CONFLUENT_SUPPORT_METRICS_ENABLE: 'false'
39     KAFKA_OPTS: -Djava.security.auth.login.config=/etc/kafka/secrets/jaas/zk_client_jaas.conf
40     KAFKA_ZOOKEEPER_SET_ACL: 'true'
41     KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
42     # Reduced the number of partitions only to avoid the timeout error for the first subscribe call in slow environment
43     KAFKA_OFFSETS_TOPIC_NUM_PARTITIONS: 1
44    volumes:
45      -  ./kafka/zk_client_jaas.conf:/etc/kafka/secrets/jaas/zk_client_jaas.conf
46    networks:
47      net:
48        aliases:
49        - kafka
50    depends_on:
51     - zookeeper
52
53   dmaap:
54     image: nexus3.onap.org:10001/onap/dmaap/dmaap-mr:latest
55     ports:
56       - "3904:3904"
57       - "3905:3905"
58     environment:
59      enableCadi: 'false'
60     volumes:
61       - ./mr/MsgRtrApi.properties:/appl/dmaapMR1/bundleconfig/etc/appprops/MsgRtrApi.properties
62       - ./mr/logback.xml:/appl/dmaapMR1/bundleconfig/etc/logback.xml
63       - ./mr/cadi.properties:/appl/dmaapMR1/etc/cadi.properties
64     networks:
65       net:
66         aliases:
67         - dmaap
68     depends_on:
69       - zookeeper
70       - kafka
71 networks:
72   net:
73     driver: bridge