833c99721dbbfdcdae4c2c7358fd51eae48ec15d
[oam.git] / solution / smo / oam / docker-compose.yaml
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.${HTTP_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       - "controller.dcn.${HTTP_DOMAIN}:${HOST_IP}"
50     healthcheck:
51       test: wget --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     environment:
57       ENABLE_ODL_CLUSTER: false
58       ENABLE_OAUTH: true
59       ODL_CERT_DIR: ${SDNC_CERT_DIR}
60       ODL_ADMIN_PASSWORD: ${ADMIN_PASSWORD}
61       SDNC_CONFIG_DIR: /opt/onap/ccsdk/data/properties
62       SDNC_REPLICAS: 0
63       CCSDK_REPLICAS: 0
64       DOMAIN: ""
65       SDNRWT: true
66       SDNRONLY: true
67       SDNRINIT: true
68       SDNRDM: true
69       SDNRDBURL: http://persistence:9200
70       SDNR_NETCONF_CALLHOME_ENABLED: true
71       A1_ADAPTER_NORTHBOUND: false
72       JAVA_OPTS: -Xms256m -Xmx4g
73       IDENTITY_PROVIDER_URL: ${IDENTITY_PROVIDER_URL}
74       SDNC_WEB_URL: https://odlux.oam.${HTTP_DOMAIN}
75       SDNR_VES_COLLECTOR_ENABLED: true
76       SDNR_VES_COLLECTOR_TLS_ENABLED: false
77       SDNR_VES_COLLECTOR_TRUST_ALL_CERTS: true
78       SDNR_VES_COLLECTOR_IP: ves-collector
79       SDNR_VES_COLLECTOR_PORT: $VES_ENDPOINT_PORT
80       SDNR_VES_COLLECTOR_VERSION: v7
81       SDNR_VES_COLLECTOR_REPORTING_ENTITY_NAME: ONAP SDN-R
82       SDNR_VES_COLLECTOR_EVENTLOG_MSG_DETAIL: LONG
83       SDNR_VES_COLLECTOR_USERNAME: ${VES_ENDPOINT_USERNAME}
84       SDNR_VES_COLLECTOR_PASSWORD: ${VES_ENDPOINT_PASSWORD}
85     volumes:
86       - ./controller/oauth-aaa-app-config.xml:/opt/onap/sdnc/data/oauth-aaa-app-config.xml
87       - ./controller/oauth-provider.config.json:/opt/opendaylight/etc/oauth-provider.config.json
88       - ./controller/devicemanager.properties:/opt/opendaylight/etc/devicemanager.properties
89       - ./controller/mountpoint-registrar.properties:/opt/opendaylight/etc/mountpoint-registrar.properties
90       - ./controller/certs/certs.properties:${SDNC_CERT_DIR}/certs.properties
91       - ./controller/certs/keys0.zip:${SDNC_CERT_DIR}/keys0.zip    
92     labels:
93       traefik.enable: true
94       traefik.http.routers.controller.entrypoints: websecure
95       traefik.http.routers.controller.rule: Host(`controller.dcn.${HTTP_DOMAIN}`)
96       traefik.http.routers.controller.tls: true
97       traefik.http.services.controller.loadbalancer.server.port: ${SDNC_REST_PORT}
98
99       traefik.tcp.routers.controller-ssh.entrypoints: ssh-netconf-callhome
100       traefik.tcp.routers.controller-ssh.rule: HostSNI(`*`)
101       traefik.tcp.routers.controller-ssh.tls: false
102       traefik.tcp.routers.controller-ssh.service: controller-ssh
103       traefik.tcp.services.controller-ssh.loadbalancer.server.port: 4334
104
105       traefik.tcp.routers.controller-tls.entrypoints: tls-netconf-callhome
106       traefik.tcp.routers.controller-tls.rule: HostSNI(`*`)
107       traefik.tcp.routers.controller-tls.tls: false
108       traefik.tcp.routers.controller-tls.service: controller-tls
109       traefik.tcp.services.controller-tls.loadbalancer.server.port: 4335
110     networks:
111       smo:
112       dcn:
113
114   ves-collector:
115     image: ${VES_COLLECTOR_IMAGE}-configured
116     build:
117       context: ./ves-collector
118       args:
119         - BASEIMAGE=${VES_COLLECTOR_IMAGE}
120     container_name: ves-collector
121     hostname: ves-collector
122     extra_hosts:
123       - "ves-collector.dcn.${HTTP_DOMAIN}:${HOST_IP}"
124     healthcheck:
125       test: curl -k -u ${VES_ENDPOINT_USERNAME}:${VES_ENDPOINT_PASSWORD} ${VES_ENDPOINT_PROTOCOL}://localhost:${VES_ENDPOINT_PORT} || exit 1
126       start_period: 1s
127       interval: 5s
128       timeout: 4s
129       retries: 5
130     environment:
131       DMAAPHOST: messages
132     volumes:
133       - ./ves-collector/collector.properties:/opt/app/VESCollector/etc/collector.properties
134       - ./ves-collector/ves-dmaap-config.json:/opt/app/VESCollector/etc/ves-dmaap-config.json
135     labels:
136       traefik.enable: true
137       traefik.http.routers.ves.entrypoints: websecure
138       traefik.http.routers.ves.rule: Host(`ves-collector.dcn.${HTTP_DOMAIN}`)
139       traefik.http.routers.ves.tls: true
140       traefik.http.services.ves.loadbalancer.server.port: ${VES_ENDPOINT_PORT}
141     networks:
142       smo:
143       dcn:
144
145 networks:
146   dmz:
147     external: true
148   smo:
149     external: true
150   dcn:
151     external: true