diff options
author | Harald Welte <laforge@gnumonks.org> | 2018-02-06 17:41:33 +0100 |
---|---|---|
committer | Harald Welte <laforge@gnumonks.org> | 2018-02-06 19:08:45 +0100 |
commit | facbb6575e31b0249590ffc6a4b3090daee9963a (patch) | |
tree | a1b40a05a8d9d6898678848371f641e4c1c1f91f /ttcn3-bsc-test | |
parent | afe1ec8dc1e99c2dfca76b52eceba5f188eea71e (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-bsc-test')
-rw-r--r-- | ttcn3-bsc-test/BSC_Tests.cfg | 4 | ||||
-rw-r--r-- | ttcn3-bsc-test/Makefile | 2 | ||||
-rwxr-xr-x | ttcn3-bsc-test/jenkins.sh | 19 | ||||
-rw-r--r-- | ttcn3-bsc-test/osmo-bsc.cfg | 2 | ||||
-rw-r--r-- | ttcn3-bsc-test/osmo-stp.cfg | 4 |
5 files changed, 20 insertions, 11 deletions
diff --git a/ttcn3-bsc-test/BSC_Tests.cfg b/ttcn3-bsc-test/BSC_Tests.cfg index f619665..3dc7b14 100644 --- a/ttcn3-bsc-test/BSC_Tests.cfg +++ b/ttcn3-bsc-test/BSC_Tests.cfg @@ -19,10 +19,10 @@ LoggerPlugins := { JUnitLogger := "libjunitlogger2" } #*.*.udpReuseAddress := "yes"; [MODULE_PARAMETERS] -BSC_Tests.mp_bsc_ip := "172.18.0.20"; +BSC_Tests.mp_bsc_ip := "172.18.2.20"; #BSC_Tests.mp_bsc_rsl_port := 3003; #BSC_Tests.mp_bsc_ctrl_port := 3003; -BSSAP_Adapter.mp_sctp_addr := { 23905, "172.18.0.203", 2905, "172.18.0.200" }; +BSSAP_Adapter.mp_sctp_addr := { 23905, "172.18.2.203", 2905, "172.18.2.200" }; #mp_ipa_mgcp_uses_osmo_ext := true; diff --git a/ttcn3-bsc-test/Makefile b/ttcn3-bsc-test/Makefile index 42de210..cbcd544 100644 --- a/ttcn3-bsc-test/Makefile +++ b/ttcn3-bsc-test/Makefile @@ -1,3 +1,3 @@ -RUN_ARGS?=--sysctl net.ipv6.conf.all.disable_ipv6=0 --rm --network sigtran --ip 172.18.0.202 -v ggsn-test-vol:/data +RUN_ARGS?=--sysctl net.ipv6.conf.all.disable_ipv6=0 --rm --network sigtran --ip 172.18.2.202 -v ggsn-test-vol:/data include ../make/Makefile diff --git a/ttcn3-bsc-test/jenkins.sh b/ttcn3-bsc-test/jenkins.sh index 03be9fe..4c9cc4a 100755 --- a/ttcn3-bsc-test/jenkins.sh +++ b/ttcn3-bsc-test/jenkins.sh @@ -10,6 +10,8 @@ if [ "x$WORKSPACE" = "x" ]; then WORKSPACE=/tmp fi +NET_NAME="bsc-tester" + VOL_BASE_DIR=`mktemp -d` mkdir $VOL_BASE_DIR/bsc-tester cp BSC_Tests.cfg $VOL_BASE_DIR/bsc-tester/ @@ -20,16 +22,19 @@ cp osmo-stp.cfg $VOL_BASE_DIR/stp/ mkdir $VOL_BASE_DIR/bsc cp osmo-bsc.cfg $VOL_BASE_DIR/bsc/ +echo Creating network $NET_NAME +docker network create --internal --subnet 172.18.2.0/24 $NET_NAME + echo Starting container with STP docker run --rm \ - --network sigtran --ip 172.18.0.200 \ + --network $NET_NAME --ip 172.18.2.200 \ -v $VOL_BASE_DIR/stp:/data \ --name stp -d \ $REPO_USER/osmo-stp-master echo Starting container with BSC docker run --rm \ - --network sigtran --ip 172.18.0.20 \ + --network $NET_NAME --ip 172.18.2.20 \ -v $VOL_BASE_DIR/bsc:/data \ --name bsc -d \ $REPO_USER/osmo-bsc-master @@ -37,14 +42,14 @@ docker run --rm \ for i in `seq 0 2`; do echo Starting container with OML for BTS$i docker run --rm \ - --network sigtran --ip 172.18.0.10$i \ + --network $NET_NAME --ip 172.18.2.10$i \ --name bts$i -d \ - $REPO_USER/osmo-bts-omldummy ./respawn.sh 172.18.0.20 $((i + 1234)) + $REPO_USER/osmo-bts-omldummy ./respawn.sh 172.18.2.20 $((i + 1234)) done echo Starting container with BSC testsuite docker run --rm \ - --network sigtran --ip 172.18.0.203 \ + --network $NET_NAME --ip 172.18.2.203 \ -v $VOL_BASE_DIR/bsc-tester:/data \ --name ttcn3-bsc-test \ $REPO_USER/ttcn3-bsc-test @@ -56,6 +61,10 @@ done docker container kill bsc docker container kill stp +echo Removing network $NET_NAME +docker network remove $NET_NAME + + rm -rf $WORKSPACE/logs mkdir -p $WORKSPACE/logs cp -a $VOL_BASE_DIR/* $WORKSPACE/logs/ diff --git a/ttcn3-bsc-test/osmo-bsc.cfg b/ttcn3-bsc-test/osmo-bsc.cfg index 7d7bd53..e024d73 100644 --- a/ttcn3-bsc-test/osmo-bsc.cfg +++ b/ttcn3-bsc-test/osmo-bsc.cfg @@ -68,7 +68,7 @@ e1_input no e1_line 0 keepalive cs7 instance 0 asp asp-clnt-msc-0 2905 2905 m3ua - remote-ip 172.18.0.200 + remote-ip 172.18.2.200 network network country code 1 mobile network code 1 diff --git a/ttcn3-bsc-test/osmo-stp.cfg b/ttcn3-bsc-test/osmo-stp.cfg index 2649a22..da0956a 100644 --- a/ttcn3-bsc-test/osmo-stp.cfg +++ b/ttcn3-bsc-test/osmo-stp.cfg @@ -32,8 +32,8 @@ line vty cs7 instance 0 xua rkm routing-key-allocation dynamic-permitted asp virt-msc0-0 23905 2905 m3ua - local-ip 172.18.0.200 - remote-ip 172.18.0.203 + local-ip 172.18.2.200 + remote-ip 172.18.2.203 as mahlzeit ipa routing-key 1 0.23.4 point-code override dpc 0.23.1 |