From: John Keeney Date: Fri, 18 Jun 2021 15:01:02 +0000 (+0000) Subject: Merge "Bugfix, selection of components to include" X-Git-Tag: f-release~42 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=b692f2151e75f6c444e5cce5d9265591402cd37c;hp=c288ca9ecc3b7d468fb1d7d5f68ec3a9d3a02401;p=it%2Fdep.git Merge "Bugfix, selection of components to include" --- diff --git a/INFO.yaml b/INFO.yaml index 0b108248..f90fb125 100644 --- 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' diff --git a/bin/deploy-nonrtric b/bin/deploy-nonrtric index 0643f4b4..6770ad24 100755 --- a/bin/deploy-nonrtric +++ b/bin/deploy-nonrtric @@ -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} diff --git a/bin/undeploy-nonrtric b/bin/undeploy-nonrtric index 9e3c0cb2..6ec73a49 100755 --- a/bin/undeploy-nonrtric +++ b/bin/undeploy-nonrtric @@ -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]" diff --git a/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml b/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml index f9595d86..fcd62b7a 100644 --- a/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml +++ b/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml @@ -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: @@ -204,7 +208,7 @@ nonrtricgateway: image: registry: 'nexus3.o-ran-sc.org:10004/o-ran-sc' name: nonrtric-gateway - tag: 0.0.1 + tag: 1.0.0 service: httpName: http internalPort1: 9090 diff --git a/nonrtric/data/run_in_k8s/populate_enrichment_data.sh b/nonrtric/data/run_in_k8s/populate_enrichment_data.sh index fe6a3f8f..14edb818 100755 --- a/nonrtric/data/run_in_k8s/populate_enrichment_data.sh +++ b/nonrtric/data/run_in_k8s/populate_enrichment_data.sh @@ -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 diff --git a/nonrtric/data/run_in_k8s/testdata/ECS/EiJob.json b/nonrtric/data/run_in_k8s/testdata/ECS/EiJob.json index 003c70f9..3939ee1a 100644 --- a/nonrtric/data/run_in_k8s/testdata/ECS/EiJob.json +++ b/nonrtric/data/run_in_k8s/testdata/ECS/EiJob.json @@ -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" diff --git a/nonrtric/data/run_in_k8s/testdata/ECS/EiProducer.json b/nonrtric/data/run_in_k8s/testdata/ECS/EiProducer.json index 01d8eb5a..4b7c6c92 100644 --- a/nonrtric/data/run_in_k8s/testdata/ECS/EiProducer.json +++ b/nonrtric/data/run_in_k8s/testdata/ECS/EiProducer.json @@ -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 diff --git a/nonrtric/data/run_in_k8s/testdata/ECS/EiType.json b/nonrtric/data/run_in_k8s/testdata/ECS/EiType.json index 073f0b4f..8618555b 100644 --- a/nonrtric/data/run_in_k8s/testdata/ECS/EiType.json +++ b/nonrtric/data/run_in_k8s/testdata/ECS/EiType.json @@ -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 diff --git a/nonrtric/helm/enrichmentservice/templates/ingress.yaml b/nonrtric/helm/enrichmentservice/templates/ingress.yaml index e679d164..f7520221 100644 --- a/nonrtric/helm/enrichmentservice/templates/ingress.yaml +++ b/nonrtric/helm/enrichmentservice/templates/ingress.yaml @@ -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 diff --git a/nonrtric/helm/enrichmentservice/values.yaml b/nonrtric/helm/enrichmentservice/values.yaml index 2e1e7a4d..e5d997a9 100644 --- a/nonrtric/helm/enrichmentservice/values.yaml +++ b/nonrtric/helm/enrichmentservice/values.yaml @@ -44,4 +44,5 @@ enrichmentservice: size: 2Gi mountPath: /dockerdata-nfs mountSubPath: nonrtric/enrichmentservice - + ingress: + enabled: false diff --git a/nonrtric/helm/nonrtricgateway/values.yaml b/nonrtric/helm/nonrtricgateway/values.yaml index 0009dfa5..6082a5a5 100644 --- a/nonrtric/helm/nonrtricgateway/values.yaml +++ b/nonrtric/helm/nonrtricgateway/values.yaml @@ -23,7 +23,7 @@ nonrtricgateway: image: registry: 'nexus3.o-ran-sc.org:10004/o-ran-sc' name: nonrtric-gateway - tag: 0.0.1 + tag: 1.0.0 service: httpName: http internalPort1: 9090 diff --git a/nonrtric/helm/policymanagementservice/templates/ingress.yaml b/nonrtric/helm/policymanagementservice/templates/ingress.yaml index 67eac10f..d981da56 100644 --- a/nonrtric/helm/policymanagementservice/templates/ingress.yaml +++ b/nonrtric/helm/policymanagementservice/templates/ingress.yaml @@ -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 diff --git a/nonrtric/helm/policymanagementservice/values.yaml b/nonrtric/helm/policymanagementservice/values.yaml index 3e67451a..a868bce1 100644 --- a/nonrtric/helm/policymanagementservice/values.yaml +++ b/nonrtric/helm/policymanagementservice/values.yaml @@ -47,3 +47,5 @@ policymanagementservice: storageClass: "manual" enabled: true #existingClaim: + ingress: + enabled: false diff --git a/ric-common/Common-Template/helm/ric-common/templates/_influxdb.tpl b/ric-common/Common-Template/helm/ric-common/templates/_influxdb.tpl index 6801ceef..c6be83cb 100644 --- a/ric-common/Common-Template/helm/ric-common/templates/_influxdb.tpl +++ b/ric-common/Common-Template/helm/ric-common/templates/_influxdb.tpl @@ -24,40 +24,29 @@ {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}} {{- end -}} - -{{- define "common.deploymentname.influxdb" -}} - {{- $name := ( include "common.fullname.influxdb" . ) -}} - {{- printf "deployment-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- define "common.influxdb.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} -{{- define "common.configmapname.influxdb" -}} - {{- $name := ( include "common.fullname.influxdb" . ) -}} - {{- printf "configmap-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- define "common.influxdb.labels" -}} +helm.sh/chart: {{ include "common.influxdb.chart" . }} +{{ include "common.influxdb.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} {{- end -}} -{{- define "common.containername.influxdb" -}} - {{- $name := ( include "common.fullname.influxdb" . ) -}} - {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}} +{{- define "common.influxdb.selectorLabels" -}} +app.kubernetes.io/name: {{ include "common.name.influxdb" . }} +app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} - -{{- define "common.pvname.influxdb" -}} - {{- $name := ( include "common.fullname.influxdb" . ) -}} - {{- printf "pv-%s" $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - -{{- define "common.pvcname.influxdb" -}} - {{- $name := ( include "common.fullname.influxdb" . ) -}} - {{- printf "pvc-%s" $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - - -{{- define "common.servicename.influxdb.http" -}} +{{- define "common.influxdb.serviceAccountName" -}} {{- $name := ( include "common.fullname.influxdb" . ) -}} {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}} {{- end -}} - {{- define "common.serviceport.influxdb.http" -}}8086{{- end -}} {{- define "common.serviceport.influxdb.meta.bind_address" -}}8091{{- end -}} {{- define "common.serviceport.influxdb.http.bind_address" -}}8086{{- end -}} @@ -66,15 +55,3 @@ {{- define "common.serviceport.influxdb.udp.bind_address" -}}8089{{- end -}} {{- define "common.serviceport.influxdb.opentsdb.bind_address" -}}4242{{- end -}} {{- define "common.serviceport.influxdb.collectd.bind_address" -}}25826{{- end -}} - - -{{- define "common.serviceaccountname.influxdb" -}} - {{- $name := ( include "common.fullname.influxdb" . ) -}} - {{- printf "svcacct-%s" $name | trunc 63 | trimSuffix "-" -}} -{{- end -}} - - -{{- define "common.ingressname.influxdb" -}} - {{- $name := ( include "common.fullname.influxdb" . ) -}} - {{- printf "ingress-%s" $name | trunc 63 | trimSuffix "-" -}} -{{- end -}}