Update docker-compose and its configurations
[oam.git] / solution / integration / smo / docker-compose.yml
1 ################################################################################
2 # Copyright 2021 highstreet technologies and others
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 #
16 version: "2.2"
17 services:
18   sdnrdb:
19     image: ${SDNRDB_IMAGE}
20     container_name: sdnrdb
21     environment:
22       - discovery.type=single-node
23     networks:
24       integration:
25         ipv4_address: ${ESDB_IP}
26
27   sdnr:
28     image: ${SDNC_IMAGE}
29     container_name: sdnr
30     ports:
31       - "8181:8181"
32       - "8101:8101"
33     environment:
34       - SDNC_CONFIG_DIR=/opt/onap/ccsdk/data/properties
35       - ODL_CERT_DIR=${ODL_CERT_DIR}
36       - ENABLE_ODL_CLUSTER=false
37       - SDNC_REPLICAS=0
38       - CCSDK_REPLICAS=0
39       - DOMAIN=""
40       - SDNRWT=true
41       - SDNRINIT=true
42       - SDNRONLY=true
43       - SDNRDBURL=http://sdnrdb:9200
44       - ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD}
45       - JAVA_OPTS=-Xms256m -Xmx2g
46     volumes:
47       - ./sdnr/mountpoint-registrar.properties:/opt/opendaylight/etc/mountpoint-registrar.properties
48       - ./sdnr/certs/certs.properties:${ODL_CERT_DIR}/certs.properties
49       - ./sdnr/certs/keys0.zip:${ODL_CERT_DIR}/keys0.zip
50     networks:
51       integration:
52         ipv4_address: ${SDNR_IP}
53     logging:
54       driver:   "json-file"
55       options:
56         max-size: "30m"
57         max-file: "5"
58   zookeeper:
59     image: ${ZOOKEEPER_IMAGE}
60     container_name: zookeeper
61     ports:
62       - "2181:2181"
63     environment:
64       ZOOKEEPER_REPLICAS: 1
65       ZOOKEEPER_TICK_TIME: 2000
66       ZOOKEEPER_SYNC_LIMIT: 5
67       ZOOKEEPER_INIT_LIMIT: 10
68       ZOOKEEPER_MAX_CLIENT_CNXNS: 200
69       ZOOKEEPER_AUTOPURGE_SNAP_RETAIN_COUNT: 3
70       ZOOKEEPER_AUTOPURGE_PURGE_INTERVAL: 24
71       ZOOKEEPER_CLIENT_PORT: 2181
72       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
73       ZOOKEEPER_SERVER_ID:
74     volumes:
75       -  ./zk/zk_server_jaas.conf:/etc/zookeeper/secrets/jaas/zk_server_jaas.conf
76     networks:
77       integration:
78         aliases:
79         - zookeeper
80         ipv4_address: ${ZOOKEEPER_IP}
81   kafka:
82     image: ${KAFKA_IMAGE}
83     container_name: kafka
84     ports:
85      - "9092:9092"
86     environment:
87       enableCadi: 'false'
88       KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
89       KAFKA_ZOOKEEPER_CONNECTION_TIMEOUT_MS: 40000
90       KAFKA_ZOOKEEPER_SESSION_TIMEOUT_MS: 40000
91       KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL_PLAINTEXT:PLAINTEXT,EXTERNAL_PLAINTEXT:PLAINTEXT
92       KAFKA_ADVERTISED_LISTENERS: INTERNAL_PLAINTEXT://kafka:9092
93       KAFKA_LISTENERS: INTERNAL_PLAINTEXT://0.0.0.0:9092
94       KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL_PLAINTEXT
95       KAFKA_CONFLUENT_SUPPORT_METRICS_ENABLE: 'false'
96       KAFKA_OPTS: -Djava.security.auth.login.config=/etc/kafka/secrets/jaas/zk_client_jaas.conf
97       KAFKA_ZOOKEEPER_SET_ACL: 'true'
98       KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
99       # Reduced the number of partitions only to avoid the timeout error for the first subscribe call in slow environment
100       KAFKA_OFFSETS_TOPIC_NUM_PARTITIONS: 1
101     volumes:
102       -  ./kafka/zk_client_jaas.conf:/etc/kafka/secrets/jaas/zk_client_jaas.conf
103     networks:
104       integration:
105         aliases:
106         - kafka
107         ipv4_address: ${KAFKA_IP}
108
109     depends_on:
110      - zookeeper
111   onap-dmaap:
112     container_name: onap-dmaap
113     image: ${DMAAP_IMAGE}
114     ports:
115       - "3904:3904"
116       - "3905:3905"
117     environment:
118       enableCadi: 'false'
119     volumes:
120       - ./mr/MsgRtrApi.properties:/appl/dmaapMR1/bundleconfig/etc/appprops/MsgRtrApi.properties
121       - ./mr/logback.xml:/appl/dmaapMR1/bundleconfig/etc/logback.xml
122       - ./mr/cadi.properties:/appl/dmaapMR1/etc/cadi.properties
123     networks:
124       integration:
125         aliases:
126         - dmaap
127         ipv4_address: ${DMAAP_IP}
128
129     depends_on:
130       - zookeeper
131       - kafka
132   vesc:
133     image: ${VESC_IMAGE}
134     container_name: vescollector
135     environment:
136       DMAAPHOST: "dmaap"
137     ports:
138       - "8080:8080"
139       - "8443:8443"
140     volumes:
141       - ./vesc/collector.properties:/opt/app/VESCollector/etc/collector.properties
142     networks:
143       integration:
144         ipv4_address: ${VESCOLLECTOR_IP}
145 networks:
146   integration:
147     driver: bridge
148     ipam:
149       driver: default
150       config:
151       - subnet: ${NETWORK_SUBNET}
152         gateway: ${GATEWAY_IP}