From 3ebd35d37a76ce9c072f3797bea864cadea3e48b Mon Sep 17 00:00:00 2001 From: Lathish Date: Wed, 15 Apr 2020 12:56:53 +0100 Subject: [PATCH] Multiple A1 Version Issue-ID: NONRTRIC-197 Change-Id: I77e03efc0cbfc0b692bc36785b6b9c4a57979e57 Signed-off-by: Lathish --- nonrtric/RECIPE_EXAMPLE/example_recipe.yaml | 13 +++-- nonrtric/helm/a1simulator/templates/service.yaml | 2 +- .../helm/a1simulator/templates/statefulset.yaml | 55 ++++++++++++++++++++-- nonrtric/helm/a1simulator/values.yaml | 13 +++-- .../config/application_configuration.json | 31 +++++++++++- 5 files changed, 99 insertions(+), 15 deletions(-) diff --git a/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml b/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml index 0968601b..bc9b1791 100644 --- a/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml +++ b/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml @@ -39,15 +39,20 @@ a1controller: externalPort: 8282 a1simulator: - instanceName: a1-sim + name: a1-sim imagePullPolicy: IfNotPresent image: - registry: "nexus3.o-ran-sc.org:10002/o-ran-sc" - name: near-rt-ric-simulator + registry: "nexus3.o-ran-sc.org:10004/o-ran-sc" + name: a1-simulator tag: 1.0.1 - replicaCount: 2 service: internalPort: 8085 + oscVersion: + name: a1-sim-osc + replicaCount: 2 + stdVersion: + name: a1-sim-std + replicaCount: 2 controlpanel: imagePullPolicy: IfNotPresent diff --git a/nonrtric/helm/a1simulator/templates/service.yaml b/nonrtric/helm/a1simulator/templates/service.yaml index 4c16903e..616595f9 100644 --- a/nonrtric/helm/a1simulator/templates/service.yaml +++ b/nonrtric/helm/a1simulator/templates/service.yaml @@ -17,7 +17,7 @@ kind: Service apiVersion: v1 metadata: - name: {{ .Values.a1simulator.instanceName }} + name: {{ .Values.a1simulator.name }} namespace: {{ include "common.namespace.nonrtric" . }} labels: app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }} diff --git a/nonrtric/helm/a1simulator/templates/statefulset.yaml b/nonrtric/helm/a1simulator/templates/statefulset.yaml index bc65edef..865e2ca0 100644 --- a/nonrtric/helm/a1simulator/templates/statefulset.yaml +++ b/nonrtric/helm/a1simulator/templates/statefulset.yaml @@ -17,7 +17,7 @@ kind: StatefulSet apiVersion: apps/v1 metadata: - name: {{ .Values.a1simulator.instanceName }} + name: {{ .Values.a1simulator.oscVersion.name }} namespace: {{ include "common.namespace.nonrtric" . }} generation: 1 labels: @@ -28,12 +28,12 @@ metadata: annotations: deployment.kubernetes.io/revision: '1' spec: - replicas: {{ .Values.a1simulator.replicaCount }} + replicas: {{ .Values.a1simulator.oscVersion.replicaCount }} selector: matchLabels: app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }} release: {{ .Release.Name }} - serviceName: {{ .Values.a1simulator.instanceName }} + serviceName: {{ .Values.a1simulator.name }} template: metadata: labels: @@ -52,4 +52,51 @@ spec: tcpSocket: port: {{ .Values.a1simulator.service.internalPort }} initialDelaySeconds: 5 - periodSeconds: 15 \ No newline at end of file + periodSeconds: 15 + env: + - name: A1_VERSION + value: OSC_2.1.0 + +--- +kind: StatefulSet +apiVersion: apps/v1 +metadata: + name: {{ .Values.a1simulator.stdVersion.name }} + namespace: {{ include "common.namespace.nonrtric" . }} + generation: 1 + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }} + chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} + annotations: + deployment.kubernetes.io/revision: '1' +spec: + replicas: {{ .Values.a1simulator.stdVersion.replicaCount }} + selector: + matchLabels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }} + release: {{ .Release.Name }} + serviceName: {{ .Values.a1simulator.name }} + template: + metadata: + labels: + app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1simulator" . }} + release: {{ .Release.Name }} + spec: + hostname: {{ include "common.name.a1simulator" . }} + containers: + - name: {{ include "common.containername.a1simulator" . }} + image: {{ .Values.a1simulator.image.registry }}/{{ .Values.a1simulator.image.name }}:{{ .Values.a1simulator.image.tag }} + imagePullPolicy: {{ .Values.a1simulator.imagePullPolicy }} + ports: + - containerPort: {{ .Values.a1simulator.service.internalPort }} + protocol: TCP + readinessProbe: + tcpSocket: + port: {{ .Values.a1simulator.service.internalPort }} + initialDelaySeconds: 5 + periodSeconds: 15 + env: + - name: A1_VERSION + value: STD_1.1.3 \ No newline at end of file diff --git a/nonrtric/helm/a1simulator/values.yaml b/nonrtric/helm/a1simulator/values.yaml index 8fa377b7..3544a231 100644 --- a/nonrtric/helm/a1simulator/values.yaml +++ b/nonrtric/helm/a1simulator/values.yaml @@ -19,12 +19,17 @@ # Declare variables to be passed into your templates. a1simulator: - instanceName: a1-sim + name: a1-sim imagePullPolicy: IfNotPresent image: - registry: "nexus3.o-ran-sc.org:10002/o-ran-sc" - name: near-rt-ric-simulator + registry: "nexus3.o-ran-sc.org:10004/o-ran-sc" + name: a1-simulator tag: 1.0.1 - replicaCount: 2 service: internalPort: 8085 + oscVersion: + name: a1-sim-osc + replicaCount: 2 + stdVersion: + name: a1-sim-std + replicaCount: 2 diff --git a/nonrtric/helm/policymanagementservice/resources/config/application_configuration.json b/nonrtric/helm/policymanagementservice/resources/config/application_configuration.json index 7e36881b..fcf0f3b6 100644 --- a/nonrtric/helm/policymanagementservice/resources/config/application_configuration.json +++ b/nonrtric/helm/policymanagementservice/resources/config/application_configuration.json @@ -1,14 +1,41 @@ { "config":{ + "controller": [ + { + "name": "controller1", + "baseUrl": "http://a1controller:8282", + "userName": "admin", + "password": "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U" + } + ], "ric":[ { "name":"ric1", - "baseUrl":"http://a1-sim1:8085/", + "baseUrl":"http://a1-sim-osc-0.a1-sim:8085/", + "controller": "controller1", "managedElementIds":[ "kista_1", "kista_2" ] - } + }, + { + "name":"ric2", + "baseUrl":"http://a1-sim-osc-1.a1-sim:8085/", + "controller": "controller1", + "managedElementIds":[ + "kista_1", + "kista_2" + ] + }, + { + "name":"ric3", + "baseUrl":"http://a1-sim-std-0.a1-sim:8085/", + "controller": "controller1", + "managedElementIds":[ + "kista_1", + "kista_2" + ] + } ], "streams_publishes":{ "dmaap_publisher":{ -- 2.16.6