Refactoring of the entire dev deployment
[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 #     https://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: ${IPv4_SDNRDB}
26         ipv6_address: ${IPv6_SDNRDB}
27
28   sdnr:
29     image: ${SDNC_IMAGE}
30     container_name: sdnr
31     ports:
32       - "8181:8181"
33       - "8101:8101"
34     environment:
35       - SDNC_CONFIG_DIR=/opt/onap/ccsdk/data/properties
36       - ODL_CERT_DIR=${ODL_CERT_DIR}
37       - ENABLE_ODL_CLUSTER=false
38       - SDNC_REPLICAS=0
39       - CCSDK_REPLICAS=0
40       - DOMAIN=""
41       - SDNRWT=true
42       - SDNRINIT=true
43       - SDNRONLY=true
44       - SDNRDBURL=http://sdnrdb:9200
45       - A1_ADAPTER_NORTHBOUND=false
46       - ODL_ADMIN_PASSWORD=${ODL_ADMIN_PASSWORD}
47       - JAVA_OPTS=-Xms256m -Xmx2g
48     volumes:
49       - ./sdnr/mountpoint-registrar.properties:/opt/opendaylight/etc/mountpoint-registrar.properties
50       - ./sdnr/certs/certs.properties:${ODL_CERT_DIR}/certs.properties
51       - ./sdnr/certs/keys0.zip:${ODL_CERT_DIR}/keys0.zip
52     networks:
53       integration:
54         ipv4_address: ${IPv4_SDNC}
55         ipv6_address: ${IPv6_SDNC}
56     logging:
57       driver:   "json-file"
58       options:
59         max-size: "30m"
60         max-file: "5"
61   zookeeper:
62     image: ${ZOOKEEPER_IMAGE}
63     container_name: zookeeper
64     ports:
65       - "2181:2181"
66     environment:
67       ZOOKEEPER_REPLICAS: 1
68       ZOOKEEPER_TICK_TIME: 2000
69       ZOOKEEPER_SYNC_LIMIT: 5
70       ZOOKEEPER_INIT_LIMIT: 10
71       ZOOKEEPER_MAX_CLIENT_CNXNS: 200
72       ZOOKEEPER_AUTOPURGE_SNAP_RETAIN_COUNT: 3
73       ZOOKEEPER_AUTOPURGE_PURGE_INTERVAL: 24
74       ZOOKEEPER_CLIENT_PORT: 2181
75       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
76       ZOOKEEPER_SERVER_ID:
77     volumes:
78       -  ./zk/zk_server_jaas.conf:/etc/zookeeper/secrets/jaas/zk_server_jaas.conf
79     networks:
80       integration:
81         aliases:
82         - zookeeper
83         ipv4_address: ${IPv4_ZOOKEEPER}
84         ipv6_address: ${IPv6_ZOOKEEPER}
85   kafka:
86     image: ${KAFKA_IMAGE}
87     container_name: kafka
88     ports:
89      - "9092:9092"
90     environment:
91       enableCadi: 'false'
92       KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
93       KAFKA_ZOOKEEPER_CONNECTION_TIMEOUT_MS: 40000
94       KAFKA_ZOOKEEPER_SESSION_TIMEOUT_MS: 40000
95       KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL_PLAINTEXT:PLAINTEXT,EXTERNAL_PLAINTEXT:PLAINTEXT
96       KAFKA_ADVERTISED_LISTENERS: INTERNAL_PLAINTEXT://kafka:9092
97       KAFKA_LISTENERS: INTERNAL_PLAINTEXT://0.0.0.0:9092
98       KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL_PLAINTEXT
99       KAFKA_CONFLUENT_SUPPORT_METRICS_ENABLE: 'false'
100       KAFKA_OPTS: -Djava.security.auth.login.config=/etc/kafka/secrets/jaas/zk_client_jaas.conf
101       KAFKA_ZOOKEEPER_SET_ACL: 'true'
102       KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
103       # Reduced the number of partitions only to avoid the timeout error for the first subscribe call in slow environment
104       KAFKA_OFFSETS_TOPIC_NUM_PARTITIONS: 1
105     volumes:
106       -  ./kafka/zk_client_jaas.conf:/etc/kafka/secrets/jaas/zk_client_jaas.conf
107     networks:
108       integration:
109         aliases:
110         - kafka
111         ipv4_address: ${IPv4_KAFKA}
112         ipv6_address: ${IPv6_KAFKA}
113     depends_on:
114      - zookeeper
115   dmaap:
116     container_name: onap-dmaap
117     image: ${DMAAP_IMAGE}
118     ports:
119       - "3904:3904"
120       - "3905:3905"
121     environment:
122       enableCadi: 'false'
123     volumes:
124       - ./dmaap/MsgRtrApi.properties:/appl/dmaapMR1/bundleconfig/etc/appprops/MsgRtrApi.properties
125       - ./dmaap/logback.xml:/appl/dmaapMR1/bundleconfig/etc/logback.xml
126       - ./dmaap/cadi.properties:/appl/dmaapMR1/etc/cadi.properties
127     networks:
128       integration:
129         aliases:
130         - dmaap
131         ipv4_address: ${IPv4_DMAAP}
132         ipv6_address: ${IPv6_DMAAP}
133
134     depends_on:
135       - zookeeper
136       - kafka
137   vescollector:
138     image: ${VESCOLLECTOR_IMAGE}
139     container_name: vescollector
140     environment:
141       DMAAPHOST: "onap-dmaap"
142     ports:
143       - "8080:8080"
144       - "8443:8443"
145     volumes:
146       - ./vescollector/collector.properties:/opt/app/VESCollector/etc/collector.properties
147     networks:
148       integration:
149         ipv4_address: ${IPv4_VESCOLLECTOR}
150         ipv6_address: ${IPv6_VESCOLLECTOR}
151 networks:
152   integration:
153     driver: bridge
154     enable_ipv6: true
155     ipam:
156       driver: default
157       config:
158       - subnet: ${IPv4_NETWORK_SUBNET}
159         gateway: ${IPv4_GATEWAY}
160       - subnet: ${IPv6_NETWORK_SUBNET}
161         gateway: ${IPv6_GATEWAY}