Change in docker-playground[master]: PCU: Add osmo-pcu-* + ttcn3-pcu-test containers

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Harald Welte gerrit-no-reply at lists.osmocom.org
Thu Feb 21 10:57:07 UTC 2019


Harald Welte has submitted this change and it was merged. ( https://gerrit.osmocom.org/12986 )

Change subject: PCU: Add osmo-pcu-* + ttcn3-pcu-test containers
......................................................................

PCU: Add osmo-pcu-* + ttcn3-pcu-test containers

This will enable us to run the PCU testsuite automatically by
jenkins, just like for other Osmocom projects.

Change-Id: Ia8e2ed2e7d03b8afdc7b1e068f94b0544a8112c7
Related: OS#2890
---
A osmo-pcu-latest/.release
A osmo-pcu-latest/Dockerfile
A osmo-pcu-latest/Makefile
A osmo-pcu-latest/Release.key
A osmo-pcu-latest/osmo-pcu.cfg
A osmo-pcu-latest/respawn.sh
A osmo-pcu-master/.release
A osmo-pcu-master/Dockerfile
A osmo-pcu-master/Makefile
A osmo-pcu-master/Release.key
A osmo-pcu-master/osmo-pcu.cfg
A osmo-pcu-master/respawn.sh
A ttcn3-pcu-test/.release
A ttcn3-pcu-test/Dockerfile
A ttcn3-pcu-test/Makefile
A ttcn3-pcu-test/PCU_Tests.cfg
A ttcn3-pcu-test/jenkins.sh
A ttcn3-pcu-test/osmo-pcu.cfg
18 files changed, 282 insertions(+), 0 deletions(-)

Approvals:
  Harald Welte: Looks good to me, approved; Verified



diff --git a/osmo-pcu-latest/.release b/osmo-pcu-latest/.release
new file mode 100644
index 0000000..466d8a8
--- /dev/null
+++ b/osmo-pcu-latest/.release
@@ -0,0 +1,2 @@
+release=0.0.0
+tag=osmo-pcu-latest-0.0.0
diff --git a/osmo-pcu-latest/Dockerfile b/osmo-pcu-latest/Dockerfile
new file mode 100644
index 0000000..fdd5e56
--- /dev/null
+++ b/osmo-pcu-latest/Dockerfile
@@ -0,0 +1,36 @@
+FROM debian:stretch
+
+MAINTAINER Harald Welte <laforge at gnumonks.org>
+
+ARG	OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/latest/Debian_9.0/"
+
+COPY	Release.key /tmp/Release.key
+
+ADD	$OSMOCOM_REPO/Release /tmp/Release
+RUN	apt-get update && \
+	apt-get install -y --no-install-recommends \
+		gnupg
+
+RUN	apt-key add /tmp/Release.key && \
+	rm /tmp/Release.key && \
+	echo "deb " $OSMOCOM_REPO " ./" > /etc/apt/sources.list.d/osmocom-latest.list
+
+ADD	$OSMOCOM_REPO/Release /tmp/Release
+RUN	apt-get update && \
+	apt-get install -y --no-install-recommends \
+		telnet \
+		osmo-pcu && \
+	apt-get clean
+
+ADD	respawn.sh /usr/local/bin/respawn.sh
+
+WORKDIR	/tmp
+
+VOLUME	/data
+
+COPY	osmo-pcu.cfg /data/osmo-pcu.cfg
+
+WORKDIR	/data
+CMD	["/usr/bin/osmo-pcu"]
+
+#EXPOSE	
diff --git a/osmo-pcu-latest/Makefile b/osmo-pcu-latest/Makefile
new file mode 100644
index 0000000..8d0e10b
--- /dev/null
+++ b/osmo-pcu-latest/Makefile
@@ -0,0 +1 @@
+include ../make/Makefile
diff --git a/osmo-pcu-latest/Release.key b/osmo-pcu-latest/Release.key
new file mode 100644
index 0000000..e656238
--- /dev/null
+++ b/osmo-pcu-latest/Release.key
@@ -0,0 +1,20 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.5 (GNU/Linux)
+
+mQENBFJBt/wBCADAht3d/ilNuyzaXYw/QwTRvmjyoDvfXw+H/3Fvk1zlDZoiKPPc
+a1wCVBINUZl7vYM2OXqbJwYa++JP2Q48xKSvC6thbRc/YLievkbcvTemf7IaREfl
+CTjoYpoqXHa9kHMw1aALDm8CNU88jZmnV7v9L6hKkbYDxie+jpoj7D6B9JlxgNJ4
+5dQyRNsFGVcIl4Vplt1HyGc5Q5nQI/VgS2rlF/IOXmhRQBc4LEDdU8R2IKnkU4ee
+S7TWanAigGAQhxGuCkS39/CWzc1DhLhjlNhBl/+RTPejkqJtAy00ZLps3+RqUN1Y
+CU/Fsr7aRlYVGqQ/BlptwV0XQ2VVYJX2oEBBABEBAAG0MG5ldHdvcmsgT0JTIFBy
+b2plY3QgPG5ldHdvcmtAYnVpbGQub3BlbnN1c2Uub3JnPokBPAQTAQIAJgUCWmMc
+aQIbAwUJDEAUbQYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEGLrGgkXKA3fjsoI
+ALSXmXzFCpTxg8a6tvXkqddY/qAmeBMNUf7hslI9wN3leNmCrnuHS8TbHWYJZgtw
+8M5fKL3aRQYaIiqqm1XOUF0OqwYNDj5V3y38mM68NYOkzgSP7foMwZp9Y0TlGhtI
+L8weA+2RUjB4hwwGMAYMqkRZyKW3NhPqdlGGoXac1ilwEyGXFHdOLbkhtyS+P2yb
+/EvaKIN5cMLzRZKeYgdp9WuAirV+yV/SDbgvabW098lrWhGLltlRRDQgMV883p8I
+ERMI1wlLFZGnHL3mfBWGeQ24M/DaBOdXQDtfBLCJ9nGztmDBUb8i6GFWU7nD2TGi
+8mYUsED1ZDwO/0jdvJ4gSluIRgQTEQIABgUCUkG3/AAKCRA7MBG3a51lIzhdAJ9v
+d6XPffMZRcCGgDEY5OaTn/MsCQCgrXbeZpFJgnirSrc8rRonvzYFiF4=
+=Gvly
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/osmo-pcu-latest/osmo-pcu.cfg b/osmo-pcu-latest/osmo-pcu.cfg
new file mode 100644
index 0000000..9a5db59
--- /dev/null
+++ b/osmo-pcu-latest/osmo-pcu.cfg
@@ -0,0 +1,10 @@
+line vty
+ no login
+ bind 0.0.0.0
+pcu
+ flow-control-interval 10
+ cs 2
+ alloc-algorithm dynamic
+ alpha 0
+ gamma 0
+ pcu-socket /data/pcu_bts
diff --git a/osmo-pcu-latest/respawn.sh b/osmo-pcu-latest/respawn.sh
new file mode 100755
index 0000000..ae5cf60
--- /dev/null
+++ b/osmo-pcu-latest/respawn.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+trap "kill 0" EXIT
+
+while [ -e /etc/passwd ]; do
+	$* &
+	LAST_PID=$!
+	wait $LAST_PID
+done
diff --git a/osmo-pcu-master/.release b/osmo-pcu-master/.release
new file mode 100644
index 0000000..49b830d
--- /dev/null
+++ b/osmo-pcu-master/.release
@@ -0,0 +1,2 @@
+release=0.0.0
+tag=osmo-pcu-master-0.0.0
diff --git a/osmo-pcu-master/Dockerfile b/osmo-pcu-master/Dockerfile
new file mode 100644
index 0000000..867f534
--- /dev/null
+++ b/osmo-pcu-master/Dockerfile
@@ -0,0 +1,43 @@
+ARG	USER
+FROM	$USER/debian-jessie-build
+
+MAINTAINER Harald Welte <laforge at gnumonks.org>
+
+ARG	OSMOCOM_REPO="http://download.opensuse.org/repositories/network:/osmocom:/nightly/Debian_8.0/"
+
+COPY	Release.key /tmp/Release.key
+
+RUN	apt-key add /tmp/Release.key && \
+	rm /tmp/Release.key && \
+	echo "deb " $OSMOCOM_REPO " ./" > /etc/apt/sources.list.d/osmocom-nightly.list
+
+ADD	$OSMOCOM_REPO/Release /tmp/Release
+RUN	apt-get update && \
+	apt-get install -y --no-install-recommends \
+		telnet \
+		libosmocore-dev && \
+	apt-get clean
+
+ADD	respawn.sh /usr/local/bin/respawn.sh
+
+WORKDIR	/tmp
+
+ARG	OSMO_PCU_BRANCH="master"
+
+RUN	git clone git://git.osmocom.org/osmo-pcu.git
+ADD	http://git.osmocom.org/osmo-pcu/patch?h=$OSMO_PCU_BRANCH /tmp/commit-osmo-pcu
+
+RUN	cd osmo-pcu && \
+	git fetch && git checkout -f -B $OSMO_PCU_BRANCH origin/$OSMO_PCU_BRANCH && \
+	autoreconf -fi && \
+	./configure --enable-trx && \
+	make -j8 install
+
+VOLUME	/data
+
+COPY	osmo-pcu.cfg /data/osmo-pcu.cfg
+
+WORKDIR	/data
+CMD	["/usr/local/bin/osmo-pcu", "-i", "172.18.0.230"]
+
+#EXPOSE	
diff --git a/osmo-pcu-master/Makefile b/osmo-pcu-master/Makefile
new file mode 100644
index 0000000..87350c2
--- /dev/null
+++ b/osmo-pcu-master/Makefile
@@ -0,0 +1,3 @@
+RUN_ARGS?=--rm --network sigtran --ip 172.18.0.211 -v pcu-vol:/data
+
+include ../make/Makefile
diff --git a/osmo-pcu-master/Release.key b/osmo-pcu-master/Release.key
new file mode 100644
index 0000000..e656238
--- /dev/null
+++ b/osmo-pcu-master/Release.key
@@ -0,0 +1,20 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.5 (GNU/Linux)
+
+mQENBFJBt/wBCADAht3d/ilNuyzaXYw/QwTRvmjyoDvfXw+H/3Fvk1zlDZoiKPPc
+a1wCVBINUZl7vYM2OXqbJwYa++JP2Q48xKSvC6thbRc/YLievkbcvTemf7IaREfl
+CTjoYpoqXHa9kHMw1aALDm8CNU88jZmnV7v9L6hKkbYDxie+jpoj7D6B9JlxgNJ4
+5dQyRNsFGVcIl4Vplt1HyGc5Q5nQI/VgS2rlF/IOXmhRQBc4LEDdU8R2IKnkU4ee
+S7TWanAigGAQhxGuCkS39/CWzc1DhLhjlNhBl/+RTPejkqJtAy00ZLps3+RqUN1Y
+CU/Fsr7aRlYVGqQ/BlptwV0XQ2VVYJX2oEBBABEBAAG0MG5ldHdvcmsgT0JTIFBy
+b2plY3QgPG5ldHdvcmtAYnVpbGQub3BlbnN1c2Uub3JnPokBPAQTAQIAJgUCWmMc
+aQIbAwUJDEAUbQYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEGLrGgkXKA3fjsoI
+ALSXmXzFCpTxg8a6tvXkqddY/qAmeBMNUf7hslI9wN3leNmCrnuHS8TbHWYJZgtw
+8M5fKL3aRQYaIiqqm1XOUF0OqwYNDj5V3y38mM68NYOkzgSP7foMwZp9Y0TlGhtI
+L8weA+2RUjB4hwwGMAYMqkRZyKW3NhPqdlGGoXac1ilwEyGXFHdOLbkhtyS+P2yb
+/EvaKIN5cMLzRZKeYgdp9WuAirV+yV/SDbgvabW098lrWhGLltlRRDQgMV883p8I
+ERMI1wlLFZGnHL3mfBWGeQ24M/DaBOdXQDtfBLCJ9nGztmDBUb8i6GFWU7nD2TGi
+8mYUsED1ZDwO/0jdvJ4gSluIRgQTEQIABgUCUkG3/AAKCRA7MBG3a51lIzhdAJ9v
+d6XPffMZRcCGgDEY5OaTn/MsCQCgrXbeZpFJgnirSrc8rRonvzYFiF4=
+=Gvly
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/osmo-pcu-master/osmo-pcu.cfg b/osmo-pcu-master/osmo-pcu.cfg
new file mode 100644
index 0000000..9a5db59
--- /dev/null
+++ b/osmo-pcu-master/osmo-pcu.cfg
@@ -0,0 +1,10 @@
+line vty
+ no login
+ bind 0.0.0.0
+pcu
+ flow-control-interval 10
+ cs 2
+ alloc-algorithm dynamic
+ alpha 0
+ gamma 0
+ pcu-socket /data/pcu_bts
diff --git a/osmo-pcu-master/respawn.sh b/osmo-pcu-master/respawn.sh
new file mode 100755
index 0000000..ae5cf60
--- /dev/null
+++ b/osmo-pcu-master/respawn.sh
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+trap "kill 0" EXIT
+
+while [ -e /etc/passwd ]; do
+	$* &
+	LAST_PID=$!
+	wait $LAST_PID
+done
diff --git a/ttcn3-pcu-test/.release b/ttcn3-pcu-test/.release
new file mode 100644
index 0000000..adac371
--- /dev/null
+++ b/ttcn3-pcu-test/.release
@@ -0,0 +1,2 @@
+release=0.0.0
+tag=ttcn3-pcu-test-0.0.0
diff --git a/ttcn3-pcu-test/Dockerfile b/ttcn3-pcu-test/Dockerfile
new file mode 100644
index 0000000..2cfacce
--- /dev/null
+++ b/ttcn3-pcu-test/Dockerfile
@@ -0,0 +1,33 @@
+ARG	USER
+FROM	$USER/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="laforge/gb-sns"
+
+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 pcu
+
+VOLUME	/data
+
+RUN	ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-start.sh / && \
+	ln -s /osmo-ttcn3-hacks/ttcn3-tcpdump-stop.sh /
+
+COPY	PCU_Tests.cfg /data/PCU_Tests.cfg
+
+CMD	cd /data && \
+	/osmo-ttcn3-hacks/start-testsuite.sh /osmo-ttcn3-hacks/pcu/PCU_Tests; \
+	exit_code=$?; \
+	/osmo-ttcn3-hacks/log_merge.sh PCU_Tests --rm; \
+	exit $exit_code
diff --git a/ttcn3-pcu-test/Makefile b/ttcn3-pcu-test/Makefile
new file mode 100644
index 0000000..b172280
--- /dev/null
+++ b/ttcn3-pcu-test/Makefile
@@ -0,0 +1,3 @@
+RUN_ARGS?=--sysctl net.ipv6.conf.all.disable_ipv6=0 --rm --network sigtran --ip 172.18.1.202 -v pcu-test-vol:/data
+
+include ../make/Makefile
diff --git a/ttcn3-pcu-test/PCU_Tests.cfg b/ttcn3-pcu-test/PCU_Tests.cfg
new file mode 100644
index 0000000..07af661
--- /dev/null
+++ b/ttcn3-pcu-test/PCU_Tests.cfg
@@ -0,0 +1,23 @@
+[ORDERED_INCLUDE]
+"/osmo-ttcn3-hacks/Common.cfg"
+"/osmo-ttcn3-hacks/pcu/PCU_Tests.default"
+
+[LOGGING]
+
+[TESTPORT_PARAMETERS]
+
+[MODULE_PARAMETERS]
+PCU_Tests_RAW.mp_pcu_sock_path := "/data/unix/pcu_bts"
+PCU_Tests.mp_nsconfig := {
+	local_ip := "172.18.13.10",
+	local_udp_port := 23000,
+	remote_ip := "172.18.13.101",
+	remote_udp_port := 23000,
+	nsvci := 1234,
+	nsei := 1234
+}
+
+[MAIN_CONTROLLER]
+
+[EXECUTE]
+PCU_Tests_RAW.control
diff --git a/ttcn3-pcu-test/jenkins.sh b/ttcn3-pcu-test/jenkins.sh
new file mode 100755
index 0000000..bee539d
--- /dev/null
+++ b/ttcn3-pcu-test/jenkins.sh
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+. ../jenkins-common.sh
+IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}"
+docker_images_require \
+	"debian-jessie-build" \
+	"osmo-pcu-$IMAGE_SUFFIX" \
+	"debian-stretch-titan" \
+	"ttcn3-pcu-test"
+
+network_create 172.18.13.0/24
+
+mkdir $VOL_BASE_DIR/pcu-tester
+mkdir $VOL_BASE_DIR/pcu-tester/unix
+cp PCU_Tests.cfg $VOL_BASE_DIR/pcu-tester/
+
+mkdir $VOL_BASE_DIR/pcu
+mkdir $VOL_BASE_DIR/pcu/unix
+cp osmo-pcu.cfg $VOL_BASE_DIR/pcu/
+
+mkdir $VOL_BASE_DIR/unix
+
+echo Starting container with PCU
+docker run	--rm \
+		--network $NET_NAME --ip 172.18.13.101 \
+		-v $VOL_BASE_DIR/pcu:/data \
+		-v $VOL_BASE_DIR/unix:/data/unix \
+		--name ${BUILD_TAG}-pcu -d \
+		$REPO_USER/osmo-pcu-$IMAGE_SUFFIX \
+		/usr/local/bin/respawn.sh osmo-pcu -c /data/osmo-pcu.cfg
+
+echo Starting container with PCU testsuite
+docker run	--rm \
+		--network $NET_NAME --ip 172.18.13.10 \
+		-e "TTCN3_PCAP_PATH=/data" \
+		-v $VOL_BASE_DIR/pcu-tester:/data \
+		-v $VOL_BASE_DIR/unix:/data/unix \
+		--name ${BUILD_TAG}-ttcn3-pcu-test \
+		$REPO_USER/ttcn3-pcu-test
+
+echo Stopping containers
+docker container kill ${BUILD_TAG}-pcu
+
+network_remove
+rm -rf $VOL_BASE_DIR/unix
+collect_logs
diff --git a/ttcn3-pcu-test/osmo-pcu.cfg b/ttcn3-pcu-test/osmo-pcu.cfg
new file mode 100644
index 0000000..918beea
--- /dev/null
+++ b/ttcn3-pcu-test/osmo-pcu.cfg
@@ -0,0 +1,10 @@
+line vty
+ no login
+ bind 0.0.0.0
+pcu
+ flow-control-interval 10
+ cs 2
+ alloc-algorithm dynamic
+ alpha 0
+ gamma 0
+ pcu-socket /data/unix/pcu_bts

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

Gerrit-Project: docker-playground
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: Ia8e2ed2e7d03b8afdc7b1e068f94b0544a8112c7
Gerrit-Change-Number: 12986
Gerrit-PatchSet: 2
Gerrit-Owner: Harald Welte <laforge at gnumonks.org>
Gerrit-Reviewer: Harald Welte <laforge at gnumonks.org>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20190221/d72e3891/attachment.htm>


More information about the gerrit-log mailing list