Resolved merge conflicts and allocated gNB struct in VNF
This commit is contained in:
Regular → Executable
@@ -0,0 +1,36 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
name: oai-physim
|
||||||
|
description: A Helm chart for physical simulators network function
|
||||||
|
|
||||||
|
# A chart can be either an 'application' or a 'library' chart.
|
||||||
|
#
|
||||||
|
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||||
|
# to be deployed.
|
||||||
|
#
|
||||||
|
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||||
|
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||||
|
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||||
|
type: application
|
||||||
|
|
||||||
|
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
|
||||||
|
|
||||||
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
|
# to the chart and its templates, including the app version.
|
||||||
|
version: 0.1.1
|
||||||
|
|
||||||
|
# This is the version number of the application being deployed. This version number should be
|
||||||
|
# incremented each time you make changes to the application.
|
||||||
|
appVersion: v1
|
||||||
|
|
||||||
|
keywords:
|
||||||
|
- Physical Simulators
|
||||||
|
- RAN
|
||||||
|
- 4G
|
||||||
|
- 5G
|
||||||
|
|
||||||
|
sources:
|
||||||
|
- https://gitlab.eurecom.fr/oai/openairinterface5g
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- name: OPENAIRINTERFACE
|
||||||
|
email: contact@openairinterface.org
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
name: oai-dlsim
|
||||||
|
description: A Helm subchart for dlsim network function
|
||||||
|
|
||||||
|
# A chart can be either an 'application' or a 'library' chart.
|
||||||
|
#
|
||||||
|
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||||
|
# to be deployed.
|
||||||
|
#
|
||||||
|
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||||
|
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||||
|
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||||
|
type: application
|
||||||
|
|
||||||
|
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
|
||||||
|
|
||||||
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
|
# to the chart and its templates, including the app version.
|
||||||
|
version: 0.1.1
|
||||||
|
|
||||||
|
# This is the version number of the application being deployed. This version number should be
|
||||||
|
# incremented each time you make changes to the application.
|
||||||
|
appVersion: v1
|
||||||
|
|
||||||
|
keywords:
|
||||||
|
- Physical Simulator
|
||||||
|
- dlsim
|
||||||
|
- RAN
|
||||||
|
- 4G
|
||||||
|
|
||||||
|
sources:
|
||||||
|
- https://gitlab.eurecom.fr/oai/openairinterface5g
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- name: OPENAIRINTERFACE
|
||||||
|
email: contact@openairinterface.org
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
1. Get the application URL by running these commands:
|
||||||
|
{{- if contains "NodePort" .Values.service.type }}
|
||||||
|
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-dlsim.fullname" . }})
|
||||||
|
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||||
|
echo http://$NODE_IP:$NODE_PORT
|
||||||
|
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||||
|
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||||
|
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-dlsim.fullname" . }}'
|
||||||
|
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-dlsim.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||||
|
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
||||||
|
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||||
|
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-dlsim.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||||
|
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||||
|
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-dlsim.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-dlsim.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride -}}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
|
{{- if contains $name .Release.Name -}}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-dlsim.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-dlsim.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "oai-dlsim.chart" . }}
|
||||||
|
{{ include "oai-dlsim.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-dlsim.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "oai-dlsim.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-dlsim.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create -}}
|
||||||
|
{{ default (include "oai-dlsim.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else -}}
|
||||||
|
{{ default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
labels:
|
||||||
|
{{- include "oai-dlsim.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "oai-dlsim.selectorLabels" . | nindent 6 }}
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "oai-dlsim.selectorLabels" . | nindent 8 }}
|
||||||
|
spec:
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||||
|
{{- if .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: physim
|
||||||
|
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: oai-dlsim
|
||||||
|
# volumeMounts:
|
||||||
|
# - mountPath: /opt/oai-dlsim/certs
|
||||||
|
# name: certs
|
||||||
|
command: ["/bin/sh", "-c"]
|
||||||
|
args:
|
||||||
|
- >
|
||||||
|
export OPENAIR_DIR=/opt/oai-physim &&
|
||||||
|
cd cmake_targets/autotests &&
|
||||||
|
./run_exec_autotests.bash -g "015100" -q -np -b &&
|
||||||
|
echo "FINISHED" &&
|
||||||
|
sleep infinity
|
||||||
|
dnsPolicy: ClusterFirst
|
||||||
|
restartPolicy: Always
|
||||||
|
schedulerName: default-scheduler
|
||||||
|
serviceAccountName: {{ .Values.global.serviceAccountName }}
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
labels:
|
||||||
|
{{- include "oai-dlsim.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
{{- if contains "ClusterIP" .Values.service.type }}
|
||||||
|
clusterIP: None
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- name: oai-dlsim
|
||||||
|
# Port accessible outside cluster
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
# Port to forward to inside the pod
|
||||||
|
targetPort: {{ .Values.service.Port }}
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
{{- include "oai-dlsim.selectorLabels" . | nindent 4 }}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
# Default values for oai-dlsim.
|
||||||
|
# This is a YAML-formatted file.
|
||||||
|
# Declare variables to be passed into your templates.
|
||||||
|
|
||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
namespace: "oaicicd-ran-tmp"
|
||||||
|
|
||||||
|
image:
|
||||||
|
registry: local
|
||||||
|
repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
|
||||||
|
version: temp
|
||||||
|
# pullPolicy: IfNotPresent or Never or Always
|
||||||
|
pullPolicy: Always
|
||||||
|
|
||||||
|
imagePullSecrets: []
|
||||||
|
|
||||||
|
nameOverride: ""
|
||||||
|
fullnameOverride: ""
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
# Specifies whether a service account should be created
|
||||||
|
create: true
|
||||||
|
# Annotations to add to the service account
|
||||||
|
annotations: {}
|
||||||
|
# The name of the service account to use.
|
||||||
|
# If not set and create is true, a name is generated using the fullname template
|
||||||
|
name: "oai-dlsim-sa"
|
||||||
|
|
||||||
|
podSecurityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
runAsGroup: 0
|
||||||
|
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
# capabilities:
|
||||||
|
# drop:
|
||||||
|
# - ALL
|
||||||
|
# readOnlyRootFilesystem: true
|
||||||
|
# runAsNonRoot: true
|
||||||
|
# runAsUser: 1000
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
resources: {}
|
||||||
|
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||||
|
# choice for the user. This also increases chances charts run on environments with little
|
||||||
|
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||||
|
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||||
|
# limits:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
# requests:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
affinity: {}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
name: oai-ldpctest
|
||||||
|
description: A Helm subchart for ldpctest network function
|
||||||
|
|
||||||
|
# A chart can be either an 'application' or a 'library' chart.
|
||||||
|
#
|
||||||
|
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||||
|
# to be deployed.
|
||||||
|
#
|
||||||
|
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||||
|
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||||
|
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||||
|
type: application
|
||||||
|
|
||||||
|
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
|
||||||
|
|
||||||
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
|
# to the chart and its templates, including the app version.
|
||||||
|
version: 0.1.1
|
||||||
|
|
||||||
|
# This is the version number of the application being deployed. This version number should be
|
||||||
|
# incremented each time you make changes to the application.
|
||||||
|
appVersion: v1
|
||||||
|
|
||||||
|
keywords:
|
||||||
|
- Physical Simulator
|
||||||
|
- ldpctest
|
||||||
|
- RAN
|
||||||
|
- 5G
|
||||||
|
|
||||||
|
sources:
|
||||||
|
- https://gitlab.eurecom.fr/oai/openairinterface5g
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- name: OPENAIRINTERFACE
|
||||||
|
email: contact@openairinterface.org
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
1. Get the application URL by running these commands:
|
||||||
|
{{- if contains "NodePort" .Values.service.type }}
|
||||||
|
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-ldpctest.fullname" . }})
|
||||||
|
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||||
|
echo http://$NODE_IP:$NODE_PORT
|
||||||
|
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||||
|
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||||
|
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-ldpctest.fullname" . }}'
|
||||||
|
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-ldpctest.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||||
|
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
||||||
|
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||||
|
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-ldpctest.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||||
|
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||||
|
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-ldpctest.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-ldpctest.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride -}}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
|
{{- if contains $name .Release.Name -}}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-ldpctest.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-ldpctest.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "oai-ldpctest.chart" . }}
|
||||||
|
{{ include "oai-ldpctest.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-ldpctest.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "oai-ldpctest.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-ldpctest.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create -}}
|
||||||
|
{{ default (include "oai-ldpctest.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else -}}
|
||||||
|
{{ default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
labels:
|
||||||
|
{{- include "oai-ldpctest.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "oai-ldpctest.selectorLabels" . | nindent 6 }}
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "oai-ldpctest.selectorLabels" . | nindent 8 }}
|
||||||
|
spec:
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||||
|
{{- if .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: physim
|
||||||
|
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: oai-ldpctest
|
||||||
|
# volumeMounts:
|
||||||
|
# - mountPath: /opt/oai-ldpctest/certs
|
||||||
|
# name: certs
|
||||||
|
command: ["/bin/sh", "-c"]
|
||||||
|
args:
|
||||||
|
- >
|
||||||
|
export OPENAIR_DIR=/opt/oai-physim &&
|
||||||
|
cd cmake_targets/autotests &&
|
||||||
|
./run_exec_autotests.bash -g "015102" -q -np -b &&
|
||||||
|
echo "FINISHED" &&
|
||||||
|
sleep infinity
|
||||||
|
dnsPolicy: ClusterFirst
|
||||||
|
restartPolicy: Always
|
||||||
|
schedulerName: default-scheduler
|
||||||
|
serviceAccountName: {{ .Values.global.serviceAccountName }}
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
labels:
|
||||||
|
{{- include "oai-ldpctest.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
{{- if contains "ClusterIP" .Values.service.type }}
|
||||||
|
clusterIP: None
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- name: oai-ldpctest
|
||||||
|
# Port accessible outside cluster
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
# Port to forward to inside the pod
|
||||||
|
targetPort: {{ .Values.service.Port }}
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
{{- include "oai-ldpctest.selectorLabels" . | nindent 4 }}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
# Default values for oai-ldpctest.
|
||||||
|
# This is a YAML-formatted file.
|
||||||
|
# Declare variables to be passed into your templates.
|
||||||
|
|
||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
namespace: "oaicicd-ran-tmp"
|
||||||
|
|
||||||
|
image:
|
||||||
|
registry: local
|
||||||
|
repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
|
||||||
|
version: temp
|
||||||
|
# pullPolicy: IfNotPresent or Never or Always
|
||||||
|
pullPolicy: Always
|
||||||
|
|
||||||
|
imagePullSecrets: []
|
||||||
|
|
||||||
|
nameOverride: ""
|
||||||
|
fullnameOverride: ""
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
# Specifies whether a service account should be created
|
||||||
|
create: true
|
||||||
|
# Annotations to add to the service account
|
||||||
|
annotations: {}
|
||||||
|
# The name of the service account to use.
|
||||||
|
# If not set and create is true, a name is generated using the fullname template
|
||||||
|
name: "oai-ldpctest-sa"
|
||||||
|
|
||||||
|
podSecurityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
runAsGroup: 0
|
||||||
|
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
# capabilities:
|
||||||
|
# drop:
|
||||||
|
# - ALL
|
||||||
|
# readOnlyRootFilesystem: true
|
||||||
|
# runAsNonRoot: true
|
||||||
|
# runAsUser: 1000
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
resources: {}
|
||||||
|
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||||
|
# choice for the user. This also increases chances charts run on environments with little
|
||||||
|
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||||
|
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||||
|
# limits:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
# requests:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
affinity: {}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
name: oai-nr-dlschsim
|
||||||
|
description: A Helm subchart for nr-dlschsim network function
|
||||||
|
|
||||||
|
# A chart can be either an 'application' or a 'library' chart.
|
||||||
|
#
|
||||||
|
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||||
|
# to be deployed.
|
||||||
|
#
|
||||||
|
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||||
|
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||||
|
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||||
|
type: application
|
||||||
|
|
||||||
|
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
|
||||||
|
|
||||||
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
|
# to the chart and its templates, including the app version.
|
||||||
|
version: 0.1.1
|
||||||
|
|
||||||
|
# This is the version number of the application being deployed. This version number should be
|
||||||
|
# incremented each time you make changes to the application.
|
||||||
|
appVersion: v1
|
||||||
|
|
||||||
|
keywords:
|
||||||
|
- Physical Simulator
|
||||||
|
- nr-dlschsim
|
||||||
|
- RAN
|
||||||
|
- 5G
|
||||||
|
|
||||||
|
sources:
|
||||||
|
- https://gitlab.eurecom.fr/oai/openairinterface5g
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- name: OPENAIRINTERFACE
|
||||||
|
email: contact@openairinterface.org
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
1. Get the application URL by running these commands:
|
||||||
|
{{- if contains "NodePort" .Values.service.type }}
|
||||||
|
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-dlschsim.fullname" . }})
|
||||||
|
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||||
|
echo http://$NODE_IP:$NODE_PORT
|
||||||
|
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||||
|
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||||
|
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-dlschsim.fullname" . }}'
|
||||||
|
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-dlschsim.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||||
|
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
||||||
|
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||||
|
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-dlschsim.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||||
|
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||||
|
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-dlschsim.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-dlschsim.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride -}}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
|
{{- if contains $name .Release.Name -}}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-dlschsim.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-dlschsim.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "oai-nr-dlschsim.chart" . }}
|
||||||
|
{{ include "oai-nr-dlschsim.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-dlschsim.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "oai-nr-dlschsim.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-dlschsim.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create -}}
|
||||||
|
{{ default (include "oai-nr-dlschsim.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else -}}
|
||||||
|
{{ default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
labels:
|
||||||
|
{{- include "oai-nr-dlschsim.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "oai-nr-dlschsim.selectorLabels" . | nindent 6 }}
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "oai-nr-dlschsim.selectorLabels" . | nindent 8 }}
|
||||||
|
spec:
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||||
|
{{- if .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: physim
|
||||||
|
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: oai-nr-dlschsim
|
||||||
|
# volumeMounts:
|
||||||
|
# - mountPath: /opt/oai-nr-dlschsim/certs
|
||||||
|
# name: certs
|
||||||
|
command: ["/bin/sh", "-c"]
|
||||||
|
args:
|
||||||
|
- >
|
||||||
|
export OPENAIR_DIR=/opt/oai-physim &&
|
||||||
|
cd cmake_targets/autotests &&
|
||||||
|
./run_exec_autotests.bash -g "015106" -q -np -b &&
|
||||||
|
echo "FINISHED" &&
|
||||||
|
sleep infinity
|
||||||
|
dnsPolicy: ClusterFirst
|
||||||
|
restartPolicy: Always
|
||||||
|
schedulerName: default-scheduler
|
||||||
|
serviceAccountName: {{ .Values.global.serviceAccountName }}
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
labels:
|
||||||
|
{{- include "oai-nr-dlschsim.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
{{- if contains "ClusterIP" .Values.service.type }}
|
||||||
|
clusterIP: None
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- name: oai-nr-dlschsim
|
||||||
|
# Port accessible outside cluster
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
# Port to forward to inside the pod
|
||||||
|
targetPort: {{ .Values.service.Port }}
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
{{- include "oai-nr-dlschsim.selectorLabels" . | nindent 4 }}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
# Default values for oai-nr-dlschsim.
|
||||||
|
# This is a YAML-formatted file.
|
||||||
|
# Declare variables to be passed into your templates.
|
||||||
|
|
||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
namespace: "oaicicd-ran-tmp"
|
||||||
|
|
||||||
|
image:
|
||||||
|
registry: local
|
||||||
|
repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
|
||||||
|
version: temp
|
||||||
|
# pullPolicy: IfNotPresent or Never or Always
|
||||||
|
pullPolicy: Always
|
||||||
|
|
||||||
|
imagePullSecrets: []
|
||||||
|
|
||||||
|
nameOverride: ""
|
||||||
|
fullnameOverride: ""
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
# Specifies whether a service account should be created
|
||||||
|
create: true
|
||||||
|
# Annotations to add to the service account
|
||||||
|
annotations: {}
|
||||||
|
# The name of the service account to use.
|
||||||
|
# If not set and create is true, a name is generated using the fullname template
|
||||||
|
name: "oai-nr-dlschsim-sa"
|
||||||
|
|
||||||
|
podSecurityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
runAsGroup: 0
|
||||||
|
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
# capabilities:
|
||||||
|
# drop:
|
||||||
|
# - ALL
|
||||||
|
# readOnlyRootFilesystem: true
|
||||||
|
# runAsNonRoot: true
|
||||||
|
# runAsUser: 1000
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
resources: {}
|
||||||
|
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||||
|
# choice for the user. This also increases chances charts run on environments with little
|
||||||
|
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||||
|
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||||
|
# limits:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
# requests:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
affinity: {}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
name: oai-nr-dlsim
|
||||||
|
description: A Helm subchart for nr-dlsim network function
|
||||||
|
|
||||||
|
# A chart can be either an 'application' or a 'library' chart.
|
||||||
|
#
|
||||||
|
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||||
|
# to be deployed.
|
||||||
|
#
|
||||||
|
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||||
|
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||||
|
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||||
|
type: application
|
||||||
|
|
||||||
|
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
|
||||||
|
|
||||||
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
|
# to the chart and its templates, including the app version.
|
||||||
|
version: 0.1.1
|
||||||
|
|
||||||
|
# This is the version number of the application being deployed. This version number should be
|
||||||
|
# incremented each time you make changes to the application.
|
||||||
|
appVersion: v1
|
||||||
|
|
||||||
|
keywords:
|
||||||
|
- Physical Simulator
|
||||||
|
- nr-dlsim
|
||||||
|
- RAN
|
||||||
|
- 5G
|
||||||
|
|
||||||
|
sources:
|
||||||
|
- https://gitlab.eurecom.fr/oai/openairinterface5g
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- name: OPENAIRINTERFACE
|
||||||
|
email: contact@openairinterface.org
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
1. Get the application URL by running these commands:
|
||||||
|
{{- if contains "NodePort" .Values.service.type }}
|
||||||
|
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-dlsim.fullname" . }})
|
||||||
|
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||||
|
echo http://$NODE_IP:$NODE_PORT
|
||||||
|
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||||
|
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||||
|
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-dlsim.fullname" . }}'
|
||||||
|
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-dlsim.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||||
|
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
||||||
|
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||||
|
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-dlsim.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||||
|
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||||
|
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-dlsim.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-dlsim.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride -}}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
|
{{- if contains $name .Release.Name -}}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-dlsim.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-dlsim.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "oai-nr-dlsim.chart" . }}
|
||||||
|
{{ include "oai-nr-dlsim.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-dlsim.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "oai-nr-dlsim.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-dlsim.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create -}}
|
||||||
|
{{ default (include "oai-nr-dlsim.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else -}}
|
||||||
|
{{ default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
labels:
|
||||||
|
{{- include "oai-nr-dlsim.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "oai-nr-dlsim.selectorLabels" . | nindent 6 }}
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "oai-nr-dlsim.selectorLabels" . | nindent 8 }}
|
||||||
|
spec:
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||||
|
{{- if .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: physim
|
||||||
|
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: oai-nr-dlsim
|
||||||
|
# volumeMounts:
|
||||||
|
# - mountPath: /opt/oai-nr-dlsim/certs
|
||||||
|
# name: certs
|
||||||
|
command: ["/bin/sh", "-c"]
|
||||||
|
args:
|
||||||
|
- >
|
||||||
|
export OPENAIR_DIR=/opt/oai-physim &&
|
||||||
|
cd cmake_targets/autotests &&
|
||||||
|
./run_exec_autotests.bash -g "015105" -q -np -b &&
|
||||||
|
echo "FINISHED" &&
|
||||||
|
sleep infinity
|
||||||
|
dnsPolicy: ClusterFirst
|
||||||
|
restartPolicy: Always
|
||||||
|
schedulerName: default-scheduler
|
||||||
|
serviceAccountName: {{ .Values.global.serviceAccountName }}
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
labels:
|
||||||
|
{{- include "oai-nr-dlsim.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
{{- if contains "ClusterIP" .Values.service.type }}
|
||||||
|
clusterIP: None
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- name: oai-nr-dlsim
|
||||||
|
# Port accessible outside cluster
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
# Port to forward to inside the pod
|
||||||
|
targetPort: {{ .Values.service.Port }}
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
{{- include "oai-nr-dlsim.selectorLabels" . | nindent 4 }}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
# Default values for oai-nr-dlsim.
|
||||||
|
# This is a YAML-formatted file.
|
||||||
|
# Declare variables to be passed into your templates.
|
||||||
|
|
||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
namespace: "oaicicd-ran-tmp"
|
||||||
|
|
||||||
|
image:
|
||||||
|
registry: local
|
||||||
|
repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
|
||||||
|
version: temp
|
||||||
|
# pullPolicy: IfNotPresent or Never or Always
|
||||||
|
pullPolicy: Always
|
||||||
|
|
||||||
|
imagePullSecrets: []
|
||||||
|
|
||||||
|
nameOverride: ""
|
||||||
|
fullnameOverride: ""
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
# Specifies whether a service account should be created
|
||||||
|
create: true
|
||||||
|
# Annotations to add to the service account
|
||||||
|
annotations: {}
|
||||||
|
# The name of the service account to use.
|
||||||
|
# If not set and create is true, a name is generated using the fullname template
|
||||||
|
name: "oai-nr-dlsim-sa"
|
||||||
|
|
||||||
|
podSecurityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
runAsGroup: 0
|
||||||
|
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
# capabilities:
|
||||||
|
# drop:
|
||||||
|
# - ALL
|
||||||
|
# readOnlyRootFilesystem: true
|
||||||
|
# runAsNonRoot: true
|
||||||
|
# runAsUser: 1000
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
resources: {}
|
||||||
|
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||||
|
# choice for the user. This also increases chances charts run on environments with little
|
||||||
|
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||||
|
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||||
|
# limits:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
# requests:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
affinity: {}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
name: oai-nr-pbchsim
|
||||||
|
description: A Helm subchart for nr-pbchsim network function
|
||||||
|
|
||||||
|
# A chart can be either an 'application' or a 'library' chart.
|
||||||
|
#
|
||||||
|
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||||
|
# to be deployed.
|
||||||
|
#
|
||||||
|
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||||
|
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||||
|
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||||
|
type: application
|
||||||
|
|
||||||
|
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
|
||||||
|
|
||||||
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
|
# to the chart and its templates, including the app version.
|
||||||
|
version: 0.1.1
|
||||||
|
|
||||||
|
# This is the version number of the application being deployed. This version number should be
|
||||||
|
# incremented each time you make changes to the application.
|
||||||
|
appVersion: v1
|
||||||
|
|
||||||
|
keywords:
|
||||||
|
- Physical Simulator
|
||||||
|
- nr-pbchsim
|
||||||
|
- RAN
|
||||||
|
- 5G
|
||||||
|
|
||||||
|
sources:
|
||||||
|
- https://gitlab.eurecom.fr/oai/openairinterface5g
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- name: OPENAIRINTERFACE
|
||||||
|
email: contact@openairinterface.org
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
1. Get the application URL by running these commands:
|
||||||
|
{{- if contains "NodePort" .Values.service.type }}
|
||||||
|
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-pbchsim.fullname" . }})
|
||||||
|
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||||
|
echo http://$NODE_IP:$NODE_PORT
|
||||||
|
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||||
|
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||||
|
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-pbchsim.fullname" . }}'
|
||||||
|
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-pbchsim.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||||
|
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
||||||
|
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||||
|
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-pbchsim.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||||
|
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||||
|
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-pbchsim.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-pbchsim.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride -}}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
|
{{- if contains $name .Release.Name -}}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-pbchsim.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-pbchsim.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "oai-nr-pbchsim.chart" . }}
|
||||||
|
{{ include "oai-nr-pbchsim.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-pbchsim.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "oai-nr-pbchsim.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-pbchsim.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create -}}
|
||||||
|
{{ default (include "oai-nr-pbchsim.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else -}}
|
||||||
|
{{ default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
labels:
|
||||||
|
{{- include "oai-nr-pbchsim.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "oai-nr-pbchsim.selectorLabels" . | nindent 6 }}
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "oai-nr-pbchsim.selectorLabels" . | nindent 8 }}
|
||||||
|
spec:
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||||
|
{{- if .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: physim
|
||||||
|
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: oai-nr-pbchsim
|
||||||
|
# volumeMounts:
|
||||||
|
# - mountPath: /opt/oai-nr-pbchsim/certs
|
||||||
|
# name: certs
|
||||||
|
command: ["/bin/sh", "-c"]
|
||||||
|
args:
|
||||||
|
- >
|
||||||
|
export OPENAIR_DIR=/opt/oai-physim &&
|
||||||
|
cd cmake_targets/autotests &&
|
||||||
|
./run_exec_autotests.bash -g "015104" -q -np -b &&
|
||||||
|
echo "FINISHED" &&
|
||||||
|
sleep infinity
|
||||||
|
dnsPolicy: ClusterFirst
|
||||||
|
restartPolicy: Always
|
||||||
|
schedulerName: default-scheduler
|
||||||
|
serviceAccountName: {{ .Values.global.serviceAccountName }}
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
labels:
|
||||||
|
{{- include "oai-nr-pbchsim.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
{{- if contains "ClusterIP" .Values.service.type }}
|
||||||
|
clusterIP: None
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- name: oai-nr-pbchsim
|
||||||
|
# Port accessible outside cluster
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
# Port to forward to inside the pod
|
||||||
|
targetPort: {{ .Values.service.Port }}
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
{{- include "oai-nr-pbchsim.selectorLabels" . | nindent 4 }}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
# Default values for oai-nr-pbchsim.
|
||||||
|
# This is a YAML-formatted file.
|
||||||
|
# Declare variables to be passed into your templates.
|
||||||
|
|
||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
namespace: "oaicicd-ran-tmp"
|
||||||
|
|
||||||
|
image:
|
||||||
|
registry: local
|
||||||
|
repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
|
||||||
|
version: temp
|
||||||
|
# pullPolicy: IfNotPresent or Never or Always
|
||||||
|
pullPolicy: Always
|
||||||
|
|
||||||
|
imagePullSecrets: []
|
||||||
|
|
||||||
|
nameOverride: ""
|
||||||
|
fullnameOverride: ""
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
# Specifies whether a service account should be created
|
||||||
|
create: true
|
||||||
|
# Annotations to add to the service account
|
||||||
|
annotations: {}
|
||||||
|
# The name of the service account to use.
|
||||||
|
# If not set and create is true, a name is generated using the fullname template
|
||||||
|
name: "oai-nr-pbchsim-sa"
|
||||||
|
|
||||||
|
podSecurityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
runAsGroup: 0
|
||||||
|
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
# capabilities:
|
||||||
|
# drop:
|
||||||
|
# - ALL
|
||||||
|
# readOnlyRootFilesystem: true
|
||||||
|
# runAsNonRoot: true
|
||||||
|
# runAsUser: 1000
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
resources: {}
|
||||||
|
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||||
|
# choice for the user. This also increases chances charts run on environments with little
|
||||||
|
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||||
|
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||||
|
# limits:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
# requests:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
affinity: {}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
name: oai-nr-prachsim
|
||||||
|
description: A Helm subchart for nr-prachsim network function
|
||||||
|
|
||||||
|
# A chart can be either an 'application' or a 'library' chart.
|
||||||
|
#
|
||||||
|
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||||
|
# to be deployed.
|
||||||
|
#
|
||||||
|
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||||
|
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||||
|
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||||
|
type: application
|
||||||
|
|
||||||
|
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
|
||||||
|
|
||||||
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
|
# to the chart and its templates, including the app version.
|
||||||
|
version: 0.1.1
|
||||||
|
|
||||||
|
# This is the version number of the application being deployed. This version number should be
|
||||||
|
# incremented each time you make changes to the application.
|
||||||
|
appVersion: v1
|
||||||
|
|
||||||
|
keywords:
|
||||||
|
- Physical Simulator
|
||||||
|
- nr-prachsim
|
||||||
|
- RAN
|
||||||
|
- 5G
|
||||||
|
|
||||||
|
sources:
|
||||||
|
- https://gitlab.eurecom.fr/oai/openairinterface5g
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- name: OPENAIRINTERFACE
|
||||||
|
email: contact@openairinterface.org
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
1. Get the application URL by running these commands:
|
||||||
|
{{- if contains "NodePort" .Values.service.type }}
|
||||||
|
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-prachsim.fullname" . }})
|
||||||
|
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||||
|
echo http://$NODE_IP:$NODE_PORT
|
||||||
|
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||||
|
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||||
|
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-prachsim.fullname" . }}'
|
||||||
|
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-prachsim.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||||
|
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
||||||
|
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||||
|
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-prachsim.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||||
|
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||||
|
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-prachsim.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-prachsim.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride -}}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
|
{{- if contains $name .Release.Name -}}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-prachsim.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-prachsim.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "oai-nr-prachsim.chart" . }}
|
||||||
|
{{ include "oai-nr-prachsim.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-prachsim.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "oai-nr-prachsim.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-prachsim.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create -}}
|
||||||
|
{{ default (include "oai-nr-prachsim.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else -}}
|
||||||
|
{{ default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
labels:
|
||||||
|
{{- include "oai-nr-prachsim.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "oai-nr-prachsim.selectorLabels" . | nindent 6 }}
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "oai-nr-prachsim.selectorLabels" . | nindent 8 }}
|
||||||
|
spec:
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||||
|
{{- if .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: physim
|
||||||
|
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: oai-nr-prachsim
|
||||||
|
# volumeMounts:
|
||||||
|
# - mountPath: /opt/oai-nr-prachsim/certs
|
||||||
|
# name: certs
|
||||||
|
command: ["/bin/sh", "-c"]
|
||||||
|
args:
|
||||||
|
- >
|
||||||
|
export OPENAIR_DIR=/opt/oai-physim &&
|
||||||
|
cd cmake_targets/autotests &&
|
||||||
|
./run_exec_autotests.bash -g "015112" -q -np -b &&
|
||||||
|
echo "FINISHED" &&
|
||||||
|
sleep infinity
|
||||||
|
dnsPolicy: ClusterFirst
|
||||||
|
restartPolicy: Always
|
||||||
|
schedulerName: default-scheduler
|
||||||
|
serviceAccountName: {{ .Values.global.serviceAccountName }}
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
labels:
|
||||||
|
{{- include "oai-nr-prachsim.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
{{- if contains "ClusterIP" .Values.service.type }}
|
||||||
|
clusterIP: None
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- name: oai-nr-prachsim
|
||||||
|
# Port accessible outside cluster
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
# Port to forward to inside the pod
|
||||||
|
targetPort: {{ .Values.service.Port }}
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
{{- include "oai-nr-prachsim.selectorLabels" . | nindent 4 }}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
# Default values for oai-nr-prachsim.
|
||||||
|
# This is a YAML-formatted file.
|
||||||
|
# Declare variables to be passed into your templates.
|
||||||
|
|
||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
namespace: "oaicicd-ran-tmp"
|
||||||
|
|
||||||
|
image:
|
||||||
|
registry: local
|
||||||
|
repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
|
||||||
|
version: temp
|
||||||
|
# pullPolicy: IfNotPresent or Never or Always
|
||||||
|
pullPolicy: Always
|
||||||
|
|
||||||
|
imagePullSecrets: []
|
||||||
|
|
||||||
|
nameOverride: ""
|
||||||
|
fullnameOverride: ""
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
# Specifies whether a service account should be created
|
||||||
|
create: true
|
||||||
|
# Annotations to add to the service account
|
||||||
|
annotations: {}
|
||||||
|
# The name of the service account to use.
|
||||||
|
# If not set and create is true, a name is generated using the fullname template
|
||||||
|
name: "oai-nr-prachsim-sa"
|
||||||
|
|
||||||
|
podSecurityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
runAsGroup: 0
|
||||||
|
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
# capabilities:
|
||||||
|
# drop:
|
||||||
|
# - ALL
|
||||||
|
# readOnlyRootFilesystem: true
|
||||||
|
# runAsNonRoot: true
|
||||||
|
# runAsUser: 1000
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
resources: {}
|
||||||
|
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||||
|
# choice for the user. This also increases chances charts run on environments with little
|
||||||
|
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||||
|
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||||
|
# limits:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
# requests:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
affinity: {}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
name: oai-nr-pucchsim
|
||||||
|
description: A Helm subchart for nr-pucchsim network function
|
||||||
|
|
||||||
|
# A chart can be either an 'application' or a 'library' chart.
|
||||||
|
#
|
||||||
|
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||||
|
# to be deployed.
|
||||||
|
#
|
||||||
|
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||||
|
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||||
|
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||||
|
type: application
|
||||||
|
|
||||||
|
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
|
||||||
|
|
||||||
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
|
# to the chart and its templates, including the app version.
|
||||||
|
version: 0.1.1
|
||||||
|
|
||||||
|
# This is the version number of the application being deployed. This version number should be
|
||||||
|
# incremented each time you make changes to the application.
|
||||||
|
appVersion: v1
|
||||||
|
|
||||||
|
keywords:
|
||||||
|
- Physical Simulator
|
||||||
|
- nr-pucchsim
|
||||||
|
- RAN
|
||||||
|
- 5G
|
||||||
|
|
||||||
|
sources:
|
||||||
|
- https://gitlab.eurecom.fr/oai/openairinterface5g
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- name: OPENAIRINTERFACE
|
||||||
|
email: contact@openairinterface.org
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
1. Get the application URL by running these commands:
|
||||||
|
{{- if contains "NodePort" .Values.service.type }}
|
||||||
|
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-pucchsim.fullname" . }})
|
||||||
|
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||||
|
echo http://$NODE_IP:$NODE_PORT
|
||||||
|
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||||
|
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||||
|
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-pucchsim.fullname" . }}'
|
||||||
|
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-pucchsim.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||||
|
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
||||||
|
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||||
|
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-pucchsim.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||||
|
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||||
|
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-pucchsim.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-pucchsim.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride -}}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
|
{{- if contains $name .Release.Name -}}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-pucchsim.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-pucchsim.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "oai-nr-pucchsim.chart" . }}
|
||||||
|
{{ include "oai-nr-pucchsim.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-pucchsim.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "oai-nr-pucchsim.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-pucchsim.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create -}}
|
||||||
|
{{ default (include "oai-nr-pucchsim.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else -}}
|
||||||
|
{{ default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
labels:
|
||||||
|
{{- include "oai-nr-pucchsim.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "oai-nr-pucchsim.selectorLabels" . | nindent 6 }}
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "oai-nr-pucchsim.selectorLabels" . | nindent 8 }}
|
||||||
|
spec:
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||||
|
{{- if .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: physim
|
||||||
|
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: oai-nr-pucchsim
|
||||||
|
# volumeMounts:
|
||||||
|
# - mountPath: /opt/oai-nr-pucchsim/certs
|
||||||
|
# name: certs
|
||||||
|
command: ["/bin/sh", "-c"]
|
||||||
|
args:
|
||||||
|
- >
|
||||||
|
export OPENAIR_DIR=/opt/oai-physim &&
|
||||||
|
cd cmake_targets/autotests &&
|
||||||
|
./run_exec_autotests.bash -g "015109" -q -np -b &&
|
||||||
|
echo "FINISHED" &&
|
||||||
|
sleep infinity
|
||||||
|
dnsPolicy: ClusterFirst
|
||||||
|
restartPolicy: Always
|
||||||
|
schedulerName: default-scheduler
|
||||||
|
serviceAccountName: {{ .Values.global.serviceAccountName }}
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
labels:
|
||||||
|
{{- include "oai-nr-pucchsim.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
{{- if contains "ClusterIP" .Values.service.type }}
|
||||||
|
clusterIP: None
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- name: oai-nr-pucchsim
|
||||||
|
# Port accessible outside cluster
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
# Port to forward to inside the pod
|
||||||
|
targetPort: {{ .Values.service.Port }}
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
{{- include "oai-nr-pucchsim.selectorLabels" . | nindent 4 }}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
# Default values for oai-nr-pucchsim.
|
||||||
|
# This is a YAML-formatted file.
|
||||||
|
# Declare variables to be passed into your templates.
|
||||||
|
|
||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
namespace: "oaicicd-ran-tmp"
|
||||||
|
|
||||||
|
image:
|
||||||
|
registry: local
|
||||||
|
repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
|
||||||
|
version: temp
|
||||||
|
# pullPolicy: IfNotPresent or Never or Always
|
||||||
|
pullPolicy: Always
|
||||||
|
|
||||||
|
imagePullSecrets: []
|
||||||
|
|
||||||
|
nameOverride: ""
|
||||||
|
fullnameOverride: ""
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
# Specifies whether a service account should be created
|
||||||
|
create: true
|
||||||
|
# Annotations to add to the service account
|
||||||
|
annotations: {}
|
||||||
|
# The name of the service account to use.
|
||||||
|
# If not set and create is true, a name is generated using the fullname template
|
||||||
|
name: "oai-nr-pucchsim-sa"
|
||||||
|
|
||||||
|
podSecurityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
runAsGroup: 0
|
||||||
|
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
# capabilities:
|
||||||
|
# drop:
|
||||||
|
# - ALL
|
||||||
|
# readOnlyRootFilesystem: true
|
||||||
|
# runAsNonRoot: true
|
||||||
|
# runAsUser: 1000
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
resources: {}
|
||||||
|
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||||
|
# choice for the user. This also increases chances charts run on environments with little
|
||||||
|
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||||
|
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||||
|
# limits:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
# requests:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
affinity: {}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
name: oai-nr-ulschsim
|
||||||
|
description: A Helm subchart for nr-ulschsim network function
|
||||||
|
|
||||||
|
# A chart can be either an 'application' or a 'library' chart.
|
||||||
|
#
|
||||||
|
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||||
|
# to be deployed.
|
||||||
|
#
|
||||||
|
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||||
|
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||||
|
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||||
|
type: application
|
||||||
|
|
||||||
|
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
|
||||||
|
|
||||||
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
|
# to the chart and its templates, including the app version.
|
||||||
|
version: 0.1.1
|
||||||
|
|
||||||
|
# This is the version number of the application being deployed. This version number should be
|
||||||
|
# incremented each time you make changes to the application.
|
||||||
|
appVersion: v1
|
||||||
|
|
||||||
|
keywords:
|
||||||
|
- Physical Simulator
|
||||||
|
- nr-ulschsim
|
||||||
|
- RAN
|
||||||
|
- 5G
|
||||||
|
|
||||||
|
sources:
|
||||||
|
- https://gitlab.eurecom.fr/oai/openairinterface5g
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- name: OPENAIRINTERFACE
|
||||||
|
email: contact@openairinterface.org
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
1. Get the application URL by running these commands:
|
||||||
|
{{- if contains "NodePort" .Values.service.type }}
|
||||||
|
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-ulschsim.fullname" . }})
|
||||||
|
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||||
|
echo http://$NODE_IP:$NODE_PORT
|
||||||
|
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||||
|
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||||
|
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-ulschsim.fullname" . }}'
|
||||||
|
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-ulschsim.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||||
|
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
||||||
|
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||||
|
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-ulschsim.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||||
|
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||||
|
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-ulschsim.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-ulschsim.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride -}}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
|
{{- if contains $name .Release.Name -}}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-ulschsim.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-ulschsim.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "oai-nr-ulschsim.chart" . }}
|
||||||
|
{{ include "oai-nr-ulschsim.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-ulschsim.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "oai-nr-ulschsim.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-ulschsim.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create -}}
|
||||||
|
{{ default (include "oai-nr-ulschsim.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else -}}
|
||||||
|
{{ default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
labels:
|
||||||
|
{{- include "oai-nr-ulschsim.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "oai-nr-ulschsim.selectorLabels" . | nindent 6 }}
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "oai-nr-ulschsim.selectorLabels" . | nindent 8 }}
|
||||||
|
spec:
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||||
|
{{- if .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: physim
|
||||||
|
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: oai-nr-ulschsim
|
||||||
|
# volumeMounts:
|
||||||
|
# - mountPath: /opt/oai-nr-ulschsim/certs
|
||||||
|
# name: certs
|
||||||
|
command: ["/bin/sh", "-c"]
|
||||||
|
args:
|
||||||
|
- >
|
||||||
|
export OPENAIR_DIR=/opt/oai-physim &&
|
||||||
|
cd cmake_targets/autotests &&
|
||||||
|
./run_exec_autotests.bash -g "015108" -q -np -b &&
|
||||||
|
echo "FINISHED" &&
|
||||||
|
sleep infinity
|
||||||
|
dnsPolicy: ClusterFirst
|
||||||
|
restartPolicy: Always
|
||||||
|
schedulerName: default-scheduler
|
||||||
|
serviceAccountName: {{ .Values.global.serviceAccountName }}
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
labels:
|
||||||
|
{{- include "oai-nr-ulschsim.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
{{- if contains "ClusterIP" .Values.service.type }}
|
||||||
|
clusterIP: None
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- name: oai-nr-ulschsim
|
||||||
|
# Port accessible outside cluster
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
# Port to forward to inside the pod
|
||||||
|
targetPort: {{ .Values.service.Port }}
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
{{- include "oai-nr-ulschsim.selectorLabels" . | nindent 4 }}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
# Default values for oai-nr-ulschsim.
|
||||||
|
# This is a YAML-formatted file.
|
||||||
|
# Declare variables to be passed into your templates.
|
||||||
|
|
||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
namespace: "oaicicd-ran-tmp"
|
||||||
|
|
||||||
|
image:
|
||||||
|
registry: local
|
||||||
|
repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
|
||||||
|
version: temp
|
||||||
|
# pullPolicy: IfNotPresent or Never or Always
|
||||||
|
pullPolicy: Always
|
||||||
|
|
||||||
|
imagePullSecrets: []
|
||||||
|
|
||||||
|
nameOverride: ""
|
||||||
|
fullnameOverride: ""
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
# Specifies whether a service account should be created
|
||||||
|
create: true
|
||||||
|
# Annotations to add to the service account
|
||||||
|
annotations: {}
|
||||||
|
# The name of the service account to use.
|
||||||
|
# If not set and create is true, a name is generated using the fullname template
|
||||||
|
name: "oai-nr-ulschsim-sa"
|
||||||
|
|
||||||
|
podSecurityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
runAsGroup: 0
|
||||||
|
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
# capabilities:
|
||||||
|
# drop:
|
||||||
|
# - ALL
|
||||||
|
# readOnlyRootFilesystem: true
|
||||||
|
# runAsNonRoot: true
|
||||||
|
# runAsUser: 1000
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
resources: {}
|
||||||
|
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||||
|
# choice for the user. This also increases chances charts run on environments with little
|
||||||
|
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||||
|
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||||
|
# limits:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
# requests:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
affinity: {}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
name: oai-nr-ulsim
|
||||||
|
description: A Helm subchart for nr-ulsim network function
|
||||||
|
|
||||||
|
# A chart can be either an 'application' or a 'library' chart.
|
||||||
|
#
|
||||||
|
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||||
|
# to be deployed.
|
||||||
|
#
|
||||||
|
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||||
|
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||||
|
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||||
|
type: application
|
||||||
|
|
||||||
|
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
|
||||||
|
|
||||||
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
|
# to the chart and its templates, including the app version.
|
||||||
|
version: 0.1.1
|
||||||
|
|
||||||
|
# This is the version number of the application being deployed. This version number should be
|
||||||
|
# incremented each time you make changes to the application.
|
||||||
|
appVersion: v1
|
||||||
|
|
||||||
|
keywords:
|
||||||
|
- Physical Simulator
|
||||||
|
- nr-ulsim
|
||||||
|
- RAN
|
||||||
|
- 5G
|
||||||
|
|
||||||
|
sources:
|
||||||
|
- https://gitlab.eurecom.fr/oai/openairinterface5g
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- name: OPENAIRINTERFACE
|
||||||
|
email: contact@openairinterface.org
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
1. Get the application URL by running these commands:
|
||||||
|
{{- if contains "NodePort" .Values.service.type }}
|
||||||
|
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-ulsim.fullname" . }})
|
||||||
|
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||||
|
echo http://$NODE_IP:$NODE_PORT
|
||||||
|
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||||
|
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||||
|
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-ulsim.fullname" . }}'
|
||||||
|
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-ulsim.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||||
|
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
||||||
|
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||||
|
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-ulsim.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||||
|
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||||
|
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-ulsim.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-ulsim.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride -}}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
|
{{- if contains $name .Release.Name -}}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-ulsim.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-ulsim.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "oai-nr-ulsim.chart" . }}
|
||||||
|
{{ include "oai-nr-ulsim.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-ulsim.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "oai-nr-ulsim.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-nr-ulsim.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create -}}
|
||||||
|
{{ default (include "oai-nr-ulsim.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else -}}
|
||||||
|
{{ default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
labels:
|
||||||
|
{{- include "oai-nr-ulsim.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "oai-nr-ulsim.selectorLabels" . | nindent 6 }}
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "oai-nr-ulsim.selectorLabels" . | nindent 8 }}
|
||||||
|
spec:
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||||
|
{{- if .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: physim
|
||||||
|
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: oai-nr-ulsim
|
||||||
|
# volumeMounts:
|
||||||
|
# - mountPath: /opt/oai-nr-ulsim/certs
|
||||||
|
# name: certs
|
||||||
|
command: ["/bin/sh", "-c"]
|
||||||
|
args:
|
||||||
|
- >
|
||||||
|
export OPENAIR_DIR=/opt/oai-physim &&
|
||||||
|
cd cmake_targets/autotests &&
|
||||||
|
./run_exec_autotests.bash -g "015111" -q -np -b &&
|
||||||
|
echo "FINISHED" &&
|
||||||
|
sleep infinity
|
||||||
|
dnsPolicy: ClusterFirst
|
||||||
|
restartPolicy: Always
|
||||||
|
schedulerName: default-scheduler
|
||||||
|
serviceAccountName: {{ .Values.global.serviceAccountName }}
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
labels:
|
||||||
|
{{- include "oai-nr-ulsim.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
{{- if contains "ClusterIP" .Values.service.type }}
|
||||||
|
clusterIP: None
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- name: oai-nr-ulsim
|
||||||
|
# Port accessible outside cluster
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
# Port to forward to inside the pod
|
||||||
|
targetPort: {{ .Values.service.Port }}
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
{{- include "oai-nr-ulsim.selectorLabels" . | nindent 4 }}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
# Default values for oai-nr-ulsim.
|
||||||
|
# This is a YAML-formatted file.
|
||||||
|
# Declare variables to be passed into your templates.
|
||||||
|
|
||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
namespace: "oaicicd-ran-tmp"
|
||||||
|
|
||||||
|
image:
|
||||||
|
registry: local
|
||||||
|
repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
|
||||||
|
version: temp
|
||||||
|
# pullPolicy: IfNotPresent or Never or Always
|
||||||
|
pullPolicy: Always
|
||||||
|
|
||||||
|
imagePullSecrets: []
|
||||||
|
|
||||||
|
nameOverride: ""
|
||||||
|
fullnameOverride: ""
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
# Specifies whether a service account should be created
|
||||||
|
create: true
|
||||||
|
# Annotations to add to the service account
|
||||||
|
annotations: {}
|
||||||
|
# The name of the service account to use.
|
||||||
|
# If not set and create is true, a name is generated using the fullname template
|
||||||
|
name: "oai-nr-ulsim-sa"
|
||||||
|
|
||||||
|
podSecurityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
runAsGroup: 0
|
||||||
|
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
# capabilities:
|
||||||
|
# drop:
|
||||||
|
# - ALL
|
||||||
|
# readOnlyRootFilesystem: true
|
||||||
|
# runAsNonRoot: true
|
||||||
|
# runAsUser: 1000
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
resources: {}
|
||||||
|
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||||
|
# choice for the user. This also increases chances charts run on environments with little
|
||||||
|
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||||
|
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||||
|
# limits:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
# requests:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
affinity: {}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
name: oai-polartest
|
||||||
|
description: A Helm subchart for polartest network function
|
||||||
|
|
||||||
|
# A chart can be either an 'application' or a 'library' chart.
|
||||||
|
#
|
||||||
|
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||||
|
# to be deployed.
|
||||||
|
#
|
||||||
|
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||||
|
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||||
|
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||||
|
type: application
|
||||||
|
|
||||||
|
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
|
||||||
|
|
||||||
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
|
# to the chart and its templates, including the app version.
|
||||||
|
version: 0.1.1
|
||||||
|
|
||||||
|
# This is the version number of the application being deployed. This version number should be
|
||||||
|
# incremented each time you make changes to the application.
|
||||||
|
appVersion: v1
|
||||||
|
|
||||||
|
keywords:
|
||||||
|
- Physical Simulator
|
||||||
|
- polartest
|
||||||
|
- RAN
|
||||||
|
- 4G
|
||||||
|
|
||||||
|
sources:
|
||||||
|
- https://gitlab.eurecom.fr/oai/openairinterface5g
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- name: OPENAIRINTERFACE
|
||||||
|
email: contact@openairinterface.org
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
1. Get the application URL by running these commands:
|
||||||
|
{{- if contains "NodePort" .Values.service.type }}
|
||||||
|
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-polartest.fullname" . }})
|
||||||
|
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||||
|
echo http://$NODE_IP:$NODE_PORT
|
||||||
|
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||||
|
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||||
|
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-polartest.fullname" . }}'
|
||||||
|
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-polartest.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||||
|
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
||||||
|
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||||
|
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-polartest.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||||
|
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||||
|
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-polartest.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-polartest.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride -}}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
|
{{- if contains $name .Release.Name -}}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-polartest.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-polartest.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "oai-polartest.chart" . }}
|
||||||
|
{{ include "oai-polartest.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-polartest.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "oai-polartest.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-polartest.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create -}}
|
||||||
|
{{ default (include "oai-polartest.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else -}}
|
||||||
|
{{ default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
labels:
|
||||||
|
{{- include "oai-polartest.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "oai-polartest.selectorLabels" . | nindent 6 }}
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "oai-polartest.selectorLabels" . | nindent 8 }}
|
||||||
|
spec:
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||||
|
{{- if .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: physim
|
||||||
|
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: oai-polartest
|
||||||
|
# volumeMounts:
|
||||||
|
# - mountPath: /opt/oai-polartest/certs
|
||||||
|
# name: certs
|
||||||
|
command: ["/bin/sh", "-c"]
|
||||||
|
args:
|
||||||
|
- >
|
||||||
|
export OPENAIR_DIR=/opt/oai-physim &&
|
||||||
|
cd cmake_targets/autotests &&
|
||||||
|
./run_exec_autotests.bash -g "015103" -q -np -b &&
|
||||||
|
echo "FINISHED" &&
|
||||||
|
sleep infinity
|
||||||
|
dnsPolicy: ClusterFirst
|
||||||
|
restartPolicy: Always
|
||||||
|
schedulerName: default-scheduler
|
||||||
|
serviceAccountName: {{ .Values.global.serviceAccountName }}
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
labels:
|
||||||
|
{{- include "oai-polartest.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
{{- if contains "ClusterIP" .Values.service.type }}
|
||||||
|
clusterIP: None
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- name: oai-polartest
|
||||||
|
# Port accessible outside cluster
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
# Port to forward to inside the pod
|
||||||
|
targetPort: {{ .Values.service.Port }}
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
{{- include "oai-polartest.selectorLabels" . | nindent 4 }}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
# Default values for oai-polartest.
|
||||||
|
# This is a YAML-formatted file.
|
||||||
|
# Declare variables to be passed into your templates.
|
||||||
|
|
||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
namespace: "oaicicd-ran-tmp"
|
||||||
|
|
||||||
|
image:
|
||||||
|
registry: local
|
||||||
|
repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
|
||||||
|
version: temp
|
||||||
|
# pullPolicy: IfNotPresent or Never or Always
|
||||||
|
pullPolicy: Always
|
||||||
|
|
||||||
|
imagePullSecrets: []
|
||||||
|
|
||||||
|
nameOverride: ""
|
||||||
|
fullnameOverride: ""
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
# Specifies whether a service account should be created
|
||||||
|
create: true
|
||||||
|
# Annotations to add to the service account
|
||||||
|
annotations: {}
|
||||||
|
# The name of the service account to use.
|
||||||
|
# If not set and create is true, a name is generated using the fullname template
|
||||||
|
name: "oai-polartest-sa"
|
||||||
|
|
||||||
|
podSecurityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
runAsGroup: 0
|
||||||
|
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
# capabilities:
|
||||||
|
# drop:
|
||||||
|
# - ALL
|
||||||
|
# readOnlyRootFilesystem: true
|
||||||
|
# runAsNonRoot: true
|
||||||
|
# runAsUser: 1000
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
resources: {}
|
||||||
|
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||||
|
# choice for the user. This also increases chances charts run on environments with little
|
||||||
|
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||||
|
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||||
|
# limits:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
# requests:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
affinity: {}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
name: oai-smallblocktest
|
||||||
|
description: A Helm subchart for smallblocktest network function
|
||||||
|
|
||||||
|
# A chart can be either an 'application' or a 'library' chart.
|
||||||
|
#
|
||||||
|
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||||
|
# to be deployed.
|
||||||
|
#
|
||||||
|
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||||
|
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||||
|
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||||
|
type: application
|
||||||
|
|
||||||
|
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
|
||||||
|
|
||||||
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
|
# to the chart and its templates, including the app version.
|
||||||
|
version: 0.1.1
|
||||||
|
|
||||||
|
# This is the version number of the application being deployed. This version number should be
|
||||||
|
# incremented each time you make changes to the application.
|
||||||
|
appVersion: v1
|
||||||
|
|
||||||
|
keywords:
|
||||||
|
- Physical Simulator
|
||||||
|
- smallblocktest
|
||||||
|
- RAN
|
||||||
|
- 4G
|
||||||
|
|
||||||
|
sources:
|
||||||
|
- https://gitlab.eurecom.fr/oai/openairinterface5g
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- name: OPENAIRINTERFACE
|
||||||
|
email: contact@openairinterface.org
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
1. Get the application URL by running these commands:
|
||||||
|
{{- if contains "NodePort" .Values.service.type }}
|
||||||
|
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-smallblocktest.fullname" . }})
|
||||||
|
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||||
|
echo http://$NODE_IP:$NODE_PORT
|
||||||
|
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||||
|
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||||
|
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-smallblocktest.fullname" . }}'
|
||||||
|
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-smallblocktest.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||||
|
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
||||||
|
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||||
|
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-smallblocktest.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||||
|
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||||
|
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-smallblocktest.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-smallblocktest.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride -}}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
|
{{- if contains $name .Release.Name -}}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-smallblocktest.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-smallblocktest.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "oai-smallblocktest.chart" . }}
|
||||||
|
{{ include "oai-smallblocktest.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-smallblocktest.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "oai-smallblocktest.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-smallblocktest.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create -}}
|
||||||
|
{{ default (include "oai-smallblocktest.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else -}}
|
||||||
|
{{ default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
labels:
|
||||||
|
{{- include "oai-smallblocktest.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "oai-smallblocktest.selectorLabels" . | nindent 6 }}
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "oai-smallblocktest.selectorLabels" . | nindent 8 }}
|
||||||
|
spec:
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||||
|
{{- if .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: physim
|
||||||
|
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: oai-smallblock
|
||||||
|
# volumeMounts:
|
||||||
|
# - mountPath: /opt/oai-smallblocktest/certs
|
||||||
|
# name: certs
|
||||||
|
command: ["/bin/sh", "-c"]
|
||||||
|
args:
|
||||||
|
- >
|
||||||
|
export OPENAIR_DIR=/opt/oai-physim &&
|
||||||
|
cd cmake_targets/autotests &&
|
||||||
|
./run_exec_autotests.bash -g "015107" -q -np -b &&
|
||||||
|
echo "FINISHED" &&
|
||||||
|
sleep infinity
|
||||||
|
dnsPolicy: ClusterFirst
|
||||||
|
restartPolicy: Always
|
||||||
|
schedulerName: default-scheduler
|
||||||
|
serviceAccountName: {{ .Values.global.serviceAccountName }}
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
labels:
|
||||||
|
{{- include "oai-smallblocktest.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
{{- if contains "ClusterIP" .Values.service.type }}
|
||||||
|
clusterIP: None
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- name: oai-smallblocktest
|
||||||
|
# Port accessible outside cluster
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
# Port to forward to inside the pod
|
||||||
|
targetPort: {{ .Values.service.Port }}
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
{{- include "oai-smallblocktest.selectorLabels" . | nindent 4 }}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
# Default values for oai-smallblocktest.
|
||||||
|
# This is a YAML-formatted file.
|
||||||
|
# Declare variables to be passed into your templates.
|
||||||
|
|
||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
namespace: "oaicicd-ran-tmp"
|
||||||
|
|
||||||
|
image:
|
||||||
|
registry: local
|
||||||
|
repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
|
||||||
|
version: temp
|
||||||
|
# pullPolicy: IfNotPresent or Never or Always
|
||||||
|
pullPolicy: Always
|
||||||
|
|
||||||
|
imagePullSecrets: []
|
||||||
|
|
||||||
|
nameOverride: ""
|
||||||
|
fullnameOverride: ""
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
# Specifies whether a service account should be created
|
||||||
|
create: true
|
||||||
|
# Annotations to add to the service account
|
||||||
|
annotations: {}
|
||||||
|
# The name of the service account to use.
|
||||||
|
# If not set and create is true, a name is generated using the fullname template
|
||||||
|
name: "oai-smallblocktest-sa"
|
||||||
|
|
||||||
|
podSecurityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
runAsGroup: 0
|
||||||
|
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
# capabilities:
|
||||||
|
# drop:
|
||||||
|
# - ALL
|
||||||
|
# readOnlyRootFilesystem: true
|
||||||
|
# runAsNonRoot: true
|
||||||
|
# runAsUser: 1000
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
resources: {}
|
||||||
|
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||||
|
# choice for the user. This also increases chances charts run on environments with little
|
||||||
|
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||||
|
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||||
|
# limits:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
# requests:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
affinity: {}
|
||||||
@@ -0,0 +1,36 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
name: oai-ulsim
|
||||||
|
description: A Helm subchart for ulsim network function
|
||||||
|
|
||||||
|
# A chart can be either an 'application' or a 'library' chart.
|
||||||
|
#
|
||||||
|
# Application charts are a collection of templates that can be packaged into versioned archives
|
||||||
|
# to be deployed.
|
||||||
|
#
|
||||||
|
# Library charts provide useful utilities or functions for the chart developer. They're included as
|
||||||
|
# a dependency of application charts to inject those utilities and functions into the rendering
|
||||||
|
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
|
||||||
|
type: application
|
||||||
|
|
||||||
|
icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png
|
||||||
|
|
||||||
|
# This is the chart version. This version number should be incremented each time you make changes
|
||||||
|
# to the chart and its templates, including the app version.
|
||||||
|
version: 0.1.1
|
||||||
|
|
||||||
|
# This is the version number of the application being deployed. This version number should be
|
||||||
|
# incremented each time you make changes to the application.
|
||||||
|
appVersion: v1
|
||||||
|
|
||||||
|
keywords:
|
||||||
|
- Physical Simulator
|
||||||
|
- ulsim
|
||||||
|
- RAN
|
||||||
|
- 4G
|
||||||
|
|
||||||
|
sources:
|
||||||
|
- https://gitlab.eurecom.fr/oai/openairinterface5g
|
||||||
|
|
||||||
|
maintainers:
|
||||||
|
- name: OPENAIRINTERFACE
|
||||||
|
email: contact@openairinterface.org
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
1. Get the application URL by running these commands:
|
||||||
|
{{- if contains "NodePort" .Values.service.type }}
|
||||||
|
export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-ulsim.fullname" . }})
|
||||||
|
export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}")
|
||||||
|
echo http://$NODE_IP:$NODE_PORT
|
||||||
|
{{- else if contains "LoadBalancer" .Values.service.type }}
|
||||||
|
NOTE: It may take a few minutes for the LoadBalancer IP to be available.
|
||||||
|
You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-ulsim.fullname" . }}'
|
||||||
|
export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-ulsim.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}")
|
||||||
|
echo http://$SERVICE_IP:{{ .Values.service.port }}
|
||||||
|
{{- else if contains "ClusterIP" .Values.service.type }}
|
||||||
|
export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-ulsim.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}")
|
||||||
|
echo "Visit http://127.0.0.1:8080 to use your application"
|
||||||
|
kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80
|
||||||
|
{{- end }}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
{{/* vim: set filetype=mustache: */}}
|
||||||
|
{{/*
|
||||||
|
Expand the name of the chart.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-ulsim.name" -}}
|
||||||
|
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create a default fully qualified app name.
|
||||||
|
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||||
|
If release name contains chart name it will be used as a full name.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-ulsim.fullname" -}}
|
||||||
|
{{- if .Values.fullnameOverride -}}
|
||||||
|
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- $name := default .Chart.Name .Values.nameOverride -}}
|
||||||
|
{{- if contains $name .Release.Name -}}
|
||||||
|
{{- .Release.Name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- else -}}
|
||||||
|
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create chart name and version as used by the chart label.
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-ulsim.chart" -}}
|
||||||
|
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Common labels
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-ulsim.labels" -}}
|
||||||
|
helm.sh/chart: {{ include "oai-ulsim.chart" . }}
|
||||||
|
{{ include "oai-ulsim.selectorLabels" . }}
|
||||||
|
{{- if .Chart.AppVersion }}
|
||||||
|
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||||
|
{{- end }}
|
||||||
|
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Selector labels
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-ulsim.selectorLabels" -}}
|
||||||
|
app.kubernetes.io/name: {{ include "oai-ulsim.name" . }}
|
||||||
|
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||||
|
{{- end -}}
|
||||||
|
|
||||||
|
{{/*
|
||||||
|
Create the name of the service account to use
|
||||||
|
*/}}
|
||||||
|
{{- define "oai-ulsim.serviceAccountName" -}}
|
||||||
|
{{- if .Values.serviceAccount.create -}}
|
||||||
|
{{ default (include "oai-ulsim.fullname" .) .Values.serviceAccount.name }}
|
||||||
|
{{- else -}}
|
||||||
|
{{ default "default" .Values.serviceAccount.name }}
|
||||||
|
{{- end -}}
|
||||||
|
{{- end -}}
|
||||||
@@ -0,0 +1,49 @@
|
|||||||
|
apiVersion: apps/v1
|
||||||
|
kind: Deployment
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
labels:
|
||||||
|
{{- include "oai-ulsim.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
replicas: {{ .Values.replicaCount }}
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
{{- include "oai-ulsim.selectorLabels" . | nindent 6 }}
|
||||||
|
strategy:
|
||||||
|
type: Recreate
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
{{- include "oai-ulsim.selectorLabels" . | nindent 8 }}
|
||||||
|
spec:
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.podSecurityContext | nindent 8 }}
|
||||||
|
{{- if .Values.imagePullSecrets }}
|
||||||
|
imagePullSecrets:
|
||||||
|
{{- toYaml . | nindent 8 }}
|
||||||
|
{{- end }}
|
||||||
|
containers:
|
||||||
|
- name: physim
|
||||||
|
image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}"
|
||||||
|
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||||
|
securityContext:
|
||||||
|
{{- toYaml .Values.securityContext | nindent 12 }}
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
name: oai-ulsim
|
||||||
|
# volumeMounts:
|
||||||
|
# - mountPath: /opt/oai-ulsim/certs
|
||||||
|
# name: certs
|
||||||
|
command: ["/bin/sh", "-c"]
|
||||||
|
args:
|
||||||
|
- >
|
||||||
|
export OPENAIR_DIR=/opt/oai-physim &&
|
||||||
|
cd cmake_targets/autotests &&
|
||||||
|
./run_exec_autotests.bash -g "015101" -q -np -b &&
|
||||||
|
echo "FINISHED" &&
|
||||||
|
sleep infinity
|
||||||
|
dnsPolicy: ClusterFirst
|
||||||
|
restartPolicy: Always
|
||||||
|
schedulerName: default-scheduler
|
||||||
|
serviceAccountName: {{ .Values.global.serviceAccountName }}
|
||||||
|
terminationGracePeriodSeconds: 30
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Service
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}
|
||||||
|
labels:
|
||||||
|
{{- include "oai-ulsim.labels" . | nindent 4 }}
|
||||||
|
spec:
|
||||||
|
type: {{ .Values.service.type }}
|
||||||
|
{{- if contains "ClusterIP" .Values.service.type }}
|
||||||
|
clusterIP: None
|
||||||
|
{{- end }}
|
||||||
|
ports:
|
||||||
|
- name: oai-ulsim
|
||||||
|
# Port accessible outside cluster
|
||||||
|
port: {{ .Values.service.port }}
|
||||||
|
# Port to forward to inside the pod
|
||||||
|
targetPort: {{ .Values.service.Port }}
|
||||||
|
protocol: TCP
|
||||||
|
selector:
|
||||||
|
{{- include "oai-ulsim.selectorLabels" . | nindent 4 }}
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
# Default values for oai-ulsim.
|
||||||
|
# This is a YAML-formatted file.
|
||||||
|
# Declare variables to be passed into your templates.
|
||||||
|
|
||||||
|
replicaCount: 1
|
||||||
|
|
||||||
|
namespace: "oaicicd-ran-tmp"
|
||||||
|
|
||||||
|
image:
|
||||||
|
registry: local
|
||||||
|
repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
|
||||||
|
version: temp
|
||||||
|
# pullPolicy: IfNotPresent or Never or Always
|
||||||
|
pullPolicy: Always
|
||||||
|
|
||||||
|
imagePullSecrets: []
|
||||||
|
|
||||||
|
nameOverride: ""
|
||||||
|
fullnameOverride: ""
|
||||||
|
|
||||||
|
serviceAccount:
|
||||||
|
# Specifies whether a service account should be created
|
||||||
|
create: true
|
||||||
|
# Annotations to add to the service account
|
||||||
|
annotations: {}
|
||||||
|
# The name of the service account to use.
|
||||||
|
# If not set and create is true, a name is generated using the fullname template
|
||||||
|
name: "oai-ulsim-sa"
|
||||||
|
|
||||||
|
podSecurityContext:
|
||||||
|
runAsUser: 0
|
||||||
|
runAsGroup: 0
|
||||||
|
|
||||||
|
securityContext:
|
||||||
|
privileged: true
|
||||||
|
# capabilities:
|
||||||
|
# drop:
|
||||||
|
# - ALL
|
||||||
|
# readOnlyRootFilesystem: true
|
||||||
|
# runAsNonRoot: true
|
||||||
|
# runAsUser: 1000
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
resources: {}
|
||||||
|
# We usually recommend not to specify default resources and to leave this as a conscious
|
||||||
|
# choice for the user. This also increases chances charts run on environments with little
|
||||||
|
# resources, such as Minikube. If you do want to specify resources, uncomment the following
|
||||||
|
# lines, adjust them as necessary, and remove the curly braces after 'resources:'.
|
||||||
|
# limits:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
# requests:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 128Mi
|
||||||
|
|
||||||
|
nodeSelector: {}
|
||||||
|
|
||||||
|
tolerations: []
|
||||||
|
|
||||||
|
affinity: {}
|
||||||
@@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
||||||
|
kind: ClusterRoleBinding
|
||||||
|
metadata:
|
||||||
|
name: {{ .Chart.Name }}-{{ .Values.global.namespace }}-rbac
|
||||||
|
roleRef:
|
||||||
|
apiGroup: rbac.authorization.k8s.io
|
||||||
|
kind: ClusterRole
|
||||||
|
name: cluster-admin
|
||||||
|
subjects:
|
||||||
|
- kind: ServiceAccount
|
||||||
|
name: {{ .Values.global.serviceAccountName }}
|
||||||
|
namespace: {{ .Values.global.namespace }}
|
||||||
@@ -0,0 +1,4 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: ServiceAccount
|
||||||
|
metadata:
|
||||||
|
name: {{ .Values.global.serviceAccountName }}
|
||||||
@@ -0,0 +1,84 @@
|
|||||||
|
# Default values for oai-physim.
|
||||||
|
# This is a YAML-formatted file.
|
||||||
|
# Declare variables to be passed into your templates.
|
||||||
|
|
||||||
|
global:
|
||||||
|
serviceAccountName: oai-physim-sa
|
||||||
|
namespace: "oaicicd-ran-tmp"
|
||||||
|
image:
|
||||||
|
repository: image-registry.openshift-image-registry.svc:5000/oaicicd-ran-tmp/oai-physim
|
||||||
|
version: TAG
|
||||||
|
|
||||||
|
## Declaring values specific to coressponding physim to overwrite
|
||||||
|
|
||||||
|
dlsim:
|
||||||
|
replicaCount: 1
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
ulsim:
|
||||||
|
replicaCount: 1
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
ldpctest:
|
||||||
|
replicaCount: 1
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
polartest:
|
||||||
|
replicaCount: 1
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
nr-pbchsim:
|
||||||
|
replicaCount: 1
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
nr-dlsim:
|
||||||
|
replicaCount: 1
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
nr-dlschsim:
|
||||||
|
replicaCount: 1
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
smallblocktest:
|
||||||
|
replicaCount: 1
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
nr-ulschsim:
|
||||||
|
replicaCount: 1
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
nr-pucchsim:
|
||||||
|
replicaCount: 1
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
nr-ulsim:
|
||||||
|
replicaCount: 1
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
|
|
||||||
|
nr-prachsim:
|
||||||
|
replicaCount: 1
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
port: 80
|
||||||
@@ -27,6 +27,9 @@ def nodeExecutor = params.nodeExecutor
|
|||||||
def doMandatoryTests = false
|
def doMandatoryTests = false
|
||||||
def doFullTestsuite = false
|
def doFullTestsuite = false
|
||||||
|
|
||||||
|
//
|
||||||
|
def gitCommitAuthorEmailAddr
|
||||||
|
|
||||||
pipeline {
|
pipeline {
|
||||||
agent {
|
agent {
|
||||||
label nodeExecutor
|
label nodeExecutor
|
||||||
@@ -152,21 +155,64 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
stage ("CppCheck Analysis") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
triggerSlaveJob ('RAN-cppcheck', 'CppCheck Analysis')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
script {
|
||||||
|
finalizeSlaveJob('RAN-cppcheck')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
failure {
|
||||||
|
script {
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage ("Image Test Processes") {
|
||||||
|
parallel {
|
||||||
|
stage ("Physical Simulators") {
|
||||||
|
when { expression {doMandatoryTests} }
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
triggerSlaveJob ('RAN-PhySim-Cluster', 'Test-Physim-Cluster')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
script {
|
||||||
|
finalizeSlaveJob('RAN-PhySim-Cluster')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
failure {
|
||||||
|
script {
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
post {
|
post {
|
||||||
always {
|
always {
|
||||||
script {
|
script {
|
||||||
|
def eSubject = JOB_NAME + ' - Build # ' + BUILD_ID + ' - ' + currentBuild.result + '!'
|
||||||
|
def eBody = "Hi,\n\n"
|
||||||
|
eBody += "Here are attached HTML report files for " + JOB_NAME + " - Build # " + BUILD_ID + " - " + currentBuild.result + "!\n\n"
|
||||||
|
eBody += "Regards,\n"
|
||||||
|
eBody += "OAI CI Team"
|
||||||
emailext attachmentsPattern: '*results*.html',
|
emailext attachmentsPattern: '*results*.html',
|
||||||
body: '''Hi,
|
body: eBody,
|
||||||
|
|
||||||
Here are attached HTML report files for $PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!
|
|
||||||
|
|
||||||
Regards,
|
|
||||||
OAI CI Team''',
|
|
||||||
replyTo: 'no-reply@openairinterface.org',
|
replyTo: 'no-reply@openairinterface.org',
|
||||||
subject: '$PROJECT_NAME - Build # $BUILD_NUMBER - $BUILD_STATUS!',
|
subject: eSubject,
|
||||||
to: gitCommitAuthorEmailAddr
|
to: gitCommitAuthorEmailAddr
|
||||||
|
|
||||||
if (fileExists('.git/CI_COMMIT_MSG')) {
|
if (fileExists('.git/CI_COMMIT_MSG')) {
|
||||||
|
|||||||
@@ -0,0 +1,45 @@
|
|||||||
|
#!/bin/groovy
|
||||||
|
/*
|
||||||
|
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
* the OAI Public License, Version 1.1 (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.openairinterface.org/?page_id=698
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*-------------------------------------------------------------------------------
|
||||||
|
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
* contact@openairinterface.org
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Template Jenkins Declarative Pipeline script to run Test w/ RF HW
|
||||||
|
|
||||||
|
// Location of the python executor node shall be in the same subnet as the others servers
|
||||||
|
def pythonExecutor = params.pythonExecutor
|
||||||
|
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label pythonExecutor
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage ("gDashboard") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
//retrieve MR data from gitlab and export to gSheet
|
||||||
|
sh returnStdout: true, script: 'python3 ci-scripts/ran_dashboard.py'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -196,16 +196,6 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage ("Start VM -- phy-sim") {
|
|
||||||
steps {
|
|
||||||
lock (vmResource) {
|
|
||||||
timeout (time: 5, unit: 'MINUTES') {
|
|
||||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage ("Start VM -- enb-ethernet") {
|
stage ("Start VM -- enb-ethernet") {
|
||||||
steps {
|
steps {
|
||||||
lock (vmResource) {
|
lock (vmResource) {
|
||||||
@@ -224,33 +214,14 @@ pipeline {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
stage ("Start VM -- cppcheck") {
|
|
||||||
steps {
|
|
||||||
lock (vmResource) {
|
|
||||||
timeout (time: 7, unit: 'MINUTES') {
|
|
||||||
sh "./ci-scripts/oai-ci-vm-tool build --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID} --daemon"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
stage ("Variant Builds") {
|
stage ("Variant Builds") {
|
||||||
parallel {
|
parallel {
|
||||||
stage ("Analysis with cppcheck") {
|
|
||||||
steps {
|
|
||||||
gitlabCommitStatus(name: "Analysis with cppcheck") {
|
|
||||||
timeout (time: 30, unit: 'MINUTES') {
|
|
||||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant cppcheck --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage ("Build basic simulator") {
|
stage ("Build basic simulator") {
|
||||||
steps {
|
steps {
|
||||||
gitlabCommitStatus(name: "Build basic-sim") {
|
gitlabCommitStatus(name: "Build basic-sim") {
|
||||||
timeout (time: 30, unit: 'MINUTES') {
|
timeout (time: 45, unit: 'MINUTES') {
|
||||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant basic-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -259,7 +230,7 @@ pipeline {
|
|||||||
stage ("Build 5G gNB-USRP") {
|
stage ("Build 5G gNB-USRP") {
|
||||||
steps {
|
steps {
|
||||||
gitlabCommitStatus(name: "Build gNB-USRP") {
|
gitlabCommitStatus(name: "Build gNB-USRP") {
|
||||||
timeout (time: 30, unit: 'MINUTES') {
|
timeout (time: 45, unit: 'MINUTES') {
|
||||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant gnb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant gnb-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -268,25 +239,16 @@ pipeline {
|
|||||||
stage ("Build 5G NR-UE-USRP") {
|
stage ("Build 5G NR-UE-USRP") {
|
||||||
steps {
|
steps {
|
||||||
gitlabCommitStatus(name: "Build nr-UE-USRP") {
|
gitlabCommitStatus(name: "Build nr-UE-USRP") {
|
||||||
timeout (time: 30, unit: 'MINUTES') {
|
timeout (time: 45, unit: 'MINUTES') {
|
||||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant nr-ue-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant nr-ue-usrp --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
stage ("Build physical simulators") {
|
|
||||||
steps {
|
|
||||||
gitlabCommitStatus(name: "Build phy-sim") {
|
|
||||||
timeout (time: 30, unit: 'MINUTES') {
|
|
||||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage ("Build eNB-ethernet") {
|
stage ("Build eNB-ethernet") {
|
||||||
steps {
|
steps {
|
||||||
gitlabCommitStatus(name: "Build eNB-ethernet") {
|
gitlabCommitStatus(name: "Build eNB-ethernet") {
|
||||||
timeout (time: 30, unit: 'MINUTES') {
|
timeout (time: 45, unit: 'MINUTES') {
|
||||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant enb-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -297,7 +259,7 @@ pipeline {
|
|||||||
// This is typically the last one to finish.
|
// This is typically the last one to finish.
|
||||||
lock (vmResource) {
|
lock (vmResource) {
|
||||||
gitlabCommitStatus(name: "Build UE-ethernet") {
|
gitlabCommitStatus(name: "Build UE-ethernet") {
|
||||||
timeout (time: 30, unit: 'MINUTES') {
|
timeout (time: 45, unit: 'MINUTES') {
|
||||||
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
sh "./ci-scripts/oai-ci-vm-tool wait --workspace $WORKSPACE --variant ue-ethernet --job-name ${JOB_NAME} --build-id ${BUILD_ID} --keep-vm-alive"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -315,9 +277,9 @@ pipeline {
|
|||||||
script {
|
script {
|
||||||
dir ('archives') {
|
dir ('archives') {
|
||||||
if (fileExists('red_hat')) {
|
if (fileExists('red_hat')) {
|
||||||
sh "zip -r -qq vm_build_logs.zip basic_sim enb_usrp phy_sim cppcheck enb_eth ue_eth gnb_usrp nr_ue_usrp red_hat"
|
sh "zip -r -qq vm_build_logs.zip basic_sim enb_eth ue_eth gnb_usrp nr_ue_usrp red_hat"
|
||||||
} else {
|
} else {
|
||||||
sh "zip -r -qq vm_build_logs.zip basic_sim enb_usrp phy_sim cppcheck enb_eth ue_eth gnb_usrp nr_ue_usrp"
|
sh "zip -r -qq vm_build_logs.zip basic_sim enb_eth ue_eth gnb_usrp nr_ue_usrp"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if(fileExists('archives/vm_build_logs.zip')) {
|
if(fileExists('archives/vm_build_logs.zip')) {
|
||||||
@@ -325,16 +287,6 @@ pipeline {
|
|||||||
}
|
}
|
||||||
if ("MERGE".equals(env.gitlabActionType)) {
|
if ("MERGE".equals(env.gitlabActionType)) {
|
||||||
sh "./ci-scripts/oai-ci-vm-tool report-build --workspace $WORKSPACE --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger merge-request --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
|
sh "./ci-scripts/oai-ci-vm-tool report-build --workspace $WORKSPACE --git-url ${GIT_URL} --job-name ${JOB_NAME} --build-id ${BUILD_ID} --trigger merge-request --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}"
|
||||||
// If the merge request has introduced more CPPCHECK errors or warnings, notifications in GitLab
|
|
||||||
if (fileExists('oai_cppcheck_added_errors.txt')) {
|
|
||||||
def ret=readFile('./oai_cppcheck_added_errors.txt').trim();
|
|
||||||
if ("0".equals(ret)) {
|
|
||||||
echo "No added cppcheck warnings/errors in this merge request"
|
|
||||||
} else {
|
|
||||||
def message = "OAI " + JOB_NAME + " build (" + BUILD_ID + "): Some modified files in Merge Request MAY have INTRODUCED up to " + ret + " CPPCHECK errors/warnings"
|
|
||||||
addGitLabMRComment comment: message
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// If the merge request has introduced compilation warnings, notifications in GitLab
|
// If the merge request has introduced compilation warnings, notifications in GitLab
|
||||||
sh "./ci-scripts/checkAddedWarnings.sh --src-branch ${env.gitlabSourceBranch} --target-branch ${env.gitlabTargetBranch}"
|
sh "./ci-scripts/checkAddedWarnings.sh --src-branch ${env.gitlabSourceBranch} --target-branch ${env.gitlabTargetBranch}"
|
||||||
def res=readFile('./oai_warning_files.txt').trim();
|
def res=readFile('./oai_warning_files.txt').trim();
|
||||||
@@ -361,26 +313,6 @@ pipeline {
|
|||||||
parallel {
|
parallel {
|
||||||
stage ("VM-based tests") {
|
stage ("VM-based tests") {
|
||||||
stages {
|
stages {
|
||||||
stage ("Test physical simulators") {
|
|
||||||
when {
|
|
||||||
expression {doMandatoryTests}
|
|
||||||
}
|
|
||||||
steps {
|
|
||||||
lock (vmResource) {
|
|
||||||
script {
|
|
||||||
timeout (time: 90, unit: 'MINUTES') {
|
|
||||||
try {
|
|
||||||
gitlabCommitStatus(name: "Test phy-sim") {
|
|
||||||
sh "./ci-scripts/oai-ci-vm-tool test --workspace $WORKSPACE --variant phy-sim --job-name ${JOB_NAME} --build-id ${BUILD_ID}"
|
|
||||||
}
|
|
||||||
} catch (Exception e) {
|
|
||||||
currentBuild.result = 'FAILURE'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
stage ("Build Flexran Controller") {
|
stage ("Build Flexran Controller") {
|
||||||
when {
|
when {
|
||||||
expression {doFlexranCtrlTest && doMandatoryTests}
|
expression {doFlexranCtrlTest && doMandatoryTests}
|
||||||
@@ -745,7 +677,7 @@ pipeline {
|
|||||||
script {
|
script {
|
||||||
if (doMandatoryTests) {
|
if (doMandatoryTests) {
|
||||||
dir ('archives') {
|
dir ('archives') {
|
||||||
sh "if [ -d basic_sim/test ] || [ -d phy_sim/test ] || [ -d l2_sim/test ]; then zip -r -qq vm_tests_logs.zip */test ; fi"
|
sh "if [ -d basic_sim/test ] || [ -d rf_sim/test ] || [ -d l2_sim/test ]; then zip -r -qq vm_tests_logs.zip */test ; fi"
|
||||||
}
|
}
|
||||||
if(fileExists('archives/vm_tests_logs.zip')) {
|
if(fileExists('archives/vm_tests_logs.zip')) {
|
||||||
archiveArtifacts artifacts: 'archives/vm_tests_logs.zip'
|
archiveArtifacts artifacts: 'archives/vm_tests_logs.zip'
|
||||||
|
|||||||
@@ -0,0 +1,233 @@
|
|||||||
|
#!/bin/groovy
|
||||||
|
/*
|
||||||
|
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
* the OAI Public License, Version 1.1 (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.openairinterface.org/?page_id=698
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*-------------------------------------------------------------------------------
|
||||||
|
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
* contact@openairinterface.org
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Location of the executor node
|
||||||
|
def pythonExecutor = params.pythonExecutor
|
||||||
|
|
||||||
|
// Location of the test XML file to be run
|
||||||
|
def testXMLFile = params.pythonTestXmlFile
|
||||||
|
def mainPythonAllXmlFiles = ""
|
||||||
|
def buildStageStatus = true
|
||||||
|
|
||||||
|
// Name of the test stage
|
||||||
|
def testStageName = params.pipelineTestStageName
|
||||||
|
|
||||||
|
// Name of the resource
|
||||||
|
def ciEpcResource = params.epcResource
|
||||||
|
|
||||||
|
// Global Parameters. Normally they should be populated when the master job
|
||||||
|
// triggers the slave job with parameters
|
||||||
|
def eNB_Repository
|
||||||
|
def eNB_Branch
|
||||||
|
def eNB_CommitID
|
||||||
|
def eNB_AllowMergeRequestProcess = false
|
||||||
|
def eNB_TargetBranch
|
||||||
|
|
||||||
|
// Flags
|
||||||
|
def scmEvent = false
|
||||||
|
def upstreamEvent = false
|
||||||
|
|
||||||
|
//-------------------------------------------------------------------------------
|
||||||
|
// Pipeline start
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label pythonExecutor
|
||||||
|
}
|
||||||
|
options {
|
||||||
|
disableConcurrentBuilds()
|
||||||
|
timestamps()
|
||||||
|
ansiColor('xterm')
|
||||||
|
lock(ciEpcResource)
|
||||||
|
}
|
||||||
|
|
||||||
|
stages {
|
||||||
|
stage ('Verify Parameters') {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
|
||||||
|
|
||||||
|
JOB_TIMESTAMP = sh returnStdout: true, script: 'date --utc --rfc-3339=seconds | sed -e "s#+00:00##"'
|
||||||
|
JOB_TIMESTAMP = JOB_TIMESTAMP.trim()
|
||||||
|
|
||||||
|
def allParametersPresent = true
|
||||||
|
|
||||||
|
// It is already to late to check it
|
||||||
|
if (params.pythonExecutor != null) {
|
||||||
|
echo "eNB CI executor node : ${pythonExecutor}"
|
||||||
|
}
|
||||||
|
// If not present picking a default Stage Name
|
||||||
|
if (params.pipelineTestStageName == null) {
|
||||||
|
// picking default
|
||||||
|
testStageName = 'Template Test Stage'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.smartphonesResource == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.eNB_IPAddress == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.eNB_SourceCodePath == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.eNB_Credentials == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
// the following 4 parameters should be pushed by the master trigger
|
||||||
|
// if not present, take the job GIT variables (used for developing)
|
||||||
|
if (params.eNB_Repository == null) {
|
||||||
|
eNB_Repository = env.GIT_URL
|
||||||
|
} else {
|
||||||
|
eNB_Repository = params.eNB_Repository
|
||||||
|
}
|
||||||
|
echo "eNB_Repository : ${eNB_Repository}"
|
||||||
|
if (params.eNB_Branch == null) {
|
||||||
|
eNB_Branch = env.GIT_BRANCH
|
||||||
|
} else {
|
||||||
|
eNB_Branch = params.eNB_Branch
|
||||||
|
}
|
||||||
|
echo "eNB_Branch : ${eNB_Branch}"
|
||||||
|
if (params.eNB_CommitID == null) {
|
||||||
|
eNB_CommitID = env.GIT_COMMIT
|
||||||
|
} else {
|
||||||
|
eNB_CommitID = params.eNB_CommitID
|
||||||
|
}
|
||||||
|
echo "eNB_CommitID : ${eNB_CommitID}"
|
||||||
|
if (params.eNB_mergeRequest != null) {
|
||||||
|
eNB_AllowMergeRequestProcess = params.eNB_mergeRequest
|
||||||
|
if (eNB_AllowMergeRequestProcess) {
|
||||||
|
if (params.eNB_TargetBranch != null) {
|
||||||
|
eNB_TargetBranch = params.eNB_TargetBranch
|
||||||
|
} else {
|
||||||
|
eNB_TargetBranch = 'develop'
|
||||||
|
}
|
||||||
|
echo "eNB_TargetBranch : ${eNB_TargetBranch}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.EPC_IPAddress == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.EPC_Type == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.EPC_SourceCodePath == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.EPC_Credentials == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.ADB_IPAddress == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.ADB_Credentials == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.OC_Credentials == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.OC_ProjectName == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (allParametersPresent) {
|
||||||
|
echo "All parameters are present"
|
||||||
|
if (eNB_AllowMergeRequestProcess) {
|
||||||
|
sh "git fetch"
|
||||||
|
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
|
||||||
|
} else {
|
||||||
|
sh "git fetch"
|
||||||
|
sh "git checkout -f ${eNB_CommitID}"
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo "Some parameters are missing"
|
||||||
|
sh "./ci-scripts/fail.sh"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
stage ("Deploy and Test") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
dir ('ci-scripts') {
|
||||||
|
echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
|
||||||
|
// If not present picking a default XML file
|
||||||
|
if (params.pythonTestXmlFile == null) {
|
||||||
|
// picking default
|
||||||
|
testXMLFile = 'xml_files/enb_usrpB210_band7_50PRB.xml'
|
||||||
|
echo "Test XML file(default): ${testXMLFile}"
|
||||||
|
mainPythonAllXmlFiles += "--XMLTestFile=" + testXMLFile + " "
|
||||||
|
} else {
|
||||||
|
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||||
|
for (xmlFile in myXmlTestSuite) {
|
||||||
|
if (fileExists(xmlFile)) {
|
||||||
|
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
|
||||||
|
echo "Test XML file : ${xmlFile}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
withCredentials([
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password'],
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.OC_Credentials}", usernameVariable: 'OC_Username', passwordVariable: 'OC_Password']
|
||||||
|
]) {
|
||||||
|
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} ${mainPythonAllXmlFiles}"
|
||||||
|
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||||
|
for (xmlFile in myXmlTestSuite) {
|
||||||
|
if (fileExists(xmlFile)) {
|
||||||
|
try {
|
||||||
|
sh "python3 main.py --mode=TesteNB --eNBIPAddress=${params.eNB_IPAddress} --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName}"
|
||||||
|
} catch (Exception e) {
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
buildStageStatus = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage ("Log Collection") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
dir ('ci-scripts') {
|
||||||
|
// Zipping all archived log files
|
||||||
|
sh "zip -r -qq physim_deploytest_logs_${env.BUILD_ID}.zip physim_test_logs_*/*"
|
||||||
|
sh "rm -rf physim_test_logs_*/"
|
||||||
|
if (fileExists("physim_deploytest_logs_${env.BUILD_ID}.zip")) {
|
||||||
|
archiveArtifacts artifacts: "physim_deploytest_logs_${env.BUILD_ID}.zip"
|
||||||
|
}
|
||||||
|
if (fileExists("test_results.html")) {
|
||||||
|
sh "mv test_results.html test_results-${env.JOB_NAME}.html"
|
||||||
|
sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' -e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: <a href=\"${BUILD_URL}\">${BUILD_ID}</a>#' -e 's#TEMPLATE_STAGE_NAME#${testStageName}#' test_results-${JOB_NAME}.html"
|
||||||
|
archiveArtifacts artifacts: "test_results-${env.JOB_NAME}.html"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,304 @@
|
|||||||
|
#!/bin/groovy
|
||||||
|
/*
|
||||||
|
* Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
* contributor license agreements. See the NOTICE file distributed with
|
||||||
|
* this work for additional information regarding copyright ownership.
|
||||||
|
* The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
* the OAI Public License, Version 1.1 (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.openairinterface.org/?page_id=698
|
||||||
|
*
|
||||||
|
* 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.
|
||||||
|
*-------------------------------------------------------------------------------
|
||||||
|
* For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
* contact@openairinterface.org
|
||||||
|
*/
|
||||||
|
|
||||||
|
// Template Jenkins Declarative Pipeline script to run Test w/ RF HW
|
||||||
|
|
||||||
|
// Location of the python executor node shall be in the same subnet as the others servers
|
||||||
|
def pythonExecutor = params.pythonExecutor
|
||||||
|
|
||||||
|
// Location of the test XML file to be run
|
||||||
|
def testXMLFile = params.pythonTestXmlFile
|
||||||
|
def mainPythonAllXmlFiles = ""
|
||||||
|
def buildStageStatus = true
|
||||||
|
|
||||||
|
// Name of the test stage
|
||||||
|
def testStageName = params.pipelineTestStageName
|
||||||
|
|
||||||
|
// Name of the phone resource
|
||||||
|
def ciSmartPhonesResource1 = params.SmartPhonesResource1
|
||||||
|
def ciSmartPhonesResource2 = params.SmartPhonesResource2
|
||||||
|
|
||||||
|
// Global Parameters. Populated when the master job
|
||||||
|
// triggers the slave job with parameters
|
||||||
|
def eNB_Repository = "https://gitlab.eurecom.fr/oai/openairinterface5g.git"
|
||||||
|
def eNB_Branch = "develop"
|
||||||
|
def eNB_CommitID
|
||||||
|
def eNB_AllowMergeRequestProcess = false
|
||||||
|
def eNB_TargetBranch = "develop"
|
||||||
|
def eNB_MR = "develop"
|
||||||
|
|
||||||
|
pipeline {
|
||||||
|
agent {
|
||||||
|
label pythonExecutor
|
||||||
|
}
|
||||||
|
options {
|
||||||
|
disableConcurrentBuilds()
|
||||||
|
ansiColor('xterm')
|
||||||
|
lock(extra: [[resource: ciSmartPhonesResource2]], resource: ciSmartPhonesResource1)
|
||||||
|
}
|
||||||
|
stages {
|
||||||
|
stage("Build Init") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
//retrieve latest commit ID from branch
|
||||||
|
latest_commit_from_branch= sh returnStdout: true, script: 'git log -1 origin/${eNB_Branch} | grep commit'
|
||||||
|
echo "Branch ${eNB_Branch}"
|
||||||
|
echo "${latest_commit_from_branch}"
|
||||||
|
tmp=latest_commit_from_branch.split()
|
||||||
|
echo "${tmp}"
|
||||||
|
eNB_CommitID = tmp[1]
|
||||||
|
echo "eNB_CommitID ${eNB_CommitID}"
|
||||||
|
// update the build name and description
|
||||||
|
buildName "${params.eNB_MR}"
|
||||||
|
buildDescription "Commit : ${eNB_CommitID}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage ("Verify Parameters") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
echo '\u2705 \u001B[32mVerify Parameters\u001B[0m'
|
||||||
|
def allParametersPresent = true
|
||||||
|
|
||||||
|
// It is already to late to check it
|
||||||
|
if (params.pythonExecutor != null) {
|
||||||
|
echo "eNB CI executor node : ${pythonExecutor}"
|
||||||
|
}
|
||||||
|
// If not present picking a default Stage Name
|
||||||
|
if (params.pipelineTestStageName == null) {
|
||||||
|
// picking default
|
||||||
|
testStageName = 'Template Test Stage'
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.SmartPhonesResource1 == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.SmartPhonesResource2 == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
// 1st eNB parameters
|
||||||
|
if (params.eNB_IPAddress == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.eNB_SourceCodePath == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.eNB_Credentials == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
// 2nd eNB parameters
|
||||||
|
if (params.eNB1_IPAddress == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.eNB1_SourceCodePath == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.eNB1_Credentials == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
// 3rd eNB parameters
|
||||||
|
if (params.eNB2_IPAddress == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.eNB2_SourceCodePath == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.eNB2_Credentials == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
// the following 4 parameters should be pushed by the master trigger
|
||||||
|
// if not present, take the job GIT variables (used for developing)
|
||||||
|
if (params.eNB_Repository == null) {
|
||||||
|
eNB_Repository = env.GIT_URL
|
||||||
|
} else {
|
||||||
|
eNB_Repository = params.eNB_Repository
|
||||||
|
}
|
||||||
|
echo "eNB_Repository : ${eNB_Repository}"
|
||||||
|
if (params.eNB_Branch == null) {
|
||||||
|
eNB_Branch = env.GIT_BRANCH
|
||||||
|
} else {
|
||||||
|
eNB_Branch = params.eNB_Branch
|
||||||
|
}
|
||||||
|
echo "eNB_Branch : ${eNB_Branch}"
|
||||||
|
//if (params.eNB_CommitID == null) {
|
||||||
|
// eNB_CommitID = env.GIT_COMMIT
|
||||||
|
//} else {
|
||||||
|
// eNB_CommitID = params.eNB_CommitID
|
||||||
|
//}
|
||||||
|
echo "eNB_CommitID : ${eNB_CommitID}"
|
||||||
|
if (params.eNB_AllowMergeRequestProcess!= null) {
|
||||||
|
eNB_AllowMergeRequestProcess = params.eNB_AllowMergeRequestProcess
|
||||||
|
if (eNB_AllowMergeRequestProcess) {
|
||||||
|
if (params.eNB_TargetBranch != null) {
|
||||||
|
eNB_TargetBranch = params.eNB_TargetBranch
|
||||||
|
} else {
|
||||||
|
eNB_TargetBranch = 'develop'
|
||||||
|
}
|
||||||
|
echo "eNB_TargetBranch : ${eNB_TargetBranch}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.EPC_IPAddress == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.EPC_Type == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.EPC_SourceCodePath == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.EPC_Credentials == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
|
||||||
|
if (params.ADB_IPAddress == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
if (params.ADB_Credentials == null) {
|
||||||
|
allParametersPresent = false
|
||||||
|
}
|
||||||
|
|
||||||
|
if (allParametersPresent) {
|
||||||
|
echo "All parameters are present"
|
||||||
|
if (eNB_AllowMergeRequestProcess) {
|
||||||
|
sh "git fetch"
|
||||||
|
sh "./ci-scripts/doGitLabMerge.sh --src-branch ${eNB_Branch} --src-commit ${eNB_CommitID} --target-branch ${eNB_TargetBranch} --target-commit latest"
|
||||||
|
} else {
|
||||||
|
sh "git fetch"
|
||||||
|
sh "git checkout -f ${eNB_CommitID}"
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
echo "Some parameters are missing"
|
||||||
|
sh "./ci-scripts/fail.sh"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage ("Build and Test") {
|
||||||
|
steps {
|
||||||
|
script {
|
||||||
|
dir ('ci-scripts') {
|
||||||
|
echo "\u2705 \u001B[32m${testStageName}\u001B[0m"
|
||||||
|
// If not present picking a default XML file
|
||||||
|
if (params.pythonTestXmlFile == null) {
|
||||||
|
// picking default
|
||||||
|
testXMLFile = 'xml_files/enb_usrpB210_band7_50PRB.xml'
|
||||||
|
echo "Test XML file(default): ${testXMLFile}"
|
||||||
|
mainPythonAllXmlFiles += "--XMLTestFile=" + testXMLFile + " "
|
||||||
|
} else {
|
||||||
|
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||||
|
for (xmlFile in myXmlTestSuite) {
|
||||||
|
if (fileExists(xmlFile)) {
|
||||||
|
mainPythonAllXmlFiles += "--XMLTestFile=" + xmlFile + " "
|
||||||
|
echo "Test XML file : ${xmlFile}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
withCredentials([
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password'],
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB1_Credentials}", usernameVariable: 'eNB1_Username', passwordVariable: 'eNB1_Password'],
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB2_Credentials}", usernameVariable: 'eNB2_Username', passwordVariable: 'eNB2_Password'],
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.EPC_Credentials}", usernameVariable: 'EPC_Username', passwordVariable: 'EPC_Password'],
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.ADB_Credentials}", usernameVariable: 'ADB_Username', passwordVariable: 'ADB_Password']
|
||||||
|
]) {
|
||||||
|
sh "python3 main.py --mode=InitiateHtml --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} ${mainPythonAllXmlFiles}"
|
||||||
|
String[] myXmlTestSuite = testXMLFile.split("\\r?\\n")
|
||||||
|
for (xmlFile in myXmlTestSuite) {
|
||||||
|
if (fileExists(xmlFile)) {
|
||||||
|
try {
|
||||||
|
sh "python3 main.py --mode=TesteNB --ranRepository=${eNB_Repository} --ranBranch=${eNB_Branch} --ranCommitID=${eNB_CommitID} --ranAllowMerge=${eNB_AllowMergeRequestProcess} --ranTargetBranch=${eNB_TargetBranch} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath} --eNB1IPAddress=${params.eNB1_IPAddress} --eNB1UserName=${eNB1_Username} --eNB1Password=${eNB1_Password} --eNB1SourceCodePath=${params.eNB1_SourceCodePath} --eNB2IPAddress=${params.eNB2_IPAddress} --eNB2UserName=${eNB2_Username} --eNB2Password=${eNB2_Password} --eNB2SourceCodePath=${params.eNB2_SourceCodePath} --EPCIPAddress=${params.EPC_IPAddress} --EPCType=${params.EPC_Type} --EPCUserName=${EPC_Username} --EPCPassword=${EPC_Password} --EPCSourceCodePath=${params.EPC_SourceCodePath} --ADBIPAddress=${params.ADB_IPAddress} --ADBUserName=${ADB_Username} --ADBPassword=${ADB_Password} --XMLTestFile=${xmlFile}"
|
||||||
|
} catch (Exception e) {
|
||||||
|
currentBuild.result = 'FAILURE'
|
||||||
|
buildStageStatus = false
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
sh "python3 main.py --mode=FinalizeHtml --finalStatus=${buildStageStatus} --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password}"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Log Collection') {
|
||||||
|
parallel {
|
||||||
|
stage('Log Collection (eNB - Build)') {
|
||||||
|
steps {
|
||||||
|
withCredentials([
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
|
||||||
|
]) {
|
||||||
|
echo '\u2705 \u001B[32mLog Collection (eNB - Build)\u001B[0m'
|
||||||
|
sh "python3 ci-scripts/main.py --mode=LogCollectBuild --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}"
|
||||||
|
|
||||||
|
echo '\u2705 \u001B[32mLog Transfer (eNB - Build)\u001B[0m'
|
||||||
|
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/build.log.zip ./build.log.${env.BUILD_ID}.zip || true"
|
||||||
|
}
|
||||||
|
script {
|
||||||
|
if(fileExists("build.log.${env.BUILD_ID}.zip")) {
|
||||||
|
archiveArtifacts "build.log.${env.BUILD_ID}.zip"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Log Collection (eNB - Run)') {
|
||||||
|
steps {
|
||||||
|
withCredentials([
|
||||||
|
[$class: 'UsernamePasswordMultiBinding', credentialsId: "${params.eNB_Credentials}", usernameVariable: 'eNB_Username', passwordVariable: 'eNB_Password']
|
||||||
|
]) {
|
||||||
|
echo '\u2705 \u001B[32mLog Collection (eNB - Run)\u001B[0m'
|
||||||
|
sh "python3 ci-scripts/main.py --mode=LogCollecteNB --eNBIPAddress=${params.eNB_IPAddress} --eNBUserName=${eNB_Username} --eNBPassword=${eNB_Password} --eNBSourceCodePath=${params.eNB_SourceCodePath}"
|
||||||
|
|
||||||
|
echo '\u2705 \u001B[32mLog Transfer (eNB - Run)\u001B[0m'
|
||||||
|
sh "sshpass -p \'${eNB_Password}\' scp -o 'StrictHostKeyChecking no' -o 'ConnectTimeout 10' ${eNB_Username}@${params.eNB_IPAddress}:${eNB_SourceCodePath}/cmake_targets/enb.log.zip ./enb.log.${env.BUILD_ID}.zip || true"
|
||||||
|
}
|
||||||
|
script {
|
||||||
|
if(fileExists("enb.log.${env.BUILD_ID}.zip")) {
|
||||||
|
archiveArtifacts "enb.log.${env.BUILD_ID}.zip"
|
||||||
|
}
|
||||||
|
if(fileExists("ci-scripts/test_results.html")) {
|
||||||
|
sh "mv ci-scripts/test_results.html test_results-${JOB_NAME}.html"
|
||||||
|
sh "sed -i -e 's#TEMPLATE_JOB_NAME#${JOB_NAME}#' -e 's@build #TEMPLATE_BUILD_ID@build #${BUILD_ID}@' -e 's#Build-ID: TEMPLATE_BUILD_ID#Build-ID: <a href=\"${BUILD_URL}\">${BUILD_ID}</a>#' -e 's#TEMPLATE_STAGE_NAME#${testStageName}#' test_results-${JOB_NAME}.html"
|
||||||
|
archiveArtifacts "test_results-${JOB_NAME}.html"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
script {
|
||||||
|
if (params.pipelineZipsConsoleLog != null) {
|
||||||
|
if (params.pipelineZipsConsoleLog) {
|
||||||
|
echo "Archiving Jenkins console log"
|
||||||
|
sh "wget --no-check-certificate --no-proxy ${env.JENKINS_URL}/job/${env.JOB_NAME}/${env.BUILD_ID}/consoleText -O consoleText.log || true"
|
||||||
|
sh "zip -m consoleText.log.${env.BUILD_ID}.zip consoleText.log || true"
|
||||||
|
if(fileExists("consoleText.log.${env.BUILD_ID}.zip")) {
|
||||||
|
archiveArtifacts "consoleText.log.${env.BUILD_ID}.zip"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -37,7 +37,7 @@ pipeline {
|
|||||||
steps {
|
steps {
|
||||||
script {
|
script {
|
||||||
//retrieve MR that are opened nd with tag READY_TO_BE_MERGED
|
//retrieve MR that are opened nd with tag READY_TO_BE_MERGED
|
||||||
MR_LIST= sh returnStdout: true, script: 'curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests?state=opened&per_page=100&labels=READY_TO_BE_MERGED" | jq ".[].iid" || true '
|
MR_LIST= sh returnStdout: true, script: 'curl --silent "https://gitlab.eurecom.fr/api/v4/projects/oai%2Fopenairinterface5g/merge_requests?state=opened&per_page=100&labels=NSA" | jq ".[].iid" || true '
|
||||||
echo "List of selected MR:\n${MR_LIST}"
|
echo "List of selected MR:\n${MR_LIST}"
|
||||||
def MR_ARRAY = MR_LIST.split('\n')
|
def MR_ARRAY = MR_LIST.split('\n')
|
||||||
//for every selected MR, retrieve the branch name and the latest commit
|
//for every selected MR, retrieve the branch name and the latest commit
|
||||||
@@ -48,7 +48,7 @@ pipeline {
|
|||||||
COMMIT_ID=COMMIT_ID.trim()
|
COMMIT_ID=COMMIT_ID.trim()
|
||||||
echo "Testing NSA on : ${MR} ${SRC_BRANCH} ${COMMIT_ID}"
|
echo "Testing NSA on : ${MR} ${SRC_BRANCH} ${COMMIT_ID}"
|
||||||
//calling NSA sub job
|
//calling NSA sub job
|
||||||
build job: "RAN-CI-NSA-B210", wait : false, propagate : false, parameters: [
|
build job: "RAN-CI-NSA-B210-N310-ModuleUE", wait : false, propagate : false, parameters: [
|
||||||
string(name: 'eNB_MR', value: String.valueOf(MR)),
|
string(name: 'eNB_MR', value: String.valueOf(MR)),
|
||||||
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
|
string(name: 'eNB_Branch', value: String.valueOf(SRC_BRANCH)),
|
||||||
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
|
string(name: 'eNB_CommitID', value: String.valueOf(COMMIT_ID)),
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ import constants as CONST
|
|||||||
#-----------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP):
|
def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM):
|
||||||
|
|
||||||
|
|
||||||
py_param_file_present = False
|
py_param_file_present = False
|
||||||
@@ -80,6 +80,8 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP):
|
|||||||
HTML.ranRepository=matchReg.group(1)
|
HTML.ranRepository=matchReg.group(1)
|
||||||
ldpc.ranRepository=matchReg.group(1)
|
ldpc.ranRepository=matchReg.group(1)
|
||||||
CONTAINERS.ranRepository=matchReg.group(1)
|
CONTAINERS.ranRepository=matchReg.group(1)
|
||||||
|
SCA.ranRepository=matchReg.group(1)
|
||||||
|
PHYSIM.ranRepository=matchReg.group(1)
|
||||||
elif re.match('^\-\-eNB_AllowMerge=(.+)$|^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE):
|
elif re.match('^\-\-eNB_AllowMerge=(.+)$|^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE):
|
||||||
if re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE):
|
if re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE):
|
||||||
matchReg = re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE)
|
matchReg = re.match('^\-\-eNB_AllowMerge=(.+)$', myArgv, re.IGNORECASE)
|
||||||
@@ -92,6 +94,8 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP):
|
|||||||
RAN.ranAllowMerge=True
|
RAN.ranAllowMerge=True
|
||||||
HTML.ranAllowMerge=True
|
HTML.ranAllowMerge=True
|
||||||
CONTAINERS.ranAllowMerge=True
|
CONTAINERS.ranAllowMerge=True
|
||||||
|
SCA.ranAllowMerge=True
|
||||||
|
PHYSIM.ranAllowMerge=True
|
||||||
elif re.match('^\-\-eNBBranch=(.+)$|^\-\-ranBranch=(.+)$', myArgv, re.IGNORECASE):
|
elif re.match('^\-\-eNBBranch=(.+)$|^\-\-ranBranch=(.+)$', myArgv, re.IGNORECASE):
|
||||||
if re.match('^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE):
|
if re.match('^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE):
|
||||||
matchReg = re.match('^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE)
|
matchReg = re.match('^\-\-eNBBranch=(.+)$', myArgv, re.IGNORECASE)
|
||||||
@@ -102,6 +106,8 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP):
|
|||||||
HTML.ranBranch=matchReg.group(1)
|
HTML.ranBranch=matchReg.group(1)
|
||||||
ldpc.ranBranch=matchReg.group(1)
|
ldpc.ranBranch=matchReg.group(1)
|
||||||
CONTAINERS.ranBranch=matchReg.group(1)
|
CONTAINERS.ranBranch=matchReg.group(1)
|
||||||
|
SCA.ranBranch=matchReg.group(1)
|
||||||
|
PHYSIM.ranBranch=matchReg.group(1)
|
||||||
elif re.match('^\-\-eNBCommitID=(.*)$|^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE):
|
elif re.match('^\-\-eNBCommitID=(.*)$|^\-\-ranCommitID=(.*)$', myArgv, re.IGNORECASE):
|
||||||
if re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE):
|
if re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE):
|
||||||
matchReg = re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE)
|
matchReg = re.match('^\-\-eNBCommitID=(.*)$', myArgv, re.IGNORECASE)
|
||||||
@@ -112,6 +118,8 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP):
|
|||||||
HTML.ranCommitID=matchReg.group(1)
|
HTML.ranCommitID=matchReg.group(1)
|
||||||
ldpc.ranCommitID=matchReg.group(1)
|
ldpc.ranCommitID=matchReg.group(1)
|
||||||
CONTAINERS.ranCommitID=matchReg.group(1)
|
CONTAINERS.ranCommitID=matchReg.group(1)
|
||||||
|
SCA.ranCommitID=matchReg.group(1)
|
||||||
|
PHYSIM.ranCommitID=matchReg.group(1)
|
||||||
elif re.match('^\-\-eNBTargetBranch=(.*)$|^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE):
|
elif re.match('^\-\-eNBTargetBranch=(.*)$|^\-\-ranTargetBranch=(.*)$', myArgv, re.IGNORECASE):
|
||||||
if re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE):
|
if re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE):
|
||||||
matchReg = re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE)
|
matchReg = re.match('^\-\-eNBTargetBranch=(.*)$', myArgv, re.IGNORECASE)
|
||||||
@@ -122,12 +130,16 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP):
|
|||||||
HTML.ranTargetBranch=matchReg.group(1)
|
HTML.ranTargetBranch=matchReg.group(1)
|
||||||
ldpc.ranTargetBranch=matchReg.group(1)
|
ldpc.ranTargetBranch=matchReg.group(1)
|
||||||
CONTAINERS.ranTargetBranch=matchReg.group(1)
|
CONTAINERS.ranTargetBranch=matchReg.group(1)
|
||||||
|
SCA.ranTargetBranch=matchReg.group(1)
|
||||||
|
PHYSIM.ranTargetBranch=matchReg.group(1)
|
||||||
elif re.match('^\-\-eNBIPAddress=(.+)$|^\-\-eNB[1-2]IPAddress=(.+)$', myArgv, re.IGNORECASE):
|
elif re.match('^\-\-eNBIPAddress=(.+)$|^\-\-eNB[1-2]IPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||||
if re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE):
|
if re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||||
matchReg = re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE)
|
matchReg = re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE)
|
||||||
RAN.eNBIPAddress=matchReg.group(1)
|
RAN.eNBIPAddress=matchReg.group(1)
|
||||||
ldpc.eNBIpAddr=matchReg.group(1)
|
ldpc.eNBIpAddr=matchReg.group(1)
|
||||||
CONTAINERS.eNBIPAddress=matchReg.group(1)
|
CONTAINERS.eNBIPAddress=matchReg.group(1)
|
||||||
|
SCA.eNBIPAddress=matchReg.group(1)
|
||||||
|
PHYSIM.eNBIPAddress=matchReg.group(1)
|
||||||
elif re.match('^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE):
|
elif re.match('^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE):
|
||||||
matchReg = re.match('^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE)
|
matchReg = re.match('^\-\-eNB1IPAddress=(.+)$', myArgv, re.IGNORECASE)
|
||||||
RAN.eNB1IPAddress=matchReg.group(1)
|
RAN.eNB1IPAddress=matchReg.group(1)
|
||||||
@@ -142,6 +154,8 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP):
|
|||||||
RAN.eNBUserName=matchReg.group(1)
|
RAN.eNBUserName=matchReg.group(1)
|
||||||
ldpc.eNBUserName=matchReg.group(1)
|
ldpc.eNBUserName=matchReg.group(1)
|
||||||
CONTAINERS.eNBUserName=matchReg.group(1)
|
CONTAINERS.eNBUserName=matchReg.group(1)
|
||||||
|
SCA.eNBUserName=matchReg.group(1)
|
||||||
|
PHYSIM.eNBUserName=matchReg.group(1)
|
||||||
elif re.match('^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE):
|
elif re.match('^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE):
|
||||||
matchReg = re.match('^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE)
|
matchReg = re.match('^\-\-eNB1UserName=(.+)$', myArgv, re.IGNORECASE)
|
||||||
RAN.eNB1UserName=matchReg.group(1)
|
RAN.eNB1UserName=matchReg.group(1)
|
||||||
@@ -156,6 +170,8 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP):
|
|||||||
RAN.eNBPassword=matchReg.group(1)
|
RAN.eNBPassword=matchReg.group(1)
|
||||||
ldpc.eNBPassWord=matchReg.group(1)
|
ldpc.eNBPassWord=matchReg.group(1)
|
||||||
CONTAINERS.eNBPassword=matchReg.group(1)
|
CONTAINERS.eNBPassword=matchReg.group(1)
|
||||||
|
SCA.eNBPassword=matchReg.group(1)
|
||||||
|
PHYSIM.eNBPassword=matchReg.group(1)
|
||||||
elif re.match('^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE):
|
elif re.match('^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE):
|
||||||
matchReg = re.match('^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE)
|
matchReg = re.match('^\-\-eNB1Password=(.+)$', myArgv, re.IGNORECASE)
|
||||||
RAN.eNB1Password=matchReg.group(1)
|
RAN.eNB1Password=matchReg.group(1)
|
||||||
@@ -170,6 +186,8 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP):
|
|||||||
RAN.eNBSourceCodePath=matchReg.group(1)
|
RAN.eNBSourceCodePath=matchReg.group(1)
|
||||||
ldpc.eNBSourceCodePath=matchReg.group(1)
|
ldpc.eNBSourceCodePath=matchReg.group(1)
|
||||||
CONTAINERS.eNBSourceCodePath=matchReg.group(1)
|
CONTAINERS.eNBSourceCodePath=matchReg.group(1)
|
||||||
|
SCA.eNBSourceCodePath=matchReg.group(1)
|
||||||
|
PHYSIM.eNBSourceCodePath=matchReg.group(1)
|
||||||
elif re.match('^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
elif re.match('^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE):
|
||||||
matchReg = re.match('^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
matchReg = re.match('^\-\-eNB1SourceCodePath=(.+)$', myArgv, re.IGNORECASE)
|
||||||
RAN.eNB1SourceCodePath=matchReg.group(1)
|
RAN.eNB1SourceCodePath=matchReg.group(1)
|
||||||
@@ -239,6 +257,15 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP):
|
|||||||
finalStatus = matchReg.group(1)
|
finalStatus = matchReg.group(1)
|
||||||
if ((finalStatus == 'true') or (finalStatus == 'True')):
|
if ((finalStatus == 'true') or (finalStatus == 'True')):
|
||||||
CiTestObj.finalStatus = True
|
CiTestObj.finalStatus = True
|
||||||
|
elif re.match('^\-\-OCUserName=(.+)$', myArgv, re.IGNORECASE):
|
||||||
|
matchReg = re.match('^\-\-OCUserName=(.+)$', myArgv, re.IGNORECASE)
|
||||||
|
PHYSIM.OCUserName = matchReg.group(1)
|
||||||
|
elif re.match('^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE):
|
||||||
|
matchReg = re.match('^\-\-OCPassword=(.+)$', myArgv, re.IGNORECASE)
|
||||||
|
PHYSIM.OCPassword = matchReg.group(1)
|
||||||
|
elif re.match('^\-\-OCProjectName=(.+)$', myArgv, re.IGNORECASE):
|
||||||
|
matchReg = re.match('^\-\-OCProjectName=(.+)$', myArgv, re.IGNORECASE)
|
||||||
|
PHYSIM.OCProjectName = matchReg.group(1)
|
||||||
else:
|
else:
|
||||||
HELP.GenericHelp(CONST.Version)
|
HELP.GenericHelp(CONST.Version)
|
||||||
sys.exit('Invalid Parameter: ' + myArgv)
|
sys.exit('Invalid Parameter: ' + myArgv)
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
echo "gNB will be started automatically..."
|
||||||
|
sleep 1
|
||||||
|
sudo .././cmake_targets/ran_build/build/nr-softmodem -E -O ../targets/PROJECTS/GENERIC-LTE-EPC/CONF/testing_gnb.conf
|
||||||
|
done
|
||||||
@@ -1,216 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
#/*
|
|
||||||
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
|
||||||
# * contributor license agreements. See the NOTICE file distributed with
|
|
||||||
# * this work for additional information regarding copyright ownership.
|
|
||||||
# * The OpenAirInterface Software Alliance licenses this file to You under
|
|
||||||
# * the OAI Public License, Version 1.1 (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.openairinterface.org/?page_id=698
|
|
||||||
# *
|
|
||||||
# * 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.
|
|
||||||
# *-------------------------------------------------------------------------------
|
|
||||||
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
|
||||||
# * contact@openairinterface.org
|
|
||||||
# */
|
|
||||||
|
|
||||||
function usage {
|
|
||||||
echo "OAI RedHat Build Check script"
|
|
||||||
echo " Original Author: Raphael Defosseux"
|
|
||||||
|
|
||||||
echo ""
|
|
||||||
echo "Usage:"
|
|
||||||
echo "------"
|
|
||||||
echo " buildOnRH.sh [OPTIONS]"
|
|
||||||
echo ""
|
|
||||||
echo "Options:"
|
|
||||||
echo "--------"
|
|
||||||
echo " --job-name #### OR -jn ####"
|
|
||||||
echo " Specify the name of the Jenkins job."
|
|
||||||
echo ""
|
|
||||||
echo " --build-id #### OR -id ####"
|
|
||||||
echo " Specify the build ID of the Jenkins job."
|
|
||||||
echo ""
|
|
||||||
echo " --workspace #### OR -ws ####"
|
|
||||||
echo " Specify the workspace."
|
|
||||||
echo ""
|
|
||||||
echo " --remote-host #### OR -rh ####"
|
|
||||||
echo " Specify the RedHat remote server."
|
|
||||||
echo ""
|
|
||||||
echo " --remote-user-name #### OR -ru ####"
|
|
||||||
echo " Specify the RedHat remote server username."
|
|
||||||
echo ""
|
|
||||||
echo " --remote-password #### OR -rp ####"
|
|
||||||
echo " Specify the RedHat remote server password."
|
|
||||||
echo ""
|
|
||||||
echo " --remote-path #### OR -ra ####"
|
|
||||||
echo " Specify the RedHat remote server path to work on."
|
|
||||||
echo ""
|
|
||||||
}
|
|
||||||
|
|
||||||
if [ $# -lt 1 ] || [ $# -gt 14 ]
|
|
||||||
then
|
|
||||||
echo "Syntax Error: not the correct number of arguments"
|
|
||||||
echo ""
|
|
||||||
usage
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
RH_HOST=XX
|
|
||||||
RH_USER=XX
|
|
||||||
RH_PASSWD=XX
|
|
||||||
RH_PATH=XX
|
|
||||||
JOB_NAME=XX
|
|
||||||
BUILD_ID=XX
|
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]
|
|
||||||
do
|
|
||||||
key="$1"
|
|
||||||
|
|
||||||
case $key in
|
|
||||||
-h|--help)
|
|
||||||
shift
|
|
||||||
usage
|
|
||||||
exit 0
|
|
||||||
;;
|
|
||||||
-jn|--job-name)
|
|
||||||
JOB_NAME="$2"
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-id|--build-id)
|
|
||||||
BUILD_ID="$2"
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-ws|--workspace)
|
|
||||||
JENKINS_WKSP="$2"
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-rh|--remote-host)
|
|
||||||
RH_HOST="$2"
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-ru|--remote-user-name)
|
|
||||||
RH_USER="$2"
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-rp|--remote-password)
|
|
||||||
RH_PASSWD="$2"
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
-ra|--remote-path)
|
|
||||||
RH_PATH="$2"
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Syntax Error: unknown option: $key"
|
|
||||||
echo ""
|
|
||||||
usage
|
|
||||||
exit 1
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ ! -f $JENKINS_WKSP/localZip.zip ]
|
|
||||||
then
|
|
||||||
echo "Missing localZip.zip file!"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$JOB_NAME" == "XX" ] || [ "$BUILD_ID" == "XX" ] || [ "$RH_HOST" == "XX" ] || [ "$RH_USER" == "XX" ] || [ "$RH_PASSWD" == "XX" ] || [ "$RH_PATH" == "XX" ]
|
|
||||||
then
|
|
||||||
echo "Missing options"
|
|
||||||
usage
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "############################################################"
|
|
||||||
echo "Copying GIT repo into RedHat Server"
|
|
||||||
echo "############################################################"
|
|
||||||
echo "rm -Rf ${RH_PATH}" >> rh-cmd.txt
|
|
||||||
echo "mkdir -p ${RH_PATH}" >> rh-cmd.txt
|
|
||||||
|
|
||||||
sshpass -p ${RH_PASSWD} ssh -o 'StrictHostKeyChecking no' ${RH_USER}@${RH_HOST} < rh-cmd.txt
|
|
||||||
rm -f rh-cmd.txt
|
|
||||||
|
|
||||||
echo "############################################################"
|
|
||||||
echo "Running install and build script on RedHat Server"
|
|
||||||
echo "############################################################"
|
|
||||||
sshpass -p ${RH_PASSWD} scp -o 'StrictHostKeyChecking no' $JENKINS_WKSP/localZip.zip ${RH_USER}@${RH_HOST}:${RH_PATH}
|
|
||||||
|
|
||||||
echo "cd ${RH_PATH}" > rh-cmd.txt
|
|
||||||
echo "unzip -qq localZip.zip" >> rh-cmd.txt
|
|
||||||
echo "source oaienv" >> rh-cmd.txt
|
|
||||||
echo "cd cmake_targets" >> rh-cmd.txt
|
|
||||||
echo "mkdir -p log" >> rh-cmd.txt
|
|
||||||
echo "./build_oai -I -w USRP --eNB > log/install-build.txt 2>&1" >> rh-cmd.txt
|
|
||||||
sshpass -p ${RH_PASSWD} ssh -o 'StrictHostKeyChecking no' ${RH_USER}@${RH_HOST} < rh-cmd.txt
|
|
||||||
|
|
||||||
rm -f rh-cmd.txt
|
|
||||||
|
|
||||||
echo "############################################################"
|
|
||||||
echo "Creating a tmp folder to store results and artifacts"
|
|
||||||
echo "############################################################"
|
|
||||||
if [ ! -d $JENKINS_WKSP/archives ]
|
|
||||||
then
|
|
||||||
mkdir -p $JENKINS_WKSP/archives
|
|
||||||
fi
|
|
||||||
|
|
||||||
ARCHIVES_LOC=$JENKINS_WKSP/archives/red_hat
|
|
||||||
if [ ! -d $ARCHIVES_LOC ]
|
|
||||||
then
|
|
||||||
mkdir -p $ARCHIVES_LOC
|
|
||||||
fi
|
|
||||||
|
|
||||||
sshpass -p ${RH_PASSWD} scp -o 'StrictHostKeyChecking no' ${RH_USER}@${RH_HOST}:${RH_PATH}/cmake_targets/log/*.txt $ARCHIVES_LOC
|
|
||||||
|
|
||||||
echo "############################################################"
|
|
||||||
echo "Checking build status"
|
|
||||||
echo "############################################################"
|
|
||||||
|
|
||||||
LOG_PATTERN=.Rel15.txt
|
|
||||||
NB_PATTERN_FILES=7
|
|
||||||
|
|
||||||
LOG_FILES=`ls $ARCHIVES_LOC/*.txt`
|
|
||||||
STATUS=0
|
|
||||||
NB_FOUND_FILES=0
|
|
||||||
|
|
||||||
for FULLFILE in $LOG_FILES
|
|
||||||
do
|
|
||||||
if [[ $FULLFILE == *"$LOG_PATTERN"* ]]
|
|
||||||
then
|
|
||||||
filename=$(basename -- "$FULLFILE")
|
|
||||||
PASS_PATTERN=`echo $filename | sed -e "s#$LOG_PATTERN##"`
|
|
||||||
LOCAL_STAT=`egrep -c "Built target $PASS_PATTERN" $FULLFILE`
|
|
||||||
if [ $LOCAL_STAT -eq 0 ]; then STATUS=-1; fi
|
|
||||||
NB_FOUND_FILES=$((NB_FOUND_FILES + 1))
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ $NB_PATTERN_FILES -ne $NB_FOUND_FILES ]
|
|
||||||
then
|
|
||||||
echo "Expecting $NB_PATTERN_FILES log files and found $NB_FOUND_FILES"
|
|
||||||
STATUS=-1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "COMMAND: build_oai -I -w USRP --eNB" > $ARCHIVES_LOC/build_final_status.log
|
|
||||||
if [ $STATUS -eq 0 ]
|
|
||||||
then
|
|
||||||
echo "BUILD_OK" >> $ARCHIVES_LOC/build_final_status.log
|
|
||||||
echo "STATUS seems OK"
|
|
||||||
else
|
|
||||||
echo "BUILD_KO" >> $ARCHIVES_LOC/build_final_status.log
|
|
||||||
echo "STATUS failed?"
|
|
||||||
fi
|
|
||||||
exit $STATUS
|
|
||||||
@@ -62,7 +62,7 @@ function build_on_vm {
|
|||||||
echo "ARCHIVES_LOC = $ARCHIVES_LOC"
|
echo "ARCHIVES_LOC = $ARCHIVES_LOC"
|
||||||
echo "BUILD_OPTIONS = $BUILD_OPTIONS"
|
echo "BUILD_OPTIONS = $BUILD_OPTIONS"
|
||||||
|
|
||||||
if [[ "$VM_NAME" == *"-enb-usrp"* ]]
|
if [[ "$VM_NAME" == *"-enb-usrp"* ]] || [[ "$VM_NAME" == *"-cppcheck"* ]] || [[ "$VM_NAME" == *"-phy-sim"* ]]
|
||||||
then
|
then
|
||||||
echo "This VM type is no longer supported in the pipeline framework"
|
echo "This VM type is no longer supported in the pipeline framework"
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -1,15 +1,15 @@
|
|||||||
|
|
||||||
ranRepository : https://gitlab.eurecom.fr/oai/openairinterface5g.git
|
ranRepository : https://gitlab.eurecom.fr/oai/openairinterface5g.git
|
||||||
ranBranch : BRANCH_NAME
|
ranBranch : integration_2021_wk13_a
|
||||||
ranCommitID : COMMIT_ID
|
ranCommitID : 104aa7eed5d6702c1b9da663414079ef698da206
|
||||||
ranAllowMerge : 'true'
|
ranAllowMerge : 'yes'
|
||||||
ranTargetBranch : develop
|
ranTargetBranch : develop
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- InitiateHtml,none
|
- InitiateHtml,none
|
||||||
- TesteNB,xml_files/fr1_multi_node_build.xml
|
- TesteNB,xml_files/fr1_multi_node_build.xml
|
||||||
- TesteNB,xml_files/fr1_epc_start.xml
|
- TesteNB,xml_files/fr1_epc_start.xml
|
||||||
- TesteNB,xml_files/fr1_ran_ue_base.xml #ue toggle, nodes initialize, ue toggle, ping, nodes terminate
|
- TesteNB,xml_files/fr1_nsa_base_next.xml #ue toggle, nodes initialize, ue toggle, ping, nodes terminate
|
||||||
- TesteNB,xml_files/fr1_epc_closure.xml
|
- TesteNB,xml_files/fr1_epc_closure.xml
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,86 @@
|
|||||||
|
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
# * contributor license agreements. See the NOTICE file distributed with
|
||||||
|
# * this work for additional information regarding copyright ownership.
|
||||||
|
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
# * the OAI Public License, Version 1.1 (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.openairinterface.org/?page_id=698
|
||||||
|
# *
|
||||||
|
# * 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.
|
||||||
|
# *-------------------------------------------------------------------------------
|
||||||
|
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
# * contact@openairinterface.org
|
||||||
|
# */
|
||||||
|
#---------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Required Python Version
|
||||||
|
# Python 3.x
|
||||||
|
#
|
||||||
|
#---------------------------------------------------------------------
|
||||||
|
|
||||||
|
#usage example:
|
||||||
|
#sudo python3 ci_ctl_qtel.py /dev/ttyUSB2 wup
|
||||||
|
#sudo python3 ci_ctl_qtel.py /dev/ttyUSB2 detach
|
||||||
|
|
||||||
|
|
||||||
|
import sys
|
||||||
|
import time
|
||||||
|
import serial
|
||||||
|
|
||||||
|
|
||||||
|
class qtel_ctl:
|
||||||
|
#---------------
|
||||||
|
#private methods
|
||||||
|
#---------------
|
||||||
|
def __init__(self, usb_port_at):
|
||||||
|
self.QUECTEL_USB_PORT_AT = usb_port_at #ex : '/dev/ttyUSB2'
|
||||||
|
self.modem = serial.Serial(self.QUECTEL_USB_PORT_AT, timeout=1)
|
||||||
|
self.cmd_dict= {"wup": self.wup,"detach":self.detach}#dictionary of function pointers
|
||||||
|
|
||||||
|
def __set_modem_state(self,ser,state):
|
||||||
|
self.__send_command(ser,"AT+CFUN={}\r".format(state))
|
||||||
|
|
||||||
|
def __send_command(self,ser,com):
|
||||||
|
ser.write(com.encode())
|
||||||
|
time.sleep(0.1)
|
||||||
|
ret=[]
|
||||||
|
while ser.inWaiting()>0:
|
||||||
|
print("waiting")
|
||||||
|
msg=ser.readline()
|
||||||
|
msg=msg.decode("utf-8")
|
||||||
|
msg=msg.replace("\r","")
|
||||||
|
msg=msg.replace("\n","")
|
||||||
|
print(msg)
|
||||||
|
if msg!="":
|
||||||
|
ret.append(msg)
|
||||||
|
else:
|
||||||
|
print("msg empty")
|
||||||
|
return ret
|
||||||
|
|
||||||
|
#--------------
|
||||||
|
#public methods
|
||||||
|
#--------------
|
||||||
|
def wup(self):#sending AT+CFUN=0, then AT+CFUN=1
|
||||||
|
self.__set_modem_state(self.modem,'0')
|
||||||
|
time.sleep(3)
|
||||||
|
self.__set_modem_state(self.modem,'1')
|
||||||
|
|
||||||
|
def detach(self):#sending AT+CFUN=0
|
||||||
|
self.__set_modem_state(self.modem,'0')
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
#argv[1] : usb port
|
||||||
|
#argv[2] : qtel command (see function pointers dict "wup", "detach" etc ...)
|
||||||
|
command = sys.argv[2]
|
||||||
|
Module=qtel_ctl(sys.argv[1])
|
||||||
|
#calling the function to be applied
|
||||||
|
Module.cmd_dict[command]()
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
idefix:
|
||||||
|
ID: idefix
|
||||||
|
State : enabled
|
||||||
|
Kind : quectel
|
||||||
|
Process :
|
||||||
|
Name : quectel-CM
|
||||||
|
Cmd : /home/oaicicd/quectel-CM/quectel-CM -s oai.ipv4 -4
|
||||||
|
WakeupScript : ci_ctl_qtel.py /dev/ttyUSB2 wup
|
||||||
|
DetachScript : ci_ctl_qtel.py /dev/ttyUSB2 detach
|
||||||
|
PLMN : 22201
|
||||||
|
UENetwork : enxb22a941dbf00
|
||||||
|
HostIPAddress : 192.168.18.188
|
||||||
|
HostUsername : oaicicd
|
||||||
|
HostPassword : oaicicd
|
||||||
|
HostSourceCodePath : none
|
||||||
|
dummy:
|
||||||
|
ID: ''
|
||||||
|
State : ''
|
||||||
|
Kind : ''
|
||||||
|
Process :
|
||||||
|
Name : ''
|
||||||
|
Cmd : ''
|
||||||
|
WakeupScript : ''
|
||||||
|
DetachScript : ''
|
||||||
|
PLMN : 22201
|
||||||
|
UENetwork : wwan0
|
||||||
|
HostIPAddress : 192.168.18.188
|
||||||
|
HostUsername : oaicicd
|
||||||
|
HostPassword : oaicicd
|
||||||
|
HostSourceCodePath : none
|
||||||
|
|
||||||
|
|
||||||
@@ -0,0 +1,57 @@
|
|||||||
|
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
# * contributor license agreements. See the NOTICE file distributed with
|
||||||
|
# * this work for additional information regarding copyright ownership.
|
||||||
|
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
# * the OAI Public License, Version 1.1 (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.openairinterface.org/?page_id=698
|
||||||
|
# *
|
||||||
|
# * 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.
|
||||||
|
# *-------------------------------------------------------------------------------
|
||||||
|
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
# * contact@openairinterface.org
|
||||||
|
# */
|
||||||
|
#---------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Required Python Version
|
||||||
|
# Python 3.x
|
||||||
|
#
|
||||||
|
#---------------------------------------------------------------------
|
||||||
|
|
||||||
|
#to use isfile
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import logging
|
||||||
|
#to create a SSH object locally in the methods
|
||||||
|
import sshconnection
|
||||||
|
#time.sleep
|
||||||
|
import time
|
||||||
|
#to load ue infrastructure dictionary
|
||||||
|
import yaml
|
||||||
|
|
||||||
|
class InfraUE:
|
||||||
|
def __init__(self):
|
||||||
|
self.ci_ue_infra ={}
|
||||||
|
|
||||||
|
|
||||||
|
#-----------------$
|
||||||
|
#PUBLIC Methods$
|
||||||
|
#-----------------$
|
||||||
|
|
||||||
|
#This method reads the yaml file describing the multi-UE infrastructure
|
||||||
|
#and stores the infra permanently in the related class attribute self.ci_ue_infra
|
||||||
|
def Get_UE_Infra(self,ue_infra_filename):
|
||||||
|
f_yaml=ue_infra_filename
|
||||||
|
with open(f_yaml,'r') as file:
|
||||||
|
logging.debug('Loading UE infrastructure from file '+f_yaml)
|
||||||
|
#load it permanently in the class attribute
|
||||||
|
self.ci_ue_infra = yaml.load(file,Loader=yaml.FullLoader)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -83,10 +83,12 @@ class Containerize():
|
|||||||
self.flexranCtrlDeployed = False
|
self.flexranCtrlDeployed = False
|
||||||
self.flexranCtrlIpAddress = ''
|
self.flexranCtrlIpAddress = ''
|
||||||
self.cli = ''
|
self.cli = ''
|
||||||
|
self.cliBuildOptions = ''
|
||||||
self.dockerfileprefix = ''
|
self.dockerfileprefix = ''
|
||||||
self.host = ''
|
self.host = ''
|
||||||
self.allImagesSize = {}
|
self.allImagesSize = {}
|
||||||
self.collectInfo = {}
|
self.collectInfo = {}
|
||||||
|
|
||||||
#-----------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
# Container management functions
|
# Container management functions
|
||||||
#-----------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
@@ -124,9 +126,11 @@ class Containerize():
|
|||||||
if self.host == 'Ubuntu':
|
if self.host == 'Ubuntu':
|
||||||
self.cli = 'docker'
|
self.cli = 'docker'
|
||||||
self.dockerfileprefix = '.ubuntu18'
|
self.dockerfileprefix = '.ubuntu18'
|
||||||
|
self.cliBuildOptions = '--no-cache'
|
||||||
elif self.host == 'Red Hat':
|
elif self.host == 'Red Hat':
|
||||||
self.cli = 'sudo podman'
|
self.cli = 'sudo podman'
|
||||||
self.dockerfileprefix = '.rhel8.2'
|
self.dockerfileprefix = '.rhel8.2'
|
||||||
|
self.cliBuildOptions = '--no-cache --disable-compression'
|
||||||
|
|
||||||
imageNames = []
|
imageNames = []
|
||||||
result = re.search('eNB', self.imageKind)
|
result = re.search('eNB', self.imageKind)
|
||||||
@@ -144,6 +148,8 @@ class Containerize():
|
|||||||
imageNames.append(('oai-gnb', 'gNB'))
|
imageNames.append(('oai-gnb', 'gNB'))
|
||||||
imageNames.append(('oai-lte-ue', 'lteUE'))
|
imageNames.append(('oai-lte-ue', 'lteUE'))
|
||||||
imageNames.append(('oai-nr-ue', 'nrUE'))
|
imageNames.append(('oai-nr-ue', 'nrUE'))
|
||||||
|
if self.host == 'Red Hat':
|
||||||
|
imageNames.append(('oai-physim', 'phySim'))
|
||||||
if len(imageNames) == 0:
|
if len(imageNames) == 0:
|
||||||
imageNames.append(('oai-enb', 'eNB'))
|
imageNames.append(('oai-enb', 'eNB'))
|
||||||
|
|
||||||
@@ -156,7 +162,7 @@ class Containerize():
|
|||||||
# on RedHat/CentOS .git extension is mandatory
|
# on RedHat/CentOS .git extension is mandatory
|
||||||
result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository)
|
result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository)
|
||||||
if result is not None:
|
if result is not None:
|
||||||
full_ran_repo_name = self.ranRepository
|
full_ran_repo_name = self.ranRepository.replace('git/', 'git')
|
||||||
else:
|
else:
|
||||||
full_ran_repo_name = self.ranRepository + '.git'
|
full_ran_repo_name = self.ranRepository + '.git'
|
||||||
mySSH.command('mkdir -p ' + lSourcePath, '\$', 5)
|
mySSH.command('mkdir -p ' + lSourcePath, '\$', 5)
|
||||||
@@ -170,7 +176,7 @@ class Containerize():
|
|||||||
mySSH.command('mkdir -p cmake_targets/log', '\$', 5)
|
mySSH.command('mkdir -p cmake_targets/log', '\$', 5)
|
||||||
# if the commit ID is provided use it to point to it
|
# if the commit ID is provided use it to point to it
|
||||||
if self.ranCommitID != '':
|
if self.ranCommitID != '':
|
||||||
mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 5)
|
mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30)
|
||||||
# if the branch is not develop, then it is a merge request and we need to do
|
# if the branch is not develop, then it is a merge request and we need to do
|
||||||
# the potential merge. Note that merge conflicts should already been checked earlier
|
# the potential merge. Note that merge conflicts should already been checked earlier
|
||||||
imageTag = 'develop'
|
imageTag = 'develop'
|
||||||
@@ -201,7 +207,7 @@ class Containerize():
|
|||||||
|
|
||||||
# Build the shared image only on Push Events (not on Merge Requests)
|
# Build the shared image only on Push Events (not on Merge Requests)
|
||||||
if (not self.ranAllowMerge):
|
if (not self.ranAllowMerge):
|
||||||
mySSH.command(self.cli + ' build --target ' + sharedimage + ' --tag ' + sharedimage + ':' + sharedTag + ' --file docker/Dockerfile.ran' + self.dockerfileprefix + ' --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > cmake_targets/log/ran-build.log 2>&1', '\$', 1600)
|
mySSH.command(self.cli + ' build ' + self.cliBuildOptions + ' --target ' + sharedimage + ' --tag ' + sharedimage + ':' + sharedTag + ' --file docker/Dockerfile.ran' + self.dockerfileprefix + ' --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" . > cmake_targets/log/ran-build.log 2>&1', '\$', 1600)
|
||||||
# First verify if the shared image was properly created.
|
# First verify if the shared image was properly created.
|
||||||
status = True
|
status = True
|
||||||
mySSH.command(self.cli + ' image inspect --format=\'Size = {{.Size}} bytes\' ' + sharedimage + ':' + sharedTag, '\$', 5)
|
mySSH.command(self.cli + ' image inspect --format=\'Size = {{.Size}} bytes\' ' + sharedimage + ':' + sharedTag, '\$', 5)
|
||||||
@@ -249,7 +255,7 @@ class Containerize():
|
|||||||
# the archived Dockerfiles have "ran-build:latest" as base image
|
# the archived Dockerfiles have "ran-build:latest" as base image
|
||||||
# we need to update them with proper tag
|
# we need to update them with proper tag
|
||||||
mySSH.command('sed -i -e "s#' + sharedimage + ':latest#' + sharedimage + ':' + sharedTag + '#" docker/Dockerfile.' + pattern + self.dockerfileprefix, '\$', 5)
|
mySSH.command('sed -i -e "s#' + sharedimage + ':latest#' + sharedimage + ':' + sharedTag + '#" docker/Dockerfile.' + pattern + self.dockerfileprefix, '\$', 5)
|
||||||
mySSH.command(self.cli + ' build --target ' + image + ' --tag ' + image + ':' + imageTag + ' --file docker/Dockerfile.' + pattern + self.dockerfileprefix + ' . > cmake_targets/log/' + image + '.log 2>&1', '\$', 1200)
|
mySSH.command(self.cli + ' build ' + self.cliBuildOptions + ' --target ' + image + ' --tag ' + image + ':' + imageTag + ' --file docker/Dockerfile.' + pattern + self.dockerfileprefix + ' . > cmake_targets/log/' + image + '.log 2>&1', '\$', 1200)
|
||||||
# split the log
|
# split the log
|
||||||
mySSH.command('mkdir -p cmake_targets/log/' + image, '\$', 5)
|
mySSH.command('mkdir -p cmake_targets/log/' + image, '\$', 5)
|
||||||
mySSH.command('python3 ci-scripts/docker_log_split.py --logfilename=cmake_targets/log/' + image + '.log', '\$', 5)
|
mySSH.command('python3 ci-scripts/docker_log_split.py --logfilename=cmake_targets/log/' + image + '.log', '\$', 5)
|
||||||
@@ -330,6 +336,31 @@ class Containerize():
|
|||||||
errorandwarnings['warnings'] = warningsNo
|
errorandwarnings['warnings'] = warningsNo
|
||||||
errorandwarnings['status'] = status
|
errorandwarnings['status'] = status
|
||||||
files[fil] = errorandwarnings
|
files[fil] = errorandwarnings
|
||||||
|
# Let analyze the target image creation part
|
||||||
|
if os.path.isfile('build_log_{}/{}.log'.format(self.testCase_id,image)):
|
||||||
|
errorandwarnings = {}
|
||||||
|
with open('build_log_{}/{}.log'.format(self.testCase_id,image), mode='r') as inputfile:
|
||||||
|
startOfTargetImageCreation = False
|
||||||
|
buildStatus = False
|
||||||
|
for line in inputfile:
|
||||||
|
result = re.search('FROM .* [aA][sS] ' + image + '$', str(line))
|
||||||
|
if result is not None:
|
||||||
|
startOfTargetImageCreation = True
|
||||||
|
if startOfTargetImageCreation:
|
||||||
|
result = re.search('Successfully tagged ' + image + ':', str(line))
|
||||||
|
if result is not None:
|
||||||
|
buildStatus = True
|
||||||
|
result = re.search('COMMIT ' + image + ':', str(line))
|
||||||
|
if result is not None:
|
||||||
|
buildStatus = True
|
||||||
|
inputfile.close()
|
||||||
|
if buildStatus:
|
||||||
|
errorandwarnings['errors'] = 0
|
||||||
|
else:
|
||||||
|
errorandwarnings['errors'] = 1
|
||||||
|
errorandwarnings['warnings'] = 0
|
||||||
|
errorandwarnings['status'] = buildStatus
|
||||||
|
files['Target Image Creation'] = errorandwarnings
|
||||||
self.collectInfo[image] = files
|
self.collectInfo[image] = files
|
||||||
|
|
||||||
if status:
|
if status:
|
||||||
|
|||||||
@@ -0,0 +1,132 @@
|
|||||||
|
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
# * contributor license agreements. See the NOTICE file distributed with
|
||||||
|
# * this work for additional information regarding copyright ownership.
|
||||||
|
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
# * the OAI Public License, Version 1.1 (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.openairinterface.org/?page_id=698
|
||||||
|
# *
|
||||||
|
# * 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.
|
||||||
|
# *-------------------------------------------------------------------------------
|
||||||
|
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
# * contact@openairinterface.org
|
||||||
|
# */
|
||||||
|
#---------------------------------------------------------------------
|
||||||
|
#
|
||||||
|
# Required Python Version
|
||||||
|
# Python 3.x
|
||||||
|
#
|
||||||
|
#---------------------------------------------------------------------
|
||||||
|
|
||||||
|
#to use isfile
|
||||||
|
import os
|
||||||
|
import sys
|
||||||
|
import logging
|
||||||
|
#to create a SSH object locally in the methods
|
||||||
|
import sshconnection
|
||||||
|
#time.sleep
|
||||||
|
import time
|
||||||
|
|
||||||
|
|
||||||
|
import re
|
||||||
|
import subprocess
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
class Module_UE:
|
||||||
|
|
||||||
|
def __init__(self,Module):
|
||||||
|
#create attributes as in the Module dictionary
|
||||||
|
for k, v in Module.items():
|
||||||
|
setattr(self, k, v)
|
||||||
|
self.UEIPAddress = ""
|
||||||
|
#dictionary linking command names and related module scripts
|
||||||
|
self.cmd_dict= {"wup": self.WakeupScript,"detach":self.DetachScript}#dictionary of function scripts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#-----------------$
|
||||||
|
#PUBLIC Methods$
|
||||||
|
#-----------------$
|
||||||
|
|
||||||
|
#this method checks if the specified Process is running on the server hosting the module
|
||||||
|
#if not it will be started
|
||||||
|
def CheckCMProcess(self):
|
||||||
|
HOST=self.HostIPAddress
|
||||||
|
COMMAND="ps aux | grep " + self.Process['Name'] + " | grep -v grep "
|
||||||
|
logging.debug(COMMAND)
|
||||||
|
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||||
|
result = ssh.stdout.readlines()
|
||||||
|
if len(result)!=0:
|
||||||
|
logging.debug(self.Process['Name'] + " process found")
|
||||||
|
return True
|
||||||
|
else:#start process and check again
|
||||||
|
logging.debug(self.Process['Name'] + " process NOT found")
|
||||||
|
#starting the process
|
||||||
|
logging.debug('Starting ' + self.Process['Name'])
|
||||||
|
mySSH = sshconnection.SSHConnection()
|
||||||
|
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
|
||||||
|
mySSH.command('echo ' + self.HostPassword + ' | sudo -S ' + self.Process['Cmd'] + ' &','\$',5)
|
||||||
|
mySSH.close()
|
||||||
|
#checking the process
|
||||||
|
HOST=self.HostIPAddress
|
||||||
|
COMMAND="ps aux | grep " + self.Process['Name'] + " | grep -v grep "
|
||||||
|
logging.debug(COMMAND)
|
||||||
|
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||||
|
result = ssh.stdout.readlines()
|
||||||
|
if len(result)!=0:
|
||||||
|
logging.debug(self.Process['Name'] + " process found")
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
logging.debug(self.Process['Name'] + " process NOT found")
|
||||||
|
return False
|
||||||
|
|
||||||
|
#Generic command function, using function pointers dictionary
|
||||||
|
def Command(self,cmd):
|
||||||
|
mySSH = sshconnection.SSHConnection()
|
||||||
|
mySSH.open(self.HostIPAddress, self.HostUsername, self.HostPassword)
|
||||||
|
mySSH.command('echo ' + self.HostPassword + ' | sudo -S python3 ' + self.cmd_dict[cmd],'\$',10)
|
||||||
|
time.sleep(5)
|
||||||
|
logging.debug("Module "+ cmd)
|
||||||
|
mySSH.close()
|
||||||
|
|
||||||
|
|
||||||
|
#this method retrieves the Module IP address (not the Host IP address)
|
||||||
|
def GetModuleIPAddress(self):
|
||||||
|
HOST=self.HostIPAddress
|
||||||
|
response= []
|
||||||
|
tentative = 10
|
||||||
|
while (len(response)==0) and (tentative>0):
|
||||||
|
COMMAND="ip a show dev " + self.UENetwork + " | grep inet | grep " + self.UENetwork
|
||||||
|
logging.debug(COMMAND)
|
||||||
|
ssh = subprocess.Popen(["ssh", "%s" % HOST, COMMAND],shell=False,stdout=subprocess.PIPE,stderr=subprocess.PIPE)
|
||||||
|
response = ssh.stdout.readlines()
|
||||||
|
tentative-=1
|
||||||
|
time.sleep(10)
|
||||||
|
if (tentative==0) and (len(response)==0):
|
||||||
|
logging.debug('\u001B[1;37;41m Module IP Address Not Found! Time expired \u001B[0m')
|
||||||
|
return -1
|
||||||
|
else: #check response
|
||||||
|
result = re.search('inet (?P<moduleipaddress>[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+)', response[0].decode("utf-8") )
|
||||||
|
if result is not None:
|
||||||
|
if result.group('moduleipaddress') is not None:
|
||||||
|
self.UEIPAddress = result.group('moduleipaddress')
|
||||||
|
logging.debug('\u001B[1mUE Module IP Address is ' + self.UEIPAddress + '\u001B[0m')
|
||||||
|
return 0
|
||||||
|
else:
|
||||||
|
logging.debug('\u001B[1;37;41m Module IP Address Not Found! \u001B[0m')
|
||||||
|
return -1
|
||||||
|
else:
|
||||||
|
logging.debug('\u001B[1;37;41m Module IP Address Not Found! \u001B[0m')
|
||||||
|
return -1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
+252
-116
@@ -54,7 +54,8 @@ import helpreadme as HELP
|
|||||||
import constants as CONST
|
import constants as CONST
|
||||||
import sshconnection
|
import sshconnection
|
||||||
|
|
||||||
|
import cls_module_ue
|
||||||
|
import cls_ci_ueinfra #class defining the multi Ue infrastrucure
|
||||||
|
|
||||||
|
|
||||||
#-----------------------------------------------------------
|
#-----------------------------------------------------------
|
||||||
@@ -129,6 +130,7 @@ class OaiCiTest():
|
|||||||
self.iperf_packetloss_threshold = ''
|
self.iperf_packetloss_threshold = ''
|
||||||
self.iperf_profile = ''
|
self.iperf_profile = ''
|
||||||
self.iperf_options = ''
|
self.iperf_options = ''
|
||||||
|
self.iperf_direction = ''
|
||||||
self.nbMaxUEtoAttach = -1
|
self.nbMaxUEtoAttach = -1
|
||||||
self.UEDevices = []
|
self.UEDevices = []
|
||||||
self.UEDevicesStatus = []
|
self.UEDevicesStatus = []
|
||||||
@@ -157,6 +159,7 @@ class OaiCiTest():
|
|||||||
self.clean_repository = True
|
self.clean_repository = True
|
||||||
self.air_interface=''
|
self.air_interface=''
|
||||||
self.expectedNbOfConnectedUEs = 0
|
self.expectedNbOfConnectedUEs = 0
|
||||||
|
self.ue_id = '' #used for module identification
|
||||||
|
|
||||||
|
|
||||||
def BuildOAIUE(self,HTML):
|
def BuildOAIUE(self,HTML):
|
||||||
@@ -174,7 +177,7 @@ class OaiCiTest():
|
|||||||
ue_prefix = ''
|
ue_prefix = ''
|
||||||
result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository)
|
result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository)
|
||||||
if result is not None:
|
if result is not None:
|
||||||
full_ran_repo_name = self.ranRepository
|
full_ran_repo_name = self.ranRepository.replace('git/', 'git')
|
||||||
else:
|
else:
|
||||||
full_ran_repo_name = self.ranRepository + '.git'
|
full_ran_repo_name = self.ranRepository + '.git'
|
||||||
SSH.command('mkdir -p ' + self.UESourceCodePath, '\$', 5)
|
SSH.command('mkdir -p ' + self.UESourceCodePath, '\$', 5)
|
||||||
@@ -217,7 +220,7 @@ class OaiCiTest():
|
|||||||
|
|
||||||
# if the commit ID is provided use it to point to it
|
# if the commit ID is provided use it to point to it
|
||||||
if self.ranCommitID != '':
|
if self.ranCommitID != '':
|
||||||
SSH.command('git checkout -f ' + self.ranCommitID, '\$', 5)
|
SSH.command('git checkout -f ' + self.ranCommitID, '\$', 30)
|
||||||
# if the branch is not develop, then it is a merge request and we need to do
|
# if the branch is not develop, then it is a merge request and we need to do
|
||||||
# the potential merge. Note that merge conflicts should already been checked earlier
|
# the potential merge. Note that merge conflicts should already been checked earlier
|
||||||
if self.ranAllowMerge:
|
if self.ranAllowMerge:
|
||||||
@@ -364,29 +367,44 @@ class OaiCiTest():
|
|||||||
except:
|
except:
|
||||||
os.kill(os.getppid(),signal.SIGUSR1)
|
os.kill(os.getppid(),signal.SIGUSR1)
|
||||||
|
|
||||||
def InitializeUE(self,HTML,COTS_UE):
|
def InitializeUE(self,HTML,RAN,EPC, COTS_UE, InfraUE):
|
||||||
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
|
if self.ue_id=='':#no ID specified, then it is a COTS controlled by ADB
|
||||||
HELP.GenericHelp(CONST.Version)
|
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
|
||||||
sys.exit('Insufficient Parameter')
|
HELP.GenericHelp(CONST.Version)
|
||||||
multi_jobs = []
|
sys.exit('Insufficient Parameter')
|
||||||
i = 0
|
multi_jobs = []
|
||||||
for device_id in self.UEDevices:
|
i = 0
|
||||||
p = Process(target = self.InitializeUE_common, args = (device_id,i,COTS_UE,))
|
for device_id in self.UEDevices:
|
||||||
p.daemon = True
|
p = Process(target = self.InitializeUE_common, args = (device_id,i,COTS_UE,))
|
||||||
p.start()
|
p.daemon = True
|
||||||
multi_jobs.append(p)
|
p.start()
|
||||||
i += 1
|
multi_jobs.append(p)
|
||||||
for job in multi_jobs:
|
i += 1
|
||||||
job.join()
|
for job in multi_jobs:
|
||||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
job.join()
|
||||||
|
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||||
|
else: #if an ID is specified, it is a module from the yaml infrastructure file
|
||||||
|
#RH
|
||||||
|
Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id])
|
||||||
|
is_module=Module_UE.CheckCMProcess()
|
||||||
|
if is_module:
|
||||||
|
Module_UE.Command("wup")
|
||||||
|
status=Module_UE.GetModuleIPAddress()
|
||||||
|
if status==0:
|
||||||
|
HTML.CreateHtmlTestRow(Module_UE.UEIPAddress, 'OK', CONST.ALL_PROCESSES_OK)
|
||||||
|
logging.debug('UE IP addresss : '+ Module_UE.UEIPAddress)
|
||||||
|
else: #status==-1 failed to retrieve IP address
|
||||||
|
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.UE_IP_ADDRESS_ISSUE)
|
||||||
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
|
||||||
|
return
|
||||||
|
|
||||||
|
|
||||||
def InitializeOAIUE(self,HTML,RAN,EPC,COTS_UE):
|
def InitializeOAIUE(self,HTML,RAN,EPC,COTS_UE):
|
||||||
if self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '' or self.UESourceCodePath == '':
|
if self.UEIPAddress == '' or self.UEUserName == '' or self.UEPassword == '' or self.UESourceCodePath == '':
|
||||||
HELP.GenericHelp(CONST.Version)
|
HELP.GenericHelp(CONST.Version)
|
||||||
sys.exit('Insufficient Parameter')
|
sys.exit('Insufficient Parameter')
|
||||||
|
|
||||||
|
|
||||||
if self.air_interface == 'lte-uesoftmodem':
|
if self.air_interface == 'lte-uesoftmodem':
|
||||||
result = re.search('--no-L2-connect', str(self.Initialize_OAI_UE_args))
|
result = re.search('--no-L2-connect', str(self.Initialize_OAI_UE_args))
|
||||||
if result is None:
|
if result is None:
|
||||||
@@ -403,13 +421,13 @@ class OaiCiTest():
|
|||||||
SSH = sshconnection.SSHConnection()
|
SSH = sshconnection.SSHConnection()
|
||||||
SSH.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
|
SSH.open(self.UEIPAddress, self.UEUserName, self.UEPassword)
|
||||||
# b2xx_fx3_utils reset procedure
|
# b2xx_fx3_utils reset procedure
|
||||||
SSH.command('echo ' + self.UEPassword + ' | sudo -S uhd_find_devices', '\$', 60)
|
SSH.command('echo ' + self.UEPassword + ' | sudo -S uhd_find_devices', '\$', 90)
|
||||||
result = re.search('type: b200', SSH.getBefore())
|
result = re.search('type: b200', SSH.getBefore())
|
||||||
if result is not None:
|
if result is not None:
|
||||||
logging.debug('Found a B2xx device --> resetting it')
|
logging.debug('Found a B2xx device --> resetting it')
|
||||||
SSH.command('echo ' + self.UEPassword + ' | sudo -S b2xx_fx3_utils --reset-device', '\$', 10)
|
SSH.command('echo ' + self.UEPassword + ' | sudo -S b2xx_fx3_utils --reset-device', '\$', 10)
|
||||||
# Reloading FGPA bin firmware
|
# Reloading FGPA bin firmware
|
||||||
SSH.command('echo ' + self.UEPassword + ' | sudo -S uhd_find_devices', '\$', 60)
|
SSH.command('echo ' + self.UEPassword + ' | sudo -S uhd_find_devices', '\$', 90)
|
||||||
result = re.search('type: n3xx', str(SSH.getBefore()))
|
result = re.search('type: n3xx', str(SSH.getBefore()))
|
||||||
if result is not None:
|
if result is not None:
|
||||||
logging.debug('Found a N3xx device --> resetting it')
|
logging.debug('Found a N3xx device --> resetting it')
|
||||||
@@ -945,30 +963,31 @@ class OaiCiTest():
|
|||||||
os.kill(os.getppid(),signal.SIGUSR1)
|
os.kill(os.getppid(),signal.SIGUSR1)
|
||||||
|
|
||||||
def AttachUE(self,HTML,RAN,EPC,COTS_UE):
|
def AttachUE(self,HTML,RAN,EPC,COTS_UE):
|
||||||
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
|
if self.ue_id=='':#no ID specified, then it is a COTS controlled by ADB
|
||||||
HELP.GenericHelp(CONST.Version)
|
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
|
||||||
sys.exit('Insufficient Parameter')
|
HELP.GenericHelp(CONST.Version)
|
||||||
check_eNB = True
|
sys.exit('Insufficient Parameter')
|
||||||
check_OAI_UE = False
|
check_eNB = True
|
||||||
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
|
check_OAI_UE = False
|
||||||
if (pStatus < 0):
|
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
|
||||||
HTML.CreateHtmlTestRow('N/A', 'KO', pStatus)
|
if (pStatus < 0):
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
|
HTML.CreateHtmlTestRow('N/A', 'KO', pStatus)
|
||||||
return
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
|
||||||
multi_jobs = []
|
return
|
||||||
status_queue = SimpleQueue()
|
multi_jobs = []
|
||||||
lock = Lock()
|
status_queue = SimpleQueue()
|
||||||
nb_ue_to_connect = 0
|
lock = Lock()
|
||||||
for device_id in self.UEDevices:
|
nb_ue_to_connect = 0
|
||||||
if (self.nbMaxUEtoAttach == -1) or (nb_ue_to_connect < self.nbMaxUEtoAttach):
|
for device_id in self.UEDevices:
|
||||||
self.UEDevicesStatus[nb_ue_to_connect] = CONST.UE_STATUS_ATTACHING
|
if (self.nbMaxUEtoAttach == -1) or (nb_ue_to_connect < self.nbMaxUEtoAttach):
|
||||||
p = Process(target = self.AttachUE_common, args = (device_id, status_queue, lock,nb_ue_to_connect,COTS_UE,))
|
self.UEDevicesStatus[nb_ue_to_connect] = CONST.UE_STATUS_ATTACHING
|
||||||
p.daemon = True
|
p = Process(target = self.AttachUE_common, args = (device_id, status_queue, lock,nb_ue_to_connect,COTS_UE,))
|
||||||
p.start()
|
p.daemon = True
|
||||||
multi_jobs.append(p)
|
p.start()
|
||||||
nb_ue_to_connect = nb_ue_to_connect + 1
|
multi_jobs.append(p)
|
||||||
for job in multi_jobs:
|
nb_ue_to_connect = nb_ue_to_connect + 1
|
||||||
job.join()
|
for job in multi_jobs:
|
||||||
|
job.join()
|
||||||
|
|
||||||
if (status_queue.empty()):
|
if (status_queue.empty()):
|
||||||
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK)
|
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK)
|
||||||
@@ -1025,37 +1044,44 @@ class OaiCiTest():
|
|||||||
except:
|
except:
|
||||||
os.kill(os.getppid(),signal.SIGUSR1)
|
os.kill(os.getppid(),signal.SIGUSR1)
|
||||||
|
|
||||||
def DetachUE(self,HTML,RAN,EPC,COTS_UE):
|
def DetachUE(self,HTML,RAN,EPC,COTS_UE,InfraUE):
|
||||||
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
|
if self.ue_id=='':#no ID specified, then it is a COTS controlled by ADB
|
||||||
HELP.GenericHelp(CONST.Version)
|
if self.ADBIPAddress == '' or self.ADBUserName == '' or self.ADBPassword == '':
|
||||||
sys.exit('Insufficient Parameter')
|
HELP.GenericHelp(CONST.Version)
|
||||||
check_eNB = True
|
sys.exit('Insufficient Parameter')
|
||||||
check_OAI_UE = False
|
check_eNB = True
|
||||||
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
|
check_OAI_UE = False
|
||||||
if (pStatus < 0):
|
pStatus = self.CheckProcessExist(check_eNB, check_OAI_UE,RAN,EPC)
|
||||||
HTML.CreateHtmlTestRow('N/A', 'KO', pStatus)
|
if (pStatus < 0):
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
|
HTML.CreateHtmlTestRow('N/A', 'KO', pStatus)
|
||||||
return
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
|
||||||
multi_jobs = []
|
return
|
||||||
cnt = 0
|
multi_jobs = []
|
||||||
for device_id in self.UEDevices:
|
cnt = 0
|
||||||
self.UEDevicesStatus[cnt] = CONST.UE_STATUS_DETACHING
|
for device_id in self.UEDevices:
|
||||||
p = Process(target = self.DetachUE_common, args = (device_id,cnt,COTS_UE,))
|
self.UEDevicesStatus[cnt] = CONST.UE_STATUS_DETACHING
|
||||||
p.daemon = True
|
p = Process(target = self.DetachUE_common, args = (device_id,cnt,COTS_UE,))
|
||||||
p.start()
|
p.daemon = True
|
||||||
multi_jobs.append(p)
|
p.start()
|
||||||
cnt += 1
|
multi_jobs.append(p)
|
||||||
for job in multi_jobs:
|
cnt += 1
|
||||||
job.join()
|
for job in multi_jobs:
|
||||||
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
job.join()
|
||||||
result = re.search('T_stdout', str(RAN.Initialize_eNB_args))
|
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||||
if result is not None:
|
result = re.search('T_stdout', str(RAN.Initialize_eNB_args))
|
||||||
logging.debug('Waiting 5 seconds to fill up record file')
|
if result is not None:
|
||||||
time.sleep(5)
|
logging.debug('Waiting 5 seconds to fill up record file')
|
||||||
cnt = 0
|
time.sleep(5)
|
||||||
while cnt < len(self.UEDevices):
|
cnt = 0
|
||||||
self.UEDevicesStatus[cnt] = CONST.UE_STATUS_DETACHED
|
while cnt < len(self.UEDevices):
|
||||||
cnt += 1
|
self.UEDevicesStatus[cnt] = CONST.UE_STATUS_DETACHED
|
||||||
|
cnt += 1
|
||||||
|
else:#if an ID is specified, it is a module from the yaml infrastructure file
|
||||||
|
Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id])
|
||||||
|
Module_UE.Command("detach")
|
||||||
|
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def RebootUE_common(self, device_id):
|
def RebootUE_common(self, device_id):
|
||||||
try:
|
try:
|
||||||
@@ -1437,14 +1463,20 @@ class OaiCiTest():
|
|||||||
statusQueue.put(message)
|
statusQueue.put(message)
|
||||||
lock.release()
|
lock.release()
|
||||||
|
|
||||||
def Ping_common(self, lock, UE_IPAddress, device_id, statusQueue,EPC):
|
def Ping_common(self, lock, UE_IPAddress, device_id, statusQueue,EPC, Module_UE):
|
||||||
try:
|
try:
|
||||||
SSH = sshconnection.SSHConnection()
|
SSH = sshconnection.SSHConnection()
|
||||||
# Launch ping on the EPC side (true for ltebox and old open-air-cn)
|
# Launch ping on the EPC side (true for ltebox and old open-air-cn)
|
||||||
# But for OAI-Rel14-CUPS, we launch from python executor
|
# But for OAI-Rel14-CUPS, we launch from python executor
|
||||||
launchFromEpc = True
|
launchFromEpc = True
|
||||||
|
launchFromModule = False
|
||||||
if re.match('OAI-Rel14-CUPS', EPC.Type, re.IGNORECASE):
|
if re.match('OAI-Rel14-CUPS', EPC.Type, re.IGNORECASE):
|
||||||
launchFromEpc = False
|
launchFromEpc = False
|
||||||
|
#if module, ping from module to EPC
|
||||||
|
if self.ue_id!='':
|
||||||
|
launchFromEpc = False
|
||||||
|
launchfromModule = True
|
||||||
|
|
||||||
ping_time = re.findall("-c (\d+)",str(self.ping_args))
|
ping_time = re.findall("-c (\d+)",str(self.ping_args))
|
||||||
|
|
||||||
if launchFromEpc:
|
if launchFromEpc:
|
||||||
@@ -1462,21 +1494,34 @@ class OaiCiTest():
|
|||||||
#copy the ping log file to have it locally for analysis (ping stats)
|
#copy the ping log file to have it locally for analysis (ping stats)
|
||||||
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath + '/scripts/ping_' + self.testCase_id + '_' + device_id + '.log', '.')
|
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath + '/scripts/ping_' + self.testCase_id + '_' + device_id + '.log', '.')
|
||||||
else:
|
else:
|
||||||
#ping log file is on the python executor
|
if launchfromModule == False:
|
||||||
cmd = 'ping ' + self.ping_args + ' ' + UE_IPAddress + ' 2>&1 > ping_' + self.testCase_id + '_' + device_id + '.log'
|
#ping log file is on the python executor
|
||||||
message = cmd + '\n'
|
cmd = 'ping ' + self.ping_args + ' ' + UE_IPAddress + ' 2>&1 > ping_' + self.testCase_id + '_' + device_id + '.log'
|
||||||
logging.debug(cmd)
|
message = cmd + '\n'
|
||||||
ret = subprocess.run(cmd, shell=True)
|
logging.debug(cmd)
|
||||||
ping_status = ret.returncode
|
ret = subprocess.run(cmd, shell=True)
|
||||||
#copy the ping log file to an other folder for log collection (source and destination are EPC)
|
ping_status = ret.returncode
|
||||||
SSH.copyout(EPC.IPAddress, EPC.UserName, EPC.Password, 'ping_' + self.testCase_id + '_' + device_id + '.log', EPC.SourceCodePath + '/scripts')
|
#copy the ping log file to an other folder for log collection (source and destination are EPC)
|
||||||
#copy the ping log file to have it locally for analysis (ping stats)
|
SSH.copyout(EPC.IPAddress, EPC.UserName, EPC.Password, 'ping_' + self.testCase_id + '_' + device_id + '.log', EPC.SourceCodePath + '/scripts')
|
||||||
logging.debug(EPC.SourceCodePath + 'ping_' + self.testCase_id + '_' + device_id + '.log')
|
#copy the ping log file to have it locally for analysis (ping stats)
|
||||||
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath +'/scripts/ping_' + self.testCase_id + '_' + device_id + '.log', '.')
|
logging.debug(EPC.SourceCodePath + 'ping_' + self.testCase_id + '_' + device_id + '.log')
|
||||||
|
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath +'/scripts/ping_' + self.testCase_id + '_' + device_id + '.log', '.')
|
||||||
|
|
||||||
|
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
|
||||||
|
#cat is executed on EPC
|
||||||
|
SSH.command('cat ' + EPC.SourceCodePath + '/scripts/ping_' + self.testCase_id + '_' + device_id + '.log', '\$', 5)
|
||||||
|
else: #launch from Module
|
||||||
|
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
|
||||||
|
#ping from module NIC rather than IP address to make sure round trip is over the air
|
||||||
|
cmd = 'ping -I ' + Module_UE.UENetwork + ' ' + self.ping_args + ' ' + EPC.IPAddress + ' 2>&1 > ping_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||||
|
SSH.command(cmd,'\$',int(ping_time[0])*1.5)
|
||||||
|
#copy the ping log file to have it locally for analysis (ping stats)
|
||||||
|
SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'ping_' + self.testCase_id + '_' + self.ue_id + '.log', '.')
|
||||||
|
|
||||||
|
#cat is executed locally
|
||||||
|
SSH.command('cat ping_' + self.testCase_id + '_' + self.ue_id + '.log', '\$', 5)
|
||||||
|
ping_status=0
|
||||||
|
|
||||||
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
|
|
||||||
#cat is executed on EPC
|
|
||||||
SSH.command('cat ' + EPC.SourceCodePath + '/scripts/ping_' + self.testCase_id + '_' + device_id + '.log', '\$', 5)
|
|
||||||
# TIMEOUT CASE
|
# TIMEOUT CASE
|
||||||
if ping_status < 0:
|
if ping_status < 0:
|
||||||
message = 'Ping with UE (' + str(UE_IPAddress) + ') crashed due to TIMEOUT!'
|
message = 'Ping with UE (' + str(UE_IPAddress) + ') crashed due to TIMEOUT!'
|
||||||
@@ -1660,7 +1705,7 @@ class OaiCiTest():
|
|||||||
except:
|
except:
|
||||||
os.kill(os.getppid(),signal.SIGUSR1)
|
os.kill(os.getppid(),signal.SIGUSR1)
|
||||||
|
|
||||||
def Ping(self,HTML,RAN,EPC,COTS_UE):
|
def Ping(self,HTML,RAN,EPC,COTS_UE, InfraUE):
|
||||||
result = re.search('noS1', str(RAN.Initialize_eNB_args))
|
result = re.search('noS1', str(RAN.Initialize_eNB_args))
|
||||||
if result is not None:
|
if result is not None:
|
||||||
self.PingNoS1(HTML,RAN,EPC,COTS_UE)
|
self.PingNoS1(HTML,RAN,EPC,COTS_UE)
|
||||||
@@ -1678,18 +1723,30 @@ class OaiCiTest():
|
|||||||
HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
|
HTML.CreateHtmlTestRow(self.ping_args, 'KO', pStatus)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
|
||||||
return
|
return
|
||||||
ueIpStatus = self.GetAllUEIPAddresses()
|
|
||||||
if (ueIpStatus < 0):
|
if self.ue_id=="":
|
||||||
HTML.CreateHtmlTestRow(self.ping_args, 'KO', CONST.UE_IP_ADDRESS_ISSUE)
|
Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra['dummy']) #RH, temporary, we need a dummy Module_UE object to pass to Ping_common
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
|
ueIpStatus = self.GetAllUEIPAddresses()
|
||||||
return
|
if (ueIpStatus < 0):
|
||||||
|
HTML.CreateHtmlTestRow(self.ping_args, 'KO', CONST.UE_IP_ADDRESS_ISSUE)
|
||||||
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
self.UEIPAddresses=[]
|
||||||
|
Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id])
|
||||||
|
Module_UE.GetModuleIPAddress()
|
||||||
|
self.UEIPAddresses.append(Module_UE.UEIPAddress)
|
||||||
|
logging.debug(self.UEIPAddresses)
|
||||||
multi_jobs = []
|
multi_jobs = []
|
||||||
i = 0
|
i = 0
|
||||||
lock = Lock()
|
lock = Lock()
|
||||||
status_queue = SimpleQueue()
|
status_queue = SimpleQueue()
|
||||||
for UE_IPAddress in self.UEIPAddresses:
|
for UE_IPAddress in self.UEIPAddresses:
|
||||||
device_id = self.UEDevices[i]
|
if self.ue_id=="":
|
||||||
p = Process(target = self.Ping_common, args = (lock,UE_IPAddress,device_id,status_queue,EPC,))
|
device_id = self.UEDevices[i]
|
||||||
|
else:
|
||||||
|
device_id = Module_UE.ID + "-" + Module_UE.Kind
|
||||||
|
p = Process(target = self.Ping_common, args = (lock,UE_IPAddress,device_id,status_queue,EPC,Module_UE,))
|
||||||
p.daemon = True
|
p.daemon = True
|
||||||
p.start()
|
p.start()
|
||||||
multi_jobs.append(p)
|
multi_jobs.append(p)
|
||||||
@@ -1864,8 +1921,8 @@ class OaiCiTest():
|
|||||||
else:
|
else:
|
||||||
return -2
|
return -2
|
||||||
|
|
||||||
def Iperf_analyzeV2Server(self, lock, UE_IPAddress, device_id, statusQueue, iperf_real_options):
|
def Iperf_analyzeV2Server(self, lock, UE_IPAddress, device_id, statusQueue, iperf_real_options, filename,type):
|
||||||
if (not os.path.isfile('iperf_server_' + self.testCase_id + '_' + device_id + '.log')):
|
if (not os.path.isfile(filename)):
|
||||||
self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Could not analyze from server log')
|
self.ping_iperf_wrong_exit(lock, UE_IPAddress, device_id, statusQueue, 'Could not analyze from server log')
|
||||||
return
|
return
|
||||||
# Computing the requested bandwidth in float
|
# Computing the requested bandwidth in float
|
||||||
@@ -1890,14 +1947,18 @@ class OaiCiTest():
|
|||||||
req_bandwidth = '%.1f Gbits/sec' % req_bw
|
req_bandwidth = '%.1f Gbits/sec' % req_bw
|
||||||
req_bw = req_bw * 1000000000
|
req_bw = req_bw * 1000000000
|
||||||
|
|
||||||
server_file = open('iperf_server_' + self.testCase_id + '_' + device_id + '.log', 'r')
|
server_file = open(filename, 'r')
|
||||||
br_sum = 0.0
|
br_sum = 0.0
|
||||||
ji_sum = 0.0
|
ji_sum = 0.0
|
||||||
pl_sum = 0
|
pl_sum = 0
|
||||||
ps_sum = 0
|
ps_sum = 0
|
||||||
row_idx = 0
|
row_idx = 0
|
||||||
for line in server_file.readlines():
|
for line in server_file.readlines():
|
||||||
result = re.search('(?P<bitrate>[0-9\.]+ [KMG]bits\/sec) +(?P<jitter>[0-9\.]+ ms) +(?P<lostPack>[0-9]+)/ +(?P<sentPack>[0-9]+)', str(line))
|
if type==0:
|
||||||
|
result = re.search('(?P<bitrate>[0-9\.]+ [KMG]bits\/sec) +(?P<jitter>[0-9\.]+ ms) +(?P<lostPack>[0-9]+)/ +(?P<sentPack>[0-9]+)', str(line))
|
||||||
|
else:
|
||||||
|
result = re.search('^\[ \d\].+ +(?P<bitrate>[0-9\.]+ [KMG]bits\/sec) +(?P<jitter>[0-9\.]+ ms) +(?P<lostPack>[0-9]+)\/(?P<sentPack>[0-9]+)', str(line))
|
||||||
|
|
||||||
if result is not None:
|
if result is not None:
|
||||||
bitrate = result.group('bitrate')
|
bitrate = result.group('bitrate')
|
||||||
jitter = result.group('jitter')
|
jitter = result.group('jitter')
|
||||||
@@ -2127,12 +2188,65 @@ class OaiCiTest():
|
|||||||
SSH.command('docker cp prod-trf-gen:/iperf-2.0.5/iperf_server_' + self.testCase_id + '_' + device_id + '.log ' + EPC.SourceCodePath + '/scripts', '\$', 5)
|
SSH.command('docker cp prod-trf-gen:/iperf-2.0.5/iperf_server_' + self.testCase_id + '_' + device_id + '.log ' + EPC.SourceCodePath + '/scripts', '\$', 5)
|
||||||
SSH.close()
|
SSH.close()
|
||||||
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath+ '/scripts/iperf_server_' + self.testCase_id + '_' + device_id + '.log', '.')
|
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, EPC.SourceCodePath+ '/scripts/iperf_server_' + self.testCase_id + '_' + device_id + '.log', '.')
|
||||||
self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, modified_options)
|
filename='iperf_server_' + self.testCase_id + '_' + device_id + '.log'
|
||||||
|
self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, modified_options,filename,0)
|
||||||
# in case of OAI-UE
|
# in case of OAI-UE
|
||||||
if (device_id == 'OAI-UE'):
|
if (device_id == 'OAI-UE'):
|
||||||
SSH.copyin(self.UEIPAddress, self.UEUserName, self.UEPassword, self.UESourceCodePath + '/cmake_targets/iperf_' + self.testCase_id + '_' + device_id + '.log', '.')
|
SSH.copyin(self.UEIPAddress, self.UEUserName, self.UEPassword, self.UESourceCodePath + '/cmake_targets/iperf_' + self.testCase_id + '_' + device_id + '.log', '.')
|
||||||
SSH.copyout(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_' + self.testCase_id + '_' + device_id + '.log', EPC.SourceCodePath + '/scripts')
|
SSH.copyout(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_' + self.testCase_id + '_' + device_id + '.log', EPC.SourceCodePath + '/scripts')
|
||||||
|
|
||||||
|
|
||||||
|
def Iperf_Module(self, lock, UE_IPAddress, device_id, idx, ue_num, statusQueue,EPC, Module_UE):
|
||||||
|
SSH = sshconnection.SSHConnection()
|
||||||
|
iperf_time = self.Iperf_ComputeTime()
|
||||||
|
if self.iperf_direction=="DL":
|
||||||
|
logging.debug("Iperf for Module in DL mode detected")
|
||||||
|
#server side UE
|
||||||
|
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
|
||||||
|
cmd = 'rm iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||||
|
SSH.command(cmd,'\$',5)
|
||||||
|
cmd = 'echo $USER; nohup /opt/iperf-2.0.10/iperf -s -B ' + UE_IPAddress + ' -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||||
|
SSH.command(cmd,'\$',5)
|
||||||
|
#client side EPC
|
||||||
|
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
|
||||||
|
cmd = 'rm iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||||
|
SSH.command(cmd,'\$',5)
|
||||||
|
cmd = 'iperf -c ' + UE_IPAddress + ' ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||||
|
SSH.command(cmd,'\$',int(iperf_time)*5.0)
|
||||||
|
#copy the 2 resulting files locally
|
||||||
|
SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log', '.')
|
||||||
|
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '.')
|
||||||
|
#send for analysis
|
||||||
|
filename='iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||||
|
self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,filename,1)
|
||||||
|
|
||||||
|
elif self.iperf_direction=="UL":#does not work at the moment
|
||||||
|
logging.debug("Iperf for Module in UL mode detected")
|
||||||
|
#server side EPC
|
||||||
|
SSH.open(EPC.IPAddress, EPC.UserName, EPC.Password)
|
||||||
|
cmd = 'rm iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||||
|
SSH.command(cmd,'\$',5)
|
||||||
|
cmd = 'echo $USER; nohup iperf -s -i 1 -u 2>&1 > iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||||
|
SSH.command(cmd,'\$',5)
|
||||||
|
|
||||||
|
#client side UE
|
||||||
|
SSH.open(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword)
|
||||||
|
cmd = 'rm iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||||
|
SSH.command(cmd,'\$',5)
|
||||||
|
SSH.command('/opt/iperf-2.0.10/iperf -c 192.172.0.1 ' + self.iperf_args + ' 2>&1 > iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '\$', int(iperf_time)*5.0)
|
||||||
|
|
||||||
|
#copy the 2 resulting files locally
|
||||||
|
SSH.copyin(Module_UE.HostIPAddress, Module_UE.HostUsername, Module_UE.HostPassword, 'iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log', '.')
|
||||||
|
SSH.copyin(EPC.IPAddress, EPC.UserName, EPC.Password, 'iperf_server_' + self.testCase_id + '_' + self.ue_id + '.log', '.')
|
||||||
|
#send for analysis
|
||||||
|
filename='iperf_client_' + self.testCase_id + '_' + self.ue_id + '.log'
|
||||||
|
self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, self.iperf_args,filename,1)
|
||||||
|
else :
|
||||||
|
logging.debug("Incorrect or missing IPERF direction in XML")
|
||||||
|
|
||||||
|
SSH.close()
|
||||||
|
return
|
||||||
|
|
||||||
def Iperf_common(self, lock, UE_IPAddress, device_id, idx, ue_num, statusQueue,EPC):
|
def Iperf_common(self, lock, UE_IPAddress, device_id, idx, ue_num, statusQueue,EPC):
|
||||||
try:
|
try:
|
||||||
SSH = sshconnection.SSHConnection()
|
SSH = sshconnection.SSHConnection()
|
||||||
@@ -2229,8 +2343,13 @@ class OaiCiTest():
|
|||||||
# Launch the IPERF client on the EPC side for DL (true for ltebox and old open-air-cn
|
# Launch the IPERF client on the EPC side for DL (true for ltebox and old open-air-cn
|
||||||
# But for OAI-Rel14-CUPS, we launch from python executor
|
# But for OAI-Rel14-CUPS, we launch from python executor
|
||||||
launchFromEpc = True
|
launchFromEpc = True
|
||||||
|
launchFromModule = False
|
||||||
if re.match('OAI-Rel14-CUPS', EPC.Type, re.IGNORECASE):
|
if re.match('OAI-Rel14-CUPS', EPC.Type, re.IGNORECASE):
|
||||||
launchFromEpc = False
|
launchFromEpc = False
|
||||||
|
#if module
|
||||||
|
if self.ue_id!='' and self.iperf :
|
||||||
|
launchFromEpc = False
|
||||||
|
launchfromModule = True
|
||||||
# When using a docker-based deployment, IPERF client shall be launched from trf container
|
# When using a docker-based deployment, IPERF client shall be launched from trf container
|
||||||
launchFromTrfContainer = False
|
launchFromTrfContainer = False
|
||||||
if re.match('OAI-Rel14-Docker', EPC.Type, re.IGNORECASE):
|
if re.match('OAI-Rel14-Docker', EPC.Type, re.IGNORECASE):
|
||||||
@@ -2334,7 +2453,8 @@ class OaiCiTest():
|
|||||||
subprocess.run(cmd, shell=True)
|
subprocess.run(cmd, shell=True)
|
||||||
except:
|
except:
|
||||||
pass
|
pass
|
||||||
self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, modified_options)
|
filename='iperf_server_' + self.testCase_id + '_' + device_id + '.log'
|
||||||
|
self.Iperf_analyzeV2Server(lock, UE_IPAddress, device_id, statusQueue, modified_options,filename,0)
|
||||||
|
|
||||||
# in case of OAI UE:
|
# in case of OAI UE:
|
||||||
if (device_id == 'OAI-UE'):
|
if (device_id == 'OAI-UE'):
|
||||||
@@ -2422,7 +2542,8 @@ class OaiCiTest():
|
|||||||
if (os.path.isfile('iperf_server_' + self.testCase_id + '.log')):
|
if (os.path.isfile('iperf_server_' + self.testCase_id + '.log')):
|
||||||
os.remove('iperf_server_' + self.testCase_id + '.log')
|
os.remove('iperf_server_' + self.testCase_id + '.log')
|
||||||
SSH.copyin(iServerIPAddr, iServerUser, iServerPasswd, '/tmp/tmp_iperf_server_' + self.testCase_id + '.log', 'iperf_server_' + self.testCase_id + '_OAI-UE.log')
|
SSH.copyin(iServerIPAddr, iServerUser, iServerPasswd, '/tmp/tmp_iperf_server_' + self.testCase_id + '.log', 'iperf_server_' + self.testCase_id + '_OAI-UE.log')
|
||||||
self.Iperf_analyzeV2Server(lock, '10.0.1.2', 'OAI-UE', status_queue, modified_options)
|
filename='iperf_server_' + self.testCase_id + '_OAI-UE.log'
|
||||||
|
self.Iperf_analyzeV2Server(lock, '10.0.1.2', 'OAI-UE', status_queue, modified_options,filename,0)
|
||||||
|
|
||||||
# copying on the EPC server for logCollection
|
# copying on the EPC server for logCollection
|
||||||
if (clientStatus == -1):
|
if (clientStatus == -1):
|
||||||
@@ -2457,7 +2578,7 @@ class OaiCiTest():
|
|||||||
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'KO', len(self.UEDevices), html_queue)
|
HTML.CreateHtmlTestRowQueue(self.iperf_args, 'KO', len(self.UEDevices), html_queue)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
|
||||||
|
|
||||||
def Iperf(self,HTML,RAN,EPC,COTS_UE):
|
def Iperf(self,HTML,RAN,EPC,COTS_UE, InfraUE):
|
||||||
result = re.search('noS1', str(RAN.Initialize_eNB_args))
|
result = re.search('noS1', str(RAN.Initialize_eNB_args))
|
||||||
if result is not None:
|
if result is not None:
|
||||||
self.IperfNoS1(HTML,RAN,EPC,COTS_UE)
|
self.IperfNoS1(HTML,RAN,EPC,COTS_UE)
|
||||||
@@ -2475,12 +2596,21 @@ class OaiCiTest():
|
|||||||
HTML.CreateHtmlTestRow(self.iperf_args, 'KO', pStatus)
|
HTML.CreateHtmlTestRow(self.iperf_args, 'KO', pStatus)
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
|
||||||
return
|
return
|
||||||
ueIpStatus = self.GetAllUEIPAddresses()
|
|
||||||
if (ueIpStatus < 0):
|
if self.ue_id=="":#is not a module, follow legacy code
|
||||||
logging.debug('going here')
|
ueIpStatus = self.GetAllUEIPAddresses()
|
||||||
HTML.CreateHtmlTestRow(self.iperf_args, 'KO', CONST.UE_IP_ADDRESS_ISSUE)
|
if (ueIpStatus < 0):
|
||||||
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
|
HTML.CreateHtmlTestRow(self.iperf_args, 'KO', CONST.UE_IP_ADDRESS_ISSUE)
|
||||||
return
|
self.AutoTerminateUEandeNB(HTML,RAN,COTS_UE,EPC)
|
||||||
|
return
|
||||||
|
else: #is a module
|
||||||
|
self.UEIPAddresses=[]
|
||||||
|
Module_UE = cls_module_ue.Module_UE(InfraUE.ci_ue_infra[self.ue_id])
|
||||||
|
Module_UE.GetModuleIPAddress()
|
||||||
|
self.UEIPAddresses.append(Module_UE.UEIPAddress)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
self.dummyIperfVersion = '2.0.10'
|
self.dummyIperfVersion = '2.0.10'
|
||||||
#cmd = 'iperf --version'
|
#cmd = 'iperf --version'
|
||||||
@@ -2498,9 +2628,15 @@ class OaiCiTest():
|
|||||||
ue_num = len(self.UEIPAddresses)
|
ue_num = len(self.UEIPAddresses)
|
||||||
lock = Lock()
|
lock = Lock()
|
||||||
status_queue = SimpleQueue()
|
status_queue = SimpleQueue()
|
||||||
|
logging.debug(self.UEIPAddresses)
|
||||||
for UE_IPAddress in self.UEIPAddresses:
|
for UE_IPAddress in self.UEIPAddresses:
|
||||||
device_id = self.UEDevices[i]
|
device_id = self.UEDevices[i]
|
||||||
p = Process(target = self.Iperf_common, args = (lock,UE_IPAddress,device_id,i,ue_num,status_queue,EPC,))
|
#special quick and dirty treatment for modules, iperf to be restructured
|
||||||
|
if self.ue_id!="": #is module
|
||||||
|
device_id = Module_UE.ID + "-" + Module_UE.Kind
|
||||||
|
p = Process(target = self.Iperf_Module ,args = (lock, UE_IPAddress, device_id, i, ue_num, status_queue, EPC, Module_UE,))
|
||||||
|
else: #legacy code
|
||||||
|
p = Process(target = self.Iperf_common, args = (lock, UE_IPAddress, device_id, i, ue_num, status_queue, EPC, ))
|
||||||
p.daemon = True
|
p.daemon = True
|
||||||
p.start()
|
p.start()
|
||||||
multi_jobs.append(p)
|
multi_jobs.append(p)
|
||||||
@@ -3273,7 +3409,7 @@ class OaiCiTest():
|
|||||||
UhdVersion = result.group('uhd_version')
|
UhdVersion = result.group('uhd_version')
|
||||||
logging.debug('UHD Version is: ' + UhdVersion)
|
logging.debug('UHD Version is: ' + UhdVersion)
|
||||||
HTML.UhdVersion[idx]=UhdVersion
|
HTML.UhdVersion[idx]=UhdVersion
|
||||||
SSH.command('echo ' + Password + ' | sudo -S uhd_find_devices', '\$', 60)
|
SSH.command('echo ' + Password + ' | sudo -S uhd_find_devices', '\$', 90)
|
||||||
usrp_boards = re.findall('product: ([0-9A-Za-z]+)\\\\r\\\\n', SSH.getBefore())
|
usrp_boards = re.findall('product: ([0-9A-Za-z]+)\\\\r\\\\n', SSH.getBefore())
|
||||||
count = 0
|
count = 0
|
||||||
for board in usrp_boards:
|
for board in usrp_boards:
|
||||||
|
|||||||
@@ -148,7 +148,7 @@ class PhySim:
|
|||||||
|
|
||||||
# if the commit ID is provided, use it to point to it
|
# if the commit ID is provided, use it to point to it
|
||||||
if self.ranCommitID != '':
|
if self.ranCommitID != '':
|
||||||
mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 5)
|
mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30)
|
||||||
# if the branch is not develop, then it is a merge request and we need to do
|
# if the branch is not develop, then it is a merge request and we need to do
|
||||||
# the potential merge. Note that merge conflicts should have already been checked earlier
|
# the potential merge. Note that merge conflicts should have already been checked earlier
|
||||||
if (self.ranAllowMerge):
|
if (self.ranAllowMerge):
|
||||||
|
|||||||
@@ -0,0 +1,337 @@
|
|||||||
|
#/*
|
||||||
|
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
# * contributor license agreements. See the NOTICE file distributed with
|
||||||
|
# * this work for additional information regarding copyright ownership.
|
||||||
|
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
# * the OAI Public License, Version 1.1 (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.openairinterface.org/?page_id=698
|
||||||
|
# *
|
||||||
|
# * 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.
|
||||||
|
# *-------------------------------------------------------------------------------
|
||||||
|
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
# * contact@openairinterface.org
|
||||||
|
# */
|
||||||
|
#---------------------------------------------------------------------
|
||||||
|
# Python for CI of OAI-eNB + COTS-UE
|
||||||
|
#
|
||||||
|
# Required Python Version
|
||||||
|
# Python 3.x
|
||||||
|
#
|
||||||
|
# Required Python Package
|
||||||
|
# pexpect
|
||||||
|
#---------------------------------------------------------------------
|
||||||
|
|
||||||
|
#-----------------------------------------------------------
|
||||||
|
# Import
|
||||||
|
#-----------------------------------------------------------
|
||||||
|
import logging
|
||||||
|
import sshconnection as SSH
|
||||||
|
import html
|
||||||
|
import os
|
||||||
|
import re
|
||||||
|
import time
|
||||||
|
import sys
|
||||||
|
import constants as CONST
|
||||||
|
import helpreadme as HELP
|
||||||
|
|
||||||
|
class PhySim:
|
||||||
|
def __init__(self):
|
||||||
|
self.eNBIpAddr = ""
|
||||||
|
self.eNBUserName = ""
|
||||||
|
self.eNBPassword = ""
|
||||||
|
self.OCUserName = ""
|
||||||
|
self.OCPassword = ""
|
||||||
|
self.OCProjectName = ""
|
||||||
|
self.eNBSourceCodePath = ""
|
||||||
|
self.ranRepository = ""
|
||||||
|
self.ranBranch = ""
|
||||||
|
self.ranCommitID= ""
|
||||||
|
self.ranAllowMerge= False
|
||||||
|
self.ranTargetBranch= ""
|
||||||
|
self.testResult = {}
|
||||||
|
self.testCount = [0,0,0]
|
||||||
|
self.testSummary = {}
|
||||||
|
self.testStatus = False
|
||||||
|
|
||||||
|
#-----------------$
|
||||||
|
#PUBLIC Methods$
|
||||||
|
#-----------------$
|
||||||
|
|
||||||
|
def Deploy_PhySim(self, HTML, RAN):
|
||||||
|
if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
|
||||||
|
HELP.GenericHelp(CONST.Version)
|
||||||
|
sys.exit('Insufficient Parameter')
|
||||||
|
lIpAddr = self.eNBIPAddress
|
||||||
|
lUserName = self.eNBUserName
|
||||||
|
lPassWord = self.eNBPassword
|
||||||
|
lSourcePath = self.eNBSourceCodePath
|
||||||
|
ocUserName = self.OCUserName
|
||||||
|
ocPassword = self.OCPassword
|
||||||
|
ocProjectName = self.OCProjectName
|
||||||
|
|
||||||
|
if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '' or ocUserName == '' or ocPassword == '' or ocProjectName == '':
|
||||||
|
HELP.GenericHelp(CONST.Version)
|
||||||
|
sys.exit('Insufficient Parameter')
|
||||||
|
logging.debug('Building on server: ' + lIpAddr)
|
||||||
|
mySSH = SSH.SSHConnection()
|
||||||
|
mySSH.open(lIpAddr, lUserName, lPassWord)
|
||||||
|
|
||||||
|
self.testCase_id = HTML.testCase_id
|
||||||
|
|
||||||
|
# on RedHat/CentOS .git extension is mandatory
|
||||||
|
result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository)
|
||||||
|
if result is not None:
|
||||||
|
full_ran_repo_name = self.ranRepository.replace('git/', 'git')
|
||||||
|
else:
|
||||||
|
full_ran_repo_name = self.ranRepository + '.git'
|
||||||
|
mySSH.command('echo ' + lPassWord + ' | sudo rm -Rf ' + lSourcePath, '\$', 30)
|
||||||
|
mySSH.command('mkdir -p ' + lSourcePath, '\$', 5)
|
||||||
|
mySSH.command('cd ' + lSourcePath, '\$', 5)
|
||||||
|
mySSH.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + full_ran_repo_name + ' .; else stdbuf -o0 git fetch --prune; fi', '\$', 600)
|
||||||
|
# Raphael: here add a check if git clone or git fetch went smoothly
|
||||||
|
mySSH.command('git config user.email "jenkins@openairinterface.org"', '\$', 5)
|
||||||
|
mySSH.command('git config user.name "OAI Jenkins"', '\$', 5)
|
||||||
|
|
||||||
|
mySSH.command('echo ' + lPassWord + ' | sudo -S git clean -x -d -ff', '\$', 30)
|
||||||
|
mySSH.command('mkdir -p cmake_targets/log', '\$', 5)
|
||||||
|
# if the commit ID is provided use it to point to it
|
||||||
|
if self.ranCommitID != '':
|
||||||
|
mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30)
|
||||||
|
if self.ranAllowMerge:
|
||||||
|
imageTag = "ci-temp"
|
||||||
|
if self.ranTargetBranch == '':
|
||||||
|
if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'):
|
||||||
|
mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 5)
|
||||||
|
else:
|
||||||
|
logging.debug('Merging with the target branch: ' + self.ranTargetBranch)
|
||||||
|
mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 5)
|
||||||
|
else:
|
||||||
|
imageTag = "develop"
|
||||||
|
# Check if image is exist on the Red Hat server, before pushing it to OC cluster
|
||||||
|
mySSH.command("sudo podman image inspect --format='Size = {{.Size}} bytes' oai-physim:" + imageTag, '\$', 60)
|
||||||
|
if mySSH.getBefore().count('no such image') != 0:
|
||||||
|
logging.error('\u001B[1m No such image oai-physim\u001B[0m')
|
||||||
|
mySSH.close()
|
||||||
|
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.PHYSIM_IMAGE_ABSENT)
|
||||||
|
RAN.prematureExit = True
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
result = re.search('Size *= *(?P<size>[0-9\-]+) *bytes', mySSH.getBefore())
|
||||||
|
if result is not None:
|
||||||
|
imageSize = float(result.group('size'))
|
||||||
|
imageSize = imageSize / 1000
|
||||||
|
if imageSize < 1000:
|
||||||
|
logging.debug('\u001B[1m oai-physim size is ' + ('%.0f' % imageSize) + ' kbytes\u001B[0m')
|
||||||
|
else:
|
||||||
|
imageSize = imageSize / 1000
|
||||||
|
if imageSize < 1000:
|
||||||
|
logging.debug('\u001B[1m oai-physim size is ' + ('%.0f' % imageSize) + ' Mbytes\u001B[0m')
|
||||||
|
else:
|
||||||
|
imageSize = imageSize / 1000
|
||||||
|
logging.debug('\u001B[1m oai-physim is ' + ('%.3f' % imageSize) + ' Gbytes\u001B[0m')
|
||||||
|
else:
|
||||||
|
logging.debug('oai-physim size is unknown')
|
||||||
|
|
||||||
|
# logging to OC Cluster and then switch to corresponding project
|
||||||
|
mySSH.command(f'oc login -u {ocUserName} -p {ocPassword}', '\$', 6)
|
||||||
|
if mySSH.getBefore().count('Login successful.') == 0:
|
||||||
|
logging.error('\u001B[1m OC Cluster Login Failed\u001B[0m')
|
||||||
|
mySSH.close()
|
||||||
|
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
|
||||||
|
RAN.prematureExit = True
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
logging.debug('\u001B[1m Login to OC Cluster Successfully\u001B[0m')
|
||||||
|
mySSH.command(f'oc project {ocProjectName}', '\$', 6)
|
||||||
|
if mySSH.getBefore().count(f'Already on project "{ocProjectName}"') == 0 and mySSH.getBefore().count(f'Now using project "{self.OCProjectName}"') == 0:
|
||||||
|
logging.error(f'\u001B[1m Unable to access OC project {ocProjectName}\u001B[0m')
|
||||||
|
mySSH.close()
|
||||||
|
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_PROJECT_FAIL)
|
||||||
|
RAN.prematureExit = True
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
logging.debug(f'\u001B[1m Now using project {ocProjectName}\u001B[0m')
|
||||||
|
|
||||||
|
# Tag the image and push to the OC cluster
|
||||||
|
mySSH.command('oc whoami -t | sudo podman login -u ' + ocUserName + ' --password-stdin https://default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/ --tls-verify=false', '\$', 6)
|
||||||
|
if mySSH.getBefore().count('Login Succeeded!') == 0:
|
||||||
|
logging.error('\u001B[1m Podman Login to OC Cluster Registry Failed\u001B[0m')
|
||||||
|
mySSH.close()
|
||||||
|
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_LOGIN_FAIL)
|
||||||
|
RAN.prematureExit = True
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
logging.debug('\u001B[1m Podman Login to OC Cluster Registry Successfully\u001B[0m')
|
||||||
|
time.sleep(2)
|
||||||
|
mySSH.command('oc create -f openshift/oai-physim-image-stream.yml', '\$', 6)
|
||||||
|
if mySSH.getBefore().count('(AlreadyExists):') == 0 and mySSH.getBefore().count('created') == 0:
|
||||||
|
logging.error(f'\u001B[1m Image Stream "oai-physim" Creation Failed on OC Cluster {ocProjectName}\u001B[0m')
|
||||||
|
mySSH.close()
|
||||||
|
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_IS_FAIL)
|
||||||
|
RAN.prematureExit = True
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
logging.debug(f'\u001B[1m Image Stream "oai-physim" created on OC project {ocProjectName}\u001B[0m')
|
||||||
|
time.sleep(2)
|
||||||
|
mySSH.command(f'sudo podman tag oai-physim:{imageTag} default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag}', '\$', 6)
|
||||||
|
time.sleep(2)
|
||||||
|
mySSH.command(f'sudo podman push default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag} --tls-verify=false', '\$', 30)
|
||||||
|
if mySSH.getBefore().count('Storing signatures') == 0:
|
||||||
|
logging.error('\u001B[1m Image "oai-physim" push to OC Cluster Registry Failed\u001B[0m')
|
||||||
|
mySSH.close()
|
||||||
|
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_IS_FAIL)
|
||||||
|
RAN.prematureExit = True
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
logging.debug('\u001B[1m Image "oai-physim" push to OC Cluster Registry Successfully\u001B[0m')
|
||||||
|
|
||||||
|
# Using helm charts deployment
|
||||||
|
time.sleep(5)
|
||||||
|
mySSH.command(f'sed -i -e "s#TAG#{imageTag}#g" ./charts/physims/values.yaml', '\$', 6)
|
||||||
|
mySSH.command('helm install physim ./charts/physims/ | tee -a cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6)
|
||||||
|
if mySSH.getBefore().count('STATUS: deployed') == 0:
|
||||||
|
logging.error('\u001B[1m Deploying PhySim Failed using helm chart on OC Cluster\u001B[0m')
|
||||||
|
mySSH.command('helm uninstall physim >> cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6)
|
||||||
|
isFinished1 = False
|
||||||
|
while(isFinished1 == False):
|
||||||
|
time.sleep(20)
|
||||||
|
mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6, resync=True)
|
||||||
|
if re.search('No resources found', mySSH.getBefore()):
|
||||||
|
isFinished1 = True
|
||||||
|
mySSH.command(f'sudo podman rmi default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag}', '\$', 6)
|
||||||
|
mySSH.command('oc delete is oai-physim', '\$', 6)
|
||||||
|
mySSH.close()
|
||||||
|
self.AnalyzeLogFile_phySim(HTML)
|
||||||
|
RAN.prematureExit = True
|
||||||
|
return
|
||||||
|
else:
|
||||||
|
logging.debug('\u001B[1m Deployed PhySim Successfully using helm chart\u001B[0m')
|
||||||
|
isRunning = False
|
||||||
|
count = 0
|
||||||
|
while(count < 2 and isRunning == False):
|
||||||
|
time.sleep(60)
|
||||||
|
mySSH.command('oc get pods -o wide -l app.kubernetes.io/instance=physim | tee -a cmake_targets/log/physim_pods_summary.txt', '\$', 6, resync=True)
|
||||||
|
if mySSH.getBefore().count('Running') == 12:
|
||||||
|
logging.debug('\u001B[1m Running the physim test Scenarios\u001B[0m')
|
||||||
|
isRunning = True
|
||||||
|
podNames = re.findall('oai-[\S\d\w]+', mySSH.getBefore())
|
||||||
|
count +=1
|
||||||
|
if isRunning == False:
|
||||||
|
logging.error('\u001B[1m Some PODS Running FAILED \u001B[0m')
|
||||||
|
mySSH.command('oc get pods -l app.kubernetes.io/instance=physim 2>&1 | tee -a cmake_targets/log/physim_pods_summary.txt', '\$', 6)
|
||||||
|
mySSH.command('helm uninstall physim >> cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6)
|
||||||
|
self.AnalyzeLogFile_phySim(HTML)
|
||||||
|
isFinished1 = False
|
||||||
|
while(isFinished1 == False):
|
||||||
|
time.sleep(20)
|
||||||
|
mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6, resync=True)
|
||||||
|
if re.search('No resources found', mySSH.getBefore()):
|
||||||
|
isFinished1 = True
|
||||||
|
mySSH.command(f'sudo podman rmi default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag}', '\$', 6)
|
||||||
|
mySSH.command('oc delete is oai-physim', '\$', 6)
|
||||||
|
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.OC_PHYSIM_DEPLOY_FAIL)
|
||||||
|
HTML.CreateHtmlTestRowPhySimTestResult(self.testSummary,self.testResult)
|
||||||
|
RAN.prematureExit = True
|
||||||
|
return
|
||||||
|
# Waiting to complete the running test
|
||||||
|
count = 0
|
||||||
|
isFinished = False
|
||||||
|
# doing a deep copy!
|
||||||
|
tmpPodNames = podNames.copy()
|
||||||
|
while(count < 28 and isFinished == False):
|
||||||
|
time.sleep(60)
|
||||||
|
for podName in tmpPodNames:
|
||||||
|
mySSH.command2(f'oc logs --tail=1 {podName} 2>&1', 6, silent=True)
|
||||||
|
if mySSH.cmd2Results.count('FINISHED') != 0:
|
||||||
|
logging.debug(podName + ' is finished')
|
||||||
|
tmpPodNames.remove(podName)
|
||||||
|
if not tmpPodNames:
|
||||||
|
isFinished = True
|
||||||
|
count += 1
|
||||||
|
if isFinished:
|
||||||
|
logging.debug('\u001B[1m PhySim test is Complete\u001B[0m')
|
||||||
|
|
||||||
|
# Getting the logs of each executables running in individual pods
|
||||||
|
for podName in podNames:
|
||||||
|
mySSH.command(f'oc logs {podName} >> cmake_targets/log/physim_test.txt 2>&1', '\$', 15, resync=True)
|
||||||
|
time.sleep(30)
|
||||||
|
|
||||||
|
# UnDeploy the physical simulator pods
|
||||||
|
mySSH.command('helm uninstall physim | tee -a cmake_targets/log/physim_helm_summary.txt 2>&1', '\$', 6)
|
||||||
|
isFinished1 = False
|
||||||
|
while(isFinished1 == False):
|
||||||
|
time.sleep(20)
|
||||||
|
mySSH.command('oc get pods -l app.kubernetes.io/instance=physim', '\$', 6, resync=True)
|
||||||
|
if re.search('No resources found', mySSH.getBefore()):
|
||||||
|
isFinished1 = True
|
||||||
|
if isFinished1 == True:
|
||||||
|
logging.debug('\u001B[1m UnDeployed PhySim Successfully on OC Cluster\u001B[0m')
|
||||||
|
mySSH.command(f'sudo podman rmi default-route-openshift-image-registry.apps.5glab.nsa.eurecom.fr/{self.OCProjectName}/oai-physim:{imageTag}', '\$', 6)
|
||||||
|
mySSH.command('oc delete is oai-physim', '\$', 6)
|
||||||
|
logging.debug('\u001B[1m Deleted the Image and ImageStream\u001B[0m')
|
||||||
|
mySSH.command('oc logout', '\$', 6)
|
||||||
|
mySSH.close()
|
||||||
|
self.AnalyzeLogFile_phySim(HTML)
|
||||||
|
if self.testStatus:
|
||||||
|
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||||
|
HTML.CreateHtmlTestRowPhySimTestResult(self.testSummary,self.testResult)
|
||||||
|
logging.info('\u001B[1m Physical Simulator Pass\u001B[0m')
|
||||||
|
else:
|
||||||
|
RAN.prematureExit = True
|
||||||
|
HTML.CreateHtmlTestRow('N/A', 'KO', CONST.ALL_PROCESSES_OK)
|
||||||
|
HTML.CreateHtmlTestRowPhySimTestResult(self.testSummary,self.testResult)
|
||||||
|
logging.info('\u001B[1m Physical Simulator Fail\u001B[0m')
|
||||||
|
|
||||||
|
def AnalyzeLogFile_phySim(self, HTML):
|
||||||
|
lIpAddr = self.eNBIPAddress
|
||||||
|
lUserName = self.eNBUserName
|
||||||
|
lPassWord = self.eNBPassword
|
||||||
|
lSourcePath = self.eNBSourceCodePath
|
||||||
|
mySSH = SSH.SSHConnection()
|
||||||
|
mySSH.open(lIpAddr, lUserName, lPassWord)
|
||||||
|
mySSH.command('cd ' + lSourcePath, '\$', 5)
|
||||||
|
mySSH.command('cd ' + lSourcePath + '/cmake_targets', '\$', 5)
|
||||||
|
mySSH.command('mkdir -p physim_test_log_' + self.testCase_id, '\$', 5)
|
||||||
|
mySSH.command('cp log/physim_* ' + 'physim_test_log_' + self.testCase_id, '\$', 5)
|
||||||
|
if not os.path.exists(f'./physim_test_logs_{self.testCase_id}'):
|
||||||
|
os.mkdir(f'./physim_test_logs_{self.testCase_id}')
|
||||||
|
mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/physim_test_log_' + self.testCase_id + '/*', './physim_test_logs_' + self.testCase_id)
|
||||||
|
mySSH.command('rm -rf ./physim_test_log_'+ self.testCase_id, '\$', 5)
|
||||||
|
mySSH.close()
|
||||||
|
# physim test log analysis
|
||||||
|
nextt = 0
|
||||||
|
if (os.path.isfile(f'./physim_test_logs_{self.testCase_id}/physim_test.txt')):
|
||||||
|
with open(f'./physim_test_logs_{self.testCase_id}/physim_test.txt', 'r') as logfile:
|
||||||
|
for line in logfile:
|
||||||
|
if re.search('execution 015', str(line)) or re.search('Bypassing compilation', str(line)):
|
||||||
|
nextt = 1
|
||||||
|
elif nextt == 1:
|
||||||
|
if not re.search('Test Results', str(line)):
|
||||||
|
nextt = 0
|
||||||
|
ret2 = re.search('T[^\n]*', str(line))
|
||||||
|
if ret2 is not None:
|
||||||
|
ret3 = ret2.group()
|
||||||
|
ret3 = ret3.replace("[00m", "")
|
||||||
|
if re.search('execution 015', str(line)):
|
||||||
|
self.testCount[0] += 1
|
||||||
|
testName = line.split()
|
||||||
|
ret1 = re.search('Result = PASS', str(line))
|
||||||
|
if ret1 is not None:
|
||||||
|
self.testResult[testName[1]] = [ret3, 'PASS']
|
||||||
|
self.testCount[1] += 1
|
||||||
|
else:
|
||||||
|
self.testResult[testName[1]] = [ret3, 'FAIL']
|
||||||
|
self.testCount[2] += 1
|
||||||
|
self.testSummary['Nbtests'] = self.testCount[0]
|
||||||
|
self.testSummary['Nbpass'] = self.testCount[1]
|
||||||
|
self.testSummary['Nbfail'] = self.testCount[2]
|
||||||
|
if self.testSummary['Nbfail'] == 0:
|
||||||
|
self.testStatus = True
|
||||||
|
return 0
|
||||||
@@ -0,0 +1,192 @@
|
|||||||
|
#/*
|
||||||
|
# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
# * contributor license agreements. See the NOTICE file distributed with
|
||||||
|
# * this work for additional information regarding copyright ownership.
|
||||||
|
# * The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
# * the OAI Public License, Version 1.1 (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.openairinterface.org/?page_id=698
|
||||||
|
# *
|
||||||
|
# * 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.
|
||||||
|
# *-------------------------------------------------------------------------------
|
||||||
|
# * For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
# * contact@openairinterface.org
|
||||||
|
# */
|
||||||
|
#---------------------------------------------------------------------
|
||||||
|
# Python for CI of OAI-eNB + COTS-UE
|
||||||
|
#
|
||||||
|
# Required Python Version
|
||||||
|
# Python 3.x
|
||||||
|
#
|
||||||
|
# Required Python Package
|
||||||
|
# pexpect
|
||||||
|
#---------------------------------------------------------------------
|
||||||
|
|
||||||
|
#-----------------------------------------------------------
|
||||||
|
# Import
|
||||||
|
#-----------------------------------------------------------
|
||||||
|
import sys # arg
|
||||||
|
import re # reg
|
||||||
|
import logging
|
||||||
|
import os
|
||||||
|
import time
|
||||||
|
|
||||||
|
#-----------------------------------------------------------
|
||||||
|
# OAI Testing modules
|
||||||
|
#-----------------------------------------------------------
|
||||||
|
import sshconnection as SSH
|
||||||
|
import helpreadme as HELP
|
||||||
|
import constants as CONST
|
||||||
|
|
||||||
|
#-----------------------------------------------------------
|
||||||
|
# Class Declaration
|
||||||
|
#-----------------------------------------------------------
|
||||||
|
class CppCheckResults():
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
|
||||||
|
self.variants = ['xenial', 'bionic']
|
||||||
|
self.versions = ['','']
|
||||||
|
self.nbErrors = [0,0]
|
||||||
|
self.nbWarnings = [0,0]
|
||||||
|
self.nbNullPtrs = [0,0]
|
||||||
|
self.nbMemLeaks = [0,0]
|
||||||
|
self.nbUninitVars = [0,0]
|
||||||
|
self.nbInvalidPrintf = [0,0]
|
||||||
|
self.nbModuloAlways = [0,0]
|
||||||
|
self.nbTooManyBitsShift = [0,0]
|
||||||
|
self.nbIntegerOverflow = [0,0]
|
||||||
|
self.nbWrongScanfArg = [0,0]
|
||||||
|
self.nbPtrAddNotNull = [0,0]
|
||||||
|
self.nbOppoInnerCondition = [0,0]
|
||||||
|
|
||||||
|
class StaticCodeAnalysis():
|
||||||
|
|
||||||
|
def __init__(self):
|
||||||
|
|
||||||
|
self.ranRepository = ''
|
||||||
|
self.ranBranch = ''
|
||||||
|
self.ranAllowMerge = False
|
||||||
|
self.ranCommitID = ''
|
||||||
|
self.ranTargetBranch = ''
|
||||||
|
self.eNBIPAddress = ''
|
||||||
|
self.eNBUserName = ''
|
||||||
|
self.eNBPassword = ''
|
||||||
|
self.eNBSourceCodePath = ''
|
||||||
|
|
||||||
|
def CppCheckAnalysis(self, HTML):
|
||||||
|
if self.ranRepository == '' or self.ranBranch == '' or self.ranCommitID == '':
|
||||||
|
HELP.GenericHelp(CONST.Version)
|
||||||
|
sys.exit('Insufficient Parameter')
|
||||||
|
lIpAddr = self.eNBIPAddress
|
||||||
|
lUserName = self.eNBUserName
|
||||||
|
lPassWord = self.eNBPassword
|
||||||
|
lSourcePath = self.eNBSourceCodePath
|
||||||
|
|
||||||
|
if lIpAddr == '' or lUserName == '' or lPassWord == '' or lSourcePath == '':
|
||||||
|
HELP.GenericHelp(CONST.Version)
|
||||||
|
sys.exit('Insufficient Parameter')
|
||||||
|
logging.debug('Building on server: ' + lIpAddr)
|
||||||
|
mySSH = SSH.SSHConnection()
|
||||||
|
mySSH.open(lIpAddr, lUserName, lPassWord)
|
||||||
|
|
||||||
|
self.testCase_id = HTML.testCase_id
|
||||||
|
|
||||||
|
# on RedHat/CentOS .git extension is mandatory
|
||||||
|
result = re.search('([a-zA-Z0-9\:\-\.\/])+\.git', self.ranRepository)
|
||||||
|
if result is not None:
|
||||||
|
full_ran_repo_name = self.ranRepository.replace('git/', 'git')
|
||||||
|
else:
|
||||||
|
full_ran_repo_name = self.ranRepository + '.git'
|
||||||
|
mySSH.command('mkdir -p ' + lSourcePath, '\$', 5)
|
||||||
|
mySSH.command('cd ' + lSourcePath, '\$', 5)
|
||||||
|
mySSH.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + full_ran_repo_name + ' .; else stdbuf -o0 git fetch --prune; fi', '\$', 600)
|
||||||
|
# Raphael: here add a check if git clone or git fetch went smoothly
|
||||||
|
mySSH.command('git config user.email "jenkins@openairinterface.org"', '\$', 5)
|
||||||
|
mySSH.command('git config user.name "OAI Jenkins"', '\$', 5)
|
||||||
|
|
||||||
|
mySSH.command('echo ' + lPassWord + ' | sudo -S git clean -x -d -ff', '\$', 30)
|
||||||
|
mySSH.command('mkdir -p cmake_targets/log', '\$', 5)
|
||||||
|
# if the commit ID is provided use it to point to it
|
||||||
|
if self.ranCommitID != '':
|
||||||
|
mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30)
|
||||||
|
|
||||||
|
mySSH.command('docker image rm oai-cppcheck:bionic oai-cppcheck:xenial || true', '\$', 60)
|
||||||
|
mySSH.command('docker build --tag oai-cppcheck:xenial --file ci-scripts/docker/Dockerfile.cppcheck.xenial . > cmake_targets/log/cppcheck-xenial.txt 2>&1', '\$', 600)
|
||||||
|
mySSH.command('sed -e "s@xenial@bionic@" ci-scripts/docker/Dockerfile.cppcheck.xenial > ci-scripts/docker/Dockerfile.cppcheck.bionic', '\$', 6)
|
||||||
|
mySSH.command('docker build --tag oai-cppcheck:bionic --file ci-scripts/docker/Dockerfile.cppcheck.bionic . > cmake_targets/log/cppcheck-bionic.txt 2>&1', '\$', 600)
|
||||||
|
mySSH.command('docker image rm oai-cppcheck:bionic oai-cppcheck:xenial || true', '\$', 60)
|
||||||
|
|
||||||
|
# Analyzing the logs
|
||||||
|
mySSH.command('cd ' + lSourcePath + '/cmake_targets', '\$', 5)
|
||||||
|
mySSH.command('mkdir -p build_log_' + self.testCase_id, '\$', 5)
|
||||||
|
mySSH.command('mv log/* ' + 'build_log_' + self.testCase_id, '\$', 5)
|
||||||
|
mySSH.close()
|
||||||
|
|
||||||
|
mySSH.copyin(lIpAddr, lUserName, lPassWord, lSourcePath + '/cmake_targets/build_log_' + self.testCase_id + '/*', '.')
|
||||||
|
CCR = CppCheckResults()
|
||||||
|
vId = 0
|
||||||
|
for variant in CCR.variants:
|
||||||
|
if (os.path.isfile('./cppcheck-'+ variant + '.txt')):
|
||||||
|
xmlStart = False
|
||||||
|
with open('./cppcheck-'+ variant + '.txt', 'r') as logfile:
|
||||||
|
for line in logfile:
|
||||||
|
ret = re.search('Unpacking cppcheck \((?P<version>[0-9\.]+)', str(line))
|
||||||
|
if ret is not None:
|
||||||
|
CCR.versions[vId] = ret.group('version')
|
||||||
|
if re.search('RUN cat cmake_targets/log/cppcheck.xml', str(line)) is not None:
|
||||||
|
xmlStart = True
|
||||||
|
if xmlStart:
|
||||||
|
if re.search('severity="error"', str(line)) is not None:
|
||||||
|
CCR.nbErrors[vId] += 1
|
||||||
|
if re.search('severity="warning"', str(line)) is not None:
|
||||||
|
CCR.nbWarnings[vId] += 1
|
||||||
|
if re.search('id="memleak"', str(line)) is not None:
|
||||||
|
CCR.nbMemLeaks[vId] += 1
|
||||||
|
if re.search('id="nullPointer"', str(line)) is not None:
|
||||||
|
CCR.nbNullPtrs[vId] += 1
|
||||||
|
if re.search('id="uninitvar"', str(line)) is not None:
|
||||||
|
CCR.nbUninitVars[vId] += 1
|
||||||
|
if re.search('id="invalidPrintfArgType_sint"|id="invalidPrintfArgType_uint"', str(line)) is not None:
|
||||||
|
CCR.nbInvalidPrintf[vId] += 1
|
||||||
|
if re.search('id="moduloAlwaysTrueFalse"', str(line)) is not None:
|
||||||
|
CCR.nbModuloAlways[vId] += 1
|
||||||
|
if re.search('id="shiftTooManyBitsSigned"', str(line)) is not None:
|
||||||
|
CCR.nbTooManyBitsShift[vId] += 1
|
||||||
|
if re.search('id="integerOverflow"', str(line)) is not None:
|
||||||
|
CCR.nbIntegerOverflow[vId] += 1
|
||||||
|
if re.search('id="wrongPrintfScanfArgNum"|id="invalidScanfArgType_int"', str(line)) is not None:
|
||||||
|
CCR.nbWrongScanfArg[vId] += 1
|
||||||
|
if re.search('id="pointerAdditionResultNotNull"', str(line)) is not None:
|
||||||
|
CCR.nbPtrAddNotNull[vId] += 1
|
||||||
|
if re.search('id="oppositeInnerCondition"', str(line)) is not None:
|
||||||
|
CCR.nbOppoInnerCondition[vId] += 1
|
||||||
|
logging.debug('======== Variant ' + variant + ' - ' + CCR.versions[vId] + ' ========')
|
||||||
|
logging.debug(' ' + str(CCR.nbErrors[vId]) + ' errors')
|
||||||
|
logging.debug(' ' + str(CCR.nbWarnings[vId]) + ' warnings')
|
||||||
|
logging.debug(' -- Details --')
|
||||||
|
logging.debug(' Memory leak: ' + str(CCR.nbMemLeaks[vId]))
|
||||||
|
logging.debug(' Possible null pointer deference: ' + str(CCR.nbNullPtrs[vId]))
|
||||||
|
logging.debug(' Uninitialized variable: ' + str(CCR.nbUninitVars[vId]))
|
||||||
|
logging.debug(' Undefined behaviour shifting: ' + str(CCR.nbTooManyBitsShift[vId]))
|
||||||
|
logging.debug(' Signed integer overflow: ' + str(CCR.nbIntegerOverflow[vId]))
|
||||||
|
logging.debug('')
|
||||||
|
logging.debug(' Printf formatting issue: ' + str(CCR.nbInvalidPrintf[vId]))
|
||||||
|
logging.debug(' Modulo result is predetermined: ' + str(CCR.nbModuloAlways[vId]))
|
||||||
|
logging.debug(' Opposite Condition -> dead code: ' + str(CCR.nbOppoInnerCondition[vId]))
|
||||||
|
logging.debug(' Wrong Scanf Nb Args: ' + str(CCR.nbWrongScanfArg[vId]))
|
||||||
|
logging.debug('')
|
||||||
|
vId += 1
|
||||||
|
|
||||||
|
HTML.CreateHtmlTestRow('N/A', 'OK', CONST.ALL_PROCESSES_OK)
|
||||||
|
HTML.CreateHtmlTestRowCppCheckResults(CCR)
|
||||||
|
logging.info('\u001B[1m Static Code Analysis Pass\u001B[0m')
|
||||||
|
|
||||||
|
return 0
|
||||||
|
|
||||||
@@ -23,6 +23,7 @@ gNBs =
|
|||||||
|
|
||||||
ssb_SubcarrierOffset = 31; //0;
|
ssb_SubcarrierOffset = 31; //0;
|
||||||
pdsch_AntennaPorts = 1;
|
pdsch_AntennaPorts = 1;
|
||||||
|
pusch_AntennaPorts = 1;
|
||||||
#pusch_TargetSNRx10 = 200;
|
#pusch_TargetSNRx10 = 200;
|
||||||
#pucch_TargetSNRx10 = 200;
|
#pucch_TargetSNRx10 = 200;
|
||||||
pusch_TargetSNRx10 = 200;
|
pusch_TargetSNRx10 = 200;
|
||||||
@@ -50,7 +51,7 @@ gNBs =
|
|||||||
#initialDownlinkBWP
|
#initialDownlinkBWP
|
||||||
#genericParameters
|
#genericParameters
|
||||||
# this is RBstart=84,L=13 (275*(L-1))+RBstart
|
# this is RBstart=84,L=13 (275*(L-1))+RBstart
|
||||||
initialDLBWPlocationAndBandwidth = 6366; //28875; //6366; #6407; #3384;
|
initialDLBWPlocationAndBandwidth = 6368;
|
||||||
# subcarrierSpacing
|
# subcarrierSpacing
|
||||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||||
initialDLBWPsubcarrierSpacing = 1;
|
initialDLBWPsubcarrierSpacing = 1;
|
||||||
@@ -59,27 +60,14 @@ gNBs =
|
|||||||
initialDLBWPsearchSpaceZero = 0;
|
initialDLBWPsearchSpaceZero = 0;
|
||||||
#pdsch-ConfigCommon
|
#pdsch-ConfigCommon
|
||||||
#pdschTimeDomainAllocationList (up to 16 entries)
|
#pdschTimeDomainAllocationList (up to 16 entries)
|
||||||
initialDLBWPk0_0 = 0;
|
initialDLBWPk0_0 = 0; #for DL slot
|
||||||
#initialULBWPmappingType
|
initialDLBWPmappingType_0 = 0; #0=typeA,1=typeB
|
||||||
#0=typeA,1=typeB
|
initialDLBWPstartSymbolAndLength_0 = 40; #this is SS=1,L=13
|
||||||
initialDLBWPmappingType_0 = 0;
|
|
||||||
#this is SS=1,L=13
|
|
||||||
initialDLBWPstartSymbolAndLength_0 = 40;
|
|
||||||
|
|
||||||
initialDLBWPk0_1 = 0;
|
initialDLBWPk0_1 = 0; #for mixed slot
|
||||||
initialDLBWPmappingType_1 = 0;
|
initialDLBWPmappingType_1 = 0;
|
||||||
#this is SS=2,L=12
|
initialDLBWPstartSymbolAndLength_1 = 57; #this is SS=1,L=5
|
||||||
initialDLBWPstartSymbolAndLength_1 = 53;
|
|
||||||
|
|
||||||
initialDLBWPk0_2 = 0;
|
|
||||||
initialDLBWPmappingType_2 = 0;
|
|
||||||
#this is SS=1,L=12
|
|
||||||
initialDLBWPstartSymbolAndLength_2 = 54;
|
|
||||||
|
|
||||||
initialDLBWPk0_3 = 0;
|
|
||||||
initialDLBWPmappingType_3 = 0;
|
|
||||||
#this is SS=1,L=4 //5 (4 is for 43, 5 is for 57)
|
|
||||||
initialDLBWPstartSymbolAndLength_3 = 57; //43; //57;
|
|
||||||
#uplinkConfigCommon
|
#uplinkConfigCommon
|
||||||
#frequencyInfoUL
|
#frequencyInfoUL
|
||||||
ul_frequencyBand = 78;
|
ul_frequencyBand = 78;
|
||||||
@@ -92,7 +80,7 @@ gNBs =
|
|||||||
pMax = 20;
|
pMax = 20;
|
||||||
#initialUplinkBWP
|
#initialUplinkBWP
|
||||||
#genericParameters
|
#genericParameters
|
||||||
initialULBWPlocationAndBandwidth = 6366; //28875; //6366; #6407; #3384;
|
initialULBWPlocationAndBandwidth = 6368;
|
||||||
# subcarrierSpacing
|
# subcarrierSpacing
|
||||||
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
# 0=kHz15, 1=kHz30, 2=kHz60, 3=kHz120
|
||||||
initialULBWPsubcarrierSpacing = 1;
|
initialULBWPsubcarrierSpacing = 1;
|
||||||
@@ -104,9 +92,9 @@ gNBs =
|
|||||||
prach_msg1_FDM = 0;
|
prach_msg1_FDM = 0;
|
||||||
prach_msg1_FrequencyStart = 74;
|
prach_msg1_FrequencyStart = 74;
|
||||||
zeroCorrelationZoneConfig = 13;
|
zeroCorrelationZoneConfig = 13;
|
||||||
preambleReceivedTargetPower = -118;
|
#preambleReceivedTargetPower = -118;
|
||||||
#preambleReceivedTargetPower = -104;
|
#preambleReceivedTargetPower = -104;
|
||||||
#preambleReceivedTargetPower = -108;
|
preambleReceivedTargetPower = -108;
|
||||||
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
|
#preamblTransMax (0...10) = (3,4,5,6,7,8,10,20,50,100,200)
|
||||||
preambleTransMax = 6;
|
preambleTransMax = 6;
|
||||||
#powerRampingStep
|
#powerRampingStep
|
||||||
@@ -136,20 +124,18 @@ gNBs =
|
|||||||
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
# 0=unrestricted, 1=restricted type A, 2=restricted type B
|
||||||
restrictedSetConfig = 0,
|
restrictedSetConfig = 0,
|
||||||
# pusch-ConfigCommon (up to 16 elements)
|
# pusch-ConfigCommon (up to 16 elements)
|
||||||
initialULBWPk2_0 = 2;
|
initialULBWPk2_0 = 2; # used for UL slot
|
||||||
initialULBWPmappingType_0 = 1
|
initialULBWPmappingType_0 = 1
|
||||||
# this is SS=0 L=11
|
initialULBWPstartSymbolAndLength_0 = 55; # this is SS=0 L=12
|
||||||
initialULBWPstartSymbolAndLength_0 = 55;
|
|
||||||
|
|
||||||
initialULBWPk2_1 = 2;
|
initialULBWPk2_1 = 2; # used for mixed slot
|
||||||
initialULBWPmappingType_1 = 1;
|
initialULBWPmappingType_1 = 1;
|
||||||
# this is SS=0 L=12
|
initialULBWPstartSymbolAndLength_1 = 69; # this is SS=10 L=2
|
||||||
initialULBWPstartSymbolAndLength_1 = 69;
|
|
||||||
|
|
||||||
initialULBWPk2_2 = 7;
|
initialULBWPk2_2 = 7; # used for Msg.3 during RA
|
||||||
initialULBWPmappingType_2 = 1;
|
initialULBWPmappingType_2 = 1;
|
||||||
# this is SS=10 L=4
|
initialULBWPstartSymbolAndLength_2 = 52; # this is SS=10 L=4
|
||||||
initialULBWPstartSymbolAndLength_2 = 52;
|
|
||||||
|
|
||||||
msg3_DeltaPreamble = 1;
|
msg3_DeltaPreamble = 1;
|
||||||
#p0_NominalWithGrant =-90;
|
#p0_NominalWithGrant =-90;
|
||||||
|
|||||||
@@ -0,0 +1,57 @@
|
|||||||
|
#/* configuration for channel modelisation */
|
||||||
|
#/* To be included in main config file when */
|
||||||
|
#/* channel modelisation is used (rfsimulator with chanmod options enabled) */
|
||||||
|
channelmod = {
|
||||||
|
max_chan=10;
|
||||||
|
modellist="modellist_rfsimu_1";
|
||||||
|
modellist_rfsimu_1 = (
|
||||||
|
{
|
||||||
|
model_name = "rfsimu_channel_enB0"
|
||||||
|
type = "AWGN";
|
||||||
|
ploss_dB = 0;
|
||||||
|
noise_power_dB = -10;
|
||||||
|
forgetfact = 0;
|
||||||
|
offset = 0;
|
||||||
|
ds_tdl = 0;
|
||||||
|
},
|
||||||
|
{
|
||||||
|
model_name = "rfsimu_channel_ue1"
|
||||||
|
type = "AWGN";
|
||||||
|
ploss_dB = 0;
|
||||||
|
noise_power_dB = 0;
|
||||||
|
forgetfact = 0;
|
||||||
|
offset = 0;
|
||||||
|
ds_tdl = 0;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
modellist_rfsimu_2 = (
|
||||||
|
{
|
||||||
|
model_name = "rfsimu_channel_ue0"
|
||||||
|
type = "AWGN";
|
||||||
|
ploss_dB = 0;
|
||||||
|
noise_power_dB = 0;
|
||||||
|
forgetfact = 0;
|
||||||
|
offset = 0;
|
||||||
|
ds_tdl = 0;
|
||||||
|
},
|
||||||
|
{
|
||||||
|
model_name = "rfsimu_channel_ue1"
|
||||||
|
type = "AWGN";
|
||||||
|
ploss_dB = 0;
|
||||||
|
noise_power_dB = 0;
|
||||||
|
forgetfact = 0;
|
||||||
|
offset = 0;
|
||||||
|
ds_tdl = 0;
|
||||||
|
},
|
||||||
|
{
|
||||||
|
model_name = "rfsimu_channel_ue2"
|
||||||
|
type = "AWGN";
|
||||||
|
ploss_dB = 0;
|
||||||
|
noise_power_dB = 0;
|
||||||
|
forgetfact = 0;
|
||||||
|
offset = 0;
|
||||||
|
ds_tdl = 0;
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user