Merge "Step version of Non-RT RIC Gateway to 1.0.0"
authorJohn Keeney <john.keeney@est.tech>
Fri, 18 Jun 2021 14:40:31 +0000 (14:40 +0000)
committerGerrit Code Review <gerrit@o-ran-sc.org>
Fri, 18 Jun 2021 14:40:31 +0000 (14:40 +0000)
13 files changed:
INFO.yaml
bin/deploy-nonrtric
bin/undeploy-nonrtric
nonrtric/RECIPE_EXAMPLE/example_recipe.yaml
nonrtric/data/run_in_k8s/populate_enrichment_data.sh
nonrtric/data/run_in_k8s/testdata/ECS/EiJob.json
nonrtric/data/run_in_k8s/testdata/ECS/EiProducer.json
nonrtric/data/run_in_k8s/testdata/ECS/EiType.json
nonrtric/helm/enrichmentservice/templates/ingress.yaml
nonrtric/helm/enrichmentservice/values.yaml
nonrtric/helm/policymanagementservice/templates/ingress.yaml
nonrtric/helm/policymanagementservice/values.yaml
ric-common/Common-Template/helm/ric-common/templates/_influxdb.tpl

index 0b10824..f90fb12 100644 (file)
--- a/INFO.yaml
+++ b/INFO.yaml
@@ -44,6 +44,36 @@ committers:
       company: 'AT&T Labs-Research'
       id: 'multics'
       timezone: 'America/New_York'
+    - name: 'Thoralf Czichy'
+      email: 'thoralf.czichy@nokia.com'
+      company: 'Nokia'
+      id: 'czichy'
+      timezone: 'Europe/Helsinki'
+    - name: 'John Keeney'
+      email: 'John.Keeney@est.tech'
+      id: 'johnkeeney'
+      company: 'Ericsson Software Technology'
+      timezone: 'Europe/Dublin'
+    - name: 'Martin Skorupski'
+      email: 'martin.skorupski@highstreet-technologies.com'
+      id: 'demx8as6'
+      company: 'highstreet technologies GmbH'
+      timezone: 'Germany/Berlin'
+    - name: 'Mahesh Jethanandani'
+      email: 'mjethanandani@gmail.com'
+      id: 'mjethanandani'
+      company: 'VMware'
+      timezone: 'America/Los_Angeles'
+    - name: 'Alex Stancu'
+      email: 'alexandru.stancu@highstreet-technologies.com'
+      id: 'alex.stancu'
+      company: 'highstreet technologies GmbH'
+      timezone: 'Europe/Bucharest'
+    - name: 'Xiaohua Zhang'
+      email: 'xiaohua.zhang@windriver.com'
+      company: 'Windriver'
+      id: 'Xiaohua626'
+      timezone: 'China/Beijing'
     - name: 'Chris Lott'
       email: 'clott@research.att.com'
       company: 'AT&T Labs-Research'
@@ -52,3 +82,22 @@ committers:
 tsc:
     # yamllint disable rule:line-length
     approval: 'https://wiki.o-ran-sc.org/display/TOC#O-RANSCTechnicalOversightCommittee(TOC)-20190821'
+    changes:
+        - type: 'promotion'
+          name: 'Thoralf Czichy'
+          link: 'https://lists.o-ran-sc.org/g/toc/topic/ap_from_toc_add_ptls_as/83099800'
+        - type: 'promotion'
+          name: 'John Keeney'
+          link: 'https://lists.o-ran-sc.org/g/toc/topic/ap_from_toc_add_ptls_as/83099800'
+        - type: 'promotion'
+          name: 'Martin Skorupski'
+          link: 'https://lists.o-ran-sc.org/g/toc/topic/ap_from_toc_add_ptls_as/83099800'
+        - type: 'promotion'
+          name: 'Mahesh Jethanandani'
+          link: 'https://lists.o-ran-sc.org/g/toc/topic/ap_from_toc_add_ptls_as/83099800'
+        - type: 'promotion'
+          name: 'Alex Stancu'
+          link: 'https://lists.o-ran-sc.org/g/toc/topic/ap_from_toc_add_ptls_as/83099800'
+        - type: 'promotion'
+          name: 'Xiaohua Zhang'
+          link: 'https://lists.o-ran-sc.org/g/toc/topic/ap_from_toc_add_ptls_as/83099800'
index 0643f4b..6770ad2 100755 (executable)
@@ -130,6 +130,16 @@ 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}')
+echo "Chart name- $PARENT_CHART"
+echo "Install Kong- $INSTALL_KONG"
+
+if [ "$INSTALL_KONG" = true ];then
+   echo "Installing Kong"
+   helm repo add kong https://charts.konghq.com
+   helm repo update
+   helm install kong-nonrtric --namespace kong kong/kong --set ingressController.installCRDs=false --set admin.enabled=true
+fi
 
 if ! kubectl get ns ${NONRTRIC_NAMESPACE:-nonrtric}> /dev/null 2>&1; then
     kubectl create ns ${NONRTRIC_NAMESPACE:-nonrtric}
