[EDGEPOD-52] Initial version of RAN-CU Helm chart for Aether
Change-Id: Ie5c380ec70d0d4d97c87f1a176169320a779e5ad
diff --git a/ran/accelleran-cbrs/accelleran-cbrs-cu/Chart.yaml b/ran/accelleran-cbrs/accelleran-cbrs-cu/Chart.yaml
new file mode 100644
index 0000000..7be7b36
--- /dev/null
+++ b/ran/accelleran-cbrs/accelleran-cbrs-cu/Chart.yaml
@@ -0,0 +1,21 @@
+---
+# Copyright 2019-present Open Networking Foundation
+#
+# 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
+name: accelleran-cbrs-cu
+description: A Helm chart to install Accelleran CU on CBRS band
+icon: https://guide.opencord.org/logos/cord.svg
+
+version: 0.1.0
\ No newline at end of file
diff --git a/ran/accelleran-cbrs/accelleran-cbrs-cu/templates/_helpers.tpl b/ran/accelleran-cbrs/accelleran-cbrs-cu/templates/_helpers.tpl
new file mode 100644
index 0000000..fccad55
--- /dev/null
+++ b/ran/accelleran-cbrs/accelleran-cbrs-cu/templates/_helpers.tpl
@@ -0,0 +1,26 @@
+{{- /*
+# Copyright 2019-present Open Networking Foundation
+#
+# 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.
+*/ -}}
+
+{{/*
+Render a set of standardised label
+*/}}
+{{- define "accelleran-cbrs-cu.metadata_labels" -}}
+{{- $application := index . 0 -}}
+{{- $context := index . 1 -}}
+release: {{ $context.Release.Name }}
+app: {{ $application }}
+{{- end -}}
+
diff --git a/ran/accelleran-cbrs/accelleran-cbrs-cu/templates/configmap-accelleran-cbrs-cu.yaml b/ran/accelleran-cbrs/accelleran-cbrs-cu/templates/configmap-accelleran-cbrs-cu.yaml
new file mode 100644
index 0000000..3c67926
--- /dev/null
+++ b/ran/accelleran-cbrs/accelleran-cbrs-cu/templates/configmap-accelleran-cbrs-cu.yaml
@@ -0,0 +1,40 @@
+{{- /*
+# Copyright 2019-present Open Networking Foundation
+#
+# 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: accelleran-cbrs-cu-{{ .Values.config.vranL3.instanceId }}-cm
+ labels:
+{{ tuple "accelleran-cbrs-cu-cm" . | include "accelleran-cbrs-cu.metadata_labels" | indent 4 }}
+data:
+ bootstrap: |
+ redis.hostname:accelleran-cbrs-redis
+ redis.port:{{ .Values.config.redis.ports.redisPort.port }}
+ instance.filter:{{ .Values.config.vranL3.instanceId }}
+
+ zlog.conf: |
+ [global]
+ strict init = true
+ buffer min = {{ .Values.config.vranL3.zlogConf.bufferMin }}
+ buffer max = {{ .Values.config.vranL3.zlogConf.bufferMax }}
+ rotate lock file = /tmp/zlog.lock
+
+ [formats]
+ printf_format = "%d(%b %d %H:%M:%S).%ms %8.8H %m%n"
+ [rules]
+ user.* >stdout ;printf_format
\ No newline at end of file
diff --git a/ran/accelleran-cbrs/accelleran-cbrs-cu/templates/service-accelleran-cbrs-cu.yaml b/ran/accelleran-cbrs/accelleran-cbrs-cu/templates/service-accelleran-cbrs-cu.yaml
new file mode 100644
index 0000000..bcb1da6
--- /dev/null
+++ b/ran/accelleran-cbrs/accelleran-cbrs-cu/templates/service-accelleran-cbrs-cu.yaml
@@ -0,0 +1,47 @@
+{{- /*
+# Copyright 2019-present Open Networking Foundation
+#
+# 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: Service
+metadata:
+ name: accelleran-cbrs-cu-{{ .Values.config.vranL3.instanceId }}
+ labels:
+{{ tuple "accelleran-cbrs-cu" . | include "accelleran-cbrs-cu.metadata_labels" | indent 4 }}
+spec:
+ selector:
+{{ tuple "accelleran-cbrs-cu" . | include "accelleran-cbrs-cu.metadata_labels" | indent 4 }}
+ ports:
+ - name: s1ap-port
+ port: {{ .Values.config.vranL3.ports.s1ap.port }}
+ protocol: {{ .Values.config.vranL3.ports.s1ap.protocol }}
+
+---
+apiVersion: v1
+kind: Service
+metadata:
+ name: accelleran-cbrs-cu-{{ .Values.config.vranL3.instanceId }}-exernal
+ labels:
+{{ tuple "accelleran-cbrs-cu" . | include "accelleran-cbrs-cu.metadata_labels" | indent 4 }}
+spec:
+ selector:
+{{ tuple "accelleran-cbrs-cu" . | include "accelleran-cbrs-cu.metadata_labels" | indent 4 }}
+ type: NodePort
+ ports:
+ - name: s1ap-port
+ port: {{ .Values.config.vranL3.ports.s1ap.port }}
+ nodePort: {{ .Values.config.vranL3.ports.s1ap.nodePort }}
+ protocol: {{ .Values.config.vranL3.ports.s1ap.protocol }}
\ No newline at end of file
diff --git a/ran/accelleran-cbrs/accelleran-cbrs-cu/templates/statefulset-accelleran-cbrs-cu.yaml b/ran/accelleran-cbrs/accelleran-cbrs-cu/templates/statefulset-accelleran-cbrs-cu.yaml
new file mode 100644
index 0000000..7a8d622
--- /dev/null
+++ b/ran/accelleran-cbrs/accelleran-cbrs-cu/templates/statefulset-accelleran-cbrs-cu.yaml
@@ -0,0 +1,116 @@
+{{- /*
+# Copyright 2019-present Open Networking Foundation
+#
+# 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: apps/v1
+kind: StatefulSet
+metadata:
+ name: accelleran-cbrs-cu-{{ .Values.config.vranL3.instanceId }}
+ labels:
+ deployedCellId: {{ .Values.config.vranL3.instanceId }}
+{{ tuple "accelleran-cbrs-cu" . | include "accelleran-cbrs-cu.metadata_labels" | indent 4 }}
+spec:
+ selector:
+ matchLabels:
+{{ tuple "accelleran-cbrs-cu" . | include "accelleran-cbrs-cu.metadata_labels" | indent 6 }}
+ serviceName: accelleran-cbrs-cu-{{ .Values.config.vranL3.instanceId }}
+ template:
+ metadata:
+ labels:
+ deployedCellId: {{ .Values.config.vranL3.instanceId }}
+{{ tuple "accelleran-cbrs-cu" . | include "accelleran-cbrs-cu.metadata_labels" | indent 8 }}
+ spec:
+ {{- if .Values.nodeSelectors.enabled }}
+ nodeSelector:
+ {{ .Values.nodeSelectors.accelleranCBRSCU.label }}: {{ .Values.nodeSelectors.accelleranCBRSCU.value }}
+ {{- end }}
+ initContainers:
+ - name: cu-init
+ image: {{ .Values.images.tags.initCU }}
+ imagePullPolicy: {{ .Values.images.pullPolicy }}
+ securityContext:
+ privileged: true
+ runAsUser: 0
+ command: [ "sh", "-c"]
+ args:
+ - >
+ iptables -I OUTPUT -p icmp --icmp-type destination-unreachable -j DROP;
+ if chroot /mnt/host-rootfs modinfo nf_conntrack_proto_sctp > /dev/null 2>&1; then \
+ chroot /mnt/host-rootfs modprobe nf_conntrack_proto_sctp; \
+ fi; \
+ volumeMounts:
+ - name: host-rootfs
+ mountPath: /mnt/host-rootfs
+ containers:
+ - name: vran-l3
+ image: {{ .Values.images.tags.vranL3 }}
+ imagePullPolicy: {{ .Values.images.pullPolicy }}
+ env:
+ - name: ZLOG_CONF_PATH
+ value: /zlog.conf
+ - name: BOOTSTRAP_FILENAME
+ value: /bootstrap
+ - name: LD_LIBRARY_PATH
+ value: /data/
+ - name: FAP_DB_PATH
+ value: /data/
+ command: ["sh", "-c"]
+ args:
+ - sqlite3 /data/datastoreRemRw.db "update FapServiceCellConfigLteEpcPlmnList set PLMNID='{{ .Values.config.vranL3.plmnId }}';";
+ sqlite3 /data/datastoreRemRw.db "update FapServiceFapControlLteGateway set SecGWServer1='{{ .Values.config.mme.ip }}';";
+ sqlite3 /data/datastoreRemRw.db "update FapServiceFapControlLteGateway set SecGWServer2='{{ .Values.config.mme.ip }}';";
+ sqlite3 /data/datastoreRemRw.db "update FapServiceFapControlLteGateway set SecGWServer3='{{ .Values.config.mme.ip }}';";
+ sqlite3 /data/datastoreRemRw.db "update FapServiceFapControlLteGateway_S1SigLinkServerListList set S1SigLinkServerList='{{ .Values.config.mme.ip }}';";
+ sqlite3 /data/datastoreRemRw.db "update FapServiceCellConfigLteRanRf set FreqBandIndicator='{{ .Values.config.vranL3.freqBand }}';";
+ sqlite3 /data/datastore.db "update featureActivation set good1PPSRequired=0;";
+ sqlite3 /data/datastoreRemRw.db "update FapServiceCellConfigLteRanRf_EARFCNDLList set EARFCNDL='{{ .Values.config.vranL3.earfcnDl }}';";
+ sqlite3 /data/datastoreRemRw.db "update FapServiceCellConfigLteRanRf_EARFCNULList set EARFCNUL='{{ .Values.config.vranL3.earfcnUl }}';";
+ redis-cli -h accelleran-cbrs-redis -p {{ .Values.config.redis.ports.redisPort.port }} hset ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICEFAPCONTROLLTEGATEWAYS1SIGLINKSERVERLIST[0] S1SIGLINKSERVERLIST {{ .Values.config.mme.ip }};
+ redis-cli -h accelleran-cbrs-redis -p {{ .Values.config.redis.ports.redisPort.port }} hset ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICEFAPCONTROLLTEGATEWAY_S1SIGLINKSERVERLISTLIST[0] S1SIGLINKSERVERLIST {{ .Values.config.mme.ip }};
+ redis-cli -h accelleran-cbrs-redis -p {{ .Values.config.redis.ports.redisPort.port }} hset ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICECELLCONFIGLTERANRF FREQBANDINDICATOR {{ .Values.config.vranL3.freqBand }};
+ redis-cli -h accelleran-cbrs-redis -p {{ .Values.config.redis.ports.redisPort.port }} hset ENB_{{ .Values.config.vranL3.instanceId }}_FEATUREACTIVATION GOOD1PPSREQUIRED False;
+ redis-cli -h accelleran-cbrs-redis -p {{ .Values.config.redis.ports.redisPort.port }} hset ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICECELLCONFIGLTEEPCPLMNLIST[0] PLMNID {{ .Values.config.vranL3.plmnId }};
+ redis-cli -h accelleran-cbrs-redis -p {{ .Values.config.redis.ports.redisPort.port }} hset ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICECELLCONFIGLTERANRF_EARFCNDLLIST EARFCNDL {{ .Values.config.vranL3.earfcnDl }};
+ redis-cli -h accelleran-cbrs-redis -p {{ .Values.config.redis.ports.redisPort.port }} hset ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICECELLCONFIGLTERANRF_EARFCNULLIST EARFCNUL {{ .Values.config.vranL3.earfcnUl }};
+ redis-cli -h accelleran-cbrs-redis -p {{ .Values.config.redis.ports.redisPort.port }} hgetall ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICEFAPCONTROLLTEGATEWAYS1SIGLINKSERVERLIST[0];
+ redis-cli -h accelleran-cbrs-redis -p {{ .Values.config.redis.ports.redisPort.port }} hgetall ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICEFAPCONTROLLTEGATEWAY_S1SIGLINKSERVERLISTLIST[0];
+ redis-cli -h accelleran-cbrs-redis -p {{ .Values.config.redis.ports.redisPort.port }} hgetall ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICECELLCONFIGLTERANRF;
+ redis-cli -h accelleran-cbrs-redis -p {{ .Values.config.redis.ports.redisPort.port }} hgetall ENB_{{ .Values.config.vranL3.instanceId }}_FEATUREACTIVATION;
+ redis-cli -h accelleran-cbrs-redis -p {{ .Values.config.redis.ports.redisPort.port }} hgetall ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICECELLCONFIGLTEEPCPLMNLIST[0];
+ redis-cli -h accelleran-cbrs-redis -p {{ .Values.config.redis.ports.redisPort.port }} hgetall ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICECELLCONFIGLTERANRF_EARFCNDLLIST;
+ redis-cli -h accelleran-cbrs-redis -p {{ .Values.config.redis.ports.redisPort.port }} hgetall ENB_{{ .Values.config.vranL3.instanceId }}_FAPSERVICECELLCONFIGLTERANRF_EARFCNULLIST;
+ sleep 30;
+ /data/l3service;
+ securityContext:
+ privileged: true
+ {{- if .Values.resources.enabled }}
+ resources:
+{{ toYaml .Values.resources.accelleranCBRSCU | indent 10 }}
+ {{- end }}
+ volumeMounts:
+ - name: l3-config-volume
+ mountPath: /bootstrap
+ subPath: bootstrap
+ - name: l3-config-volume
+ mountPath: /zlog.conf
+ subPath: zlog.conf
+ volumes:
+ - name: l3-config-volume
+ configMap:
+ name: accelleran-cbrs-cu-{{ .Values.config.vranL3.instanceId }}-cm
+ - name: host-rootfs
+ hostPath:
+ path: /
diff --git a/ran/accelleran-cbrs/accelleran-cbrs-cu/values.yaml b/ran/accelleran-cbrs/accelleran-cbrs-cu/values.yaml
new file mode 100644
index 0000000..9778c02
--- /dev/null
+++ b/ran/accelleran-cbrs/accelleran-cbrs-cu/values.yaml
@@ -0,0 +1,59 @@
+# Copyright 2019-present Open Networking Foundation
+#
+# 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.
+
+images:
+ tags:
+ initCU: docker.io/omecproject/pod-init:1.0.0
+ vranL3: registry.aether.opennetworking.org/aether/accelleran-cu-l3-tdd:v1.0.2
+ depCheck: quay.io/stackanetes/kubernetes-entrypoint:v0.3.1
+ pullPolicy: IfNotPresent
+
+nodeSelectors:
+ enabled: false
+ accelleranCBRSCU:
+ label: accelleran-cbrs-cu
+ value: enabled
+
+resources:
+ enabled: true
+ accelleranCBRSCU:
+ requests:
+ cpu: 3
+ memory: 1Gi
+ limits:
+ cpu: 3
+ memory: 1Gi
+
+config:
+ vranL3:
+ zlogConf:
+ bufferMin: 64K
+ bufferMax: 64K
+ instanceId: onfcell202 # Cell ID -- Unique value for each L2/DU-L3/CU pair, no capital and special character
+ freqBand: 48
+ earfcnDl: 55990
+ earfcnUl: 55990
+ plmnId: "371211" # 130501 for aether If not, 315010 oldone: 371211
+ ports:
+ s1ap:
+ port: 36412
+ nodePort: 31412
+ protocol: SCTP
+ redis:
+ ports:
+ redisPort:
+ port: 6379
+ mme:
+ ip: 10.90.0.151
+ s1apPort: 36412