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/.
Neels Hofmeyr gerrit-no-reply at lists.osmocom.orgReview at https://gerrit.osmocom.org/7388 bsc master,ttcn3: mount external bsc sources for ttcn3 hacking In osmo-bsc-master, provide convenience commands to build osmo-bsc sources that may be "mounted" at /osmo-bsc, and run osmo-bsc. To have only one place that defines how to run osmo-bsc, call 'make run' from Dockerfile. In ttcn3-bsc-test, add a second argument to -h to provide the osmo-bsc sources to "mount" into the osmo-bsc-master docker container, and to launch the container with a shell to allow restarting osmo-bsc interactively. Change-Id: I27bc5c0898d368db152e56baa124ba4941a10a4d --- M osmo-bsc-master/Dockerfile A osmo-bsc-master/Makefile.within-docker-img M ttcn3-bsc-test/jenkins.sh 3 files changed, 30 insertions(+), 3 deletions(-) git pull ssh://gerrit.osmocom.org:29418/docker-playground refs/changes/88/7388/1 diff --git a/osmo-bsc-master/Dockerfile b/osmo-bsc-master/Dockerfile index 2228c39..2ba05f0 100644 --- a/osmo-bsc-master/Dockerfile +++ b/osmo-bsc-master/Dockerfile @@ -38,8 +38,9 @@ VOLUME /data COPY osmo-bsc.cfg /data/osmo-bsc.cfg +COPY Makefile.within-docker-img /Makefile -WORKDIR /data -CMD ["/usr/local/bin/osmo-bsc"] +WORKDIR / +CMD ["make", "run"] #EXPOSE diff --git a/osmo-bsc-master/Makefile.within-docker-img b/osmo-bsc-master/Makefile.within-docker-img new file mode 100644 index 0000000..5f9c8fe --- /dev/null +++ b/osmo-bsc-master/Makefile.within-docker-img @@ -0,0 +1,17 @@ +# This file assumes an osmo-bsc src tree mounted into /osmo-bsc using something like +# docker -v ~/src/osmo-bsc:/osmo-bsc +.PHONY: compile run + +all: compile run + +# construct the /build dir to build outside the mounted-in osmo-bsc source tree +build: + cd /osmo-bsc && ( test -f configure || autoreconf -fi ) + mkdir -p /build + cd /build && /osmo-bsc/configure + +compile: build + $(MAKE) -C /build -j install + +run: + cd /data && /usr/local/bin/osmo-bsc -c osmo-bsc.cfg diff --git a/ttcn3-bsc-test/jenkins.sh b/ttcn3-bsc-test/jenkins.sh index aa504de..40c9780 100755 --- a/ttcn3-bsc-test/jenkins.sh +++ b/ttcn3-bsc-test/jenkins.sh @@ -5,12 +5,18 @@ ADD_TTCN_RUN_OPTS="" ADD_TTCN_RUN_CMD="" ADD_TTCN_VOLUMES="" +ADD_BSC_VOLUMES="" +ADD_BSC_ARGS="" if [ "x$1" = "x-h" ]; then ADD_TTCN_RUN_OPTS="-ti" ADD_TTCN_RUN_CMD="bash" if [ -d "$2" ]; then ADD_TTCN_VOLUMES="$ADD_TTCN_VOLUMES -v $2:/osmo-ttcn3-hacks" + fi + if [ -d "$3" ]; then + ADD_BSC_RUN_CMD="sleep 100000" + ADD_BSC_VOLUMES="$ADD_BSC_VOLUMES -v $3:/osmo-bsc" fi fi @@ -36,8 +42,11 @@ docker run --rm \ --network $NET_NAME --ip 172.18.2.20 \ -v $VOL_BASE_DIR/bsc:/data \ + $ADD_BSC_VOLUMES \ --name ${BUILD_TAG}-bsc -d \ - $REPO_USER/osmo-bsc-master + $ADD_BSC_RUN_OPTS \ + $REPO_USER/osmo-bsc-master \ + $ADD_BSC_RUN_CMD for i in `seq 0 2`; do echo Starting container with OML for BTS$i -- To view, visit https://gerrit.osmocom.org/7388 To unsubscribe, visit https://gerrit.osmocom.org/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I27bc5c0898d368db152e56baa124ba4941a10a4d Gerrit-PatchSet: 1 Gerrit-Project: docker-playground Gerrit-Branch: master Gerrit-Owner: Neels Hofmeyr <nhofmeyr at sysmocom.de>