index 9e3c0cb..6ec73a4 100755 (executable)
@@ -31,6 +31,12 @@ COMMON_BLOCK=$(cat /tmp/recipe.yaml | awk '/^common:/{getline; while ($0 ~ /^ +.
 NAMESPACE_BLOCK=$(cat /tmp/recipe.yaml | 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 /tmp/recipe.yaml | awk '/^  installKong:/{print $2}')
+
+if [ "$INSTALL_KONG" = true ];then
+   echo "Uninstalling Kong"
+   helm delete kong-nonrtric --namespace kong
+fi
 
 echo "Undeploying NONRTRIC components [$COMPONENTS]"
 
index 0a46681..fcd62b7 100644 (file)
@@ -35,7 +35,7 @@ common:
   namespace:
     nonrtric: nonrtric
   ingressClassName: kong
-
+  installKong: true
 
 # A1 Conttroller may take few more minutes to start. Increase the initialDelaySeconds in liveness to avoid container restart.
 a1controller:
@@ -146,6 +146,8 @@ policymanagementservice:
       size: 2Gi
       mountPath: /dockerdata-nfs
       mountSubPath: nonrtric/policymanagementservice
+    ingress:
+      enabled: false
 
 enrichmentservice:
   enrichmentservice:
@@ -175,6 +177,8 @@ enrichmentservice:
       size: 2Gi
       mountPath: /dockerdata-nfs
       mountSubPath: nonrtric/enrichmentservice
+    ingress:
+      enabled: false
 
 rappcatalogueservice:
   rappcatalogueservice:
index fe6a3f8..14edb81 100755 (executable)
@@ -33,50 +33,50 @@ echo -e "\n"
 
 # Create EiType
 echo "Create EiType:"
-curl -X PUT -skw %{http_code} $httpx://$ecs_host:$ecs_port/ei-producer/v1/eitypes/type1 -H accept:application/json -H Content-Type:application/json --data-binary @testdata/ECS/EiType.json
+curl -X PUT -skw %{http_code} $httpx://$ecs_host:$ecs_port/data-producer/v1/info-types/type1 -H accept:application/json -H Content-Type:application/json --data-binary @testdata/ECS/EiType.json
 echo -e "\n"
 
 # Get EiTypes
 echo "Get EiTypes:"
-curl -X GET -skw %{http_code} $httpx://$ecs_host:$ecs_port/ei-producer/v1/eitypes -H Content-Type:application/json
+curl -X GET -skw %{http_code} $httpx://$ecs_host:$ecs_port/data-producer/v1/info-types -H Content-Type:application/json
 echo -e "\n"
 
 # Get Individual EiType
 echo "Get Individual EiType:"
-curl -X GET -skw %{http_code} $httpx://$ecs_host:$ecs_port/ei-producer/v1/eitypes/type1 -H Content-Type:application/json
+curl -X GET -skw %{http_code} $httpx://$ecs_host:$ecs_port/data-producer/v1/info-types/type1 -H Content-Type:application/json
 echo -e "\n"
 
 # Create EiProducer
 echo "Create EiProducer:"
-curl -X PUT -skw %{http_code} $httpx://$ecs_host:$ecs_port/ei-producer/v1/eiproducers/1 -H Content-Type:application/json --data-binary @testdata/ECS/EiProducer.json
+curl -X PUT -skw %{http_code} $httpx://$ecs_host:$ecs_port/data-producer/v1/info-producers/1 -H Content-Type:application/json --data-binary @testdata/ECS/EiProducer.json
 echo -e "\n"
 
 # Get EiProducers
 echo "Get EiProducers:"
-curl -X GET -skw %{http_code} $httpx://$ecs_host:$ecs_port/ei-producer/v1/eiproducers -H Content-Type:application/json
+curl -X GET -skw %{http_code} $httpx://$ecs_host:$ecs_port/data-producer/v1/info-producers -H Content-Type:application/json
 echo -e "\n"
 
 # Get Individual EiProducer
 echo "Get Individual EiProducer:"
-curl -X GET -skw %{http_code} $httpx://$ecs_host:$ecs_port/ei-producer/v1/eiproducers/1 -H Content-Type:application/json
+curl -X GET -skw %{http_code} $httpx://$ecs_host:$ecs_port/data-producer/v1/info-producers/1 -H Content-Type:application/json
 echo -e "\n"
 
 # Get Individual EiProducer Status
 echo "Get Individual EiProducer:"
-curl -X GET -skw %{http_code} $httpx://$ecs_host:$ecs_port/ei-producer/v1/eiproducers/1/status -H Content-Type:application/json
+curl -X GET -skw %{http_code} $httpx://$ecs_host:$ecs_port/data-producer/v1/info-producers/1/status -H Content-Type:application/json
 echo -e "\n"
 
 # Create EiJob
 echo "Create EiJob Of A Certain Type type1:"
-curl -X PUT -skw %{http_code} $httpx://$ecs_host:$ecs_port/A1-EI/v1/eijobs/job1 -H Content-Type:application/json --data-binary @testdata/ECS/EiJob.json
+curl -X PUT -skw %{http_code} $httpx://$ecs_host:$ecs_port/data-consumer/v1/info-jobs/job1 -H Content-Type:application/json --data-binary @testdata/ECS/EiJob.json
 echo -e "\n"
 
 # Get EiJobs
 echo "Get EiJobs:"
-curl -X GET -skw %{http_code} $httpx://$ecs_host:$ecs_port/A1-EI/v1/eijobs -H Content-Type:application/json
+curl -X GET -skw %{http_code} $httpx://$ecs_host:$ecs_port/data-consumer/v1/info-jobs -H Content-Type:application/json
 echo -e "\n"
 
 # Get Individual EiJob:
 echo "Get Individual EiJob:"
-curl -X GET -skw %{http_code} $httpx://$ecs_host:$ecs_port/A1-EI/v1/eijobs/job1 -H Content-Type:application/json
+curl -X GET -skw %{http_code} $httpx://$ecs_host:$ecs_port/data-consumer/v1/info-jobs/job1 -H Content-Type:application/json
 echo -e "\n"
\ No newline at end of file
index 003c70f..3939ee1 100644 (file)
@@ -1,9 +1,9 @@
 {
-    "eiTypeId": "type1",
-    "jobResultUri": "https://ricsim_g3_1:8185/datadelivery",
-    "jobOwner": "ricsim_g3_1",
-    "jobStatusNotificationUri": "http://producer:80/",
-    "jobDefinition": {
+    "info_type_id": "type1",
+    "job_result_uri": "https://ricsim_g3_1:8185/datadelivery",
+    "job_owner": "ricsim_g3_1",
+    "status_notification_uri": "http://producer:80/",
+    "job_definition": {
         "jobparam1": "value1_job1",
         "jobparam2": "value2_job1",
         "jobparam3": "value3_job1"
index 01d8eb5..4b7c6c9 100644 (file)
@@ -1,5 +1,5 @@
 {
-    "supported_ei_types":["type1"],
-    "ei_job_callback_url": "https://producer-stub:8093/callbacks/job/prod-a",
-    "ei_producer_supervision_callback_url": "https://producer-stub:8093/callbacks/supervision/prod-a"
+    "supported_info_types":["type1"],
+    "info_job_callback_url": "https://producer-stub:8093/callbacks/job/prod-a",
+    "info_producer_supervision_callback_url": "https://producer-stub:8093/callbacks/supervision/prod-a"
 }
\ No newline at end of file
index 073f0b4..8618555 100644 (file)
@@ -1,8 +1,8 @@
 {
-    "ei_job_data_schema":{
-       "$schema":"http://json-schema.org/draft-07/schema#",
-       "title":"STD_Type1_1.0.0",
-       "description":"EI-Type 1",
-       "type":"object"
-    }
- }
\ No newline at end of file
+   "info_job_data_schema":{
+      "$schema":"http://json-schema.org/draft-07/schema#",
+      "title":"STD_Type1_1.0.0",
+      "description":"EI-Type 1",
+      "type":"object"
+   }
+}
\ No newline at end of file
index e679d16..f752022 100644 (file)
@@ -1,3 +1,4 @@
+{{/*
 ################################################################################
 #   Copyright (c) 2021 Nordix Foundation.                                      #
 #                                                                              #
@@ -13,7 +14,9 @@
 #   See the License for the specific language governing permissions and        #
 #   limitations under the License.                                             #
 ################################################################################
+*/}}
 
+{{- if .Values.enrichmentservice.ingress.enabled -}}
 apiVersion: networking.k8s.io/v1
 kind: Ingress
 metadata:
@@ -29,13 +32,14 @@ spec:
             backend:
               service:
                 name: {{ include "common.name.enrichmentservice" . }}
-                port: 
+                port:
                   number: {{ .Values.enrichmentservice.service.internalPort1 }}
             pathType: Prefix
             path: "/data-consumer"
             backend:
               service:
                 name: {{ include "common.name.enrichmentservice" . }}
-                port: 
+                port:
                   number: {{ .Values.enrichmentservice.service.internalPort1 }}
             pathType: Prefix
+{{- end -}}
\ No newline at end of file
index 2e1e7a4..e5d997a 100644 (file)
@@ -44,4 +44,5 @@ enrichmentservice:
     size: 2Gi
     mountPath: /dockerdata-nfs
     mountSubPath: nonrtric/enrichmentservice
-
+  ingress:
+    enabled: false
index 67eac10..d981da5 100644 (file)
@@ -1,3 +1,4 @@
+{{/*
 ################################################################################
 #   Copyright (c) 2021 Nordix Foundation.                                      #
 #                                                                              #
@@ -13,7 +14,9 @@
 #   See the License for the specific language governing permissions and        #
 #   limitations under the License.                                             #
 ################################################################################
+*/}}
 
+{{- if .Values.policymanagementservice.ingress.enabled -}}
 apiVersion: networking.k8s.io/v1
 kind: Ingress
 metadata:
@@ -32,3 +35,4 @@ spec:
                   number: {{ .Values.policymanagementservice.service.internalPort1 }}
             path: "/a1-policy"
             pathType: Prefix
+{{- end -}}
\ No newline at end of file
index 3e67451..a868bce 100644 (file)
@@ -47,3 +47,5 @@ policymanagementservice:
     storageClass: "manual"
     enabled: true
     #existingClaim:
+  ingress:
+    enabled: false
index 6801cee..c6be83c 100644 (file)
   {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}\r
 {{- end -}}\r
 \r
-\r
-{{- define "common.deploymentname.influxdb" -}}\r
-  {{- $name := ( include "common.fullname.influxdb" . ) -}}\r
-  {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}}\r
+{{- define "common.influxdb.chart" -}}\r
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}\r
 {{- end -}}\r
 \r
-{{- define "common.configmapname.influxdb" -}}\r
-  {{- $name := ( include "common.fullname.influxdb" . ) -}}\r
-  {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}}\r
+{{- define "common.influxdb.labels" -}}\r
+helm.sh/chart: {{ include "common.influxdb.chart" . }}\r
+{{ include "common.influxdb.selectorLabels" . }}\r
+{{- if .Chart.AppVersion }}\r
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}\r
+{{- end }}\r
+app.kubernetes.io/managed-by: {{ .Release.Service }}\r
 {{- end -}}\r
 \r
