Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-RAN
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-RAN
Commits
8dca1822
Commit
8dca1822
authored
Sep 13, 2021
by
hardy
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CI scripted deployment of OAI CN5G
parent
de553cd1
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
ci-scripts/epc.py
ci-scripts/epc.py
+13
-1
No files found.
ci-scripts/epc.py
View file @
8dca1822
...
...
@@ -220,7 +220,7 @@ class EPCManagement():
mySSH
=
SSH
.
SSHConnection
()
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
if
re
.
match
(
'ltebox'
,
self
.
Type
,
re
.
IGNORECASE
):
logging
.
debug
(
'Using the
sabox
simulated HSS'
)
logging
.
debug
(
'Using the
SABOX
simulated HSS'
)
mySSH
.
command
(
'if [ -d '
+
self
.
SourceCodePath
+
'/scripts ]; then echo '
+
self
.
Password
+
' | sudo -S rm -Rf '
+
self
.
SourceCodePath
+
'/scripts ; fi'
,
'\$'
,
5
)
mySSH
.
command
(
'mkdir -p '
+
self
.
SourceCodePath
+
'/scripts'
,
'\$'
,
5
)
mySSH
.
command
(
'cd /opt/hss_sim0609'
,
'\$'
,
5
)
...
...
@@ -229,6 +229,13 @@ class EPCManagement():
logging
.
debug
(
'Using the sabox'
)
mySSH
.
command
(
'cd /opt/ltebox/tools'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
self
.
Password
+
' | sudo -S ./start_sabox'
,
'\$'
,
5
)
elif
re
.
match
(
'OAI'
,
self
.
Type
,
re
.
IGNORECASE
):
logging
.
debug
(
'Starting OAI CN5G'
)
mySSH
.
command
(
'if [ -d '
+
self
.
SourceCodePath
+
'/scripts ]; then echo '
+
self
.
Password
+
' | sudo -S rm -Rf '
+
self
.
SourceCodePath
+
'/scripts ; fi'
,
'\$'
,
5
)
mySSH
.
command
(
'mkdir -p '
+
self
.
SourceCodePath
+
'/scripts'
,
'\$'
,
5
)
mySSH
.
command
(
'cd /opt/oai-cn5g-fed/docker-compose'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
self
.
Password
+
' | sudo -S ./core-network.sh start nrf spgwu'
,
'\$'
,
5
)
time
.
sleep
(
20
)
#leave some time for deployment and health check
else
:
logging
.
error
(
'This option should not occur!'
)
mySSH
.
close
()
...
...
@@ -433,6 +440,7 @@ class EPCManagement():
mySSH
=
SSH
.
SSHConnection
()
mySSH
.
open
(
self
.
IPAddress
,
self
.
UserName
,
self
.
Password
)
if
re
.
match
(
'ltebox'
,
self
.
Type
,
re
.
IGNORECASE
):
logging
.
debug
(
'Terminating SA BOX'
)
mySSH
.
command
(
'cd /opt/ltebox/tools'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
self
.
Password
+
' | sudo -S ./stop_sabox'
,
'\$'
,
5
)
time
.
sleep
(
1
)
...
...
@@ -440,6 +448,10 @@ class EPCManagement():
mySSH
.
command
(
'cd scripts'
,
'\$'
,
5
)
time
.
sleep
(
1
)
mySSH
.
command
(
'echo '
+
self
.
Password
+
' | sudo -S screen -S simulated_5g_hss -X quit'
,
'\$'
,
5
)
elif
re
.
match
(
'OAI'
,
self
.
Type
,
re
.
IGNORECASE
):
logging
.
debug
(
'Terminating OAI CN5G'
)
mySSH
.
command
(
'cd /opt/oai-cn5g-fed/docker-compose'
,
'\$'
,
5
)
mySSH
.
command
(
'echo '
+
self
.
Password
+
' | sudo -S ./core-network.sh stop nrf spgwu'
,
'\$'
,
5
)
else
:
logging
.
error
(
'This should not happen!'
)
mySSH
.
close
()
...
...
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