Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
oai
cn5g
oai-cn5g-fed
Commits
f96e6d05
Commit
f96e6d05
authored
May 27, 2021
by
ismail
Browse files
Helm: added persistance storage for pcaps
Signed-off-by:
ismail
<
mohammed.ismail@openairinterface.org
>
parent
db6a881c
Changes
9
Hide whitespace changes
Inline
Side-by-side
charts/oai-amf/templates/deployment.yaml
View file @
f96e6d05
...
...
@@ -32,8 +32,12 @@ spec:
-
name
:
tcpdump
image
:
image-registry.openshift-image-registry.svc:5000/oai/tcpdump-internal:latest
command
:
-
/bin/sleep
-
infinity
-
/bin/sh
-
-c
-
/usr/sbin/tcpdump -i net1 -w /pcap/oai-amf_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap
volumeMounts
:
-
mountPath
:
"
/pcap"
name
:
cn5g-pv
-
name
:
amf
image
:
"
{{
.Values.image.repository
}}:{{
.Values.image.version
}}"
imagePullPolicy
:
{{
.Values.image.pullPolicy
}}
...
...
@@ -262,6 +266,10 @@ spec:
key
:
operatorKey
# command: ["/bin/bash","-c"]
# args: ["/openair-amf/bin/entrypoint.sh; /openair-amf/bin/oai_amf -c /openair-amf/etc/amf.conf -o"]
volumes
:
-
name
:
cn5g-pv
persistentVolumeClaim
:
claimName
:
cn5g-pvc
dnsPolicy
:
ClusterFirst
restartPolicy
:
Always
schedulerName
:
default-scheduler
...
...
charts/oai-nrf/templates/deployment.yaml
View file @
f96e6d05
...
...
@@ -28,8 +28,12 @@ spec:
-
name
:
tcpdump
image
:
image-registry.openshift-image-registry.svc:5000/oai/tcpdump-internal:latest
command
:
-
/bin/sleep
-
infinity
-
/bin/sh
-
-c
-
/usr/sbin/tcpdump -i net1 -w /pcap/oai-nrf_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap
volumeMounts
:
-
mountPath
:
"
/pcap"
name
:
cn5g-pv
-
name
:
nrf
image
:
"
{{
.Values.image.repository
}}:{{
.Values.image.version
}}"
imagePullPolicy
:
{{
.Values.image.pullPolicy
}}
...
...
@@ -73,6 +77,10 @@ spec:
configMapKeyRef
:
name
:
{{
.Chart.Name
}}
-configmap
key
:
nrfApiVersion
volumes
:
-
name
:
cn5g-pv
persistentVolumeClaim
:
claimName
:
cn5g-pvc
dnsPolicy
:
ClusterFirst
restartPolicy
:
Always
schedulerName
:
default-scheduler
...
...
charts/oai-nrf/templates/pvc.yaml
0 → 100644
View file @
f96e6d05
{{
- if .Values.persistence.enabled
}}
apiVersion
:
v1
kind
:
PersistentVolumeClaim
metadata
:
name
:
cn5g-pvc
spec
:
accessModes
:
-
ReadWriteMany
storageClassName
:
managed-nfs-storage
resources
:
requests
:
storage
:
1Gi
{{
- end
}}
\ No newline at end of file
charts/oai-nrf/values.yaml
View file @
f96e6d05
...
...
@@ -62,7 +62,7 @@ config:
persistence
:
# make it true for the first time when you want to create persistance volume
# and then false
enabled
:
fals
e
enabled
:
tru
e
resources
:
# We usually recommend not to specify default resources and to leave this as a conscious
...
...
charts/oai-smf/templates/deployment.yaml
View file @
f96e6d05
...
...
@@ -28,8 +28,12 @@ spec:
-
name
:
tcpdump
image
:
image-registry.openshift-image-registry.svc:5000/oai/tcpdump-internal:latest
command
:
-
/bin/sleep
-
infinity
-
/bin/sh
-
-c
-
/usr/sbin/tcpdump -i net1 -w /pcap/oai-smf_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap
volumeMounts
:
-
mountPath
:
"
/pcap"
name
:
cn5g-pv
-
name
:
smf
image
:
"
{{
.Values.image.repository
}}:{{
.Values.image.version
}}"
imagePullPolicy
:
{{
.Values.image.pullPolicy
}}
...
...
@@ -151,6 +155,10 @@ spec:
#command:
# - /bin/sleep
# - infinity
volumes
:
-
name
:
cn5g-pv
persistentVolumeClaim
:
claimName
:
cn5g-pvc
dnsPolicy
:
ClusterFirst
restartPolicy
:
Always
schedulerName
:
default-scheduler
...
...
charts/oai-smf/values.yaml
View file @
f96e6d05
...
...
@@ -74,7 +74,12 @@ config:
nrfPort
:
"
80"
nrfApiVersion
:
"
v1"
upfIpv4Address
:
"
192.168.18.179"
persistence
:
# make it true for the first time when you want to create persistance volume
# and then false
enabled
:
false
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
...
...
charts/oai-spgwu-tiny/templates/deployment.yaml
View file @
f96e6d05
...
...
@@ -34,8 +34,12 @@ spec:
-
name
:
tcpdump
image
:
image-registry.openshift-image-registry.svc:5000/oai/tcpdump-internal:latest
command
:
-
/bin/sleep
-
infinity
-
/bin/sh
-
-c
-
/usr/sbin/tcpdump -i any -w /pcap/oai-spgwu_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap
volumeMounts
:
-
mountPath
:
"
/pcap"
name
:
cn5g-pv
-
name
:
spgwu
image
:
"
{{
.Values.image.repository
}}:{{
.Values.image.version
}}"
imagePullPolicy
:
{{
.Values.image.pullPolicy
}}
...
...
@@ -112,9 +116,9 @@ spec:
{{
- toYaml . | nindent 10
}}
{{
- end
}}
volumes
:
-
name
:
{{
.Chart.Name
}}
-{{ .Values.namespace }}
-pv
persistentVolumeClaim
:
claimName
:
{{
.Chart.Name
}}
-{{ .Values.namespace }}
-pvc
-
name
:
cn5g
-pv
persistentVolumeClaim
:
claimName
:
cn5g
-pvc
dnsPolicy
:
ClusterFirst
restartPolicy
:
Always
schedulerName
:
default-scheduler
...
...
ci-scripts/Jenkinsfile-GitLab-Helm
View file @
f96e6d05
...
...
@@ -232,13 +232,11 @@ pipeline {
}
}
}
dir
(
'ci-scripts'
)
{
try
{
sh
"python3 helmDeploy.py --mode=GetLogs --remoteIPAdd=${params.remote_IPAddress} --remoteUserName=${remote_Username} --remotePassword=${remote_Password} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName} --imageTags=${imageTags}"
}
catch
(
Exception
e
)
{
echo
"Unable to get the 5gcn components pod logs"
}
}
try
{
sh
"python3 ci-scripts/helmDeploy.py --mode=GetLogs --remoteIPAdd=${params.remote_IPAddress} --remoteUserName=${remote_Username} --remotePassword=${remote_Password} --OCUserName=${OC_Username} --OCPassword=${OC_Password} --OCProjectName=${OC_ProjectName} --imageTags=${imageTags}"
}
catch
(
Exception
e
)
{
echo
"Unable to get the 5gcn components pod logs"
}
}
}
}
...
...
ci-scripts/helmDeploy.py
View file @
f96e6d05
...
...
@@ -37,6 +37,7 @@ import os
import
re
import
time
import
sys
import
subprocess
logging
.
basicConfig
(
level
=
logging
.
DEBUG
,
...
...
@@ -264,8 +265,8 @@ class ClusterDeploy:
# copying the pcaps
lssh
=
subprocess
.
Popen
(
f
'ls /nfs/prov-vols | grep
{
self
.
OCProjectName
}
-cn5g-pvc'
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
,
encoding
=
'utf-8'
).
stdout
.
readlines
()
pStorage
=
str
(
lssh
[
0
]).
strip
()
lssh
=
subprocess
.
Popen
(
f
'mkdir -p
../
archives/pcap'
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
lssh
=
subprocess
.
Popen
(
f
'cp /nfs/prov-vols/
{
pStorage
}
/*
../
archives/pcap/'
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
lssh
=
subprocess
.
Popen
(
f
'mkdir -p archives/pcap'
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
lssh
=
subprocess
.
Popen
(
f
'cp /nfs/prov-vols/
{
pStorage
}
/* archives/pcap/'
,
shell
=
True
,
stdout
=
subprocess
.
PIPE
,
stderr
=
subprocess
.
PIPE
)
# copy the pods logs
mySSH
=
SSH
.
SSHConnection
()
mySSH
.
open
(
lIpAddr
,
lUserName
,
lPassWord
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment