CI: deploy Magme-MME OAI EPC through CoreNetwork, use in Ping/Iperf
- call scripts for magma MME-based deployment of OAI 5GC in ci_infra.yaml - implement the existing python code through scripts (which does the same) - save the cql file in the repo, which was previously downloaded every time - use for porcepix-cn4g and nano-cn4g (un)deployment, ping, perf, in XML files
This commit is contained in:
Executable
+28
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
function die() { echo "${@}"; exit 1; }
|
||||
|
||||
[ $# -eq 1 ] || die "usage: $0 <path>"
|
||||
|
||||
DOCKERFILE="${1}"
|
||||
|
||||
function wait_for() {
|
||||
local timeout=${1}
|
||||
local condition=${2}
|
||||
echo "wait up to ${timeout} seconds for condition \"${condition}\""
|
||||
while [ $timeout -gt 0 ]; do
|
||||
eval ${condition} && return
|
||||
sleep 1
|
||||
let timeout=$timeout-1
|
||||
done
|
||||
die "ERROR: timed out waiting for condition \"${condition}\""
|
||||
}
|
||||
|
||||
# start database
|
||||
docker compose -f ${DOCKERFILE} up -d db_init cassandra
|
||||
wait_for 30 "docker logs prod-db-init 2> /dev/null | grep OK"
|
||||
|
||||
# start EPC
|
||||
docker compose -f ${DOCKERFILE} up -d oai_hss redis magma_mme oai_spgwc oai_spgwu trf_gen
|
||||
wait_for 20 "docker inspect --format='{{.State.Health.Status}}' prod-cassandra prod-oai-hss prod-magma-mme prod-oai-spgwc prod-oai-spgwu-tiny prod-redis prod-trf-gen | grep healthy | wc -l | grep 7"
|
||||
echo "deployment OK"
|
||||
Executable
+12
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
|
||||
function die() { echo "${@}"; exit 1; }
|
||||
|
||||
[ $# -eq 1 ] || die "usage: $0 <logdir>"
|
||||
|
||||
DIR=${1}
|
||||
|
||||
docker logs prod-oai-hss &> ${DIR}/oai-hss.log
|
||||
docker logs prod-magma-mme &> ${DIR}/magme-mme.log
|
||||
docker logs prod-oai-spgwc &> ${DIR}/oai-spgwc.log
|
||||
docker logs prod-oai-spgwu-tiny &> ${DIR}/oai-spgwu.log
|
||||
Reference in New Issue
Block a user