Split SMO network from telecom network
[oam.git] / solution / smo / oam / docker-compose.yml
1 ################################################################################
2 # Copyright 2023 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
17 # no more versions needed! Compose spec supports all features w/o a version
18 services:
19
20   odlux:
21     image: ${SDNC_WEB_IMAGE}
22     container_name: odlux
23     hostname: odlux
24     environment:
25       ENABLE_OAUTH: true
26       WEBPROTOCOL: HTTP
27       WEBPORT: ${SDNC_WEB_PORT}
28       SDNRPROTOCOL: http
29       SDNRHOST: controller
30       SDNRPORT: ${SDNC_REST_PORT}
31     labels:
32       traefik.enable: true
33       traefik.http.routers.sdnc-web.entrypoints: websecure
34       traefik.http.routers.sdnc-web.rule: Host(`odlux.oam.${SOLUTION_DOMAIN}`)
35       traefik.http.routers.sdnc-web.tls: true
36       traefik.http.services.sdnc-web.loadbalancer.server.port: ${SDNC_WEB_PORT}
37     depends_on:
38       controller:
39         condition: service_healthy
40     networks:
41       dmz:
42       smo:
43
44   controller:
45     image: ${SDNC_IMAGE}
46     container_name: controller
47     hostname: controller
48     extra_hosts:
49       - "identity.smo.o-ran-sc.org:${HOST_IP}"
50     healthcheck:
51       test: wget -U ${ADMIN_USERNAME}:${ADMIN_PASSWORD} --no-verbose --tries=1 --spider http://localhost:${SDNC_REST_PORT}/ready || exit 1
52       start_period: 60s
53       interval: 10s
54       timeout: 5s
55       retries: 5
56     # ports:
57       # - 4334:4334
58       # - 4335:4335
59     environment:
60       ENABLE_ODL_CLUSTER: false
61       ENABLE_OAUTH: true
62       ODL_CERT_DIR: ${SDNC_CERT_DIR}
63       ODL_ADMIN_PASSWORD: ${ADMIN_PASSWORD}
64       SDNC_CONFIG_DIR: /opt/onap/ccsdk/data/properties
65       SDNC_REPLICAS: 0
66       CCSDK_REPLICAS: 0
67       DOMAIN: ""
68       SDNRWT: true
69       SDNRONLY: true
70       SDNRINIT: true
71       SDNRDM: true
72       SDNRDBURL: http://persistence:9200
73       SDNR_NETCONF_CALLHOME_ENABLED: true
74       A1_ADAPTER_NORTHBOUND: false
75       JAVA_OPTS: -Xms256m -Xmx4g
76       IDENTITY_PROVIDER_URL: ${IDENTITY_PROVIDER_URL}
77       SDNC_WEB_URL: https://odlux.oam.${SOLUTION_DOMAIN}
78       SDNR_VES_COLLECTOR_ENABLED: true
79       SDNR_VES_COLLECTOR_TLS_ENABLED: false
80       SDNR_VES_COLLECTOR_TRUST_ALL_CERTS: true
81       SDNR_VES_COLLECTOR_IP: ves-collector
82       SDNR_VES_COLLECTOR_PORT: $VES_ENDPOINT_PORT
83       SDNR_VES_COLLECTOR_VERSION: v7
84       SDNR_VES_COLLECTOR_REPORTING_ENTITY_NAME: ONAP SDN-R
85       SDNR_VES_COLLECTOR_EVENTLOG_MSG_DETAIL: LONG
86       SDNR_VES_COLLECTOR_USERNAME: ${VES_ENDPOINT_USERNAME}
87       SDNR_VES_COLLECTOR_PASSWORD: ${VES_ENDPOINT_PASSWORD}
88     volumes:
89       - ./controller/oauth-aaa-app-config.xml:/opt/onap/sdnc/data/oauth-aaa-app-config.xml
90       - ./controller/oauth-provider.config.json:/opt/opendaylight/etc/oauth-provider.config.json
91       - ./controller/devicemanager.properties:/opt/opendaylight/etc/devicemanager.properties
92       - ./controller/mountpoint-registrar.properties:/opt/opendaylight/etc/mountpoint-registrar.properties
93       - ./controller/certs/certs.properties:${SDNC_CERT_DIR}/certs.properties
94       - ./controller/certs/keys0.zip:${SDNC_CERT_DIR}/keys0.zip    
95     labels:
96       traefik.enable: true
97       traefik.http.routers.controller.entrypoints: websecure
98       traefik.http.routers.controller.rule: Host(`controller.dcn.${SOLUTION_DOMAIN}`)
99       traefik.http.routers.controller.tls: true
100       traefik.http.services.controller.loadbalancer.server.port: ${SDNC_REST_PORT}
101
102       traefik.tcp.routers.controller-ssh.entrypoints: ssh-netconf-callhome
103       traefik.tcp.routers.controller-ssh.rule: HostSNI(`*`)
104       traefik.tcp.routers.controller-ssh.tls: false
105       traefik.tcp.routers.controller-ssh.service: controller-ssh
106       traefik.tcp.services.controller-ssh.loadbalancer.server.port: 4334
107
108       traefik.tcp.routers.controller-tls.entrypoints: tls-netconf-callhome
109       traefik.tcp.routers.controller-tls.rule: HostSNI(`*`)
110       traefik.tcp.routers.controller-tls.tls: false
111       traefik.tcp.routers.controller-tls.service: controller-tls
112       traefik.tcp.services.controller-tls.loadbalancer.server.port: 4335
113     networks:
114       smo:
115       dcn:
116
117   ves-collector:
118     image: ${VES_COLLECTOR_IMAGE}-configured
119     build:
120       context: ./ves-collector
121       args:
122         - BASEIMAGE=${VES_COLLECTOR_IMAGE}
123     container_name: ves-collector
124     hostname: ves-collector
125     healthcheck:
126       test: curl -k -u ${VES_ENDPOINT_USERNAME}:${VES_ENDPOINT_PASSWORD} ${VES_ENDPOINT_PROTOCOL}://localhost:${VES_ENDPOINT_PORT} || exit 1
127       start_period: 1s
128       interval: 5s
129       timeout: 4s
130       retries: 5
131     environment:
132       DMAAPHOST: messages
133     volumes:
134       - ./ves-collector/collector.properties:/opt/app/VESCollector/etc/collector.properties
135       - ./ves-collector/ves-dmaap-config.json:/opt/app/VESCollector/etc/ves-dmaap-config.json
136     labels:
137       traefik.enable: true
138       traefik.http.routers.ves.entrypoints: websecure
139       traefik.http.routers.ves.rule: Host(`ves-collector.dcn.${SOLUTION_DOMAIN}`)
140       traefik.http.routers.ves.tls: true
141       traefik.http.services.ves.loadbalancer.server.port: ${VES_ENDPOINT_PORT}
142     networks:
143       smo:
144       dcn:
145
146 networks:
147   dmz:
148     external: true
149   smo:
150     external: true
151   dcn:
152     external: true