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