Modify docker-compose configuration
[oam.git] / solution / integration / smo / common / docker-compose.yml
1 ################################################################################
2 # Copyright 2021 highstreet technologies GmbH
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: '3.8'
17 services:
18   identity:
19     image: ${IDENTITY_IMAGE}
20     container_name: identity
21     ports: 
22       - ${IDENTITY_PORT}:8443
23     environment: 
24       - KEYCLOAK_USER=${ADMIN_USERNAME}
25       - KEYCLOAK_PASSWORD=${ADMIN_PASSWORD}
26       - JAVA_OPTS=-Djboss.bind.address.private=[::1] -Djboss.bind.address=[::1] -Djava.net.preferIPv6Addresses=true -Djava.net.preferIPv4Stack=false
27       - DB_VENDOR=h2
28     networks:
29       dmz:
30               
31   topology:
32     image: ${TOPOLOGY_IMAGE}
33     container_name: topology
34     ports:
35       - 3001:3001
36     environment:
37       - AUTH_ENABLED=true
38       - AUTH_HOST_URL=${IDENTITY_PROVIDER_URL}
39       # - AUTH_CONFIG_FILE 
40       - PROVIDERS=${TOPOLOGY_PROVIDERS}
41       - LOAD_PACKAGES=com.highstreet
42  
43   persistence:
44     image: ${PERSISTENCE_IMAGE}
45     container_name: persistence
46     environment:
47       - discovery.type=single-node
48
49   zookeeper:
50     image: ${ZOOKEEPER_IMAGE}
51     container_name: zookeeper
52     ports:
53       - 2181:2181
54     environment:
55       ZOOKEEPER_REPLICAS: 1
56       ZOOKEEPER_TICK_TIME: 2000
57       ZOOKEEPER_SYNC_LIMIT: 5
58       ZOOKEEPER_INIT_LIMIT: 10
59       ZOOKEEPER_MAX_CLIENT_CNXNS: 200
60       ZOOKEEPER_AUTOPURGE_SNAP_RETAIN_COUNT: 3
61       ZOOKEEPER_AUTOPURGE_PURGE_INTERVAL: 24
62       ZOOKEEPER_CLIENT_PORT: 2181
63       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
64       ZOOKEEPER_SERVER_ID:
65     volumes:
66       -  ./zookeeper/zk_server_jaas.conf:/etc/zookeeper/secrets/jaas/zk_server_jaas.conf
67
68   kafka:
69     image: ${KAFKA_IMAGE}
70     container_name: kafka
71     ports:
72      - 9092:9092
73     environment:
74       enableCadi: 'false'
75       KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181
76       KAFKA_ZOOKEEPER_CONNECTION_TIMEOUT_MS: 40000
77       KAFKA_ZOOKEEPER_SESSION_TIMEOUT_MS: 40000
78       KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL_PLAINTEXT:PLAINTEXT,EXTERNAL_PLAINTEXT:PLAINTEXT
79       KAFKA_ADVERTISED_LISTENERS: INTERNAL_PLAINTEXT://kafka:9092
80       KAFKA_LISTENERS: INTERNAL_PLAINTEXT://0.0.0.0:9092
81       KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL_PLAINTEXT
82       KAFKA_CONFLUENT_SUPPORT_METRICS_ENABLE: 'false'
83       KAFKA_OPTS: -Djava.security.auth.login.config=/etc/kafka/secrets/jaas/zk_client_jaas.conf
84       KAFKA_ZOOKEEPER_SET_ACL: 'true'
85       KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1
86       # Reduced the number of partitions only to avoid the timeout error for the first subscribe call in slow environment
87       KAFKA_OFFSETS_TOPIC_NUM_PARTITIONS: 1
88     volumes:
89       -  ./kafka/zk_client_jaas.conf:/etc/kafka/secrets/jaas/zk_client_jaas.conf
90     depends_on:
91      - zookeeper
92
93   dmaap:
94     container_name: onap-dmaap
95     image: ${DMAAP_IMAGE}
96     ports:
97       - 3904:3904
98       - 3905:3905
99     environment:
100       enableCadi: 'false'
101     volumes:
102       - ./dmaap/MsgRtrApi.properties:/appl/dmaapMR1/bundleconfig/etc/appprops/MsgRtrApi.properties
103       - ./dmaap/logback.xml:/appl/dmaapMR1/bundleconfig/etc/logback.xml
104       - ./dmaap/cadi.properties:/appl/dmaapMR1/etc/cadi.properties
105     depends_on:
106       - zookeeper
107       - kafka
108
109 networks:
110   dmz:
111     driver: bridge
112     name: dmz
113     enable_ipv6: false
114   default:
115     driver: bridge
116     name: smo
117     enable_ipv6: true
118     ipam:
119       driver: default
120       config:
121       - subnet:  ${NETWORK_SUBNET_SMO}
122         gateway: ${NETWORK_GATEWAY_SMO}