aboutsummaryrefslogtreecommitdiffstats
path: root/ttcn3-nitb-sysinfo
diff options
context:
space:
mode:
authorHarald Welte <laforge@gnumonks.org>2018-02-06 17:41:33 +0100
committerHarald Welte <laforge@gnumonks.org>2018-02-06 19:08:45 +0100
commitfacbb6575e31b0249590ffc6a4b3090daee9963a (patch)
treea1b40a05a8d9d6898678848371f641e4c1c1f91f /ttcn3-nitb-sysinfo
parentafe1ec8dc1e99c2dfca76b52eceba5f188eea71e (diff)
move every 'test network' to its own IP address space
Ideally we would want to launch a group of containers with their own private network segment and use the same static IP addresses in those isolated networks. The stupidity of docker is requiring unique IPv4 addresses even on isolated (!) networks. This means we have to manually give each of our test setups a different subnet, and then we can at least run one instance that test in parallel to at most one instance of each other test. If this weird reestriction about unique IPv4 addresses didn't exist, we could start any number of test runs in parallel.
Diffstat (limited to 'ttcn3-nitb-sysinfo')
-rw-r--r--ttcn3-nitb-sysinfo/Makefile2
-rw-r--r--ttcn3-nitb-sysinfo/Test.cfg2
-rwxr-xr-xttcn3-nitb-sysinfo/jenkins.sh14
3 files changed, 13 insertions, 5 deletions
diff --git a/ttcn3-nitb-sysinfo/Makefile b/ttcn3-nitb-sysinfo/Makefile
index a9aefee..7b2593b 100644
--- a/ttcn3-nitb-sysinfo/Makefile
+++ b/ttcn3-nitb-sysinfo/Makefile
@@ -1,3 +1,3 @@
-RUN_ARGS?=--sysctl net.ipv6.conf.all.disable_ipv6=0 --rm --network sigtran --ip 172.18.0.230 -v ttcn3-nitb-sysinfo-vol:/data
+RUN_ARGS?=--sysctl net.ipv6.conf.all.disable_ipv6=0 --rm --network sigtran --ip 172.18.5.230 -v ttcn3-nitb-sysinfo-vol:/data
include ../make/Makefile
diff --git a/ttcn3-nitb-sysinfo/Test.cfg b/ttcn3-nitb-sysinfo/Test.cfg
index 6ee7fca..077fa25 100644
--- a/ttcn3-nitb-sysinfo/Test.cfg
+++ b/ttcn3-nitb-sysinfo/Test.cfg
@@ -8,7 +8,7 @@ LoggerPlugins := { JUnitLogger := "libjunitlogger2" }
[TESTPORT_PARAMETERS]
*.BSCVTY.CTRL_MODE := "client"
-*.BSCVTY.CTRL_HOSTNAME := "172.18.0.20"
+*.BSCVTY.CTRL_HOSTNAME := "172.18.5.20"
*.BSCVTY.CTRL_PORTNUM := "4242"
*.BSCVTY.CTRL_LOGIN_SKIPPED := "yes"
*.BSCVTY.CTRL_DETECT_SERVER_DISCONNECTED := "yes"
diff --git a/ttcn3-nitb-sysinfo/jenkins.sh b/ttcn3-nitb-sysinfo/jenkins.sh
index ab6f4b0..a52c16e 100755
--- a/ttcn3-nitb-sysinfo/jenkins.sh
+++ b/ttcn3-nitb-sysinfo/jenkins.sh
@@ -10,11 +10,16 @@ if [ "x$WORKSPACE" = "x" ]; then
WORKSPACE=/tmp
fi
+NET_NAME="nitb-sysinfo-tester"
+
+echo Creating network $NET_NAME
+docker network create --internal --subnet 172.18.5.0/24 $NET_NAME
+
# start container with nitb in background
docker volume rm nitb-vol
docker run --rm \
--sysctl net.ipv6.conf.all.disable_ipv6=0 \
- --network sigtran --ip 172.18.0.20 \
+ --network sigtran --ip 172.18.5.20 \
-v nitb-vol:/data \
--name nitb -d \
$REPO_USER/osmo-nitb-master
@@ -23,7 +28,7 @@ docker run --rm \
docker volume rm bts-vol
docker run --rm \
--sysctl net.ipv6.conf.all.disable_ipv6=0 \
- --network sigtran --ip 172.18.0.210 \
+ --network sigtran --ip 172.18.5.210 \
-v bts-vol:/data \
--name bts -d \
$REPO_USER/osmo-bts-master
@@ -33,7 +38,7 @@ docker run --rm \
docker volume rm ttcn3-nitb-sysinfo-vol
docker run --rm \
--sysctl net.ipv6.conf.all.disable_ipv6=0 \
- --network sigtran --ip 172.18.0.230 \
+ --network sigtran --ip 172.18.5.230 \
-v ttcn3-nitb-sysinfo-vol:/data \
$REPO_USER/ttcn3-nitb-sysinfo
@@ -54,3 +59,6 @@ docker cp sysinfo-helper:/ttcn3-nitb-sysinfo $WORKSPACE/logs
docker cp sysinfo-helper:/nitb $WORKSPACE/logs
docker cp sysinfo-helper:/bts $WORKSPACE/logs
docker container stop -t 0 sysinfo-helper
+
+echo Removing network $NET_NAME
+docker network remove $NET_NAME