Osmocom docker containers
Go to file
Pau Espin 18de547d3e ttcn3-sgsn: Enable osmo-sgsn SS7 multi-homing and IPv6 features in tests
Change-Id: I21dbe79705dcc23426a88174120f6f810df84749
2020-08-30 16:07:57 +00:00
alpine-build Add Dockerfile for alpine:3.6 based containers with libosmocore build deps 2017-10-09 11:15:57 +08:00
alpine-lighttpd Add Dockerfile for alpine Linux with lighttpd 2017-10-15 14:37:41 +00:00
bind9 Makefile support for our production infrastructure containers 2018-06-03 16:11:26 +00:00
centos-repo-install-test centos-repo-install-test: new image 2020-05-27 10:55:13 +02:00
centos8-build centos8-build: new image 2020-05-30 08:57:58 +02:00
cgit cgit: change URL for gerrit change-ids 2020-05-08 19:59:16 +02:00
debian-buster-build docker-*-build: Add missign dependency to stow 2020-01-09 22:11:06 +00:00
debian-buster-erlang update OBS Release.key; the old one expired today. 2020-03-30 18:06:58 +02:00
debian-buster-simtrace2 update OBS Release.key; the old one expired today. 2020-03-30 18:06:58 +02:00
debian-jessie-build docker-*-build: Add missign dependency to stow 2020-01-09 22:11:06 +00:00
debian-jessie-buildslave Fix "'laforge/debian-jessie-build' not found" 2018-09-06 15:17:06 +02:00
debian-jessie-buildslave-st Fix "'laforge/debian-jessie-build' not found" 2018-09-06 15:17:06 +02:00
debian-jessie-osmocom update OBS Release.key; the old one expired today. 2020-03-30 18:06:58 +02:00
debian-repo-install-test debian-repo-install-test: move scripts to osmo-ci 2020-05-27 11:41:47 +02:00
debian-sid-build add debian-sid-build, osmo-dev-on-debian-sid 2017-12-06 01:45:42 +01:00
debian-stretch-build docker-*-build: Add missign dependency to stow 2020-01-09 22:11:06 +00:00
debian-stretch-build-dist update OBS Release.key; the old one expired today. 2020-03-30 18:06:58 +02:00
debian-stretch-jenkins debian-stretch-jenkins: install osmo-python-tests for python2 2020-08-17 08:34:13 +00:00
debian-stretch-titan debian-stretch-titan: do not install unneeded dependencies 2020-06-05 22:20:35 +07:00
gerrit gerrit: Update to 2.16.18 2020-05-04 11:34:00 +02:00
git-daemon git-deamon: Make sure to create the git-daemon user 2018-07-21 09:38:52 +02:00
gitolite Makefile support for our production infrastructure containers 2018-06-03 16:11:26 +00:00
gr-gsm-master make: use $(nproc) instead of hard-coded number of cores 2020-07-13 02:52:10 +07:00
make Makefile: Support overriding LIBOSMOCORE_BRANCH 2020-06-30 18:23:04 +02:00
nplab-m3ua-test jenkins-common.sh: Add function to print docker network related parameters 2020-08-27 12:49:43 +02:00
nplab-sua-test jenkins-common.sh: Add function to print docker network related parameters 2020-08-27 12:49:43 +02:00
open5gs-master open5gs: Add pgw.sh 2020-04-27 11:19:36 +00:00
osmo-bsc-latest osmo-{bsc,msc}.cfg: eliminate 'periodic location update 30' 2020-06-01 01:17:35 +07:00
osmo-bsc-master make: use $(nproc) instead of hard-coded number of cores 2020-07-13 02:52:10 +07:00
osmo-bts-latest update OBS Release.key; the old one expired today. 2020-03-30 18:06:58 +02:00
osmo-bts-master make: use $(nproc) instead of hard-coded number of cores 2020-07-13 02:52:10 +07:00
osmo-cn-latest update OBS Release.key; the old one expired today. 2020-03-30 18:06:58 +02:00
osmo-dev-on-debian-sid add debian-sid-build, osmo-dev-on-debian-sid 2017-12-06 01:45:42 +01:00
osmo-gerrit-libosmo make: use $(nproc) instead of hard-coded number of cores 2020-07-13 02:52:10 +07:00
osmo-ggsn-latest update OBS Release.key; the old one expired today. 2020-03-30 18:06:58 +02:00
osmo-ggsn-master make: use $(nproc) instead of hard-coded number of cores 2020-07-13 02:52:10 +07:00
osmo-gsm-tester jenkins-common.sh: Add function to print docker network related parameters 2020-08-27 12:49:43 +02:00
osmo-hlr-latest update OBS Release.key; the old one expired today. 2020-03-30 18:06:58 +02:00
osmo-hlr-master make: use $(nproc) instead of hard-coded number of cores 2020-07-13 02:52:10 +07:00
osmo-hnbgw-latest update OBS Release.key; the old one expired today. 2020-03-30 18:06:58 +02:00
osmo-hnbgw-master make: use $(nproc) instead of hard-coded number of cores 2020-07-13 02:52:10 +07:00
osmo-mgw-latest update OBS Release.key; the old one expired today. 2020-03-30 18:06:58 +02:00
osmo-mgw-master make: use $(nproc) instead of hard-coded number of cores 2020-07-13 02:52:10 +07:00
osmo-msc-latest update OBS Release.key; the old one expired today. 2020-03-30 18:06:58 +02:00
osmo-msc-master make: use $(nproc) instead of hard-coded number of cores 2020-07-13 02:52:10 +07:00
osmo-nitb-latest update OBS Release.key; the old one expired today. 2020-03-30 18:06:58 +02:00
osmo-nitb-master make: use $(nproc) instead of hard-coded number of cores 2020-07-13 02:52:10 +07:00
osmo-pcu-latest update OBS Release.key; the old one expired today. 2020-03-30 18:06:58 +02:00
osmo-pcu-master make: use $(nproc) instead of hard-coded number of cores 2020-07-13 02:52:10 +07:00
osmo-remsim-latest update OBS Release.key; the old one expired today. 2020-03-30 18:06:58 +02:00
osmo-remsim-master make: use $(nproc) instead of hard-coded number of cores 2020-07-13 02:52:10 +07:00
osmo-sgsn-latest update OBS Release.key; the old one expired today. 2020-03-30 18:06:58 +02:00
osmo-sgsn-master make: use $(nproc) instead of hard-coded number of cores 2020-07-13 02:52:10 +07:00
osmo-sip-latest update OBS Release.key; the old one expired today. 2020-03-30 18:06:58 +02:00
osmo-sip-master make: use $(nproc) instead of hard-coded number of cores 2020-07-13 02:52:10 +07:00
osmo-stp-latest collect core dumps: '--ulimit core=-1' and WORKDIR=/data everywhere 2020-06-21 20:58:22 +00:00
osmo-stp-master make: use $(nproc) instead of hard-coded number of cores 2020-07-13 02:52:10 +07:00
osmo-uecups-master make: use $(nproc) instead of hard-coded number of cores 2020-07-13 02:52:10 +07:00
osmocom-bb-host-master make: use $(nproc) instead of hard-coded number of cores 2020-07-13 02:52:10 +07:00
patchwork Makefile support for our production infrastructure containers 2018-06-03 16:11:26 +00:00
public-inbox add "public-inbox" Dockerfile + Makefiel 2018-10-07 16:27:31 +00:00
redmine redmine: We no longer need the hmac diff 2020-02-16 10:47:10 +01:00
scripts Enable IPv6 in docker networking 2020-08-13 15:01:58 +00:00
sctp-test Switch all osmo-*-master and ttcn3-*-test from jessie to stretch 2019-03-30 09:56:36 +00:00
sigtran-tests Switch all osmo-*-master and ttcn3-*-test from jessie to stretch 2019-03-30 09:56:36 +00:00
tmp add non-working yml file with service/stack description 2017-05-03 20:50:12 +02:00
ttcn3-bsc-test ttcn3-bsc: Enable osmo-bsc SS7 multi-homing and IPv6 features in tests 2020-08-30 14:15:27 +00:00
ttcn3-bsc-test-sccplite symlinks: ttcn3-bsc-test-sccplite 2018-10-26 10:19:05 +02:00
ttcn3-bscnat-test jenkins-common.sh: Add function to print docker network related parameters 2020-08-27 12:49:43 +02:00
ttcn3-bts-test jenkins-common.sh: Add function to print docker network related parameters 2020-08-27 12:49:43 +02:00
ttcn3-ggsn-test jenkins-common.sh: Add function to print docker network related parameters 2020-08-27 12:49:43 +02:00
ttcn3-hlr-test jenkins-common.sh: Add function to print docker network related parameters 2020-08-27 12:49:43 +02:00
ttcn3-mgw-test jenkins-common.sh: Add function to print docker network related parameters 2020-08-27 12:49:43 +02:00
ttcn3-msc-test ttcn3-msc: Enable osmo-msc SS7 multi-homing and IPv6 features in tests 2020-08-30 16:07:10 +00:00
ttcn3-nitb-sysinfo jenkins-common.sh: Add function to print docker network related parameters 2020-08-27 12:49:43 +02:00
ttcn3-pcu-test jenkins-common.sh: Add function to print docker network related parameters 2020-08-27 12:49:43 +02:00
ttcn3-pcu-test-sns PCU: Differentiate between tests with classic and SNS Gb dialects 2019-03-14 21:38:44 +01:00
ttcn3-remsim-test jenkins-common.sh: Add function to print docker network related parameters 2020-08-27 12:49:43 +02:00
ttcn3-sccp-test jenkins-common.sh: Add function to print docker network related parameters 2020-08-27 12:49:43 +02:00
ttcn3-sgsn-test ttcn3-sgsn: Enable osmo-sgsn SS7 multi-homing and IPv6 features in tests 2020-08-30 16:07:57 +00:00
ttcn3-sip-test jenkins-common.sh: Add function to print docker network related parameters 2020-08-27 12:49:43 +02:00
ttcn3-stp-test jenkins-common.sh: Add function to print docker network related parameters 2020-08-27 12:49:43 +02:00
ubuntu-zesty-build *-build: Add libgnutls28-dev, as libosmocore requires this now 2017-11-17 10:11:30 +01:00
.gitignore gitignore: add .release 2019-04-04 10:46:14 +00:00
.gitreview add .gitreview 2018-04-12 09:20:24 +00:00
README.md ttcn3-*-test: remove implicit dependencies 2020-05-30 09:14:06 +02:00
Release.key update OBS Release.key; the old one expired today. 2020-03-30 18:06:58 +02:00
jenkins-common.sh jenkins-common.sh: Add function to print docker network related parameters 2020-08-27 12:49:43 +02:00
osmo-bisect.sh Add script to bisect test failures with ttcn3 and docker 2019-04-26 12:07:15 +02:00

