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
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
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
wangjie
OpenXG-RAN
Commits
b1d35dcf
Commit
b1d35dcf
authored
Jun 07, 2019
by
frtabu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make addition of new options and variants easier in the bash scripts
prepare for external EPC
parent
ebd40e8d
Changes
4
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
474 additions
and
395 deletions
+474
-395
ci-scripts/buildOnVM.sh
ci-scripts/buildOnVM.sh
+2
-2
ci-scripts/createVM.sh
ci-scripts/createVM.sh
+2
-2
ci-scripts/oai-ci-vm-tool
ci-scripts/oai-ci-vm-tool
+390
-343
ci-scripts/runTestOnVM.sh
ci-scripts/runTestOnVM.sh
+80
-48
No files found.
ci-scripts/buildOnVM.sh
View file @
b1d35dcf
...
@@ -25,7 +25,7 @@ function build_usage {
...
@@ -25,7 +25,7 @@ function build_usage {
echo
" Original Author: Raphael Defosseux"
echo
" Original Author: Raphael Defosseux"
echo
" Requirements:"
echo
" Requirements:"
echo
" -- uvtool uvtool-libvirt apt-cacher"
echo
" -- uvtool uvtool-libvirt apt-cacher"
echo
" --
xenial
image already synced"
echo
" --
$VM_OSREL
image already synced"
echo
" Default:"
echo
" Default:"
echo
" -- eNB with USRP"
echo
" -- eNB with USRP"
echo
""
echo
""
...
@@ -95,7 +95,7 @@ function build_on_vm {
...
@@ -95,7 +95,7 @@ function build_on_vm {
echo
"Creating VM (
$VM_NAME
) on Ubuntu Cloud Image base"
echo
"Creating VM (
$VM_NAME
) on Ubuntu Cloud Image base"
echo
"############################################################"
echo
"############################################################"
acquire_vm_create_lock
acquire_vm_create_lock
uvt-kvm create
$VM_NAME
release
=
xenial
--memory
$VM_MEMORY
--cpu
$VM_CPU
--unsafe-caching
--template
ci-scripts/template-host.xml
uvt-kvm create
$VM_NAME
release
=
$VM_OSREL
--memory
$VM_MEMORY
--cpu
$VM_CPU
--unsafe-caching
--template
ci-scripts/template-host.xml
echo
"Waiting for VM to be started"
echo
"Waiting for VM to be started"
uvt-kvm
wait
$VM_NAME
--insecure
uvt-kvm
wait
$VM_NAME
--insecure
...
...
ci-scripts/createVM.sh
View file @
b1d35dcf
...
@@ -25,7 +25,7 @@ function create_usage {
...
@@ -25,7 +25,7 @@ function create_usage {
echo
" Original Author: Raphael Defosseux"
echo
" Original Author: Raphael Defosseux"
echo
" Requirements:"
echo
" Requirements:"
echo
" -- uvtool uvtool-libvirt apt-cacher"
echo
" -- uvtool uvtool-libvirt apt-cacher"
echo
" --
xenial
image already synced"
echo
" --
$VM_OSREL
image already synced"
echo
" Default:"
echo
" Default:"
echo
" -- eNB with USRP"
echo
" -- eNB with USRP"
echo
""
echo
""
...
@@ -90,7 +90,7 @@ function create_vm {
...
@@ -90,7 +90,7 @@ function create_vm {
echo
"Creating VM (
$VM_NAME
) on Ubuntu Cloud Image base"
echo
"Creating VM (
$VM_NAME
) on Ubuntu Cloud Image base"
echo
"############################################################"
echo
"############################################################"
acquire_vm_create_lock
acquire_vm_create_lock
uvt-kvm create
$VM_NAME
release
=
xenial
--memory
$VM_MEMORY
--cpu
$VM_CPU
--unsafe-caching
--template
ci-scripts/template-host.xml
uvt-kvm create
$VM_NAME
release
=
$VM_OSREL
--memory
$VM_MEMORY
--cpu
$VM_CPU
--unsafe-caching
--template
ci-scripts/template-host.xml
echo
"Waiting for VM to be started"
echo
"Waiting for VM to be started"
uvt-kvm
wait
$VM_NAME
--insecure
uvt-kvm
wait
$VM_NAME
--insecure
...
...
ci-scripts/oai-ci-vm-tool
View file @
b1d35dcf
This diff is collapsed.
Click to expand it.
ci-scripts/runTestOnVM.sh
View file @
b1d35dcf
...
@@ -20,12 +20,12 @@
...
@@ -20,12 +20,12 @@
# * contact@openairinterface.org
# * contact@openairinterface.org
# */
# */
function
run_
test_usage
{
function
test_usage
{
echo
"OAI CI VM script"
echo
"OAI CI VM script"
echo
" Original Author: Raphael Defosseux"
echo
" Original Author: Raphael Defosseux"
echo
" Requirements:"
echo
" Requirements:"
echo
" -- uvtool uvtool-libvirt apt-cacher"
echo
" -- uvtool uvtool-libvirt apt-cacher"
echo
" --
xenial
image already synced"
echo
" --
$VM_OSREL
image already synced"
echo
" Default:"
echo
" Default:"
echo
" -- eNB with USRP"
echo
" -- eNB with USRP"
echo
""
echo
""
...
@@ -126,7 +126,7 @@ function start_basic_sim_ue {
...
@@ -126,7 +126,7 @@ function start_basic_sim_ue {
echo
"echo
\"
cd /home/ubuntu/tmp/cmake_targets/lte_build_oai/build/
\"
"
>
$1
echo
"echo
\"
cd /home/ubuntu/tmp/cmake_targets/lte_build_oai/build/
\"
"
>
$1
echo
"sudo chmod 777 /home/ubuntu/tmp/cmake_targets/lte_build_oai/build/"
>>
$1
echo
"sudo chmod 777 /home/ubuntu/tmp/cmake_targets/lte_build_oai/build/"
>>
$1
echo
"cd /home/ubuntu/tmp/cmake_targets/lte_build_oai/build"
>>
$1
echo
"cd /home/ubuntu/tmp/cmake_targets/lte_build_oai/build"
>>
$1
echo
"echo
\"
./lte-uesoftmodem -C
${
LOC_FREQUENCY
}
000000 -r
$LOC_NB_RBS
--log_config.global_log_options
level,nocolor
--basicsim
\"
> ./my-lte-uesoftmodem-run.sh"
>>
$1
echo
"echo
\"
./lte-uesoftmodem -C
${
LOC_FREQUENCY
}
000000 -r
$LOC_NB_RBS
--log_config.global_log_options
nocolor,level
--basicsim
\"
> ./my-lte-uesoftmodem-run.sh"
>>
$1
echo
"chmod 775 ./my-lte-uesoftmodem-run.sh"
>>
$1
echo
"chmod 775 ./my-lte-uesoftmodem-run.sh"
>>
$1
echo
"cat ./my-lte-uesoftmodem-run.sh"
>>
$1
echo
"cat ./my-lte-uesoftmodem-run.sh"
>>
$1
echo
"if [ -e /home/ubuntu/tmp/cmake_targets/log/
$LOC_UE_LOG_FILE
]; then sudo sudo rm -f /home/ubuntu/tmp/cmake_targets/log/
$LOC_UE_LOG_FILE
; fi"
>>
$1
echo
"if [ -e /home/ubuntu/tmp/cmake_targets/log/
$LOC_UE_LOG_FILE
]; then sudo sudo rm -f /home/ubuntu/tmp/cmake_targets/log/
$LOC_UE_LOG_FILE
; fi"
>>
$1
...
@@ -483,7 +483,7 @@ function install_epc_on_vm {
...
@@ -483,7 +483,7 @@ function install_epc_on_vm {
echo
"Creating test EPC VM (
$LOC_EPC_VM_NAME
) on Ubuntu Cloud Image base"
echo
"Creating test EPC VM (
$LOC_EPC_VM_NAME
) on Ubuntu Cloud Image base"
echo
"############################################################"
echo
"############################################################"
acquire_vm_create_lock
acquire_vm_create_lock
uvt-kvm create
$LOC_EPC_VM_NAME
release
=
xenial
--unsafe-caching
uvt-kvm create
$LOC_EPC_VM_NAME
release
=
$VM_OSREL
--unsafe-caching
echo
"Waiting for VM to be started"
echo
"Waiting for VM to be started"
uvt-kvm
wait
$LOC_EPC_VM_NAME
--insecure
uvt-kvm
wait
$LOC_EPC_VM_NAME
--insecure
release_vm_create_lock
release_vm_create_lock
...
@@ -629,14 +629,19 @@ function retrieve_real_epc_ip_addr {
...
@@ -629,14 +629,19 @@ function retrieve_real_epc_ip_addr {
local
LOC_EPC_VM_CMDS
=
$2
local
LOC_EPC_VM_CMDS
=
$2
local
LOC_EPC_VM_IP_ADDR
=
$3
local
LOC_EPC_VM_IP_ADDR
=
$3
if
[[
"
$EPC_IPADDR
"
==
""
]]
then
if
[
$LTEBOX
-eq
1
]
if
[
$LTEBOX
-eq
1
]
then
then
# in our configuration file, we are using pool 5
# in our configuration file, we are using pool 5
echo
"ifconfig tun5 | egrep
\"
inet addr
\"
| sed -e 's#^.*inet addr:##' -e 's# P-t-P:.*
\$
##'"
>
$LOC_EPC_VM_CMDS
echo
"ifconfig tun5 | egrep
\"
inet addr
\"
| sed -e 's#^.*inet addr:##' -e 's# P-t-P:.*
\$
##'"
>
$LOC_EPC_VM_CMDS
REAL_EPC_IP_ADDR
=
`
ssh
-T
-o
StrictHostKeyChecking
=
no ubuntu@
$LOC_EPC_VM_IP_ADDR
<
$LOC_EPC_VM_CMDS
`
REAL_EPC_IP_ADDR
=
`
ssh
-T
-o
StrictHostKeyChecking
=
no ubuntu@
$LOC_EPC_VM_IP_ADDR
<
$LOC_EPC_VM_CMDS
`
echo
"EPC IP Address is :
$REAL_EPC_IP_ADDR
"
rm
$LOC_EPC_VM_CMDS
rm
$LOC_EPC_VM_CMDS
fi
fi
else
REAL_EPC_IP_ADDR
=
$EPC_TUN_IPADDR
fi
echo
"EPC IP Address is :
$REAL_EPC_IP_ADDR
"
}
}
function
terminate_epc
{
function
terminate_epc
{
...
@@ -1093,7 +1098,7 @@ function run_test_on_vm {
...
@@ -1093,7 +1098,7 @@ function run_test_on_vm {
echo
"############################################################"
echo
"############################################################"
echo
"OAI CI VM script"
echo
"OAI CI VM script"
echo
"############################################################"
echo
"############################################################"
if
[[
((
"
$RUN_OPTIONS
"
==
"complex"
)
&&
(
$VM_NAME
=
~ .
*
-l2-sim
.
*
))
||
((
"
$RUN_OPTIONS
"
==
"complex"
)
&&
(
$VM_NAME
=
~ .
*
-rf-sim
.
*
))
]]
if
[[
((
"
$RUN_OPTIONS
"
==
"complex"
)
&&
(
$VM_NAME
=
~ .
*
-l2-sim
.
*
))
]]
||
[[
((
"
$RUN_OPTIONS
"
==
"complex"
)
&&
(
$VM_NAME
=
~ .
*
-rf-sim
.
*
))
]]
then
then
ENB_VM_NAME
=
`
echo
$VM_NAME
|
sed
-e
"s#l2-sim#enb-ethernet#"
-e
"s#rf-sim#enb-ethernet#"
`
ENB_VM_NAME
=
`
echo
$VM_NAME
|
sed
-e
"s#l2-sim#enb-ethernet#"
-e
"s#rf-sim#enb-ethernet#"
`
ENB_VM_CMDS
=
${
ENB_VM_NAME
}
_cmds.txt
ENB_VM_CMDS
=
${
ENB_VM_NAME
}
_cmds.txt
...
@@ -1110,7 +1115,7 @@ function run_test_on_vm {
...
@@ -1110,7 +1115,7 @@ function run_test_on_vm {
echo
"JENKINS_WKSP =
$JENKINS_WKSP
"
echo
"JENKINS_WKSP =
$JENKINS_WKSP
"
echo
"ARCHIVES_LOC =
$ARCHIVES_LOC
"
echo
"ARCHIVES_LOC =
$ARCHIVES_LOC
"
if
[[
((
"
$RUN_OPTIONS
"
==
"complex"
)
&&
(
$VM_NAME
=
~ .
*
-l2-sim
.
*
))
||
((
"
$RUN_OPTIONS
"
==
"complex"
)
&&
(
$VM_NAME
=
~ .
*
-rf-sim
.
*
))
]]
if
[[
((
"
$RUN_OPTIONS
"
==
"complex"
)
&&
(
$VM_NAME
=
~ .
*
-l2-sim
.
*
))
]]
||
[[
((
"
$RUN_OPTIONS
"
==
"complex"
)
&&
(
$VM_NAME
=
~ .
*
-rf-sim
.
*
))
]]
then
then
echo
"############################################################"
echo
"############################################################"
echo
"Waiting for ENB VM to be started"
echo
"Waiting for ENB VM to be started"
...
@@ -1261,17 +1266,28 @@ function run_test_on_vm {
...
@@ -1261,17 +1266,28 @@ function run_test_on_vm {
EPC_VM_NAME
=
`
echo
$VM_NAME
|
sed
-e
"s#basic-sim#epc#"
`
EPC_VM_NAME
=
`
echo
$VM_NAME
|
sed
-e
"s#basic-sim#epc#"
`
EPC_VM_CMDS
=
${
EPC_VM_NAME
}
_cmds.txt
EPC_VM_CMDS
=
${
EPC_VM_NAME
}
_cmds.txt
LTEBOX
=
0
LTEBOX
=
0
if
[[
"
$EPC_IPADDR
"
==
""
]]
then
# Creating a VM for EPC and installing SW
install_epc_on_vm
$EPC_VM_NAME
$EPC_VM_CMDS
install_epc_on_vm
$EPC_VM_NAME
$EPC_VM_CMDS
EPC_VM_IP_ADDR
=
`
uvt-kvm ip
$EPC_VM_NAME
`
EPC_VM_IP_ADDR
=
`
uvt-kvm ip
$EPC_VM_NAME
`
# Starting EPC
# Starting EPC
start_epc
$EPC_VM_NAME
$EPC_VM_CMDS
$EPC_VM_IP_ADDR
start_epc
$EPC_VM_NAME
$EPC_VM_CMDS
$EPC_VM_IP_ADDR
else
echo
"We will use EPC on
$EPC_IPADDR
"
EPC_VM_IP_ADDR
=
$EPC_IPADDR
fi
# Retrieve EPC real IP address
# Retrieve EPC real IP address
retrieve_real_epc_ip_addr
$EPC_VM_NAME
$EPC_VM_CMDS
$EPC_VM_IP_ADDR
retrieve_real_epc_ip_addr
$EPC_VM_NAME
$EPC_VM_CMDS
$EPC_VM_IP_ADDR
TRANS_MODES
=(
"fdd"
"tdd"
)
BW_CASES
=(
05 10 20
)
#TRANS_MODES=("fdd" "tdd")
#BW_CASES=(05 10 20)
TRANS_MODES
=(
"fdd"
)
BW_CASES
=(
05
)
for
TMODE
in
${
TRANS_MODES
[@]
}
for
TMODE
in
${
TRANS_MODES
[@]
}
do
do
...
@@ -1312,6 +1328,9 @@ function run_test_on_vm {
...
@@ -1312,6 +1328,9 @@ function run_test_on_vm {
fi
fi
get_ue_ip_addr
$VM_CMDS
$VM_IP_ADDR
1
get_ue_ip_addr
$VM_CMDS
$VM_IP_ADDR
1
full_terminate
continue
echo
"############################################################"
echo
"############################################################"
echo
"Pinging the UE"
echo
"Pinging the UE"
echo
"############################################################"
echo
"############################################################"
...
@@ -1453,7 +1472,10 @@ function run_test_on_vm {
...
@@ -1453,7 +1472,10 @@ function run_test_on_vm {
echo
"Terminate EPC"
echo
"Terminate EPC"
echo
"############################################################"
echo
"############################################################"
if
[[
"
$EPC_IPADDR
"
==
""
]]
then
terminate_epc
$EPC_VM_CMDS
$EPC_VM_IP_ADDR
terminate_epc
$EPC_VM_CMDS
$EPC_VM_IP_ADDR
fi
full_basic_sim_destroy
full_basic_sim_destroy
...
@@ -1481,33 +1503,43 @@ function run_test_on_vm {
...
@@ -1481,33 +1503,43 @@ function run_test_on_vm {
rm
-Rf
$ARCHIVES_LOC
rm
-Rf
$ARCHIVES_LOC
fi
fi
mkdir
--parents
$ARCHIVES_LOC
mkdir
--parents
$ARCHIVES_LOC
if
[[
"
$EPC_IPADDR
"
==
""
]]
then
# Creating a VM for EPC and installing SW
# Creating a VM for EPC and installing SW
EPC_VM_NAME
=
`
echo
$VM_NAME
|
sed
-e
"s#rf-sim#epc#"
`
EPC_VM_NAME
=
`
echo
$VM_NAME
|
sed
-e
"s#rf-sim#epc#"
`
EPC_VM_CMDS
=
${
EPC_VM_NAME
}
_cmds.txt
EPC_VM_CMDS
=
${
EPC_VM_NAME
}
_cmds.txt
LTEBOX
=
0
LTEBOX
=
0
install_epc_on_vm
$EPC_VM_NAME
$EPC_VM_CMDS
install_epc_on_vm
$EPC_VM_NAME
$EPC_VM_CMDS
EPC_VM_IP_ADDR
=
`
uvt-kvm ip
$EPC_VM_NAME
`
EPC_VM_IP_ADDR
=
`
uvt-kvm ip
$EPC_VM_NAME
`
fi
# withS1 configuration is not working
# withS1 configuration is not working
#EPC_CONFIGS=("wS1" "noS1")
#EPC_CONFIGS=("wS1" "noS1")
#TRANS_MODES=("fdd" "tdd")
#TRANS_MODES=("fdd" "tdd")
#BW_CASES=(05 10 20)
#BW_CASES=(05 10 20)
EPC_CONFIGS
=(
"noS1"
)
EPC_CONFIGS
=(
"noS1"
"wS1"
)
TRANS_MODES
=(
"fdd"
)
TRANS_MODES
=(
"fdd"
)
BW_CASES
=(
05
)
BW_CASES
=(
05
)
for
CN_CONFIG
in
${
EPC_CONFIGS
[@]
}
for
CN_CONFIG
in
${
EPC_CONFIGS
[@]
}
do
do
if
[[
$CN_CONFIG
=
~ .
*
wS1.
*
]]
if
[[
$CN_CONFIG
=
~ .
*
wS1.
*
]]
then
if
[[
"
$EPC_IPADDR
"
==
""
]]
then
then
echo
"############################################################"
echo
"############################################################"
echo
"Start EPC for the wS1 configuration"
echo
"Start EPC for the wS1 configuration"
echo
"############################################################"
echo
"############################################################"
start_epc
$EPC_VM_NAME
$EPC_VM_CMDS
$EPC_VM_IP_ADDR
start_epc
$EPC_VM_NAME
$EPC_VM_CMDS
$EPC_VM_IP_ADDR
# Retrieve EPC real IP address
# Retrieve EPC real IP address
retrieve_real_epc_ip_addr
$EPC_VM_NAME
$EPC_VM_CMDS
$EPC_VM_IP_ADDR
retrieve_real_epc_ip_addr
$EPC_VM_NAME
$EPC_VM_CMDS
$EPC_VM_IP_ADDR
S1_NOS1_CFG
=
1
S1_NOS1_CFG
=
1
else
echo
"############################################################"
echo
"Using external EPC "
$EPC_IPADDR
echo
"############################################################"
$EPC_VM_IP_ADDR
=
$EPC_IPADDR
S1_NOS1_CFG
=
1
LTEBOX
=
0
fi
else
else
echo
"############################################################"
echo
"############################################################"
echo
"Terminate EPC"
echo
"Terminate EPC"
...
@@ -1515,7 +1547,7 @@ function run_test_on_vm {
...
@@ -1515,7 +1547,7 @@ function run_test_on_vm {
terminate_epc
$EPC_VM_CMDS
$EPC_VM_IP_ADDR
terminate_epc
$EPC_VM_CMDS
$EPC_VM_IP_ADDR
echo
"############################################################"
echo
"############################################################"
echo
"Running now in a no-S1 configuration
"
echo
"Running now in a no-S1
"
echo
"############################################################"
echo
"############################################################"
S1_NOS1_CFG
=
0
S1_NOS1_CFG
=
0
fi
fi
...
@@ -1539,7 +1571,7 @@ function run_test_on_vm {
...
@@ -1539,7 +1571,7 @@ function run_test_on_vm {
echo
"
${
CN_CONFIG
}
: Starting the eNB in
${
TMODE
}
-
${
BW
}
MHz mode"
echo
"
${
CN_CONFIG
}
: Starting the eNB in
${
TMODE
}
-
${
BW
}
MHz mode"
echo
"############################################################"
echo
"############################################################"
CURRENT_ENB_LOG_FILE
=
${
TMODE
}
_
${
BW
}
MHz_
${
CN_CONFIG
}
_enb.log
CURRENT_ENB_LOG_FILE
=
${
TMODE
}
_
${
BW
}
MHz_
${
CN_CONFIG
}
_enb.log
start_rf_sim_enb
$ENB_VM_CMDS
$ENB_VM_IP_ADDR
$EPC_VM_IP_ADDR
$CURRENT_ENB_LOG_FILE
$PRB
$CONF_FILE
$S1_NOS1_CFG
start_rf_sim_enb
$ENB_VM_CMDS
"
$ENB_VM_IP_ADDR
"
"
$EPC_VM_IP_ADDR
"
$CURRENT_ENB_LOG_FILE
$PRB
$CONF_FILE
$S1_NOS1_CFG
echo
"############################################################"
echo
"############################################################"
echo
"
${
CN_CONFIG
}
: Starting the UE"
echo
"
${
CN_CONFIG
}
: Starting the UE"
...
...
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