daniel has submitted this change. (
https://gerrit.osmocom.org/c/docker-playground/+/27242
)
Change subject: Add ttcn3-hnbgw-test docker container
......................................................................
Add ttcn3-hnbgw-test docker container
Only works in OSMO_HNBGW_BRANCH=pmaier/mgw2 for now
Change-Id: I7e06c1d4365a34b8b6b02a4748714694dfa14554
---
A ttcn3-hnbgw-test/Dockerfile
A ttcn3-hnbgw-test/HNBGW_Tests.cfg
A ttcn3-hnbgw-test/Makefile
A ttcn3-hnbgw-test/jenkins.sh
A ttcn3-hnbgw-test/osmo-hnbgw.cfg
A ttcn3-hnbgw-test/osmo-stp.cfg
6 files changed, 218 insertions(+), 0 deletions(-)
Approvals:
Jenkins Builder: Verified
pespin: Looks good to me, but someone else must approve
osmith: Looks good to me, approved
diff --git a/ttcn3-hnbgw-test/Dockerfile b/ttcn3-hnbgw-test/Dockerfile
new file mode 100644
index 0000000..4dd0d1b
--- /dev/null
+++ b/ttcn3-hnbgw-test/Dockerfile
@@ -0,0 +1,13 @@
+ARG REGISTRY
+ARG USER
+FROM $REGISTRY/$USER/debian-bullseye-titan
+ARG OSMO_TTCN3_BRANCH="master"
+
+ADD
http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
+RUN ttcn3-docker-prepare "$OSMO_TTCN3_BRANCH" hnbgw
+
+VOLUME /data
+
+COPY HNBGW_Tests.cfg /data/HNBGW_Tests.cfg
+
+CMD ttcn3-docker-run hnbgw HNBGW_Tests
diff --git a/ttcn3-hnbgw-test/HNBGW_Tests.cfg b/ttcn3-hnbgw-test/HNBGW_Tests.cfg
new file mode 100644
index 0000000..2768d20
--- /dev/null
+++ b/ttcn3-hnbgw-test/HNBGW_Tests.cfg
@@ -0,0 +1,46 @@
+[ORDERED_INCLUDE]
+# Common configuration, shared between test suites
+"/osmo-ttcn3-hacks/Common.cfg"
+# testsuite specific configuration, not expected to change
+"/osmo-ttcn3-hacks/hnbgw/HNBGW_Tests.default"
+
+# Local configuration below
+
+[LOGGING]
+
+[TESTPORT_PARAMETERS]
+*.HNBGWVTY.CTRL_HOSTNAME := "172.18.35.20"
+
+[MODULE_PARAMETERS]
+HNBGW_Tests.mp_hnodeb_ip := "172.18.35.203";
+HNBGW_Tests.mp_hnbgw_ip := "172.18.35.20";
+HNBGW_Tests.mp_mgw_ip := "172.18.35.203";
+HNBGW_Tests.mp_msc_cfg := {
+ transport := RANAP_TRANSPORT_IuCS,
+ sccp_service_type := "mtp3_itu",
+ sctp_addr := { 23905, "172.18.35.203", 2905, "172.18.35.200" },
+ own_pc := 188, /* 0.23.4 first MSC emulation */
+ own_ssn := 142,
+ peer_pc := 189, /* 0.23.5 osmo-hnbgw */
+ peer_ssn := 142,
+ sio := '83'O,
+ rctx := 1
+};
+HNBGW_Tests.mp_sgsn_cfg := {
+ transport := RANAP_TRANSPORT_IuCS,
+ sccp_service_type := "mtp3_itu",
+ sctp_addr := { 23906, "172.18.35.203", 2905, "172.18.35.200" },
+ own_pc := 185, /* 0.23.1 first SGSN emulation */
+ own_ssn := 142,
+ peer_pc := 189, /* 0.23.5 osmo-hnbgw */
+ peer_ssn := 142,
+ sio := '83'O,
+ rctx := 2
+};
+
+
+
+[MAIN_CONTROLLER]
+
+[EXECUTE]
+HNBGW_Tests.control
diff --git a/ttcn3-hnbgw-test/Makefile b/ttcn3-hnbgw-test/Makefile
new file mode 100644
index 0000000..1fcab4f
--- /dev/null
+++ b/ttcn3-hnbgw-test/Makefile
@@ -0,0 +1,3 @@
+RUN_ARGS?=-it --sysctl net.ipv6.conf.all.disable_ipv6=0 --network sigtran --ip
172.18.35.203 -v ggsn-test-vol:/data
+
+include ../make/Makefile
diff --git a/ttcn3-hnbgw-test/jenkins.sh b/ttcn3-hnbgw-test/jenkins.sh
new file mode 100755
index 0000000..71a4dc6
--- /dev/null
+++ b/ttcn3-hnbgw-test/jenkins.sh
@@ -0,0 +1,62 @@
+#!/bin/sh
+
+. ../jenkins-common.sh
+IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}"
+docker_images_require \
+ "osmo-stp-$IMAGE_SUFFIX" \
+ "osmo-hnbgw-$IMAGE_SUFFIX" \
+ "ttcn3-hnbgw-test"
+
+set_clean_up_trap
+set -e
+
+mkdir $VOL_BASE_DIR/hnbgw-tester
+mkdir $VOL_BASE_DIR/hnbgw-tester/unix
+cp HNBGW_Tests.cfg $VOL_BASE_DIR/hnbgw-tester/
+write_mp_osmo_repo "$VOL_BASE_DIR/hnbgw-tester/HNBGW_Tests.cfg"
+
+mkdir $VOL_BASE_DIR/stp
+cp osmo-stp.cfg $VOL_BASE_DIR/stp/
+
+mkdir $VOL_BASE_DIR/hnbgw
+mkdir $VOL_BASE_DIR/hnbgw/unix
+cp osmo-hnbgw.cfg $VOL_BASE_DIR/hnbgw/
+
+mkdir $VOL_BASE_DIR/unix
+
+SUBNET=35
+network_create $SUBNET
+
+echo Starting container with STP
+docker run --rm \
+ $(docker_network_params $SUBNET 200) \
+ --ulimit core=-1 \
+ -v $VOL_BASE_DIR/stp:/data \
+ --name ${BUILD_TAG}-stp -d \
+ $DOCKER_ARGS \
+ $REPO_USER/osmo-stp-$IMAGE_SUFFIX
+
+echo Starting container with HNBGW
+docker run --rm \
+ $(docker_network_params $SUBNET 20) \
+ --ulimit core=-1 \
+ -v $VOL_BASE_DIR/hnbgw:/data \
+ -v $VOL_BASE_DIR/unix:/data/unix \
+ --name ${BUILD_TAG}-hnbgw -d \
+ $DOCKER_ARGS \
+ $REPO_USER/osmo-hnbgw-$IMAGE_SUFFIX
+
+echo Starting container with HNBGW testsuite
+docker run --rm \
+ $(docker_network_params $SUBNET 203) \
+ --ulimit core=-1 \
+ -e "TTCN3_PCAP_PATH=/data" \
+ -v $VOL_BASE_DIR/hnbgw-tester:/data \
+ -v $VOL_BASE_DIR/unix:/data/unix \
+ --name ${BUILD_TAG}-ttcn3-hnbgw-test \
+ $DOCKER_ARGS \
+ $REPO_USER/ttcn3-hnbgw-test
+
+echo Stopping containers
+docker container kill ${BUILD_TAG}-hnbgw
+docker container kill ${BUILD_TAG}-stp
diff --git a/ttcn3-hnbgw-test/osmo-hnbgw.cfg b/ttcn3-hnbgw-test/osmo-hnbgw.cfg
new file mode 100644
index 0000000..a4d3787
--- /dev/null
+++ b/ttcn3-hnbgw-test/osmo-hnbgw.cfg
@@ -0,0 +1,42 @@
+!
+! OsmoHNBGW (1.1.0) configuration saved from vty
+!!
+!
+log stderr
+ logging filter all 1
+ logging color 1
+ logging print category-hex 1
+ logging print category 1
+ logging print thread-id 0
+ logging print extended-timestamp 1
+ logging print file 1
+ logging level set-all debug
+!
+line vty
+ no login
+ bind 0.0.0.0
+!
+cs7 instance 0
+ asp asp-clnt-msc-0 2905 2905 m3ua
+ local-ip 172.18.35.20
+ remote-ip 172.18.35.200
+ point-code 0.23.5
+ sccp-address msc
+ routing-indicator PC
+ point-code 0.23.4
+ sccp-address sgsn
+ routing-indicator PC
+ point-code 0.23.1
+hnbgw
+ log-prefix hnb-id
+ iuh
+ local-ip 172.18.35.20
+ local-port 29169
+ hnbap-allow-tmsi 1
+ iucs
+ remote-addr msc
+ iups
+ remote-addr sgsn
+ mgcp
+ mgw local-ip 172.18.35.20
+ mgw remote-ip 172.18.35.203
diff --git a/ttcn3-hnbgw-test/osmo-stp.cfg b/ttcn3-hnbgw-test/osmo-stp.cfg
new file mode 100644
index 0000000..76685eb
--- /dev/null
+++ b/ttcn3-hnbgw-test/osmo-stp.cfg
@@ -0,0 +1,52 @@
+!
+! OsmoSTP (0.8.1) configuration saved from vty
+!!
+!
+log stderr
+ logging filter all 1
+ logging color 1
+ logging print category 1
+ logging timestamp 1
+ logging print extended-timestamp 1
+ logging level lglobal notice
+ logging level llapd notice
+ logging level linp notice
+ logging level lmux notice
+ logging level lmi notice
+ logging level lmib notice
+ logging level lsms notice
+ logging level lctrl notice
+ logging level lgtp notice
+ logging level lstats notice
+ logging level lgsup notice
+ logging level loap notice
+ logging level lss7 debug
+ logging level lsccp debug
+ logging level lsua debug
+ logging level lm3ua debug
+ logging level lmgcp notice
+!
+line vty
+ no login
+!
+cs7 instance 0
+ xua rkm routing-key-allocation dynamic-permitted
+ asp virt-msc0-0 23905 2905 m3ua
+ local-ip 172.18.35.200
+ remote-ip 172.18.35.203
+ as virt-msc0 m3ua
+ asp virt-msc0-0
+ routing-key 1 0.23.4
+ asp virt-sgsn0-0 23906 2905 m3ua
+ local-ip 172.18.35.200
+ remote-ip 172.18.35.203
+ as virt-sgsn0 m3ua
+ asp virt-sgsn0-0
+ routing-key 2 0.23.1
+
+
+ route-table system
+ update route 0.23.4 7.255.7 linkset virt-msc0
+ update route 0.23.1 7.255.7 linkset virt-sgsn0
+ listen m3ua 2905
+ accept-asp-connections dynamic-permitted
--
To view, visit
https://gerrit.osmocom.org/c/docker-playground/+/27242
To unsubscribe, or for help writing mail filters, visit
https://gerrit.osmocom.org/settings
Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-Change-Id: I7e06c1d4365a34b8b6b02a4748714694dfa14554
Gerrit-Change-Number: 27242
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: daniel <dwillmann(a)sysmocom.de>
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-MessageType: merged