README.md

Osmocom docker playground

This repository contains some humble attempts at creating some Docker containers + related stacks around Osmocom. So far, the main focus is test automation.

Running a testsuite

All testsuite folders start with ttcn3 or nplab. Run the following to build/update all required containers and start a specific testsuite:

$ cd ttcn3-mgw-test
$ ./jenkins.sh

Environment variables:

  • IMAGE_SUFFIX: the version of the Osmocom stack to run the testsuite against. Default is master, set this to latest to test the last stable releases.
  • OSMO_TTCN3_BRANCH: osmo-ttcn3-hacks.git branch, which will be used when building a ttcn3-* docker image. Defaults to master.
  • NO_DOCKER_IMAGE_BUILD: when set to 1, it won't try to update the containers (see "caching" below)

Building containers manually

Most folders in this repository contain a Dockerfile. Build a docker container with the same name as the folder like this:

$ cd debian-stretch-build
$ make

Caching

All folders named osmo-*-latest and osmo-*-master build the latest stable or most recent commit from master of the corresponding Osmocom program's git repository. When you have built it already, running make will only do a small HTTP request to check if the sources are outdated and skip the build in case it is still up-to-date.

Dependencies

Folders that don't have a jenkins.sh usually only depend on the container that is specified in the FROM line of their Dockerfile. Testsuites depend on multiple containers, they are defined on top of each jenkins.sh:

