From a86df57862bec68eb7a9a01f59ee13501e70b7f8 Mon Sep 17 00:00:00 2001 From: DenisGNoonan Date: Mon, 22 Apr 2024 16:46:57 +0100 Subject: [PATCH 1/4] NONRTRIC-946: Servicemanager - Add Kong data plane and control plane Change-Id: I5ba03381a2ceb40738779e09f92b654a8ed94737 Signed-off-by: DenisGNoonan --- nonrtric/RECIPE_EXAMPLE/example_recipe.yaml | 2 +- nonrtric/helm/servicemanager/values.yaml | 12 ++++++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml b/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml index 1a676076..d557e535 100644 --- a/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml +++ b/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml @@ -387,7 +387,7 @@ servicemanager: image: registry: "nexus3.o-ran-sc.org:10004/o-ran-sc" name: nonrtric-plt-servicemanager - tag: 0.1.1 + tag: 0.1.2 rappmanager: rappmanager: diff --git a/nonrtric/helm/servicemanager/values.yaml b/nonrtric/helm/servicemanager/values.yaml index 7a36304f..dbb261c7 100644 --- a/nonrtric/helm/servicemanager/values.yaml +++ b/nonrtric/helm/servicemanager/values.yaml @@ -21,7 +21,7 @@ servicemanager: image: registry: 'nexus3.o-ran-sc.org:10004/o-ran-sc' name: nonrtric-plt-servicemanager - tag: 0.1.1 + tag: 0.1.2 apiVersion: v1 kind: ConfigMap metadataName: servicemanager-configmap @@ -36,13 +36,17 @@ servicemanager: data: .env: | + # The Kong Data plane provides the endpoint that Service Manager gives to the rApp so that the rApp can invoke the CAPIF published API. + # In a Kubernetes environment, we need to use the Kong NodePort IP and nodePort if the rApp needs access from outside the Kong cluster. + # From inside the Kong cluster, we can use the Kubernetes cluster DNS entry, kong-nonrtric-kong-proxy.nonrtric.svc.cluster.local. KONG_DOMAIN: "kong" KONG_PROTOCOL: "http" - KONG_IPV4: "kong-nonrtric-kong-admin.nonrtric.svc.cluster.local" - KONG_DATA_PLANE_PORT: "80" + KONG_CONTROL_PLANE_IPV4: "kong-nonrtric-kong-admin.nonrtric.svc.cluster.local" KONG_CONTROL_PLANE_PORT: "8001" + KONG_DATA_PLANE_IPV4: "kong-nonrtric-kong-proxy.nonrtric.svc.cluster.local" + KONG_DATA_PLANE_PORT: "80" CAPIF_PROTOCOL: "http" CAPIF_IPV4: "capifcore.nonrtric.svc.cluster.local" CAPIF_PORT: "8090" - LOG_LEVEL: "Debug" + LOG_LEVEL: "Info" SERVICE_MANAGER_PORT: "8095" -- 2.16.6 From 99ae44c19362fd7553dce5f1413bd4dbc2d55397 Mon Sep 17 00:00:00 2001 From: DenisGNoonan Date: Thu, 23 May 2024 13:14:19 +0100 Subject: [PATCH 2/4] NONRTRIC-980: Check ServiceManager switches Issue-ID: NONRTRIC-980 Change-Id: Ib2bd52bf5b804da2bd485754873ffa3ce7078090 Signed-off-by: DenisGNoonan --- bin/deploy-nonrtric | 34 +++++++++++++++++++++++++++++++++- 1 file changed, 33 insertions(+), 1 deletion(-) diff --git a/bin/deploy-nonrtric b/bin/deploy-nonrtric index 2125ef31..651771b7 100755 --- a/bin/deploy-nonrtric +++ b/bin/deploy-nonrtric @@ -50,6 +50,39 @@ if [ -z "$OVERRIDEYAML" ];then exit 1 fi +if ! command -v yq > /dev/null 2>&1; then + echo "yq is not installed. Installing yq..." + sudo snap install yq --channel=v3/stable +fi + +INSTALL_KONG=$(yq read "$OVERRIDEYAML" 'nonrtric.installKong') +if [ $? -ne 0 ] || [ -z "$INSTALL_KONG" ]; then + echo "Error: failed to parse installKong from YAML with yq. Aborting install." + exit 1 +fi + +INSTALL_CAPIF=$(yq read "$OVERRIDEYAML" 'nonrtric.installCapifcore') +if [ $? -ne 0 ] || [ -z "$INSTALL_CAPIF" ]; then + echo "Error: failed to parse installCapifcore from YAML with yq. Aborting install." + exit 1 +fi + +INSTALL_SERVICEMANAGER=$(yq read "$OVERRIDEYAML" 'nonrtric.installServicemanager') +if [ $? -ne 0 ] || [ -z "$INSTALL_SERVICEMANAGER" ]; then + echo "Error: failed to parse installServicemanager from YAML with yq. Aborting install." + exit 1 +fi + +if [ "$INSTALL_SERVICEMANAGER" == "true" ]; then + if [ "$INSTALL_KONG" == "false" ]; then + echo "Error: INSTALL_KONG must be true if INSTALL_SERVICEMANAGER is true. Aborting install." + exit 1 + fi + if [ "$INSTALL_CAPIF" == "false" ]; then + echo "Error: INSTALL_CAPIF must be true if INSTALL_SERVICEMANAGER is true. Aborting install." + exit 1 + fi +fi ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" @@ -168,7 +201,6 @@ COMMON_BLOCK=$(cat $OVERRIDEYAML | awk '/^common:/{getline; while ($0 ~ /^ +.*|^ NAMESPACE_BLOCK=$(cat $OVERRIDEYAML | awk '/^ namespace:/{getline; while ($0 ~ /^ .*|^ *$/) {print $0; if (getline == 0) {break}}}') NONRTRIC_NAMESPACE=$(echo "$NAMESPACE_BLOCK" | awk '/^ *nonrtric:/{print $2}') RELEASE_PREFIX=$(echo "$COMMON_BLOCK" | awk '/^ *releasePrefix:/{print $2}') -INSTALL_KONG=$(cat $OVERRIDEYAML | awk '/^ installKong:/{print $2}') INSTALL_RANPM=$(cat $OVERRIDEYAML | awk '/^ installRanpm:/{print $2}') if ! kubectl get ns ${NONRTRIC_NAMESPACE:-nonrtric}> /dev/null 2>&1; then -- 2.16.6 From 3fdbdbb3159139ed8dbcca663824486eaf2f216d Mon Sep 17 00:00:00 2001 From: DenisGNoonan Date: Thu, 16 May 2024 10:49:21 +0100 Subject: [PATCH 3/4] NONRTRIC-980: Service Manager - SMO deployment Issue-ID: NONRTRIC-980 Change-Id: I7be646a7deef5bafc20c6cb0a2951f82564320b4 Signed-off-by: DenisGNoonan --- .gitignore | 1 + README.md | 5 +- nonrtric/helm/nonrtric/values.yaml | 2 +- .../helm/servicemanager/templates/configmap.yaml | 10 +- ric-aux/helm/mrsub/resources/mrsub.sh | 7 +- .../{servicemanager.tpl => _servicemanager.tpl} | 2 + smo-install/helm-override/cnf/oran-override.yaml | 1 + .../helm-override/default/oran-override.yaml | 1 + .../pythonsdk-tests/oran-override.yaml | 1 + smo-install/oran_oom/kong/.helmignore | 23 ++++ smo-install/oran_oom/kong/Chart.yaml | 26 ++++ .../oran_oom/kong/templates/00-kong-pv.yaml | 33 +++++ .../oran_oom/kong/templates/01-kongpvc.yaml | 29 ++++ smo-install/oran_oom/kong/values.yaml | 149 +++++++++++++++++++++ smo-install/oran_oom/nonrtric/Chart.yaml | 25 +++- smo-install/oran_oom/nonrtric/values.yaml | 1 + smo-install/oran_oom/servicemanager/Chart.yaml | 27 ++++ .../servicemanager/templates/configmap.yaml | 24 ++++ .../servicemanager/templates/deployment.yaml | 39 ++++++ .../oran_oom/servicemanager/templates/service.yaml | 17 +++ smo-install/oran_oom/servicemanager/values.yaml | 75 +++++++++++ .../scripts/sub-scripts/install-nonrtric.sh | 55 ++++++-- .../scripts/sub-scripts/uninstall-nonrtric.sh | 34 ++++- 23 files changed, 562 insertions(+), 25 deletions(-) rename ric-common/Common-Template/helm/nonrtric-common/templates/{servicemanager.tpl => _servicemanager.tpl} (99%) create mode 100644 smo-install/oran_oom/kong/.helmignore create mode 100644 smo-install/oran_oom/kong/Chart.yaml create mode 100644 smo-install/oran_oom/kong/templates/00-kong-pv.yaml create mode 100644 smo-install/oran_oom/kong/templates/01-kongpvc.yaml create mode 100644 smo-install/oran_oom/kong/values.yaml create mode 100644 smo-install/oran_oom/servicemanager/Chart.yaml create mode 100644 smo-install/oran_oom/servicemanager/templates/configmap.yaml create mode 100644 smo-install/oran_oom/servicemanager/templates/deployment.yaml create mode 100644 smo-install/oran_oom/servicemanager/templates/service.yaml create mode 100644 smo-install/oran_oom/servicemanager/values.yaml diff --git a/.gitignore b/.gitignore index a14e5c27..ad464841 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ .tox .DS_Store docs/_build/ +index-cache.yaml \ No newline at end of file diff --git a/README.md b/README.md index bfc28326..b79262ad 100644 --- a/README.md +++ b/README.md @@ -89,7 +89,7 @@ $ . ./undeploy-ric-aux ``` ### NOTE: To Deploy RANPM -RANPM helm charts are integrated as a submodule in this repository. To deploy RANPM function set installRanpm: true in the RECEPIE_EXAMPLE file as below: +RANPM helm charts are integrated as a submodule in this repository. To deploy RANPM function set installRanpm: true in the RECIPE_EXAMPLE file as below: nonrtric: installPms: true @@ -100,13 +100,14 @@ nonrtric: installRappcatalogueservice: true installRappcatalogueEnhancedservice: true  installNonrtricgateway: true - installKong: false + installKong: true installDmaapadapterservice: true installDmaapmediatorservice: true installHelmmanager: true installOruclosedlooprecovery: true installOdusliceassurance: true installCapifcore: true + installServicemanager: true installRanpm: true   volume1: diff --git a/nonrtric/helm/nonrtric/values.yaml b/nonrtric/helm/nonrtric/values.yaml index 4f067e99..c8edf879 100644 --- a/nonrtric/helm/nonrtric/values.yaml +++ b/nonrtric/helm/nonrtric/values.yaml @@ -30,7 +30,7 @@ nonrtric: installOrufhrecovery: true installRansliceassurance: true installCapifcore: true - installServicemanager: false + installServicemanager: true installRanpm: true installrAppmanager: true installDmeParticipant: true diff --git a/nonrtric/helm/servicemanager/templates/configmap.yaml b/nonrtric/helm/servicemanager/templates/configmap.yaml index 746b0399..280e58f7 100644 --- a/nonrtric/helm/servicemanager/templates/configmap.yaml +++ b/nonrtric/helm/servicemanager/templates/configmap.yaml @@ -13,10 +13,18 @@ # See the License for the specific language governing permissions and # # limitations under the License. # ################################################################################ + + apiVersion: v1 kind: ConfigMap metadata: - name: servicemanager-configmap + name: {{ include "common.name.servicemanager" . }}-configmap + namespace: {{ include "common.namespace.nonrtric" . }} + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.servicemanager" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} data: {{- range $key, $value := .Values.data }} {{ $key }}: | diff --git a/ric-aux/helm/mrsub/resources/mrsub.sh b/ric-aux/helm/mrsub/resources/mrsub.sh index 27439512..9992193e 100644 --- a/ric-aux/helm/mrsub/resources/mrsub.sh +++ b/ric-aux/helm/mrsub/resources/mrsub.sh @@ -4,7 +4,7 @@ MR_HOSTPORT="$_MR_HOSTPORT" MR_TOPIC="$_MR_TOPIC" LOGSTASH_URL="$_LOGSTASH_URL" -if ! jq --version > /dev/null 2&>1 ; then +if ! jq --version > /dev/null 2>&1 ; then apt-get update apt-get install -y jq curl fi @@ -30,8 +30,8 @@ while true; do DATA=$(echo $DATA |jq -r --arg source "$source" '.[] | $source+","+((.event.measurementsForVfScalingFields.additionalFields[1].value) | tostring)+ ","+ ((.event.measurementsForVfScalingFields.additionalFields[2].value) | tostring)') #EVENTS=$(echo $DATA |jq -r '.event.measurementFields.additionalFields.SgNBRequestRate') #for EVENT in $EVENTS; do - elif [ "$source" == "AC xAPP" ] - then + elif [ "$source" == "AC xAPP" ] + then DATA=$(echo $DATA |jq -r --arg source "$source" '.[] | $source+","+((.event.measurementsForVfScalingFields.additionalFields[0].value) | tostring)') else DATA="No supportive reporting entity provided" @@ -40,4 +40,3 @@ while true; do curl -i -XPUT "${LOGSTASH_URL}" -d "${DATA}" #done done - diff --git a/ric-common/Common-Template/helm/nonrtric-common/templates/servicemanager.tpl b/ric-common/Common-Template/helm/nonrtric-common/templates/_servicemanager.tpl similarity index 99% rename from ric-common/Common-Template/helm/nonrtric-common/templates/servicemanager.tpl rename to ric-common/Common-Template/helm/nonrtric-common/templates/_servicemanager.tpl index ed1ba739..7deaac08 100644 --- a/ric-common/Common-Template/helm/nonrtric-common/templates/servicemanager.tpl +++ b/ric-common/Common-Template/helm/nonrtric-common/templates/_servicemanager.tpl @@ -13,9 +13,11 @@ # See the License for the specific language governing permissions and # # limitations under the License. # ################################################################################ + {{- define "common.name.servicemanager" -}} {{- printf "servicemanager" -}} {{- end -}} + {{- define "common.container.servicemanager" -}} {{- $name := ( include "common.name.servicemanager" . ) -}} {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} diff --git a/smo-install/helm-override/cnf/oran-override.yaml b/smo-install/helm-override/cnf/oran-override.yaml index 52403d25..b159e965 100644 --- a/smo-install/helm-override/cnf/oran-override.yaml +++ b/smo-install/helm-override/cnf/oran-override.yaml @@ -43,6 +43,7 @@ nonrtric: installHelmmanager: true installrAppmanager: true installCapifcore: true + installServicemanager: true # override default mount path root directory # referenced by persistent volumes and log files persistence: diff --git a/smo-install/helm-override/default/oran-override.yaml b/smo-install/helm-override/default/oran-override.yaml index 574ef5d6..40d81733 100644 --- a/smo-install/helm-override/default/oran-override.yaml +++ b/smo-install/helm-override/default/oran-override.yaml @@ -43,6 +43,7 @@ nonrtric: installHelmmanager: true installrAppmanager: true installCapifcore: true + installServicemanager: true # override default mount path root directory # referenced by persistent volumes and log files persistence: diff --git a/smo-install/helm-override/pythonsdk-tests/oran-override.yaml b/smo-install/helm-override/pythonsdk-tests/oran-override.yaml index 9b0c2de5..50634ccf 100644 --- a/smo-install/helm-override/pythonsdk-tests/oran-override.yaml +++ b/smo-install/helm-override/pythonsdk-tests/oran-override.yaml @@ -43,6 +43,7 @@ nonrtric: installHelmmanager: true installrAppmanager: true installCapifcore: true + installServicemanager: true # override default mount path root directory # referenced by persistent volumes and log files persistence: diff --git a/smo-install/oran_oom/kong/.helmignore b/smo-install/oran_oom/kong/.helmignore new file mode 100644 index 00000000..0e8a0eb3 --- /dev/null +++ b/smo-install/oran_oom/kong/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/smo-install/oran_oom/kong/Chart.yaml b/smo-install/oran_oom/kong/Chart.yaml new file mode 100644 index 00000000..9e2ab91a --- /dev/null +++ b/smo-install/oran_oom/kong/Chart.yaml @@ -0,0 +1,26 @@ +# ============LICENSE_START======================================================== +# Modification Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved. +# ================================================================================= +# 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. +# ============LICENSE_END========================================================== + +apiVersion: v2 +name: kong +description: A Helm chart for deploying DB-mode Kong with Postgres +version: 1.0.0 +appVersion: "1.0.0" + +dependencies: + - name: kong + version: "2.38.0" + repository: https://nexus3.o-ran-sc.org/repository/helm-konghq/ diff --git a/smo-install/oran_oom/kong/templates/00-kong-pv.yaml b/smo-install/oran_oom/kong/templates/00-kong-pv.yaml new file mode 100644 index 00000000..a12ad6a9 --- /dev/null +++ b/smo-install/oran_oom/kong/templates/00-kong-pv.yaml @@ -0,0 +1,33 @@ +# ============LICENSE_START=============================================== +# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved. +# ======================================================================== +# 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. +# ============LICENSE_END================================================= +# + +{{- if .Values.kongpv.enabled }} +apiVersion: v1 +kind: PersistentVolume +metadata: + name: kongpv + labels: + type: local +spec: + capacity: + storage: "{{ .Values.kongpv.persistence.size }}" + accessModes: + - "{{ .Values.kongpv.persistence.accessMode }}" + hostPath: + path: "{{ .Values.kongpv.persistence.path }}" + persistentVolumeReclaimPolicy: "{{ .Values.kongpv.persistence.volumeReclaimPolicy }}" +{{- end }} diff --git a/smo-install/oran_oom/kong/templates/01-kongpvc.yaml b/smo-install/oran_oom/kong/templates/01-kongpvc.yaml new file mode 100644 index 00000000..5f631cf3 --- /dev/null +++ b/smo-install/oran_oom/kong/templates/01-kongpvc.yaml @@ -0,0 +1,29 @@ +# ============LICENSE_START=============================================== +# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved. +# ======================================================================== +# 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. +# ============LICENSE_END================================================= +# +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: data-oran-nonrtric-postgresql-0 +spec: + accessModes: + - "{{ .Values.kongpvc.persistence.accessMode }}" + resources: + requests: + storage: "{{ .Values.kongpvc.persistence.size }}" +{{- if .Values.kongpv.enabled }} + volumeName: kongpv +{{- end }} diff --git a/smo-install/oran_oom/kong/values.yaml b/smo-install/oran_oom/kong/values.yaml new file mode 100644 index 00000000..527f0d0a --- /dev/null +++ b/smo-install/oran_oom/kong/values.yaml @@ -0,0 +1,149 @@ + +# ============LICENSE_START=============================================== +# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved. +# ======================================================================== +# 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. +# ============LICENSE_END================================================= + +# Default values for Kong PV and PVC + +kongpv: + enabled: true # Disabled for Minikube + persistence: + volumeReclaimPolicy: Delete + accessMode: ReadWriteOnce + size: 2Gi + path: "/tmp/kongpv" + +kongpvc: + persistence: + volumeReclaimPolicy: Delete + accessMode: ReadWriteOnce + size: 2Gi + +# +# Default values for Kong's Helm Chart. +# + +kong: + # Sections: + # - Deployment parameters + # - Kong parameters + # - Ingress Controller parameters + # - Postgres sub-chart parameters + # - Miscellaneous parameters + # For a detailed example of values.yaml, please see https://github.com/Kong/charts/blob/main/charts/kong/values.yaml + # ----------------------------------------------------------------------------- + # Deployment parameters + # ----------------------------------------------------------------------------- + deployment: + kong: + enabled: true + serviceAccount: + create: true + automountServiceAccountToken: false + # ----------------------------------------------------------------------------- + # Kong parameters + # ----------------------------------------------------------------------------- + env: + database: "postgres" + # Specify Kong's Docker image and repository details here + image: + repository: kong + tag: "3.4" + pullPolicy: IfNotPresent + # Specify Kong admin API service and listener configuration + admin: + enabled: true + type: NodePort + http: + # Enable plaintext HTTP listen for the admin API + enabled: true + servicePort: 8001 + containerPort: 8001 + nodePort: 32081 + parameters: [] + tls: + # Enable HTTPS listen for the admin API + enabled: false + servicePort: 8444 + containerPort: 8444 + nodePort: 32444 + parameters: + - http2 + ingress: + enabled: false + # Specify Kong proxy service configuration + proxy: + # Enable creating a Kubernetes service for the proxy + enabled: true + type: LoadBalancer + loadBalancerClass: + nameOverride: "" + annotations: {} + labels: + enable-metrics: "true" + http: + # Enable plaintext HTTP listen for the proxy + enabled: true + servicePort: 80 + containerPort: 8000 + # Set a nodePort which is available if service type is NodePort + nodePort: 32080 + parameters: [] + tls: + # Enable HTTPS listen for the proxy + enabled: false + servicePort: 443 + containerPort: 8443 + parameters: + - http2 + # ----------------------------------------------------------------------------- + # Ingress Controller parameters + # ----------------------------------------------------------------------------- + ingressController: + enabled: true + installCRDs: false + image: + repository: kong/kubernetes-ingress-controller + tag: "3.0" + env: + kong_admin_tls_skip_verify: true + # ----------------------------------------------------------------------------- + # Postgres sub-chart parameters + # ----------------------------------------------------------------------------- + postgresql: + enabled: true + auth: + database: kong + username: kong + password: kong + postgresPassword: kong + image: + # use postgres < 14 until is https://github.com/Kong/kong/issues/8533 resolved + tag: 13.11.0-debian-11-r20 + service: + ports: + postgresql: "5432" + volumePermissions: + enabled: true + primary: + persistence: + existingClaim: data-oran-nonrtric-postgresql-0 + # ----------------------------------------------------------------------------- + # Miscellaneous parameters + # ----------------------------------------------------------------------------- + waitImage: + enabled: true + pullPolicy: IfNotPresent + replicaCount: 1 diff --git a/smo-install/oran_oom/nonrtric/Chart.yaml b/smo-install/oran_oom/nonrtric/Chart.yaml index e7dd005f..5462a683 100644 --- a/smo-install/oran_oom/nonrtric/Chart.yaml +++ b/smo-install/oran_oom/nonrtric/Chart.yaml @@ -1,3 +1,19 @@ +# ============LICENSE_START======================================================== +# Modification Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved. +# ================================================================================= +# 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. +# ============LICENSE_END========================================================== + apiVersion: v2 name: nonrtric version: 1.0.0 @@ -79,8 +95,8 @@ dependencies: condition: nonrtric.installHelmmanager - name: kong - version: ~2.4.0 - repository: https://nexus3.o-ran-sc.org/repository/helm-konghq/ + version: ~1.0.0 + repository: "@local" condition: nonrtric.installKong - name: dmaapadapterservice @@ -97,3 +113,8 @@ dependencies: version: ~1.0.0 repository: "@local" condition: nonrtric.installCapifcore + + - name: servicemanager + version: ~1.0.0 + repository: "@local" + condition: nonrtric.installServicemanager diff --git a/smo-install/oran_oom/nonrtric/values.yaml b/smo-install/oran_oom/nonrtric/values.yaml index f3444418..7b862a7e 100644 --- a/smo-install/oran_oom/nonrtric/values.yaml +++ b/smo-install/oran_oom/nonrtric/values.yaml @@ -44,6 +44,7 @@ nonrtric: installHelmmanager: true installrAppmanager: true installCapifcore: true + installServicemanager: true volume1: size: 1Gi diff --git a/smo-install/oran_oom/servicemanager/Chart.yaml b/smo-install/oran_oom/servicemanager/Chart.yaml new file mode 100644 index 00000000..db6a13ed --- /dev/null +++ b/smo-install/oran_oom/servicemanager/Chart.yaml @@ -0,0 +1,27 @@ +################################################################################ +# Copyright (c) 2024 OpenInfra Foundation Europe. # +# # +# 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. # +################################################################################ + + +apiVersion: v2 +appVersion: "2.0.0" +description: A Helm chart for ServiceManager +name: servicemanager +version: 1.0.0 + +dependencies: + - name: nonrtric-common + version: ^2.0.0 + repository: "@local" diff --git a/smo-install/oran_oom/servicemanager/templates/configmap.yaml b/smo-install/oran_oom/servicemanager/templates/configmap.yaml new file mode 100644 index 00000000..746b0399 --- /dev/null +++ b/smo-install/oran_oom/servicemanager/templates/configmap.yaml @@ -0,0 +1,24 @@ +################################################################################ +# Copyright (c) 2024 OpenInfra Foundation Europe. # +# # +# 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. # +################################################################################ +apiVersion: v1 +kind: ConfigMap +metadata: + name: servicemanager-configmap +data: +{{- range $key, $value := .Values.data }} + {{ $key }}: | +{{ $value | indent 4 }} +{{- end }} diff --git a/smo-install/oran_oom/servicemanager/templates/deployment.yaml b/smo-install/oran_oom/servicemanager/templates/deployment.yaml new file mode 100644 index 00000000..fd768868 --- /dev/null +++ b/smo-install/oran_oom/servicemanager/templates/deployment.yaml @@ -0,0 +1,39 @@ +################################################################################ +# Copyright (c) 2024 OpenInfra Foundation Europe. # +# # +# 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. # +################################################################################ + +kind: Deployment +apiVersion: apps/v1 +metadata: {{- include "common.resourceMetadata" . | nindent 2 }} +spec: + replicas: 1 + selector: {{- include "common.selectors" . | nindent 4 }} + template: + metadata: {{- include "common.templateMetadata" . | nindent 6 }} + spec: + hostname: {{ include "common.name" . }} + containers: + - name: {{ include "common.containername" . }} + image: {{ .Values.image.registry }}/{{ .Values.image.name }}:{{ .Values.image.tag }} + imagePullPolicy: {{ .Values.imagePullPolicy }} + {{- include "common.tcpsocketProbes" . | nindent 8 }} + volumeMounts: + - name: servicemanager-config-volume + mountPath: /app/servicemanager/.env + subPath: .env + volumes: + - name: servicemanager-config-volume + configMap: + name: servicemanager-configmap diff --git a/smo-install/oran_oom/servicemanager/templates/service.yaml b/smo-install/oran_oom/servicemanager/templates/service.yaml new file mode 100644 index 00000000..3a64f6af --- /dev/null +++ b/smo-install/oran_oom/servicemanager/templates/service.yaml @@ -0,0 +1,17 @@ +################################################################################ +# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved. # +# # +# 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. # +################################################################################ + +{{ include "common.service" . }} diff --git a/smo-install/oran_oom/servicemanager/values.yaml b/smo-install/oran_oom/servicemanager/values.yaml new file mode 100644 index 00000000..a0a4ffda --- /dev/null +++ b/smo-install/oran_oom/servicemanager/values.yaml @@ -0,0 +1,75 @@ +# ============LICENSE_START=============================================== +# Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved. +# ======================================================================== +# 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. +# ============LICENSE_END================================================= + +# Default values for Servicemanager + +imagePullPolicy: IfNotPresent +image: + registry: 'nexus3.o-ran-sc.org:10004/o-ran-sc' + name: nonrtric-plt-servicemanager + tag: 0.1.2 +service: + httpName: http + ports: + - name: http + internalPort: "8095" + targetPort: "8095" + nodePort: 31575 + type: NodePort +liveness: + initialDelaySeconds: 300 + periodSeconds: 10 +readiness: + initialDelaySeconds: 60 + periodSeconds: 10 +resources: + small: + limits: + cpu: 250m + memory: 256Mi + requests: + cpu: 80m + memory: 128Mi + large: + limits: + cpu: 400m + memory: 8Gi + requests: + cpu: 200m + memory: 2Gi + unlimited: {} +nameOverride: "" + + +allowHttp: true +SERVICE_MANAGER_ENV: "" + +data: + .env: | + # The Kong Data plane provides the endpoint that Service Manager gives to the rApp so that the rApp can invoke the CAPIF published API. + # In a Kubernetes environment, we need to use the Kong NodePort IP and nodePort if the rApp needs access from outside the Kong cluster. + # From inside the Kong cluster, we can use the Kubernetes cluster DNS entry, kong-nonrtric-kong-proxy.nonrtric.svc.cluster.local. + KONG_DOMAIN: "kong" + KONG_PROTOCOL: "http" + KONG_CONTROL_PLANE_IPV4: "oran-nonrtric-kong-admin.nonrtric.svc.cluster.local" + KONG_CONTROL_PLANE_PORT: "8001" + KONG_DATA_PLANE_IPV4: "oran-nonrtric-kong-proxy.nonrtric.svc.cluster.local" + KONG_DATA_PLANE_PORT: "80" + CAPIF_PROTOCOL: "http" + CAPIF_IPV4: "capifcore.nonrtric.svc.cluster.local" + CAPIF_PORT: "8090" + LOG_LEVEL: "Info" + SERVICE_MANAGER_PORT: "8095" diff --git a/smo-install/scripts/sub-scripts/install-nonrtric.sh b/smo-install/scripts/sub-scripts/install-nonrtric.sh index 2926b407..97479d05 100755 --- a/smo-install/scripts/sub-scripts/install-nonrtric.sh +++ b/smo-install/scripts/sub-scripts/install-nonrtric.sh @@ -1,12 +1,12 @@ #!/bin/bash ### -# ============LICENSE_START======================================================= +# ============LICENSE_START======================================================== # ORAN SMO Package -# ================================================================================ -# Copyright (C) 2021 AT&T Intellectual Property. All rights -# reserved. -# ================================================================================ +# ================================================================================= +# Copyright (C) 2021 AT&T Intellectual Property. All rights reserved. +# Modification Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved. +# ================================================================================= # 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 @@ -18,11 +18,48 @@ # 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. -# ============LICENSE_END============================================ -# =================================================================== -# +# ============LICENSE_END========================================================== +# ================================================================================= +# ### kubectl create namespace nonrtric echo '### Installing ORAN NONRTRIC part ###' -helm install --debug oran-nonrtric local/nonrtric --namespace nonrtric -f $1 --set nonrtric.persistence.mountPath="/dockerdata-nfs/deployment-$2" + +OVERRIDEYAML=$1 + +if ! command -v yq > /dev/null 2>&1; then + echo "yq is not installed. Installing yq..." + sudo snap install yq --channel=v3/stable +fi + +INSTALL_KONG=$(yq read "$OVERRIDEYAML" 'nonrtric.installKong') +if [ $? -ne 0 ] || [ -z "$INSTALL_KONG" ]; then + echo "Error: failed to parse installKong from YAML with yq. Aborting install." + exit 1 +fi + +INSTALL_CAPIF=$(yq read "$OVERRIDEYAML" 'nonrtric.installCapifcore') +if [ $? -ne 0 ] || [ -z "$INSTALL_CAPIF" ]; then + echo "Error: failed to parse installCapifcore from YAML with yq. Aborting install." + exit 1 +fi + +INSTALL_SERVICEMANAGER=$(yq read "$OVERRIDEYAML" 'nonrtric.installServicemanager') +if [ $? -ne 0 ] || [ -z "$INSTALL_SERVICEMANAGER" ]; then + echo "Error: failed to parse installServicemanager from YAML with yq. Aborting install." + exit 1 +fi + +if [ "$INSTALL_SERVICEMANAGER" == "true" ]; then + if [ "$INSTALL_KONG" == "false" ]; then + echo "Error: INSTALL_KONG must be true if INSTALL_SERVICEMANAGER is true. Aborting install." + exit 1 + fi + if [ "$INSTALL_CAPIF" == "false" ]; then + echo "Error: INSTALL_CAPIF must be true if INSTALL_SERVICEMANAGER is true. Aborting install." + exit 1 + fi +fi + +helm install --debug oran-nonrtric local/nonrtric --namespace nonrtric -f $OVERRIDEYAML --set nonrtric.persistence.mountPath="/dockerdata-nfs/deployment-$2" diff --git a/smo-install/scripts/sub-scripts/uninstall-nonrtric.sh b/smo-install/scripts/sub-scripts/uninstall-nonrtric.sh index 6c528e3f..ee52b7ca 100755 --- a/smo-install/scripts/sub-scripts/uninstall-nonrtric.sh +++ b/smo-install/scripts/sub-scripts/uninstall-nonrtric.sh @@ -1,12 +1,13 @@ #!/bin/bash ### -# ============LICENSE_START======================================================= +# ============LICENSE_START======================================================== # ORAN SMO Package -# ================================================================================ +# ================================================================================= # Copyright (C) 2021 AT&T Intellectual Property. All rights # reserved. -# ================================================================================ +# Modification Copyright (C) 2024 OpenInfra Foundation Europe. All rights reserved. +# ================================================================================= # 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 @@ -18,11 +19,32 @@ # 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. -# ============LICENSE_END============================================ -# =================================================================== -# +# ============LICENSE_END========================================================== +# ================================================================================= +# ### +if ! jq --version > /dev/null 2>&1 ; then + sudo apt-get update + sudo apt-get install -y jq +fi + +INSTALL_KONG=$(helm get values oran-nonrtric -n nonrtric -o json | jq '.nonrtric.installKong') +if [ $? -ne 0 ]; then + echo "Failed to parse helm release value installKong with jq." + exit 1 +fi + +if [ "$INSTALL_KONG" = true ];then + echo "Warning - deleting Kong routes and services for ServiceManager." + SERVICEMANAGER_POD=$(kubectl get pods -o custom-columns=NAME:.metadata.name -l app.kubernetes.io/name=servicemanager --no-headers -n nonrtric) + if [[ -n $SERVICEMANAGER_POD ]]; then + kubectl exec $SERVICEMANAGER_POD -n nonrtric -- ./kongclearup + else + echo "Error - Servicemanager pod not found, didn't delete Kong routes and services for ServiceManager." + fi +fi + kubectl delete namespace nonrtric kubectl delete pv nonrtric-pv2 kubectl delete pv nonrtric-pv1 -- 2.16.6 From 1fd14f960d45794d4b87135ba2e2e72244987f03 Mon Sep 17 00:00:00 2001 From: DenisGNoonan Date: Thu, 6 Jun 2024 16:03:41 +0100 Subject: [PATCH 4/4] NONRTRIC980: fixs for controlpanel kong, 'hunkey dory' and pms ports Issue-ID: NONRTRIC-980 Change-Id: I48f8709e9cef1d6cbd010f50b7981782dbeddba7 Signed-off-by: DenisGNoonan --- bin/deploy-nonrtric | 2 +- bin/undeploy-nonrtric | 2 +- nonrtric/RECIPE_EXAMPLE/example_recipe.yaml | 4 ++-- nonrtric/data/run_in_k8s/populate_policy_data.sh | 2 +- nonrtric/helm/controlpanel/resources-ing/nginx.conf | 4 ++-- nonrtric/helm/controlpanel/values.yaml | 2 +- nonrtric/helm/nonrtricgateway/resources/config/application.yaml | 2 +- nonrtric/helm/policymanagementservice/values.yaml | 4 ++-- nonrtric/helm/servicemanager/values.yaml | 6 +++--- smo-install/oran_oom/controlpanel/resources-ing/nginx.conf | 5 ++++- smo-install/oran_oom/servicemanager/values.yaml | 2 +- smo-install/test/a1-validation/subscripts/health_check.sh | 4 ++-- smo-install/test/a1-validation/subscripts/prepareDmaapMsg.sh | 2 +- smo-install/test/a1-validation/subscripts/preparePmsData.sh | 4 ++-- 14 files changed, 24 insertions(+), 21 deletions(-) diff --git a/bin/deploy-nonrtric b/bin/deploy-nonrtric index 651771b7..e0c33060 100755 --- a/bin/deploy-nonrtric +++ b/bin/deploy-nonrtric @@ -225,7 +225,7 @@ if [ "$INSTALL_KONG" = true ];then echo "Installing Kong" helm repo add kong https://charts.konghq.com --force-update helm repo update - helm install kong-nonrtric kong/kong -n ${NONRTRIC_NAMESPACE:-nonrtric} -f dep/nonrtric/helm/kongstorage/kongvalues.yaml + helm install oran-nonrtric kong/kong -n ${NONRTRIC_NAMESPACE:-nonrtric} -f dep/nonrtric/helm/kongstorage/kongvalues.yaml fi kubectl create configmap -n ${NONRTRIC_NAMESPACE:-nonrtric} nonrtric-recipe --from-file=recipe=$OVERRIDEYAML diff --git a/bin/undeploy-nonrtric b/bin/undeploy-nonrtric index af9a31db..adfe2875 100755 --- a/bin/undeploy-nonrtric +++ b/bin/undeploy-nonrtric @@ -66,7 +66,7 @@ if [ "$INSTALL_KONG" = true ];then echo "Uninstalling kongstorage" helm delete kongstorage -n "${NONRTRIC_NAMESPACE:-nonrtric}" echo "Uninstalling Kong" - helm delete kong-nonrtric -n ${NONRTRIC_NAMESPACE:-nonrtric} + helm delete oran-nonrtric -n ${NONRTRIC_NAMESPACE:-nonrtric} fi ROOT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )" diff --git a/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml b/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml index d557e535..24f168d1 100644 --- a/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml +++ b/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml @@ -104,10 +104,10 @@ policymanagementservice: service: allowHttp: true httpName: http - internalPort1: 9080 + internalPort1: 8081 targetPort1: 8081 httpsName: https - internalPort2: 9081 + internalPort2: 8433 targetPort2: 8433 liveness: initialDelaySeconds: 20 diff --git a/nonrtric/data/run_in_k8s/populate_policy_data.sh b/nonrtric/data/run_in_k8s/populate_policy_data.sh index 4a3f1b8e..4f15e89d 100755 --- a/nonrtric/data/run_in_k8s/populate_policy_data.sh +++ b/nonrtric/data/run_in_k8s/populate_policy_data.sh @@ -25,7 +25,7 @@ # one policy-type and one policy in a1-sim-STD2_0 policy_agent_host="policymanagementservice" -policy_agent_port="9080" +policy_agent_port="8081" a1_sim_osc_0_host="a1-sim-osc-0.a1-sim" a1_sim_osc_0_port="8085" a1_sim_osc_1_host="a1-sim-osc-1.a1-sim" diff --git a/nonrtric/helm/controlpanel/resources-ing/nginx.conf b/nonrtric/helm/controlpanel/resources-ing/nginx.conf index d72eea73..4e53c543 100644 --- a/nonrtric/helm/controlpanel/resources-ing/nginx.conf +++ b/nonrtric/helm/controlpanel/resources-ing/nginx.conf @@ -4,7 +4,7 @@ http { include /etc/nginx/mime.types; upstream backend { - server kong-proxy.kong:80; + server oran-nonrtric-kong-proxy.nonrtric:80; } server { @@ -25,4 +25,4 @@ http { try_files $uri $uri/ /index.html; } } -} \ No newline at end of file +} diff --git a/nonrtric/helm/controlpanel/values.yaml b/nonrtric/helm/controlpanel/values.yaml index a1519508..e3e41dcc 100644 --- a/nonrtric/helm/controlpanel/values.yaml +++ b/nonrtric/helm/controlpanel/values.yaml @@ -32,7 +32,7 @@ controlpanel: targetPort1: 8080 externalPort1: 30091 httpsName: https - internalPort2: 8081 + internalPort2: 8082 targetPort2: 8082 externalPort2: 30092 liveness: diff --git a/nonrtric/helm/nonrtricgateway/resources/config/application.yaml b/nonrtric/helm/nonrtricgateway/resources/config/application.yaml index 0d96d68d..602252ba 100644 --- a/nonrtric/helm/nonrtricgateway/resources/config/application.yaml +++ b/nonrtric/helm/nonrtricgateway/resources/config/application.yaml @@ -27,7 +27,7 @@ spring: wiretap: true routes: - id: A1-Policy - uri: https://policymanagementservice:9081 + uri: https://policymanagementservice:8433 predicates: - Path=/a1-policy/** - id: A1-EI diff --git a/nonrtric/helm/policymanagementservice/values.yaml b/nonrtric/helm/policymanagementservice/values.yaml index c6a312eb..4e24f8c5 100644 --- a/nonrtric/helm/policymanagementservice/values.yaml +++ b/nonrtric/helm/policymanagementservice/values.yaml @@ -28,10 +28,10 @@ policymanagementservice: service: allowHttp: true httpName: http - internalPort1: 9080 + internalPort1: 8081 targetPort1: 8081 httpsName: https - internalPort2: 9081 + internalPort2: 8433 targetPort2: 8433 liveness: initialDelaySeconds: 20 diff --git a/nonrtric/helm/servicemanager/values.yaml b/nonrtric/helm/servicemanager/values.yaml index dbb261c7..0cfaa055 100644 --- a/nonrtric/helm/servicemanager/values.yaml +++ b/nonrtric/helm/servicemanager/values.yaml @@ -38,12 +38,12 @@ data: .env: | # The Kong Data plane provides the endpoint that Service Manager gives to the rApp so that the rApp can invoke the CAPIF published API. # In a Kubernetes environment, we need to use the Kong NodePort IP and nodePort if the rApp needs access from outside the Kong cluster. - # From inside the Kong cluster, we can use the Kubernetes cluster DNS entry, kong-nonrtric-kong-proxy.nonrtric.svc.cluster.local. + # From inside the Kong cluster, we can use the Kubernetes cluster DNS entry, oran-nonrtric-kong-proxy.nonrtric.svc.cluster.local. KONG_DOMAIN: "kong" KONG_PROTOCOL: "http" - KONG_CONTROL_PLANE_IPV4: "kong-nonrtric-kong-admin.nonrtric.svc.cluster.local" + KONG_CONTROL_PLANE_IPV4: "oran-nonrtric-kong-admin.nonrtric.svc.cluster.local" KONG_CONTROL_PLANE_PORT: "8001" - KONG_DATA_PLANE_IPV4: "kong-nonrtric-kong-proxy.nonrtric.svc.cluster.local" + KONG_DATA_PLANE_IPV4: "oran-nonrtric-kong-proxy.nonrtric.svc.cluster.local" KONG_DATA_PLANE_PORT: "80" CAPIF_PROTOCOL: "http" CAPIF_IPV4: "capifcore.nonrtric.svc.cluster.local" diff --git a/smo-install/oran_oom/controlpanel/resources-ing/nginx.conf b/smo-install/oran_oom/controlpanel/resources-ing/nginx.conf index 374861f1..4e53c543 100644 --- a/smo-install/oran_oom/controlpanel/resources-ing/nginx.conf +++ b/smo-install/oran_oom/controlpanel/resources-ing/nginx.conf @@ -1,9 +1,12 @@ events{} + http { include /etc/nginx/mime.types; + upstream backend { - server kong-proxy.kong:80; + server oran-nonrtric-kong-proxy.nonrtric:80; } + server { listen 8080; server_name localhost; diff --git a/smo-install/oran_oom/servicemanager/values.yaml b/smo-install/oran_oom/servicemanager/values.yaml index a0a4ffda..fb536718 100644 --- a/smo-install/oran_oom/servicemanager/values.yaml +++ b/smo-install/oran_oom/servicemanager/values.yaml @@ -61,7 +61,7 @@ data: .env: | # The Kong Data plane provides the endpoint that Service Manager gives to the rApp so that the rApp can invoke the CAPIF published API. # In a Kubernetes environment, we need to use the Kong NodePort IP and nodePort if the rApp needs access from outside the Kong cluster. - # From inside the Kong cluster, we can use the Kubernetes cluster DNS entry, kong-nonrtric-kong-proxy.nonrtric.svc.cluster.local. + # From inside the Kong cluster, we can use the Kubernetes cluster DNS entry, oran-nonrtric-kong-proxy.nonrtric.svc.cluster.local. KONG_DOMAIN: "kong" KONG_PROTOCOL: "http" KONG_CONTROL_PLANE_IPV4: "oran-nonrtric-kong-admin.nonrtric.svc.cluster.local" diff --git a/smo-install/test/a1-validation/subscripts/health_check.sh b/smo-install/test/a1-validation/subscripts/health_check.sh index 9f675ab9..3857b304 100755 --- a/smo-install/test/a1-validation/subscripts/health_check.sh +++ b/smo-install/test/a1-validation/subscripts/health_check.sh @@ -4,7 +4,7 @@ enrichment_service_url=${1:-localhost:9082} a1_sim_OSC_url=${2:-localhost:8085} a1_sim_STD_url=${3:-localhost:8085} a1_sim_STD_v2_url=${4:-localhost:8085} -policy_agent_url=${5:-localhost:9080} +policy_agent_url=${5:-localhost:8081} a1_controller_url=${6:false} echo -e "NONRTRIC HealthCheck\n" @@ -47,7 +47,7 @@ checkStatus "curl -vskw %{http_code} http://$a1_sim_STD_v2_url/" "OK200" "SIM3" # check PMS status echo "check Policy Agent status:" -checkStatus "curl -vskw %{http_code} http://$policy_agent_url/status" "hunky dory200" "PMS" +checkStatus "curl -vskw %{http_code} http://$policy_agent_url/status" "success200" "PMS" # check ECS status echo "check Enrichment service status:" diff --git a/smo-install/test/a1-validation/subscripts/prepareDmaapMsg.sh b/smo-install/test/a1-validation/subscripts/prepareDmaapMsg.sh index 9a06a864..2d3fd23b 100755 --- a/smo-install/test/a1-validation/subscripts/prepareDmaapMsg.sh +++ b/smo-install/test/a1-validation/subscripts/prepareDmaapMsg.sh @@ -31,7 +31,7 @@ dmaap_mr_url=${1:-localhost:3904} a1_sim_OSC_url=${2:-localhost:8085} a1_sim_STD_url=${3:-localhost:8085} a1_sim_STD_v2_url=${4:-localhost:8085} -policy_agent_url=${5:-localhost:9081} +policy_agent_url=${5:-localhost:8081} httpx=${6:-"http"} echo "using dmaap-mr url: "$dmaap_mr_url diff --git a/smo-install/test/a1-validation/subscripts/preparePmsData.sh b/smo-install/test/a1-validation/subscripts/preparePmsData.sh index 49194817..fc874e0a 100755 --- a/smo-install/test/a1-validation/subscripts/preparePmsData.sh +++ b/smo-install/test/a1-validation/subscripts/preparePmsData.sh @@ -29,7 +29,7 @@ a1_sim_OSC_url=${1:-localhost:8085} a1_sim_STD_v2_url=${2:-localhost:8085} -policy_agent_url=${3:-localhost:9081} +policy_agent_url=${3:-localhost:8081} httpx=${4:-"http"} SHELL_FOLDER=$(cd "$(dirname "$0")";pwd) @@ -52,7 +52,7 @@ echo "policy agent status:" curlString="curl -skw %{http_code} $httpx://$policy_agent_url/status" res=$($curlString) echo "$res" -expect="hunky dory200" +expect="success200" checkRes echo -e "\n" -- 2.16.6