Clean-up existing docker-compose solutions
[oam.git] / solution / smo / oam / docker-compose.yml
similarity index 60%
rename from solution/operation-and-maintenance/smo/oam/docker-compose.yml
rename to solution/smo/oam/docker-compose.yml
index c05bc98..1f8b1fd 100755 (executable)
@@ -1,52 +1,36 @@
-################################################################################
-# Copyright 2021 highstreet technologies GmbH
-#
-# Licensed under the Apache License, Version 2.0 (the "License");
-# you may not use this file except in compliance with the License.
-# You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-#
-version: '3.8'
+# no more versions needed! Compose spec supports all features w/o a version
 services:
-  sdnc-web:
+
+  odlux:
     image: ${SDNC_WEB_IMAGE}
-    container_name: sdnc-web
-    ports:
-      - ${SDNC_WEB_PORT}:${SDNC_WEB_PORT}
+    container_name: odlux
+    hostname: odlux
     environment:
       - ENABLE_OAUTH=true
-      - WEBPROTOCOL=HTTPS
+      - WEBPROTOCOL=HTTP
       - WEBPORT=${SDNC_WEB_PORT}
       - SDNRPROTOCOL=http
       - SDNRHOST=sdnr
       - SDNRPORT=${SDNC_REST_PORT}
-      - SSL_CERT_DIR=/opt/app/osaaf/local/certs
-      - SSL_CERTIFICATE=cert.pem
-      - SSL_CERTIFICATE_KEY=key.pem
-    volumes:
-      - ./web:/opt/app/osaaf/local/certs
+    labels:
+      traefik.enable: true
+      traefik.http.routers.sdnc-web.entrypoints: websecure
+      traefik.http.routers.sdnc-web.rule: Host(`odlux.oam.${SOLUTION_DOMAIN}`)
+      traefik.http.routers.sdnc-web.tls: true
+      traefik.http.services.sdnc-web.loadbalancer.server.port: ${SDNC_WEB_PORT}
     networks:
-      dmz:
       smo:
 
   sdnr:
     image: ${SDNC_IMAGE}
     container_name: sdnr
+    hostname: sdnr
     ports:
-      - ${SDNC_REST_PORT}:8181
       - 6666:6666
       - 4335:4335
     environment:
       - ENABLE_ODL_CLUSTER=false
       - ENABLE_OAUTH=true
-      - ODL_CERT_DIR=${SDNC_CERT_DIR}
       - ODL_ADMIN_PASSWORD=${ADMIN_PASSWORD}
       - SDNC_CONFIG_DIR=/opt/onap/ccsdk/data/properties
       - SDNC_REPLICAS=0
@@ -61,9 +45,9 @@ services:
       - A1_ADAPTER_NORTHBOUND=false
       - JAVA_OPTS=-Xms256m -Xmx4g
       - IDENTITY_PROVIDER_URL=${IDENTITY_PROVIDER_URL}
-      - SDNC_WEB_URL=https://sdnc-web:${SDNC_WEB_PORT}
+      - SDNC_WEB_URL=https://odlux.oam.${SOLUTION_DOMAIN}
       - SDNR_VES_COLLECTOR_ENABLED=true
-      - SDNR_VES_COLLECTOR_TLS_ENABLED=true
+      - SDNR_VES_COLLECTOR_TLS_ENABLED=false
       - SDNR_VES_COLLECTOR_TRUST_ALL_CERTS=true
       - SDNR_VES_COLLECTOR_IP=ves-collector
       - SDNR_VES_COLLECTOR_PORT=$VES_ENDPOINT_PORT
@@ -77,10 +61,13 @@ services:
       - ./controller/oauth-provider.config.json:/opt/opendaylight/etc/oauth-provider.config.json
       - ./controller/devicemanager.properties:/opt/opendaylight/etc/devicemanager.properties
       - ./controller/mountpoint-registrar.properties:/opt/opendaylight/etc/mountpoint-registrar.properties
-      - ./controller/certs/certs.properties:${SDNC_CERT_DIR}/certs.properties
-      - ./controller/certs/keys0.zip:${SDNC_CERT_DIR}/keys0.zip
+    labels:
+      traefik.enable: true
+      traefik.http.routers.sdnr.entrypoints: websecure
+      traefik.http.routers.sdnr.rule: Host(`controller.oam.${SOLUTION_DOMAIN}`)
+      traefik.http.routers.sdnr.tls: true
+      traefik.http.services.sdnr.loadbalancer.server.port: 8181
     networks:
-      dmz:
       smo:
       default:
         ipv6_address: ${SDNC_OAM_IPv6}
@@ -88,22 +75,23 @@ services:
   ves-collector:
     image: ${VES_COLLECTOR_IMAGE}
     container_name: ves-collector
+    hostname: ves-collector
     environment:
-      DMAAPHOST: onap-dmaap
-    ports:
-      - 8443:8443
+      DMAAPHOST: messages
     volumes:
       - ./ves-collector/collector.properties:/opt/app/VESCollector/etc/collector.properties
       - ./ves-collector/ves-dmaap-config.json:/opt/app/VESCollector/etc/ves-dmaap-config.json
       - ./ves-collector/externalRepo:/opt/app/VESCollector/etc/externalRepo
+    labels:
+      traefik.enable: true
+      traefik.http.routers.ves.entrypoints: websecure
+      traefik.http.routers.ves.rule: Host(`ves-collector.oam.${SOLUTION_DOMAIN}`)
+      traefik.http.routers.ves.tls: true
+      traefik.http.services.ves.loadbalancer.server.port: ${VES_ENDPOINT_PORT}
     networks:
       smo:
-      default:
-        ipv6_address: ${VES_COLLECTOR_OAM_IPv6}
 
 networks:
-  dmz:
-    external: true
   smo:
     external: true
   default:
@@ -113,5 +101,5 @@ networks:
     ipam:
       driver: default
       config:
-      - subnet:  ${NETWORK_SUBNET_OAM_IPv6}
-        gateway: ${NETWORK_GATEWAY_OAM_IPv6}
+      - subnet:  "${NETWORK_SUBNET_OAM_IPv6}"
+        gateway: "${NETWORK_GATEWAY_OAM_IPv6}"
\ No newline at end of file