diff options
Diffstat (limited to 'operations/a1-pe-sim-packages/resources/oran-sim-csar')
11 files changed, 292 insertions, 0 deletions
diff --git a/operations/a1-pe-sim-packages/resources/oran-sim-csar/MANIFEST.json b/operations/a1-pe-sim-packages/resources/oran-sim-csar/MANIFEST.json new file mode 100644 index 0000000..c605362 --- /dev/null +++ b/operations/a1-pe-sim-packages/resources/oran-sim-csar/MANIFEST.json @@ -0,0 +1,19 @@ +{ + "name": "SamsungORANSimulator", + "description": "ORAN Simulator; Samsung Electronics.", + "data": [ + { + "file": "oran-sim-cba.zip", + "type": "CONTROLLER_BLUEPRINT_ARCHIVE" + }, + { + "file": "o-ran-simulator.yml", + "type": "HEAT", + "isBase": "true" + }, + { + "file": "o-ran-simulator_cloudtech_k8s_charts.tgz", + "type": "CLOUD_TECHNOLOGY_SPECIFIC_ARTIFACT" + } + ] +} diff --git a/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator.yml b/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator.yml new file mode 100644 index 0000000..93bbcfa --- /dev/null +++ b/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator.yml @@ -0,0 +1,35 @@ +--- +heat_template_version: 2017-02-24 +description: "O-RAN Simulator Dummy Heat" +parameters: + vnf_name: + type: string + description: VNF Name (provided by ONAP) + vnf_id: + type: string + description: VNF ID (provided by ONAP) + vf_module_id: + type: string + description: VF Module ID (provided by ONAP) + skip_post_instantiation_configuration: + type: boolean + default: false + sdnc_model_name: + type: string + default: a1_pe_simulator + sdnc_model_version: + type: string + default: 1.3.2 + sdnc_artifact_name: + type: string + default: vnf + controller_actor: + type: string + default: CDS +resources: + dummy_node: + type: OS::Nova::Server + properties: + name: dummy + image: dummy + flavor: dummy diff --git a/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/.helmignore b/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/.helmignore new file mode 100644 index 0000000..50af031 --- /dev/null +++ b/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/.helmignore @@ -0,0 +1,22 @@ +# 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 +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/Chart.yaml b/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/Chart.yaml new file mode 100644 index 0000000..1f10a6f --- /dev/null +++ b/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/Chart.yaml @@ -0,0 +1,5 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm Chart for Handover Simulator +name: o-ran-simulator +version: 0.1.0 diff --git a/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/templates/_common.tpl b/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/templates/_common.tpl new file mode 100644 index 0000000..b46d402 --- /dev/null +++ b/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/templates/_common.tpl @@ -0,0 +1,38 @@ +{{/* vim: set filetype=mustache: */}} + +{{/* + Functions here are generated by helm, please don't use them directly +*/}} + + +{{/* +Expand the name of the chart. +*/}} +{{- define "handover-simulator.common.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "handover-simulator.common.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + + +{{/* +Common labels +*/}} +{{- define "handover-simulator.common.labels" -}} +app.kubernetes.io/name: {{ include "handover-simulator.common.name" . }} +helm.sh/chart: {{ include "handover-simulator.common.chart" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- if .Values.oran_name }} +oran_name: {{ .Values.oran_name | quote }} +{{- end }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} diff --git a/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/templates/_deployment.tpl b/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/templates/_deployment.tpl new file mode 100644 index 0000000..1bfc3a9 --- /dev/null +++ b/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/templates/_deployment.tpl @@ -0,0 +1,59 @@ +{{/* vim: set filetype=mustache: */}} + +{{/* + Functions here are intended for Deployment resources use only +*/}} + + +{{/* Generate Deployment's container section */}} +{{/* Input: Dict with "dot", "name" and "spec" keys */}} +{{- define "handover-simulator.deployment.containers" -}} +{{- $name := .name -}} +{{- $spec := .spec -}} +{{- $dot := . -}} +{{- with .dot -}} +{{- range $owner, $containerSpec := $spec.containers }} +- name: {{ $owner }} + image: "{{ $containerSpec.image.repository }}:{{ $containerSpec.image.tag }}" + imagePullPolicy: {{ $containerSpec.image.pullPolicy }} + {{- with $containerSpec.env }} + env: + {{- range $containerSpec.env }} + {{/* This is ugly but helm's tpl required root object */}} + - name: {{ .name }} + value: {{ tpl .value $dot.dot | quote }} + {{- end }} + {{- end }} + {{- with $containerSpec.volumeMounts }} + volumeMounts: + {{- range $containerSpec.volumeMounts }} + - name: {{ .name }} + mountPath: {{ .mountPath }} + {{- end }} + {{- end }} + ports: + {{- range $spec.service.ports }} + {{- if eq $owner .owner }} + - name: {{ .name }} + containerPort: {{ .port }} + protocol: TCP + {{- end }} + {{- end }} + {{- with $containerSpec.volumes }} + volumes: {{ toYaml . | nindent 4 }} + {{- end }} + {{- with $spec.livenessProbe }} + livenessProbe: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with $spec.readinessProbe }} + readinessProbe: + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with $spec.resources }} + resources: + {{- toYaml . | nindent 4 }} + {{- end }} +{{- end }} +{{- end -}} +{{- end -}} diff --git a/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/templates/_utils.tpl b/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/templates/_utils.tpl new file mode 100644 index 0000000..c59770a --- /dev/null +++ b/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/templates/_utils.tpl @@ -0,0 +1,25 @@ +{{/* vim: set filetype=mustache: */}} + +{{/* + Functions here define utilities for unique name/labels generation +*/}} + + +{{/* Generate Deployment labels */}} +{{/* Input: Dict with "dot", "name" and "spec" keys */}} +{{- define "handover-simulator.utils.labels" -}} +{{- $name := .name -}} +{{- $spec := .spec -}} +{{- with .dot -}} +app: {{ $name }} +{{ include "handover-simulator.common.labels" . }} +{{- end -}} +{{- end -}} + + +{{/* Generate Resource name based unique between different chart instances */}} +{{/* Input: List with strings */}} +{{/* Output: Provided elements joined with dash and trimmed according to DNS requirements */}} +{{- define "handover-simulator.utils.name" -}} +res-{{- join "-" . | trunc 59 | trimSuffix "-" -}} +{{- end -}} diff --git a/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/templates/a1-pe-sim-configmapa.yaml b/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/templates/a1-pe-sim-configmapa.yaml new file mode 100644 index 0000000..15c6d46 --- /dev/null +++ b/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/templates/a1-pe-sim-configmapa.yaml @@ -0,0 +1,14 @@ +{{/* Set up subresource name */}} + {{- $spec := .Values.a1pesimulator -}} + {{- $name := $spec.name -}} + {{- $input := dict "dot" . "name" $name "spec" $spec }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: {{ include "handover-simulator.utils.name" (list .Release.Name $name "app-cm") }} + labels: {{ include "handover-simulator.utils.labels" $input | nindent 4 }} +data: #Initial data is empty as it will be populated by CDS at runtime + vnf.config: + cells.json: + ue.json: + diff --git a/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/templates/a1-pe-sim-deployment.yaml b/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/templates/a1-pe-sim-deployment.yaml new file mode 100644 index 0000000..c5690b6 --- /dev/null +++ b/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/templates/a1-pe-sim-deployment.yaml @@ -0,0 +1,22 @@ +{{/* Set up subresource name */}} + {{- $spec := .Values.a1pesimulator -}} + {{- $name := $spec.name -}} + {{- $input := dict "dot" . "name" $name "spec" $spec }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ include "handover-simulator.utils.name" (list .Release.Name $name) }} + labels: {{ include "handover-simulator.utils.labels" $input | nindent 4 }} +spec: + replicas: {{ $spec.replicaCount }} + selector: + matchLabels: {{ include "handover-simulator.utils.labels" $input | nindent 6 }} + template: + metadata: + labels: {{ include "handover-simulator.utils.labels" $input | nindent 8 }} + spec: + containers: {{ include "handover-simulator.deployment.containers" $input | nindent 8 }} + volumes: + - name: config + configMap: + name: {{ include "handover-simulator.utils.name" (list .Release.Name $name "app-cm") }} diff --git a/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/templates/a1-pe-sim-service.yaml b/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/templates/a1-pe-sim-service.yaml new file mode 100644 index 0000000..320e83e --- /dev/null +++ b/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/templates/a1-pe-sim-service.yaml @@ -0,0 +1,23 @@ +{{/* Set up subresource name */}} + {{- $spec := .Values.a1pesimulator -}} + {{- $name := $spec.name -}} + {{- $input := dict "dot" . "name" $name "spec" $spec }} +apiVersion: v1 +kind: Service +metadata: + name: {{ include "handover-simulator.utils.name" (list .Release.Name $name) }} + labels: {{ include "handover-simulator.utils.labels" $input | nindent 4 }} +spec: + type: {{ $spec.service.type }} + ports: + {{- range $spec.service.ports }} + - port: {{ .port }} + targetPort: {{ .port }} + protocol: TCP + name: {{ .name }} + {{- with .nodePort }} + nodePort: {{ tpl . $ }} + {{- end }} + {{- end }} + selector: {{ include "handover-simulator.utils.labels" $input | nindent 4 }} + diff --git a/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/values.yaml b/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/values.yaml new file mode 100644 index 0000000..3bec165 --- /dev/null +++ b/operations/a1-pe-sim-packages/resources/oran-sim-csar/o-ran-simulator/values.yaml @@ -0,0 +1,30 @@ +# Default values for handover-simulator. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +#To easier define node ports: +backendRESTNodePort: 32766 +a1NodePort: 32085 + +#oran_name can be provided from onap and will set custom label +oran_name: null + +a1pesimulator: + name: a1-pe-simulator + replicaCount: 1 + containers: + backend: + image: + repository: nexus3.onap.org:10001/onap/integration/simulators/a1-pe-simulator + tag: latest + pullPolicy: Always + volumeMounts: + - name: config + mountPath: /var/a1pesim + service: + type: NodePort + ports: + - port: 9998 + name: a1-pe-simulator-http + owner: a1pesimulator + nodePort: "{{ .Values.backendRESTNodePort }}" |