-{{- define "common.containername.influxdb" -}}\r
-  {{- $name := ( include "common.fullname.influxdb" . ) -}}\r
-  {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}\r
+{{- define "common.influxdb.selectorLabels" -}}\r
+app.kubernetes.io/name: {{ include "common.name.influxdb" . }}\r
+app.kubernetes.io/instance: {{ .Release.Name }}\r
 {{- end -}}\r
 \r
-\r
-{{- define "common.pvname.influxdb" -}}\r
-  {{- $name := ( include "common.fullname.influxdb" . ) -}}\r
-  {{- printf "pv-%s" $name | trunc 63 | trimSuffix "-" -}}\r
-{{- end -}}\r
-\r
-{{- define "common.pvcname.influxdb" -}}\r
-  {{- $name := ( include "common.fullname.influxdb" . ) -}}\r
-  {{- printf "pvc-%s" $name | trunc 63 | trimSuffix "-" -}}\r
-{{- end -}}\r
-\r
-\r
-{{- define "common.servicename.influxdb.http" -}}\r
+{{- define "common.influxdb.serviceAccountName" -}}\r
   {{- $name := ( include "common.fullname.influxdb" . ) -}}\r
   {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}\r
 {{- end -}}\r
 \r
-\r
 {{- define "common.serviceport.influxdb.http" -}}8086{{- end -}}\r
 {{- define "common.serviceport.influxdb.meta.bind_address" -}}8091{{- end -}}\r
 {{- define "common.serviceport.influxdb.http.bind_address" -}}8086{{- end -}}\r
 {{- define "common.serviceport.influxdb.udp.bind_address" -}}8089{{- end -}}\r
 {{- define "common.serviceport.influxdb.opentsdb.bind_address" -}}4242{{- end -}}\r
 {{- define "common.serviceport.influxdb.collectd.bind_address" -}}25826{{- end -}}\r
-\r
-\r
-{{- define "common.serviceaccountname.influxdb" -}}\r
-  {{- $name := ( include "common.fullname.influxdb" . ) -}}\r
-  {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}}\r
-{{- end -}}\r
-\r
-\r
-{{- define "common.ingressname.influxdb" -}}\r
-  {{- $name := ( include "common.fullname.influxdb" . ) -}}\r
-  {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}}\r
-{{- end -}}\r