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
151d65d3
Commit
151d65d3
authored
Jun 08, 2021
by
Raphael Defosseux
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CI: initial migration to bionic
Signed-off-by:
Raphael Defosseux
<
raphael.defosseux@eurecom.fr
>
parent
530b74dd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
63 additions
and
21 deletions
+63
-21
ci-scripts/oai-ci-vm-tool
ci-scripts/oai-ci-vm-tool
+2
-2
ci-scripts/runTestOnVM.sh
ci-scripts/runTestOnVM.sh
+61
-19
No files found.
ci-scripts/oai-ci-vm-tool
View file @
151d65d3
...
...
@@ -278,7 +278,7 @@ function check_set_variant {
ARCHIVES_LOC
=
${
VARIANTS_LONG
[
$i
]//
"-"
/
"_"
}
VM_MEMORY
=
2048
VM_CPU
=
4
VM_DISK
=
1
0
VM_DISK
=
1
2
EXPERIMENTAL
=
""
NBARGS
=
$[$NBARGS
+
$VARIANT_OPTID
]
variant__
${
VARIANTS_SHORT
[
$i
]
}
__
${
VARIANTS_LONG
[
$i
]//
"-"
/
"_"
}
...
...
@@ -490,7 +490,7 @@ AUTHORIZED_VAR=("VM_OSREL RUN_EXPERIMENTAL OPTIONAL_APTCACHER TESTPLATFORM_OWNER
# VM_ARCHI=
`
uname
-m
`
#else
VM_OS="
ubuntu
"
VM_OSREL="
xenial
"
VM_OSREL="
bionic
"
VM_ARCHI="
x86_64
"
#fi
...
...
ci-scripts/runTestOnVM.sh
View file @
151d65d3
...
...
@@ -120,7 +120,7 @@ function start_basic_sim_ue {
rm
$1
local
i
=
"0"
echo
"ifconfig oaitun_ue1 | egrep -c
\"
inet addr
\"
"
>
$1
echo
"ifconfig oaitun_ue1 | egrep -c
'inet '
"
>
$1
while
[
$i
-lt
10
]
do
sleep
5
...
...
@@ -169,7 +169,12 @@ function start_basic_sim_ue {
function
get_ue_ip_addr
{
local
LOC_IF_ID
=
$3
echo
"ifconfig oaitun_ue
${
LOC_IF_ID
}
| egrep
\"
inet addr
\"
| sed -e 's#^.*inet addr:##' -e 's# P-t-P:.*
\$
##'"
>
$1
if
[[
$VM_OSREL
=
~ .
*
bionic.
*
]]
then
echo
"ifconfig oaitun_ue
${
LOC_IF_ID
}
| egrep 'inet ' | sed -e 's#^.*inet addr:##' -e 's# netmask.*
\$
##'"
>
$1
else
echo
"ifconfig oaitun_ue
${
LOC_IF_ID
}
| egrep 'inet addr' | sed -e 's#^.*inet addr:##' -e 's# P-t-P:.*
\$
##'"
>
$1
fi
UE_IP_ADDR
=
`
ssh
-T
-o
StrictHostKeyChecking
=
no ubuntu@
$2
<
$1
`
echo
"Test UE
${
LOC_IF_ID
}
IP Address is :
$UE_IP_ADDR
"
rm
$1
...
...
@@ -508,13 +513,25 @@ function install_epc_on_vm {
if
[
-d
/opt/ltebox-archives/
]
then
# Checking if all ltebox archives are available to run ltebx epc on a brand new VM
if
[
-f
/opt/ltebox-archives/ltebox_2.2.70_16_04_amd64.deb
]
&&
[
-f
/opt/ltebox-archives/etc-conf.zip
]
&&
[
-f
/opt/ltebox-archives/hss-sim-develop.zip
]
if
[[
$VM_OSREL
=
~ .
*
bionic.
*
]]
then
echo
"############################################################"
echo
"Test EPC on VM (
$EPC_VM_NAME
) will be using ltebox"
echo
"############################################################"
LTEBOX
=
1
# Checking if all ltebox archives are available to run ltebx epc on a brand new VM
if
[
-f
/opt/ltebox-archives/ltebox_3.5.39_ubuntu18_optimized_amd64.deb
]
&&
[
-f
/opt/ltebox-archives/etc-conf-sabox.zip
]
&&
[
-f
/opt/ltebox-archives/hss-sim-develop.zip
]
then
echo
"############################################################"
echo
"Test EPC on VM (
$EPC_VM_NAME
) will be using ltebox"
echo
"############################################################"
LTEBOX
=
1
fi
else
# Checking if all ltebox archives are available to run ltebx epc on a brand new VM
if
[
-f
/opt/ltebox-archives/ltebox_2.2.70_16_04_amd64.deb
]
&&
[
-f
/opt/ltebox-archives/etc-conf.zip
]
&&
[
-f
/opt/ltebox-archives/hss-sim-develop.zip
]
then
echo
"############################################################"
echo
"Test EPC on VM (
$EPC_VM_NAME
) will be using ltebox"
echo
"############################################################"
LTEBOX
=
1
fi
fi
fi
# Here we could have other types of EPC detection
...
...
@@ -557,8 +574,14 @@ function install_epc_on_vm {
echo
"############################################################"
echo
"Copying ltebox archives into EPC VM (
$LOC_EPC_VM_NAME
)"
echo
"############################################################"
scp
-o
StrictHostKeyChecking
=
no /opt/ltebox-archives/ltebox_2.2.70_16_04_amd64.deb ubuntu@
$LOC_EPC_VM_IP_ADDR
:/home/ubuntu
scp
-o
StrictHostKeyChecking
=
no /opt/ltebox-archives/etc-conf.zip ubuntu@
$LOC_EPC_VM_IP_ADDR
:/home/ubuntu
if
[[
$VM_OSREL
=
~ .
*
bionic.
*
]]
then
scp
-o
StrictHostKeyChecking
=
no /opt/ltebox-archives/ltebox_3.5.39_ubuntu18_optimized_amd64.deb ubuntu@
$LOC_EPC_VM_IP_ADDR
:/home/ubuntu
scp
-o
StrictHostKeyChecking
=
no /opt/ltebox-archives/etc-conf-sabox.zip ubuntu@
$LOC_EPC_VM_IP_ADDR
:/home/ubuntu/etc-conf.zip
else
scp
-o
StrictHostKeyChecking
=
no /opt/ltebox-archives/ltebox_2.2.70_16_04_amd64.deb ubuntu@
$LOC_EPC_VM_IP_ADDR
:/home/ubuntu
scp
-o
StrictHostKeyChecking
=
no /opt/ltebox-archives/etc-conf.zip ubuntu@
$LOC_EPC_VM_IP_ADDR
:/home/ubuntu
fi
scp
-o
StrictHostKeyChecking
=
no /opt/ltebox-archives/hss-sim-develop.zip ubuntu@
$LOC_EPC_VM_IP_ADDR
:/home/ubuntu
echo
"############################################################"
...
...
@@ -569,6 +592,10 @@ function install_epc_on_vm {
echo
"echo
\"
sudo apt-get --yes --quiet install zip openjdk-8-jre libconfuse-dev libreadline-dev liblog4c-dev libgcrypt-dev libsctp-dev python2.7 python2.7-dev iperf
\"
"
>>
$LOC_EPC_VM_CMDS
echo
"sudo apt-get update > zip-install.txt 2>&1"
>>
$LOC_EPC_VM_CMDS
echo
"sudo apt-get --yes install zip openjdk-8-jre libconfuse-dev libreadline-dev liblog4c-dev libgcrypt-dev libsctp-dev python2.7 python2.7-dev iperf >> zip-install.txt 2>&1"
>>
$LOC_EPC_VM_CMDS
if
[[
$VM_OSREL
=
~ .
*
bionic.
*
]]
then
echo
"sudo apt-get --yes install libxmlrpc-core-c3-dev libxmlrpc-c++8-dev >> zip-install.txt 2>&1"
>>
$LOC_EPC_VM_CMDS
fi
# Installing HSS
echo
"echo
\"
cd /opt
\"
"
>>
$LOC_EPC_VM_CMDS
...
...
@@ -581,8 +608,14 @@ function install_epc_on_vm {
# Installing ltebox
echo
"echo
\"
cd /home/ubuntu
\"
"
>>
$LOC_EPC_VM_CMDS
echo
"cd /home/ubuntu"
>>
$LOC_EPC_VM_CMDS
echo
"echo
\"
sudo dpkg -i ltebox_2.2.70_16_04_amd64.deb
\"
"
>>
$LOC_EPC_VM_CMDS
echo
"sudo dpkg -i ltebox_2.2.70_16_04_amd64.deb >> zip-install.txt 2>&1"
>>
$LOC_EPC_VM_CMDS
if
[[
$VM_OSREL
=
~ .
*
bionic.
*
]]
then
echo
"echo
\"
sudo dpkg -i ltebox_3.5.39_ubuntu18_optimized_amd64.deb
\"
"
>>
$LOC_EPC_VM_CMDS
echo
"sudo dpkg -i ltebox_3.5.39_ubuntu18_optimized_amd64.deb >> zip-install.txt 2>&1"
>>
$LOC_EPC_VM_CMDS
else
echo
"echo
\"
sudo dpkg -i ltebox_2.2.70_16_04_amd64.deb
\"
"
>>
$LOC_EPC_VM_CMDS
echo
"sudo dpkg -i ltebox_2.2.70_16_04_amd64.deb >> zip-install.txt 2>&1"
>>
$LOC_EPC_VM_CMDS
fi
echo
"echo
\"
cd /opt/ltebox/etc/
\"
"
>>
$LOC_EPC_VM_CMDS
echo
"cd /opt/ltebox/etc/"
>>
$LOC_EPC_VM_CMDS
...
...
@@ -590,6 +623,10 @@ function install_epc_on_vm {
echo
"sudo unzip -qq -o /home/ubuntu/etc-conf.zip"
>>
$LOC_EPC_VM_CMDS
echo
"sudo sed -i -e 's#EPC_VM_IP_ADDRESS#
$LOC_EPC_VM_IP_ADDR
#' gw.conf"
>>
$LOC_EPC_VM_CMDS
echo
"sudo sed -i -e 's#EPC_VM_IP_ADDRESS#
$LOC_EPC_VM_IP_ADDR
#' mme.conf"
>>
$LOC_EPC_VM_CMDS
if
[[
$VM_OSREL
=
~ .
*
bionic.
*
]]
then
echo
"sudo sed -i -e 's#EPC_VM_IP_ADDRESS#
$LOC_EPC_VM_IP_ADDR
#' amf.conf"
>>
$LOC_EPC_VM_CMDS
fi
ssh
-T
-o
StrictHostKeyChecking
=
no ubuntu@
$LOC_EPC_VM_IP_ADDR
<
$LOC_EPC_VM_CMDS
rm
-f
$LOC_EPC_VM_CMDS
...
...
@@ -637,7 +674,12 @@ function start_epc {
echo
"echo
\"
cd /opt/ltebox/tools/
\"
"
>>
$LOC_EPC_VM_CMDS
echo
"cd /opt/ltebox/tools/"
>>
$LOC_EPC_VM_CMDS
echo
"echo
\"
sudo ./start_ltebox
\"
"
>>
$LOC_EPC_VM_CMDS
echo
"nohup sudo ./start_ltebox > /home/ubuntu/ltebox.txt"
>>
$LOC_EPC_VM_CMDS
if
[[
$VM_OSREL
=
~ .
*
bionic.
*
]]
then
echo
"sudo ./start_ltebox > /home/ubuntu/ltebox.txt"
>>
$LOC_EPC_VM_CMDS
else
echo
"nohup sudo ./start_ltebox > /home/ubuntu/ltebox.txt"
>>
$LOC_EPC_VM_CMDS
fi
echo
"touch /home/ubuntu/try.txt"
>>
$LOC_EPC_VM_CMDS
echo
"sudo rm -f /home/ubuntu/*.txt"
>>
$LOC_EPC_VM_CMDS
...
...
@@ -645,7 +687,7 @@ function start_epc {
rm
-f
$LOC_EPC_VM_CMDS
i
=
"0"
echo
"ifconfig tun5 | egrep -c
\"
inet addr
\"
"
>
$LOC_EPC_VM_CMDS
echo
"ifconfig tun5 | egrep -c
'inet '
"
>
$LOC_EPC_VM_CMDS
while
[
$i
-lt
10
]
do
sleep
2
...
...
@@ -696,9 +738,9 @@ function terminate_epc {
echo
"echo
\"
cd /opt/ltebox/tools
\"
"
>
$1
echo
"cd /opt/ltebox/tools"
>>
$1
echo
"echo
\"
sudo ./stop_ltebox
\"
"
>>
$1
echo
"sudo ./stop_ltebox"
>>
$1
echo
"sudo ./stop_ltebox
|| true
"
>>
$1
echo
"echo
\"
sudo killall --signal SIGKILL hss_sim
\"
"
>>
$1
echo
"sudo killall --signal SIGKILL hss_sim"
>>
$1
echo
"sudo killall --signal SIGKILL hss_sim
|| true
"
>>
$1
ssh
-T
-o
StrictHostKeyChecking
=
no ubuntu@
$2
<
$1
rm
$1
fi
...
...
@@ -817,7 +859,7 @@ function start_l2_sim_enb {
fi
if
[
$LOC_S1_CONFIGURATION
-eq
0
]
then
echo
"ifconfig oaitun_enb1 | egrep -c
\"
inet addr
\"
"
>
$1
echo
"ifconfig oaitun_enb1 | egrep -c
'inet '
"
>
$1
# Checking oaitun_enb1 interface has now an IP address
i
=
"0"
while
[
$i
-lt
10
]
...
...
@@ -933,7 +975,7 @@ function start_l2_sim_ue {
local
j
=
"1"
while
[
$j
-le
$max_interfaces_to_check
]
do
echo
"ifconfig oaitun_ue
${
j
}
| egrep -c
\"
inet addr
\"
"
>
$1
echo
"ifconfig oaitun_ue
${
j
}
| egrep -c
'inet '
"
>
$1
# Checking oaitun_ue1 interface has now an IP address
i
=
"0"
while
[
$i
-lt
10
]
...
...
@@ -1150,7 +1192,7 @@ function start_rf_sim_ue {
fi
# Checking oaitun_ue1 interface has now an IP address
i
=
"0"
echo
"ifconfig oaitun_ue1 | egrep -c
\"
inet addr
\"
"
>
$1
echo
"ifconfig oaitun_ue1 | egrep -c
'inet '
"
>
$1
while
[
$i
-lt
10
]
do
sleep
5
...
...
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