Add control-panel to docker-compose 11/11711/1
authorktimoney <kevin.timoney@est.tech>
Thu, 31 Aug 2023 10:26:52 +0000 (11:26 +0100)
committerktimoney <kevin.timoney@est.tech>
Thu, 31 Aug 2023 10:36:30 +0000 (11:36 +0100)
Issue-ID: NONRTRIC-920
Change-Id: If9279f235b7ee7224227f8aaf1214e4d3d47060f
Signed-off-by: ktimoney <kevin.timoney@est.tech>
docker-proj/README.md
docker-proj/config/control-panel/nginx.conf [new file with mode: 0644]
docker-proj/config/ngw/application.yaml [new file with mode: 0644]
docker-proj/docker-compose-k1.yaml
docker-proj/docker-setup.sh

index 9a73ef7..f99e282 100644 (file)
@@ -88,16 +88,17 @@ Example cmd: \
 To remove run:
 `./pmrapp-tear-down.sh`
 
-
 ### Tools for monitoring
 
 Open browser to redpanda (kafka gui) - watch topics, messages etc\
-browser: `localhost:8780`
+browser: `<host ip>:8780`
 
-Open brower to minio - available only if minio is given on the cmd line when starting the demo\
+Open brower to minio \
 user: admin pwd: adminadmin\
-browser: `localhost:9001`
+browser: `<host ip>:9001`
 
+Open brower to control-panel \
+browser: `<host ip>:8088/ei-coordinator`
 
 ### Push data - basic
 
diff --git a/docker-proj/config/control-panel/nginx.conf b/docker-proj/config/control-panel/nginx.conf
new file mode 100644 (file)
index 0000000..81c7cb9
--- /dev/null
@@ -0,0 +1,45 @@
+################################################################################
+#   Copyright (c) 2023 Nordix Foundation.                                      #
+#                                                                              #
+#   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.                                             #
+################################################################################
+
+events{}
+
+http {
+    include /etc/nginx/mime.types;
+
+    resolver 127.0.0.11;
+
+    server {
+        listen 8080;
+        server_name localhost;
+        root /usr/share/nginx/html;
+        index index.html;
+        location /a1-policy/ {
+            set $upstream nonrtricgateway;
+            proxy_pass http://$upstream:9090;
+        }
+        location /data-producer/ {
+            set $upstream nonrtricgateway;
+            proxy_pass http://$upstream:9090;
+        }
+        location /data-consumer/ {
+            set $upstream nonrtricgateway;
+            proxy_pass http://$upstream:9090;
+        }
+        location / {
+            try_files $uri $uri/ /index.html;
+        }
+    }
+}
diff --git a/docker-proj/config/ngw/application.yaml b/docker-proj/config/ngw/application.yaml
new file mode 100644 (file)
index 0000000..15fa3ea
--- /dev/null
@@ -0,0 +1,48 @@
+################################################################################
+#   Copyright (c) 2023 Nordix Foundation.                                      #
+#                                                                              #
+#   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.                                             #
+################################################################################
+
+server:
+  port: 9090
+spring:
+  cloud:
+    gateway:
+      httpclient:
+        ssl:
+          useInsecureTrustManager: true
+        wiretap: true
+      httpserver:
+        wiretap: true
+      routes:
+      - id: A1-EI2
+        uri: http://ics:8083
+        predicates:
+        - Path=/data-producer/**,/data-consumer/**
+management:
+  endpoint:
+    gateway:
+      enabled: true
+  endpoints:
+    web:
+      exposure:
+        include: "gateway,loggers,logfile,health,info,metrics,threaddump,heapdump"
+logging:
+  level:
+    ROOT: ERROR
+    org.springframework: ERROR
+    org.springframework.cloud.gateway: INFO
+    reactor.netty: INFO
+  file:
+    name: /var/log/nonrtric-gateway/application.log
index 515c493..d943a53 100644 (file)
@@ -125,3 +125,27 @@ services:
       - "ranpm=yes"
     volumes:
     - /tmp/minio-test/0:/data
+
+  nonrtric-gateway:
+    image: ${NONRTRIC_GATEWAY_IMAGE}
+    container_name: nonrtricgateway
+    depends_on:
+      - ics
+    ports:
+    - 9098:9090
+    volumes:
+    - ./config/ngw/application.yaml:/opt/app/nonrtric-gateway/config/application.yaml
+    labels:
+      - "ranpm=yes"
+
+  control-panel:
+    image: ${CONTROL_PANEL_IMAGE}
+    container_name: controlpanel
+    depends_on:
+      - nonrtric-gateway
+    ports:
+    - 8088:8080
+    volumes:
+    - ./config/control-panel/nginx.conf:/etc/nginx/nginx.conf
+    labels:
+      - "ranpm=yes"
index bca0281..695d845 100755 (executable)
@@ -102,6 +102,12 @@ pull_image $KPX_IMAGE
 
 export AUTH_TOKEN_IMAGE=nexus3.o-ran-sc.org:10001/o-ran-sc/nonrtric-plt-auth-token-fetch:1.1.1
 pull_image $AUTH_TOKEN_IMAGE
+
+export NONRTRIC_GATEWAY_IMAGE=nexus3.o-ran-sc.org:10001/o-ran-sc/nonrtric-gateway:1.2.0
+pull_image $NONRTRIC_GATEWAY_IMAGE
+
+export CONTROL_PANEL_IMAGE=nexus3.o-ran-sc.org:10001/o-ran-sc/nonrtric-controlpanel:2.5.0
+pull_image $CONTROL_PANEL_IMAGE
 }
 
 setup_keycloak() {
@@ -160,7 +166,7 @@ export DFC_CLIENT_SECRET=$(< .sec_nonrtric-realm_$cid)
 
 setup_kafka() {
 echo "Starting containers for: kafka, zookeeper, kafka client, ics, minio"
-envsubst  '$DMAAP_IMAGE,$VES_COLLECTOR_IMAGE,$ICS_IMAGE,$REDPANDA_IMAGE,$STRIMZI_IMAGE,$MINIO_IMAGE' < docker-compose-k1.yaml > docker-compose-k1_gen.yaml
+envsubst  < docker-compose-k1.yaml > docker-compose-k1_gen.yaml
 docker-compose -p common -f docker-compose-k1_gen.yaml up -d
 }