Skip to content
Snippets Groups Projects
Commit 9baaae81 authored by Raphael Defosseux's avatar Raphael Defosseux
Browse files

Merge branch 'new-components' into 'master'

CI: docker-compose updated to integrate AUS, UDM, UDR

See merge request oai/cn5g/oai-cn5g-fed!19
parents 12f34336 b7f8050b
No related branches found
No related tags found
1 merge request!19CI: docker-compose updated to integrate AUS, UDM, UDR
......@@ -41,16 +41,10 @@ def ds_tester_ci_resource = params.DsTester
// When triggered by upstream, specify which tag to use
def upstreamTagToUse = params.upstreamTagToUse
// Location of the 2nd CN executor
def new_host_flag = false
def new_host = ""
def new_host_user = ""
// Location of the CN tester
def dsT_host_flag = false
def dsT_host = ""
def dsT_host_user = ""
def dsT_host_ip_addr = ""
// dsTester tag to use
def dsTesterTag = params.DSTESTER_TAG
......@@ -70,6 +64,13 @@ def smfBranch = params.smfBranch
def spgwuTag = params.spgwuTag
def spgwuBranch = params.spgwuBranch
def ausfTag = params.ausfTag
def ausfBranch = params.ausfBranch
def udmTag = params.udmTag
def udmBranch = params.udmBranch
def udrTag = params.udrTag
def udrBranch = params.udrBranch
//-------------------------------------------------------------------------------
// Pipeline start
pipeline {
......@@ -91,19 +92,8 @@ pipeline {
JOB_TIMESTAMP = sh returnStdout: true, script: 'date --utc --rfc-3339=seconds | sed -e "s#+00:00##"'
JOB_TIMESTAMP = JOB_TIMESTAMP.trim()
if (params.Host_CN_CI_2nd_Server_Flag != null) {
new_host_flag = params.Host_CN_CI_2nd_Server_Flag
if (new_host_flag) {
new_host = params.Host_CN_CI_2nd_Server
new_host_user = params.Host_CN_CI_2nd_Server_Login
echo "1st Node is ${NODE_NAME}"
echo "2nd Node is ${new_host}"
} else {
echo "Node is ${NODE_NAME}"
}
} else {
echo "Node is ${NODE_NAME}"
}
echo "Node is ${NODE_NAME}"
if (params.DS_Tester_Server_Flag != null) {
dsT_host_flag = params.DS_Tester_Server_Flag
if (dsT_host_flag) {
......@@ -118,11 +108,6 @@ pipeline {
} else {
dsT_host_user = params.DS_Tester_Server_Login
}
if (params.DS_Tester_Server_IP_Addr == null) {
allParametersPresent = false
} else {
dsT_host_ip_addr = params.DS_Tester_Server_IP_Addr
}
if (allParametersPresent) {
echo "DS Tester is on ${dsT_host}"
} else {
......@@ -180,13 +165,6 @@ pipeline {
sh "zip -r -qq oai-cn5g-fed.zip .git"
sh "mkdir -p archives DS-TEST-RESULTS"
sh './scripts/syncComponents.sh --nrf-branch ' + nrfBranch + ' --amf-branch ' + amfBranch + ' --smf-branch ' + smfBranch + ' --spgwu-tiny-branch ' + spgwuBranch
if (new_host_flag) {
// Prepare the workspace in remote server
copyTo2ndServer('oai-cn5g-fed.zip', new_host_flag, new_host_user, new_host)
myShCmd('git clean -x -d -f > /dev/null 2>&1', new_host_flag, new_host_user, new_host)
myShCmd('mkdir -p archives DS-TEST-RESULTS', new_host_flag, new_host_user, new_host)
myShCmd('./scripts/syncComponents.sh --nrf-branch ' + nrfBranch + ' --amf-branch ' + amfBranch + ' --smf-branch ' + smfBranch + ' --spgwu-tiny-branch ' + spgwuBranch, new_host_flag, new_host_user, new_host)
}
}
if (scmEvent) {
sh "git clean -x -d -f > /dev/null 2>&1"
......@@ -196,16 +174,6 @@ pipeline {
sh "zip -r -qq oai-cn5g-fed.zip .git"
sh "mkdir -p archives DS-TEST-RESULTS"
sh './scripts/syncComponents.sh --nrf-branch develop --amf-branch develop --smf-branch develop --spgwu-tiny-branch develop'
if (new_host_flag) {
// Prepare the workspace in remote server
copyTo2ndServer('oai-cn5g-fed.zip', new_host_flag, new_host_user, new_host)
myShCmd('git clean -x -d -f > /dev/null 2>&1', new_host_flag, new_host_user, new_host)
if ("MERGE".equals(env.gitlabActionType)) {
myShCmd("./ci-scripts/doGitLabMerge.sh --src-branch ${env.gitlabSourceBranch} --src-commit ${env.gitlabMergeRequestLastCommit} --target-branch ${env.gitlabTargetBranch} --target-commit ${GIT_COMMIT}", new_host_flag, new_host_user, new_host)
}
myShCmd('mkdir -p archives DS-TEST-RESULTS', new_host_flag, new_host_user, new_host)
myShCmd('./scripts/syncComponents.sh --nrf-branch develop --amf-branch develop --smf-branch develop --spgwu-tiny-branch develop', new_host_flag, new_host_user, new_host)
}
}
if ((!upstreamEvent) && (!scmEvent)) {
sh "git clean -x -d -f > /dev/null 2>&1"
......@@ -241,6 +209,27 @@ pipeline {
} catch (Exception e) {
error "OAI SPGW-U-Tiny Image tag to test does not exist!"
}
try {
sh 'echo "OAI_AUSF_TAG: oai-ausf:' + ausfTag +'" > archives/oai_ausf_image_info.log'
sh 'docker image inspect --format=\'Size = {{.Size}} bytes\' oai-ausf:' + ausfTag + ' >> archives/oai_ausf_image_info.log'
sh 'docker image inspect --format=\'Date = {{.Created}}\' oai-ausf:' + ausfTag + ' >> archives/oai_ausf_image_info.log'
} catch (Exception e) {
error "OAI AUSF Image tag to test does not exist!"
}
try {
sh 'echo "OAI_UDM_TAG: oai-udm:' + udmTag +'" > archives/oai_udm_image_info.log'
sh 'docker image inspect --format=\'Size = {{.Size}} bytes\' oai-udm:' + udmTag + ' >> archives/oai_udm_image_info.log'
sh 'docker image inspect --format=\'Date = {{.Created}}\' oai-udm:' + udmTag + ' >> archives/oai_udm_image_info.log'
} catch (Exception e) {
error "OAI UDM Image tag to test does not exist!"
}
try {
sh 'echo "OAI_UDR_TAG: oai-udr:' + udrTag +'" > archives/oai_udr_image_info.log'
sh 'docker image inspect --format=\'Size = {{.Size}} bytes\' oai-udr:' + udrTag + ' >> archives/oai_udr_image_info.log'
sh 'docker image inspect --format=\'Date = {{.Created}}\' oai-udr:' + udrTag + ' >> archives/oai_udr_image_info.log'
} catch (Exception e) {
error "OAI UDR Image tag to test does not exist!"
}
}
}
}
......@@ -250,17 +239,27 @@ pipeline {
echo '\u2705 \u001B[32mDeploy CN5G using Docker-Compose\u001B[0m'
// Prepare all needed files for docker-compose
// First put all correct tags to test
sh 'sed -e "s#NRF_IMAGE_TAG#' + nrfTag + '#" -e "s#AMF_IMAGE_TAG#' + amfTag + '#" -e "s#SMF_IMAGE_TAG#' + smfTag + '#" -e "s#SPGWU_IMAGE_TAG#' + spgwuTag + '#" ci-scripts/dsTesterDockerCompose/docker-compose.tplt > ci-scripts/dsTesterDockerCompose/docker-compose.yml'
sh 'sed -e "s#NRF_IMAGE_TAG#' + nrfTag + '#" -e "s#AMF_IMAGE_TAG#' + amfTag + '#" -e "s#SMF_IMAGE_TAG#' + smfTag + '#" -e "s#SPGWU_IMAGE_TAG#' + spgwuTag + '#" -e "s#AUSF_IMAGE_TAG#' + ausfTag + '#" -e "s#UDM_IMAGE_TAG#' + udmTag + '#" -e "s#UDR_IMAGE_TAG#' + udrTag + '#" ci-scripts/dsTesterDockerCompose/docker-compose.tplt > ci-scripts/dsTesterDockerCompose/docker-compose.yml'
dir('ci-scripts/dsTesterDockerCompose') {
sh 'docker-compose up -d > ../../archives/compose_5gcn_up.log 2>&1'
sh 'sleep 100'
// Do a check on number of healthy containers
// 5 == mysql + nrf + amf + smf + upf(spgwu-tiny)
ret = sh returnStdout: true, script: 'docker-compose ps -a | grep -v unhealthy | grep -c healthy || true'
ret = ret.trim()
if (ret != '5') {
// Tricking because mySql container takes a long time to be healthy
sh 'docker-compose up -d cicd_mysql > ../../archives/compose_5gcn_up.log 2>&1'
sh 'sleep 30'
sh 'docker-compose up -d >> ../../archives/compose_5gcn_up.log 2>&1'
int count = 0
while (count < 10) {
sh 'sleep 10'
// Do a check on number of healthy containers
// 8 == mysql + nrf + amf + smf + upf(spgwu-tiny) + ausf + udm + udr
ret = sh returnStdout: true, script: 'docker-compose ps -a | grep -v unhealthy | grep -c healthy || true'
ret = ret.trim()
if (ret == '8') {
count = 20
}
count++
}
if (count < 20) {
error "Deployment went wrong!"
}
}
}
}
}
......@@ -276,29 +275,40 @@ pipeline {
}
// Do docker logs to recover the configuration results
try {
//sh 'docker logs cicd-oai-nrf > archives/nrf_config.log 2>&1'
sh 'docker inspect --format=\'STATUS: {{.State.Health.Status}}\' cicd-oai-nrf >> archives/nrf_config.log'
} catch (Exception e) {
sh 'echo "STATUS: KO" >> archives/nrf_config.log'
}
try {
//sh 'docker logs cicd-oai-amf > archives/amf_config.log 2>&1'
sh 'docker inspect --format=\'STATUS: {{.State.Health.Status}}\' cicd-oai-amf >> archives/amf_config.log'
} catch (Exception e) {
sh 'echo "STATUS: KO" >> archives/amf_config.log'
}
try {
//sh 'docker logs cicd-oai-smf > archives/smf_config.log 2>&1'
sh 'docker inspect --format=\'STATUS: {{.State.Health.Status}}\' cicd-oai-smf >> archives/smf_config.log'
} catch (Exception e) {
sh 'echo "STATUS: OK" >> archives/smf_config.log'
}
try {
//sh 'docker logs cicd-oai-upf > archives/spgwu_config.log 2>&1'
sh 'docker inspect --format=\'STATUS: {{.State.Health.Status}}\' cicd-oai-upf >> archives/spgwu_config.log'
} catch (Exception e) {
sh 'echo "STATUS: KO" >> archives/spgwu_config.log'
}
try {
sh 'docker inspect --format=\'STATUS: {{.State.Health.Status}}\' cicd-oai-ausf >> archives/ausf_config.log'
} catch (Exception e) {
sh 'echo "STATUS: OK" >> archives/ausf_config.log'
}
try {
sh 'docker inspect --format=\'STATUS: {{.State.Health.Status}}\' cicd-oai-udm >> archives/udm_config.log'
} catch (Exception e) {
sh 'echo "STATUS: OK" >> archives/udm_config.log'
}
try {
sh 'docker inspect --format=\'STATUS: {{.State.Health.Status}}\' cicd-oai-udr >> archives/udr_config.log'
} catch (Exception e) {
sh 'echo "STATUS: OK" >> archives/udr_config.log'
}
}
}
success {
......@@ -350,18 +360,20 @@ pipeline {
script {
// Copy the pcaps and logs from the containers
sh "mkdir -p archives/pcaps archives/logs"
try {
sh 'docker cp cicd-oai-nrf:/tmp/nrf.pcap archives/pcaps/oai_nrf.pcap'
sh 'docker cp cicd-oai-nrf:/tmp/nrf.log archives/logs/oai_nrf.log'
sh 'docker cp cicd-oai-amf:/tmp/amf.pcap archives/pcaps/oai_amf.pcap'
sh 'docker cp cicd-oai-amf:/tmp/amf.log archives/logs/oai_amf.log'
sh 'docker cp cicd-oai-smf:/tmp/smf.pcap archives/pcaps/oai_smf.pcap'
sh 'docker cp cicd-oai-smf:/tmp/smf.log archives/logs/oai_smf.log'
sh 'docker cp cicd-oai-upf:/tmp/spgwu.pcap archives/pcaps/oai_spgwu.pcap'
sh 'docker cp cicd-oai-upf:/tmp/spgwu.log archives/logs/oai_spgwu.log'
} catch (Exception e) {
sh 'echo "Error in copying pcaps & logs from the containers"'
}
sh 'docker cp cicd-oai-nrf:/tmp/nrf.pcap archives/pcaps/oai_nrf.pcap || true'
sh 'docker logs cicd-oai-nrf > archives/logs/oai_nrf.log 2>&1 || true'
sh 'docker cp cicd-oai-amf:/tmp/amf.pcap archives/pcaps/oai_amf.pcap || true'
sh 'docker logs cicd-oai-amf > archives/logs/oai_amf.log 2>&1 || true'
sh 'docker cp cicd-oai-smf:/tmp/smf.pcap archives/pcaps/oai_smf.pcap || true'
sh 'docker logs cicd-oai-smf > archives/logs/oai_smf.log 2>&1 || true'
sh 'docker cp cicd-oai-upf:/tmp/spgwu.pcap archives/pcaps/oai_spgwu.pcap || true'
sh 'docker logs cicd-oai-upf > archives/logs/oai_spgwu.log 2>&1 || true'
sh 'docker cp cicd-oai-ausf:/tmp/ausf.pcap archives/pcaps/oai_ausf.pcap || true'
sh 'docker logs cicd-oai-ausf > archives/logs/oai_ausf.log 2>&1 || true'
sh 'docker cp cicd-oai-udm:/tmp/udm.pcap archives/pcaps/oai_udm.pcap || true'
sh 'docker logs cicd-oai-udm > archives/logs/oai_udm.log 2>&1 || true'
sh 'docker cp cicd-oai-udr:/tmp/udr.pcap archives/pcaps/oai_udr.pcap || true'
sh 'docker logs cicd-oai-udr > archives/logs/oai_udr.log 2>&1 || true'
}
}
}
......@@ -383,11 +395,14 @@ pipeline {
script {
// Get logs if deployment fail
if (deployed != true) {
sh "mkdir -p archives/logs"
sh 'docker logs cicd-oai-nrf > archives/logs/oai_nrf.log'
sh 'docker logs cicd-oai-amf > archives/logs/oai_amf.log'
sh 'docker logs cicd-oai-smf > archives/logs/oai_smf.log'
sh 'docker logs cicd-oai-upf > archives/logs/oai_spgwu.log'
sh "mkdir -p archives/logs"
sh 'docker logs cicd-oai-nrf > archives/logs/oai_nrf.log 2>&1 || true'
sh 'docker logs cicd-oai-amf > archives/logs/oai_amf.log 2>&1 || true'
sh 'docker logs cicd-oai-smf > archives/logs/oai_smf.log 2>&1 || true'
sh 'docker logs cicd-oai-upf > archives/logs/oai_spgwu.log 2>&1 || true'
sh 'docker logs cicd-oai-ausf > archives/logs/oai_ausf.log 2>&1 || true'
sh 'docker logs cicd-oai-udm > archives/logs/oai_udm.log 2>&1 || true'
sh 'docker logs cicd-oai-udr > archives/logs/oai_udr.log 2>&1 || true'
}
// Remove any leftover containers/networks
sh 'python3 ./ci-scripts/routeCheck.py --mode=Delete --userName=' + dsT_host_user + ' --hostName=' + dsT_host
......@@ -409,52 +424,3 @@ pipeline {
}
}
}
// Functions
def copyTo2ndServer(filename, flag, user, host) {
if (flag) {
if ("oai-cn5g-fed.zip".equals(filename)) {
sh "ssh ${user}@${host} 'rm -rf /tmp/CI-CN5G-FED'"
sh "ssh ${user}@${host} 'mkdir -p /tmp/CI-CN5G-FED'"
}
sh "scp ${filename} ${user}@${host}:/tmp/CI-CN5G-FED"
if ("oai-cn5g-fed.zip".equals(filename)) {
sh "ssh ${user}@${host} 'cd /tmp/CI-CN5G-FED && unzip -qq oai-cn5g-fed.zip && rm oai-cn5g-fed.zip'"
sh "ssh ${user}@${host} 'cd /tmp/CI-CN5G-FED && git checkout -f ${GIT_COMMIT}'"
sh "ssh ${user}@${host} 'cd /tmp/CI-CN5G-FED && git log -n1'"
}
}
}
def copyFrom2ndServer(filename, target, flag, user, host) {
if (flag) {
sh "scp ${user}@${host}:/tmp/CI-CN5G-FED/${filename} ${target}"
}
}
def myShCmd(cmd, flag, user, host) {
if (flag) {
sh "ssh -t -t ${user}@${host} 'cd /tmp/CI-CN5G-FED && ${cmd}'"
} else {
sh "${cmd}"
}
}
def myShCmdWithLog(cmd, logFile, flag, user, host) {
if (flag) {
sh "ssh -t -t ${user}@${host} 'export PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:.:/usr/local/devsol/bin && ${cmd}' > ${logFile} 2>&1"
} else {
sh "${cmd} > ${logFile} 2>&1"
}
}
def myShRetCmd(cmd, flag, user, host) {
if (flag) {
ret = sh returnStdout: true, script: "ssh -t -t ${user}@${host} 'cd /tmp/CI-CN5G-FED && ${cmd}'"
} else {
ret = sh returnStdout: true, script: "${cmd}"
}
ret = ret.trim()
return ret
}
......@@ -122,6 +122,9 @@ class HtmlReport():
self.addImageRow('oai_amf')
self.addImageRow('oai_smf')
self.addImageRow('oai_spgwu')
self.addImageRow('oai_ausf')
self.addImageRow('oai_udm')
self.addImageRow('oai_udr')
self.file.write(' </table>\n')
self.file.write(' </div>\n')
......@@ -143,6 +146,18 @@ class HtmlReport():
containerName = 'oai-spgwu-tiny'
tagPattern = 'OAI_SPGWU_TAG'
statusPrefix = 'spgwu'
if imageInfoPrefix == 'oai_ausf':
containerName = 'oai-ausf'
tagPattern = 'OAI_AUSF_TAG'
statusPrefix = 'ausf'
if imageInfoPrefix == 'oai_udm':
containerName = 'oai-udm'
tagPattern = 'OAI_UDM_TAG'
statusPrefix = 'udm'
if imageInfoPrefix == 'oai_udr':
containerName = 'oai-udr'
tagPattern = 'OAI_UDR_TAG'
statusPrefix = 'udr'
if imageInfoPrefix == 'mysql':
containerName = imageInfoPrefix
tagPattern = 'N/A'
......@@ -252,7 +267,7 @@ class HtmlReport():
cwd = os.getcwd()
if os.path.isfile(cwd + '/DS-TEST-RESULTS/mvc.yaml'):
with open(cwd + '/DS-TEST-RESULTS/mvc.yaml') as f:
data = yaml.load(f)
data = yaml.full_load(f)
nScenarios = len(data['scenarios'])
for scenario in range(nScenarios):
self.file.write(' <tr>\n')
......
#!/bin/bash
STATUS=0
RESULT=$(ps aux | grep -v nohup || true)
SUB='/openair-ausf/bin/oai_ausf -c /openair-ausf/etc/ausf.conf -o'
if [[ $RESULT =~ $SUB ]]; then
STATUS=0
else
STATUS=-1
fi
exit $STATUS
......@@ -7,7 +7,7 @@ services:
- 3306
command: --init-file /docker-entrypoint-initdb.d/oai_db.sql
volumes:
- ../../docker-compose/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql:rw
- ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql:rw
environment:
- TZ=Europe/Paris
- MYSQL_DATABASE=oai_db
......@@ -23,6 +23,115 @@ services:
cicd_public_net:
ipv4_address: 192.168.61.194
cicd_oai_udr:
container_name: cicd-oai-udr
image: oai-udr:UDR_IMAGE_TAG
ports:
- 80
command: >
bash -c "nohup tshark -i eth0 -w /tmp/udr.pcap 2>&1 > /dev/null &
/openair-udr/bin/oai_udr -c /openair-udr/etc/udr.conf -o"
cap_add:
- NET_ADMIN
environment:
- TZ=Europe/Paris
- INSTANCE=1
- PID_DIRECTORY=/var/run
- UDR_INTERFACE_NAME_FOR_NUDR=eth0
- UDR_INTERFACE_PORT_FOR_NUDR=80
- UDR_INTERFACE_HTTP2_PORT_FOR_NUDR=8080
- UDR_API_VERSION=v1
- MYSQL_IPV4_ADDRESS=192.168.61.194
- MYSQL_USER=test
- MYSQL_PASS=test
- MYSQL_DB=oai_db
- WAIT_MYSQL=120
depends_on:
- cicd_mysql
networks:
cicd_public_net:
ipv4_address: 192.168.61.200
volumes:
- ./udr-healthy-check.sh:/openair-udr/bin/udr-healthy-check.sh
healthcheck:
test: /bin/bash -c "/openair-udr/bin/udr-healthy-check.sh"
interval: 10s
timeout: 5s
retries: 5
cicd_oai_udm:
container_name: cicd-oai-udm
image: oai-udm:UDM_IMAGE_TAG
ports:
- 80
command: >
bash -c "nohup tshark -i eth0 -w /tmp/udm.pcap 2>&1 > /dev/null &
/openair-udm/bin/oai_udm -c /openair-udm/etc/udm.conf -o"
cap_add:
- NET_ADMIN
environment:
- TZ=Europe/Paris
- INSTANCE=1
- PID_DIRECTORY=/var/run
- UDM_NAME=OAI_UDM
- SBI_IF_NAME=eth0
- SBI_PORT=80
- UDM_VERSION_NB=v1
- UDR_IP_ADDRESS=192.168.61.200
- UDR_PORT=80
- UDR_VERSION_NB=v1
depends_on:
- cicd_mysql
- cicd_oai_udr
networks:
cicd_public_net:
ipv4_address: 192.168.61.201
volumes:
- ./udm-healthy-check.sh:/openair-udm/bin/udm-healthy-check.sh
healthcheck:
test: /bin/bash -c "/openair-udm/bin/udm-healthy-check.sh"
interval: 10s
timeout: 5s
retries: 5
cicd_oai_ausf:
container_name: cicd-oai-ausf
image: oai-ausf:AUSF_IMAGE_TAG
ports:
- 80
command: >
bash -c "nohup tshark -i eth0 -w /tmp/ausf.pcap 2>&1 > /dev/null &
/openair-ausf/bin/oai_ausf -c /openair-ausf/etc/ausf.conf -o"
cap_add:
- NET_ADMIN
environment:
- TZ=Europe/Paris
- INSTANCE_ID=1
- PID_DIR=/var/run
- AUSF_NAME=OAI_AUSF
- SBI_IF_NAME=eth0
- SBI_PORT=80
- UDM_IP_ADDRESS=192.168.61.201
- UDM_PORT=80
- UDM_VERSION_NB=v1
- AMF_IP_ADDRESS=192.168.61.196
- AMF_PORT=80
- AMF_VERSION_NB=v1
depends_on:
- cicd_mysql
- cicd_oai_udr
- cicd_oai_udm
networks:
cicd_public_net:
ipv4_address: 192.168.61.199
volumes:
- ./ausf-healthy-check.sh:/openair-ausf/bin/ausf-healthy-check.sh
healthcheck:
test: /bin/bash -c "/openair-ausf/bin/ausf-healthy-check.sh"
interval: 10s
timeout: 5s
retries: 5
cicd_oai_nrf:
container_name: cicd-oai-nrf
image: oai-nrf:NRF_IMAGE_TAG
......@@ -31,8 +140,7 @@ services:
- 9090
command: >
bash -c "nohup tshark -i eth0 -w /tmp/nrf.pcap 2>&1 > /dev/null &
/openair-nrf/bin/oai_nrf -c /openair-nrf/etc/nrf.conf -o | tee /tmp/nrf.log 2>&1
"
/openair-nrf/bin/oai_nrf -c /openair-nrf/etc/nrf.conf -o"
cap_add:
- NET_ADMIN
environment:
......@@ -62,8 +170,7 @@ services:
- 80
command: >
bash -c "nohup tshark -i eth0 -w /tmp/amf.pcap 2>&1 > /dev/null &
/openair-amf/bin/oai_amf -c /openair-amf/etc/amf.conf -o | tee /tmp/amf.log 2>&1
"
/openair-amf/bin/oai_amf -c /openair-amf/etc/amf.conf -o"
cap_add:
- NET_ADMIN
environment:
......@@ -109,15 +216,19 @@ services:
- NRF_PORT=80
- NF_REGISTRATION=yes
- SMF_SELECTION=yes
- USE_FQDN_DNS=yes
- USE_FQDN_DNS=no
- EXTERNAL_AUSF=yes
- NRF_API_VERSION=v1
- NRF_FQDN=cicd_oai_nrf
- AUSF_IPV4_ADDRESS=192.168.61.210
- AUSF_IPV4_ADDRESS=192.168.61.199
- AUSF_PORT=80
- AUSF_API_VERSION=v1
depends_on:
- cicd_mysql
- cicd_oai_nrf
- cicd_oai_udr
- cicd_oai_udm
- cicd_oai_ausf
networks:
cicd_public_net:
ipv4_address: 192.168.61.196
......@@ -137,8 +248,7 @@ services:
- 9090
command: >
bash -c "nohup tshark -i eth0 -w /tmp/smf.pcap 2>&1 > /dev/null &
/openair-smf/bin/oai_smf -c /openair-smf/etc/smf.conf -o | tee /tmp/smf.log 2>&1
"
/openair-smf/bin/oai_smf -c /openair-smf/etc/smf.conf -o"
cap_add:
- NET_ADMIN
environment:
......@@ -191,8 +301,7 @@ services:
- 8805
command: >
bash -c "nohup tshark -i eth0 -w /tmp/spgwu.pcap 2>&1 > /dev/null &
/openair-spgwu-tiny/bin/oai_spgwu -c /openair-spgwu-tiny/etc/spgw_u.conf -o | tee /tmp/spgwu.log 2>&1
"
/openair-spgwu-tiny/bin/oai_spgwu -c /openair-spgwu-tiny/etc/spgw_u.conf -o"
environment:
- TZ=Europe/Paris
- PID_DIRECTORY=/var/run
......@@ -253,3 +362,5 @@ networks:
ipam:
config:
- subnet: 192.168.61.192/26
driver_opts:
com.docker.network.bridge.name: "cicd-public"
-- phpMyAdmin SQL Dump
-- version 5.1.0
-- https://www.phpmyadmin.net/
--
-- Host: 172.16.200.10:3306
-- Generation Time: Mar 22, 2021 at 10:31 AM
-- Server version: 5.7.33
-- PHP Version: 7.4.15
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
START TRANSACTION;
SET time_zone = "+00:00";
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;
--
-- Database: `oai_db`
--
-- --------------------------------------------------------
--
-- Table structure for table `AccessAndMobilitySubscriptionData`
--
CREATE TABLE `AccessAndMobilitySubscriptionData` (
`ueid` varchar(15) NOT NULL,
`servingPlmnid` varchar(15) NOT NULL,
`supportedFeatures` varchar(50) DEFAULT NULL,
`gpsis` json DEFAULT NULL,
`internalGroupIds` json DEFAULT NULL,
`sharedVnGroupDataIds` json DEFAULT NULL,
`subscribedUeAmbr` json DEFAULT NULL,
`nssai` json DEFAULT NULL,
`ratRestrictions` json DEFAULT NULL,
`forbiddenAreas` json DEFAULT NULL,
`serviceAreaRestriction` json DEFAULT NULL,
`coreNetworkTypeRestrictions` json DEFAULT NULL,
`rfspIndex` int(10) DEFAULT NULL,
`subsRegTimer` int(10) DEFAULT NULL,
`ueUsageType` int(10) DEFAULT NULL,
`mpsPriority` tinyint(1) DEFAULT NULL,
`mcsPriority` tinyint(1) DEFAULT NULL,
`activeTime` int(10) DEFAULT NULL,
`sorInfo` json DEFAULT NULL,
`sorInfoExpectInd` tinyint(1) DEFAULT NULL,
`sorafRetrieval` tinyint(1) DEFAULT NULL,
`sorUpdateIndicatorList` json DEFAULT NULL,
`upuInfo` json DEFAULT NULL,
`micoAllowed` tinyint(1) DEFAULT NULL,
`sharedAmDataIds` json DEFAULT NULL,
`odbPacketServices` json DEFAULT NULL,
`serviceGapTime` int(10) DEFAULT NULL,
`mdtUserConsent` json DEFAULT NULL,
`mdtConfiguration` json DEFAULT NULL,
`traceData` json DEFAULT NULL,
`cagData` json DEFAULT NULL,
`stnSr` varchar(50) DEFAULT NULL,
`cMsisdn` varchar(50) DEFAULT NULL,
`nbIoTUePriority` int(10) DEFAULT NULL,
`nssaiInclusionAllowed` tinyint(1) DEFAULT NULL,
`rgWirelineCharacteristics` varchar(50) DEFAULT NULL,
`ecRestrictionDataWb` json DEFAULT NULL,
`ecRestrictionDataNb` tinyint(1) DEFAULT NULL,
`expectedUeBehaviourList` json DEFAULT NULL,
`primaryRatRestrictions` json DEFAULT NULL,
`secondaryRatRestrictions` json DEFAULT NULL,
`edrxParametersList` json DEFAULT NULL,
`ptwParametersList` json DEFAULT NULL,
`iabOperationAllowed` tinyint(1) DEFAULT NULL,
`wirelineForbiddenAreas` json DEFAULT NULL,
`wirelineServiceAreaRestriction` json DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `Amf3GppAccessRegistration`
--
CREATE TABLE `Amf3GppAccessRegistration` (
`ueid` varchar(15) NOT NULL,
`amfInstanceId` varchar(50) NOT NULL,
`supportedFeatures` varchar(50) DEFAULT NULL,
`purgeFlag` tinyint(1) DEFAULT NULL,
`pei` varchar(50) DEFAULT NULL,
`imsVoPs` json DEFAULT NULL,
`deregCallbackUri` varchar(50) NOT NULL,
`amfServiceNameDereg` json DEFAULT NULL,
`pcscfRestorationCallbackUri` varchar(50) DEFAULT NULL,
`amfServiceNamePcscfRest` json DEFAULT NULL,
`initialRegistrationInd` tinyint(1) DEFAULT NULL,
`guami` json NOT NULL,
`backupAmfInfo` json DEFAULT NULL,
`drFlag` tinyint(1) DEFAULT NULL,
`ratType` json NOT NULL,
`urrpIndicator` tinyint(1) DEFAULT NULL,
`amfEeSubscriptionId` varchar(50) DEFAULT NULL,
`epsInterworkingInfo` json DEFAULT NULL,
`ueSrvccCapability` tinyint(1) DEFAULT NULL,
`registrationTime` varchar(50) DEFAULT NULL,
`vgmlcAddress` json DEFAULT NULL,
`contextInfo` json DEFAULT NULL,
`noEeSubscriptionInd` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `AuthenticationStatus`
--
CREATE TABLE `AuthenticationStatus` (
`ueid` varchar(20) NOT NULL,
`nfInstanceId` varchar(50) NOT NULL,
`success` tinyint(1) NOT NULL,
`timeStamp` varchar(50) NOT NULL,
`authType` varchar(25) NOT NULL,
`servingNetworkName` varchar(50) NOT NULL,
`authRemovalInd` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `AuthenticationSubscription`
--
CREATE TABLE `AuthenticationSubscription` (
`ueid` varchar(20) NOT NULL,
`authenticationMethod` varchar(25) NOT NULL,
`encPermanentKey` varchar(50) DEFAULT NULL,
`protectionParameterId` varchar(50) DEFAULT NULL,
`sequenceNumber` json DEFAULT NULL,
`authenticationManagementField` varchar(50) DEFAULT NULL,
`algorithmId` varchar(50) DEFAULT NULL,
`encOpcKey` varchar(50) DEFAULT NULL,
`encTopcKey` varchar(50) DEFAULT NULL,
`vectorGenerationInHss` tinyint(1) DEFAULT NULL,
`n5gcAuthMethod` varchar(15) DEFAULT NULL,
`rgAuthenticationInd` tinyint(1) DEFAULT NULL,
`supi` varchar(20) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Dumping data for table `AuthenticationSubscription`
--
INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES
('208950000000031', '5G_AKA', '0C0A34601D4F07677303652C0462535B', '0C0A34601D4F07677303652C0462535B', '{\"sqn\": \"000000000020\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', '63bfa50ee6523365ff14c1f45f88737d', NULL, NULL, NULL, NULL, '208950000000031');
-- --------------------------------------------------------
--
-- Table structure for table `SdmSubscriptions`
--
CREATE TABLE `SdmSubscriptions` (
`ueid` varchar(15) NOT NULL,
`subsId` int(10) UNSIGNED NOT NULL,
`nfInstanceId` varchar(50) NOT NULL,
`implicitUnsubscribe` tinyint(1) DEFAULT NULL,
`expires` varchar(50) DEFAULT NULL,
`callbackReference` varchar(50) NOT NULL,
`amfServiceName` json DEFAULT NULL,
`monitoredResourceUris` json NOT NULL,
`singleNssai` json DEFAULT NULL,
`dnn` varchar(50) DEFAULT NULL,
`subscriptionId` varchar(50) DEFAULT NULL,
`plmnId` json DEFAULT NULL,
`immediateReport` tinyint(1) DEFAULT NULL,
`report` json DEFAULT NULL,
`supportedFeatures` varchar(50) DEFAULT NULL,
`contextInfo` json DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `SessionManagementSubscriptionData`
--
CREATE TABLE `SessionManagementSubscriptionData` (
`ueid` varchar(15) NOT NULL,
`servingPlmnid` varchar(15) NOT NULL,
`singleNssai` json NOT NULL,
`dnnConfigurations` json DEFAULT NULL,
`internalGroupIds` json DEFAULT NULL,
`sharedVnGroupDataIds` json DEFAULT NULL,
`sharedDnnConfigurationsId` varchar(50) DEFAULT NULL,
`odbPacketServices` json DEFAULT NULL,
`traceData` json DEFAULT NULL,
`sharedTraceDataId` varchar(50) DEFAULT NULL,
`expectedUeBehavioursList` json DEFAULT NULL,
`suggestedPacketNumDlList` json DEFAULT NULL,
`3gppChargingCharacteristics` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `SmfRegistrations`
--
CREATE TABLE `SmfRegistrations` (
`ueid` varchar(15) NOT NULL,
`subpduSessionId` int(10) NOT NULL,
`smfInstanceId` varchar(50) NOT NULL,
`smfSetId` varchar(50) DEFAULT NULL,
`supportedFeatures` varchar(50) DEFAULT NULL,
`pduSessionId` int(10) NOT NULL,
`singleNssai` json NOT NULL,
`dnn` varchar(50) DEFAULT NULL,
`emergencyServices` tinyint(1) DEFAULT NULL,
`pcscfRestorationCallbackUri` varchar(50) DEFAULT NULL,
`plmnId` json NOT NULL,
`pgwFqdn` varchar(50) DEFAULT NULL,
`epdgInd` tinyint(1) DEFAULT NULL,
`deregCallbackUri` varchar(50) DEFAULT NULL,
`registrationReason` json DEFAULT NULL,
`registrationTime` varchar(50) DEFAULT NULL,
`contextInfo` json DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
-- --------------------------------------------------------
--
-- Table structure for table `SmfSelectionSubscriptionData`
--
CREATE TABLE `SmfSelectionSubscriptionData` (
`ueid` varchar(15) NOT NULL,
`servingPlmnid` varchar(15) NOT NULL,
`supportedFeatures` varchar(50) DEFAULT NULL,
`subscribedSnssaiInfos` json DEFAULT NULL,
`sharedSnssaiInfosId` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Indexes for dumped tables
--
--
-- Indexes for table `AccessAndMobilitySubscriptionData`
--
ALTER TABLE `AccessAndMobilitySubscriptionData`
ADD PRIMARY KEY (`ueid`,`servingPlmnid`) USING BTREE;
--
-- Indexes for table `Amf3GppAccessRegistration`
--
ALTER TABLE `Amf3GppAccessRegistration`
ADD PRIMARY KEY (`ueid`);
--
-- Indexes for table `AuthenticationStatus`
--
ALTER TABLE `AuthenticationStatus`
ADD PRIMARY KEY (`ueid`);
--
-- Indexes for table `AuthenticationSubscription`
--
ALTER TABLE `AuthenticationSubscription`
ADD PRIMARY KEY (`ueid`);
--
-- Indexes for table `SdmSubscriptions`
--
ALTER TABLE `SdmSubscriptions`
ADD PRIMARY KEY (`subsId`,`ueid`) USING BTREE;
--
-- Indexes for table `SessionManagementSubscriptionData`
--
ALTER TABLE `SessionManagementSubscriptionData`
ADD PRIMARY KEY (`ueid`,`servingPlmnid`) USING BTREE;
--
-- Indexes for table `SmfRegistrations`
--
ALTER TABLE `SmfRegistrations`
ADD PRIMARY KEY (`ueid`,`subpduSessionId`) USING BTREE;
--
-- Indexes for table `SmfSelectionSubscriptionData`
--
ALTER TABLE `SmfSelectionSubscriptionData`
ADD PRIMARY KEY (`ueid`,`servingPlmnid`) USING BTREE;
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `SdmSubscriptions`
--
ALTER TABLE `SdmSubscriptions`
MODIFY `subsId` int(10) UNSIGNED NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
#!/bin/bash
STATUS=0
RESULT=$(ps aux | grep -v nohup || true)
SUB='/openair-udm/bin/oai_udm -c /openair-udm/etc/udm.conf -o'
if [[ $RESULT =~ $SUB ]]; then
STATUS=0
else
STATUS=-1
fi
exit $STATUS
#!/bin/bash
STATUS=0
RESULT=$(ps aux | grep -v nohup || true)
SUB='/openair-udr/bin/oai_udr -c /openair-udr/etc/udr.conf -o'
if [[ $RESULT =~ $SUB ]]; then
STATUS=0
else
STATUS=-1
fi
exit $STATUS
......@@ -44,7 +44,7 @@ except IOError:
if locexist:
try:
with open(cwd + f'/DS-TEST-RESULTS/{filename.group(0)}') as f:
data = yaml.load(f)
data = yaml.full_load(f)
if data["final-result"] == 'fail':
sys.exit('DsTester final result FAILED')
except IOError:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment