General updates for flows 11/11011/1
authorMartin Skorupski <martin.skorupski@highstreet-technologies.com>
Thu, 27 Apr 2023 14:41:25 +0000 (16:41 +0200)
committerMartin Skorupski <martin.skorupski@highstreet-technologies.com>
Thu, 27 Apr 2023 14:42:31 +0000 (16:42 +0200)
-  add docker file to build a container with
   additional flow-nodes
-  instructions for build and usage of flows

Issue-ID: OAM-333
Change-Id: Ie43cc3d23c95d14cbd900c9e4233b3ea57a1332d
Signed-off-by: Martin Skorupski <martin.skorupski@highstreet-technologies.com>
solution/smo/apps/docker-compose.yml
solution/smo/apps/flows/Dockerfile [new file with mode: 0644]

index ab2dc3c..e3a60e3 100644 (file)
@@ -2,13 +2,32 @@
 services:
 
   flows:
-    image: ${FLOWS_IMAGE}
+    image: ${FLOWS_IMAGE}-configured
+    build:
+      context: ./flows
+      args:
+        - BASEIMAGE=${FLOWS_IMAGE}
     container_name: flows
     hostname: flows
     environment:
-      - APP_VENDOR=${APP_VENDOR}
-      - APP_SOURCE=${APP_SOURCE}
-      - APP_NETWORK_FUNCTION_ID=${APP_NETWORK_FUNCTION_ID}
+      APP_VENDOR: ${APP_VENDOR}
+      APP_SOURCE: ${APP_SOURCE}
+      APP_NETWORK_FUNCTION_ID: ${APP_NETWORK_FUNCTION_ID}
+      SDN_CONTROLLER_PROTOCOL: https
+      SDN_CONTROLLER_HOST: controller.oam.${SOLUTION_DOMAIN}
+      SDN_CONTROLLER_PORT: 443
+      SDN_CONTROLLER_USERNAME: ${ADMIN_USERNAME}
+      SDN_CONTROLLER_PASSWORD: ${ADMIN_PASSWORD}
+      VES_ENDPOINT_PROTOCOL: https
+      VES_ENDPOINT_HOST: ves-collector.oam.${SOLUTION_DOMAIN}
+      VES_ENDPOINT_PORT: 443
+      VES_ENDPOINT_AUTH_METHOD: ${VES_ENDPOINT_AUTH_METHOD}
+      VES_ENDPOINT_USERNAME: ${VES_ENDPOINT_USERNAME}
+      VES_ENDPOINT_PASSWORD: ${VES_ENDPOINT_PASSWORD}
+      MESSAGES_PROTOCOL: https
+      MESSAGES_HOST: messages.${SOLUTION_DOMAIN}
+      MESSAGES_PORT: 443
+
     labels:
       traefik.enable: true
       traefik.http.routers.flows.entrypoints: websecure
diff --git a/solution/smo/apps/flows/Dockerfile b/solution/smo/apps/flows/Dockerfile
new file mode 100644 (file)
index 0000000..7716597
--- /dev/null
@@ -0,0 +1,26 @@
+################################################################################
+# Copyright 2023 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.
+
+# inspired by https://nodered.org/docs/getting-started/docker
+
+ARG BASEIMAGE=nodered/node-red:latest
+FROM ${BASEIMAGE}
+
+# Copy package.json to the WORKDIR so npm builds all
+# of your added nodes modules for Node-RED
+WORKDIR /data
+COPY ./data/package.json .
+RUN npm install --unsafe-perm --no-update-notifier --no-fund --only=production
+WORKDIR /usr/src/node-red
\ No newline at end of file