. ../jenkins-common.sh
IMAGE_SUFFIX="${IMAGE_SUFFIX:-master}"
docker_images_require \
	"osmo-stp-$IMAGE_SUFFIX" \
	"osmo-bsc-$IMAGE_SUFFIX" \
	"osmo-bts-$IMAGE_SUFFIX" \
	"ttcn3-bsc-test"

Reasoning for this implementation

Before having the docker_images_require lines, there used to be a top-level Makefile for resolving dependencies between the containers. But it was prone to mistakes: when new folders in the repository were added without related targets in the Makefile, make would always assume that the targets where the always existing folders and therefore never build the containers.

In order to implement testing latest in addition to master (OS#3268), it would have been necessary to add further complexity to the Makefile. Instead it was decided to scrap the file, and just keep the short list of dependencies right above where they would be needed in the jenkins.sh.

Obtaining gdb backtrace from crash

If for instance TTCN3 test is producing a crash on a program running in docker, eg. osmo-msc, it is desirable to get a full crash report. This section describes how to do so.

First, open osmo-$program/Dockerfile and add lines to install gdb plus $program dependency debug packages. For instance:

+RUN    apt-get install -y --no-install-recommends \
+               gdb \
+               libosmocore-dbg libosmo-abis-dbg libosmo-netif-dbg libosmo-sigtran-dbg osmo-msc-dbg && \
+               apt-get clean

In same Dockerfile file, modify configure to build with debug symbols enabled and other interesting options, such as --enable-sanitize:

-       ./configure --enable-smpp --enable-iu && \
+       export CPPFLAGS="-g -O0 -fno-omit-frame-pointer" && \
+       export CFLAGS="-g -O0 -fno-omit-frame-pointer" && \
+       export CXXFLAGS="-g -O0 -fno-omit-frame-pointer" && \
+       ./configure --enable-smpp --enable-iu --enable-sanitize && \

Finally open the script you use to run the program (for instance ttcn3-$program-master/jenkins.sh), and modify it to launch the process using gdb, and to print a full backtrace when control returns to gdb (when the process crashes):

-/bin/sh -c "osmo-msc -c /data/osmo-msc.cfg >>/data/osmo-msc.log 2>&1"
+/bin/sh -c "gdb -ex 'run' -ex 'bt full' --arg osmo-msc -c /data/osmo-msc.cfg >>/data/osmo-msc.log 2>&1"

See also