Change in docker-playground[master]: Add ttcn3-bscnat-test docker image

daniel gerrit-no-reply at lists.osmocom.org
Wed Nov 7 17:15:14 UTC 2018


daniel has uploaded this change for review. ( https://gerrit.osmocom.org/11657


Change subject: Add ttcn3-bscnat-test docker image
......................................................................

Add ttcn3-bscnat-test docker image

Run the bscnat ttcn3 tests in docker. This uses the osmo-nitb-master
image since osmo-bsc_nat is built there as well.

Change-Id: Ibeebb0325d3d1976225666eb28db0741df2e66f0
---
A ttcn3-bscnat-test/BSCNAT_Tests.cfg
A ttcn3-bscnat-test/Dockerfile
A ttcn3-bscnat-test/Makefile
A ttcn3-bscnat-test/bscs.config
A ttcn3-bscnat-test/jenkins.sh
A ttcn3-bscnat-test/osmo-bsc-nat.cfg
6 files changed, 183 insertions(+), 0 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/57/11657/1

diff --git a/ttcn3-bscnat-test/BSCNAT_Tests.cfg b/ttcn3-bscnat-test/BSCNAT_Tests.cfg
new file mode 100644
index 0000000..e45061d
--- /dev/null
+++ b/ttcn3-bscnat-test/BSCNAT_Tests.cfg
@@ -0,0 +1,30 @@
+[ORDERED_INCLUDE]
+"/osmo-ttcn3-hacks/Common.cfg"
+"/osmo-ttcn3-hacks/bsc-nat/BSCNAT_Tests.default"
+
+[LOGGING]
+*.JUnitLogger.testsuite_name := "BSCNAT_Tests"
+
+[TESTPORT_PARAMETERS]
+
+[MODULE_PARAMETERS]
+mp_bsc_port := 49999;
+mp_bsc_ip   := "172.18.11.203";
+mp_msc_port := 5100;
+mp_msc_ip   := "172.18.11.203";
+mp_nat_port := 5000;
+mp_nat_ip   := "172.18.11.20";
+
+#mp_ipa_mgcp_uses_osmo_ext := true;
+
+mp_mgcp_uses_udp := true;
+mp_callagent_ip := "172.18.11.203";
+mp_callagent_udp_port := 2727;
+mp_mgw_ip := "172.18.11.20";
+mp_mgw_udp_port := 2427;
+
+[MAIN_CONTROLLER]
+
+[EXECUTE]
+BSCNAT_Tests.control
+#BSCNAT_Tests.TC_recv_dump
diff --git a/ttcn3-bscnat-test/Dockerfile b/ttcn3-bscnat-test/Dockerfile
new file mode 100644
index 0000000..10acf98
--- /dev/null
+++ b/ttcn3-bscnat-test/Dockerfile
@@ -0,0 +1,32 @@
+FROM	laforge/debian-stretch-titan
+
+RUN	mkdir /root/projects && (cd /root/projects && ln -sf / git)
+RUN	git clone git://git.osmocom.org/osmo-ttcn3-hacks.git
+
+RUN	cd osmo-ttcn3-hacks && \
+	git checkout -f -B master origin/master && \
+	make deps
+
+RUN	git config --global user.email docker at dock.er && \
+	git config --global user.name "Dock Er"
+
+ARG	OSMO_TTCN3_BRANCH="master"
+
+ADD	http://git.osmocom.org/osmo-ttcn3-hacks/patch?h=$OSMO_TTCN3_BRANCH /tmp/commit
+RUN	cd osmo-ttcn3-hacks && \
+	git fetch && \
+	git checkout -f -B $OSMO_TTCN3_BRANCH origin/$OSMO_TTCN3_BRANCH && \
+	make bsc-nat
+
+VOLUME	/data
+
+RUN	ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-start.sh / && \
+	ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-stop.sh /
+
+COPY	BSCNAT_Tests.cfg /data/BSCNAT_Tests.cfg
+
+CMD	cd /data && \
+	/osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/bsc-nat/BSCNAT_Tests; \
+	exit_code=$?; \
+	/osmo-ttcn3-hacks/log_merge.sh BSCNAT_Tests --rm; \
+	exit $exit_code
diff --git a/ttcn3-bscnat-test/Makefile b/ttcn3-bscnat-test/Makefile
new file mode 100644
index 0000000..0895788
--- /dev/null
+++ b/ttcn3-bscnat-test/Makefile
@@ -0,0 +1,2 @@
+
+include ../make/Makefile
diff --git a/ttcn3-bscnat-test/bscs.config b/ttcn3-bscnat-test/bscs.config
new file mode 100644
index 0000000..6afa09b
--- /dev/null
+++ b/ttcn3-bscnat-test/bscs.config
@@ -0,0 +1,19 @@
+nat
+ bsc 0
+  token BSC0
+  location_area_code 1
+  description bsc
+  max-endpoints 32
+  paging forbidden 0
+ bsc 1
+  token BSC1
+  location_area_code 2
+  description bsc
+  max-endpoints 32
+  paging forbidden 0
+ bsc 2
+  token BSC2
+  location_area_code 3
+  description bsc
+  max-endpoints 32
+  paging forbidden 0
diff --git a/ttcn3-bscnat-test/jenkins.sh b/ttcn3-bscnat-test/jenkins.sh
new file mode 100755
index 0000000..d54a31a
--- /dev/null
+++ b/ttcn3-bscnat-test/jenkins.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+. ../jenkins-common.sh
+
+mkdir $VOL_BASE_DIR/bscnat-tester
+cp BSCNAT_Tests.cfg $VOL_BASE_DIR/bscnat-tester/
+
+mkdir $VOL_BASE_DIR/bscnat
+cp osmo-bsc-nat.cfg $VOL_BASE_DIR/bscnat/
+cp bscs.config $VOL_BASE_DIR/bscnat/
+
+network_create 172.18.11.0/24
+
+echo Starting container with BSCNAT
+docker run	--rm \
+		--network $NET_NAME --ip 172.18.11.20 \
+		-v $VOL_BASE_DIR/bscnat:/data \
+		--name ${BUILD_TAG}-bscnat -d \
+		$REPO_USER/osmo-nitb-master /usr/local/bin/osmo-bsc_nat -c /data/osmo-bsc-nat.cfg
+
+echo Starting container with BSCNAT testsuite
+docker run	--rm \
+		--network $NET_NAME --ip 172.18.11.203 \
+		-e "TTCN3_PCAP_PATH=/data" \
+		-v $VOL_BASE_DIR/bscnat-tester:/data \
+		--name ${BUILD_TAG}-ttcn3-bscnat-test \
+		$REPO_USER/ttcn3-bscnat-test
+
+echo Stopping containers
+docker container kill ${BUILD_TAG}-bscnat
+
+network_remove
+collect_logs
diff --git a/ttcn3-bscnat-test/osmo-bsc-nat.cfg b/ttcn3-bscnat-test/osmo-bsc-nat.cfg
new file mode 100644
index 0000000..4f02366
--- /dev/null
+++ b/ttcn3-bscnat-test/osmo-bsc-nat.cfg
@@ -0,0 +1,67 @@
+!
+! OsmoBSCNAT (0.12.0.266-2daa9) configuration saved from vty
+!!
+!
+log stderr
+  logging filter all 1
+  logging color 1
+  logging timestamp 1
+  logging level rll notice
+  logging level cc notice
+  logging level mm notice
+  logging level rr notice
+  logging level rsl notice
+  logging level nm info
+  logging level mncc notice
+  logging level pag notice
+  logging level meas notice
+  logging level sccp debug
+  logging level msc notice
+  logging level mgcp notice
+  logging level ho notice
+  logging level db notice
+  logging level ref notice
+  logging level gprs debug
+  logging level ns info
+  logging level bssgp debug
+  logging level llc debug
+  logging level sndcp debug
+  logging level nat notice
+  logging level ctrl notice
+  logging level smpp debug
+  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
+!
+line vty
+ no login
+!
+mgcp
+  bind ip 172.18.11.20
+  bind port 2427
+  rtp bts-base 4000
+  rtp net-base 16000
+  rtp ip-dscp 0
+  no rtcp-omit
+  sdp audio-payload number 126
+  sdp audio-payload name AMR/8000
+  loop 0
+  number endpoints 1
+  call-agent ip 172.18.11.203
+  rtp transcoder-base 0
+  transcoder-remote-base 4000
+nat
+ msc ip 172.18.11.203
+ msc port 5100
+ token foo
+ timeout auth 2
+ timeout ping 20
+ timeout pong 5
+ ip-dscp 0
+ bscs-config-file bscs.config
+ access-list msceven imsi-allow ^[0-9]*[24680]$
+ access-list mscodd imsi-allow ^[0-9]*[13579]$

-- 
To view, visit https://gerrit.osmocom.org/11657
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ibeebb0325d3d1976225666eb28db0741df2e66f0
Gerrit-Change-Number: 11657
Gerrit-PatchSet: 1
Gerrit-Owner: daniel <dwillmann at sysmocom.de>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181107/1c19788d/attachment.html>


More information about the gerrit-log mailing list