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