From 846cb20e969f73052bd3d1640622a0581b3cf98a Mon Sep 17 00:00:00 2001 From: RehanRaza Date: Thu, 4 Feb 2021 14:24:45 +0100 Subject: [PATCH] Modify helm chart for nonrtric-controlpanel Change-Id: Ie16420565b04e4833d24387e346008d9c953f808 Issue-ID: NONRTRIC-429 Signed-off-by: RehanRaza --- nonrtric/RECIPE_EXAMPLE/example_recipe.yaml | 6 ++-- .../controlpanel/resources/application.properties | 39 ---------------------- nonrtric/helm/controlpanel/resources/nginx.conf | 25 ++++++++++++++ .../helm/controlpanel/templates/deployment.yaml | 4 +-- nonrtric/helm/controlpanel/values.yaml | 4 +-- 5 files changed, 31 insertions(+), 47 deletions(-) delete mode 100644 nonrtric/helm/controlpanel/resources/application.properties create mode 100644 nonrtric/helm/controlpanel/resources/nginx.conf diff --git a/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml b/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml index a746270a..4e5ec4ab 100644 --- a/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml +++ b/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml @@ -82,15 +82,13 @@ a1simulator: name: a1-sim-std2 replicaCount: 2 -# image registry and tag to be changed after first release of controlpanel -# Need to check the external port Availability controlpanel: controlpanel: imagePullPolicy: IfNotPresent image: - registry: 'nexus3.o-ran-sc.org:10002/o-ran-sc' + registry: 'nexus3.o-ran-sc.org:10004/o-ran-sc' name: nonrtric-controlpanel - tag: 2.1.0 + tag: 2.2.0 replicaCount: 1 service: allowHttp: true diff --git a/nonrtric/helm/controlpanel/resources/application.properties b/nonrtric/helm/controlpanel/resources/application.properties deleted file mode 100644 index 07fd88e4..00000000 --- a/nonrtric/helm/controlpanel/resources/application.properties +++ /dev/null @@ -1,39 +0,0 @@ -################################################################################ -# Copyright (c) 2020 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 = 8082 -server.ssl.key-store-type = PKCS12 -server.ssl.key-store-password = ericsson_kwdjfhw -server.ssl.key-store = classpath:keystore.jks -server.ssl.key-password = ericsson_kwdjfhw -server.http.port = 8080 -# https api -policycontroller.url.prefix = https://policymanagementservice:9081 -# http api -#policycontroller.url.prefix = http://policymanagementservice:9080 -userfile = users.json -portalapi.decryptor = org.oransc.portal.nonrtric.controlpanel.portalapi.PortalSdkDecryptorAes -portalapi.usercookie = UserId -portalapi.security = false -portalapi.appname = Non-RT RIC Control Panel -portalapi.username = Default -portalapi.password = password - -# URL for enrichment coordinator service -# enrichmentcontroller.url.prefix = https://enrichmentservice:9083/ei-producer/v1 -enrichmentcontroller.url.prefix = http://enrichmentservice:9082/ei-producer/v1 - -# Mimic slow endpoints by defining sleep period, in milliseconds -mock.config.delay = 0 diff --git a/nonrtric/helm/controlpanel/resources/nginx.conf b/nonrtric/helm/controlpanel/resources/nginx.conf new file mode 100644 index 00000000..e7f807f3 --- /dev/null +++ b/nonrtric/helm/controlpanel/resources/nginx.conf @@ -0,0 +1,25 @@ +events{} + +http { + include /etc/nginx/mime.types; + + upstream backend { + server nonrtricgateway:9090; + } + + server { + listen 8080; + server_name localhost; + root /usr/share/nginx/html; + index index.html; + location /a1-policy/ { + proxy_pass http://backend; + } + location /ei-producer/ { + proxy_pass http://backend; + } + location / { + try_files $uri $uri/ /index.html; + } + } +} \ No newline at end of file diff --git a/nonrtric/helm/controlpanel/templates/deployment.yaml b/nonrtric/helm/controlpanel/templates/deployment.yaml index 0d08ea44..eb8fccea 100644 --- a/nonrtric/helm/controlpanel/templates/deployment.yaml +++ b/nonrtric/helm/controlpanel/templates/deployment.yaml @@ -51,8 +51,8 @@ spec: protocol: TCP volumeMounts: - name: configmap - mountPath: /maven/application.properties - subPath: application.properties + mountPath: /etc/nginx/nginx.conf + subPath: nginx.conf readOnly: true readinessProbe: tcpSocket: diff --git a/nonrtric/helm/controlpanel/values.yaml b/nonrtric/helm/controlpanel/values.yaml index a842ec4b..ce9acbce 100644 --- a/nonrtric/helm/controlpanel/values.yaml +++ b/nonrtric/helm/controlpanel/values.yaml @@ -21,9 +21,9 @@ controlpanel: imagePullPolicy: IfNotPresent image: - registry: 'nexus3.o-ran-sc.org:10002/o-ran-sc' + registry: 'nexus3.o-ran-sc.org:10004/o-ran-sc' name: nonrtric-controlpanel - tag: 2.1.0 + tag: 2.2.0 replicaCount: 1 service: allowHttp: true -- 2.16.6