Osmocom docker containers
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Harald Welte 57b6011e28 redmine: Make changeset keywords work with OS# annotation 2 years ago
alpine-build introduce 'REGISTRY' argument to all Dockerfiles 2 years ago
alpine-lighttpd Add Dockerfile for alpine Linux with lighttpd 5 years ago
bind9 Makefile support for our production infrastructure containers 5 years ago
centos8-build centos8-build: Make 'make' work again 2 years ago
centos8-repo-install-test centos8-repo-install-test: Upstream requires 'powertools' not 'PowerTools' 2 years ago
cgit cgit: Increase fastcgi timeout from default 60s to 120s 2 years ago
debian-buster-build introduce 'REGISTRY' argument to all Dockerfiles 2 years ago
debian-buster-erlang common: Introduce OSMOCOM_REPO_MIRROR param 2 years ago
debian-buster-simtrace2 common: Introduce OSMOCOM_REPO_MIRROR param 2 years ago
debian-jessie-build introduce 'REGISTRY' argument to all Dockerfiles 2 years ago
debian-jessie-buildslave Fix "'laforge/debian-jessie-build' not found" 4 years ago
debian-jessie-buildslave-st Fix "'laforge/debian-jessie-build' not found" 4 years ago
debian-jessie-osmocom common: Introduce OSMOCOM_REPO_MIRROR param 2 years ago
debian-sid-build introduce 'REGISTRY' argument to all Dockerfiles 2 years ago
debian-stretch-build common: Automatize UPSTREAM_DISTRO name based on image name 2 years ago
debian-stretch-build-dist common: Introduce OSMOCOM_REPO_MIRROR param 2 years ago
debian-stretch-jenkins Cosmetic: debian-stretch-jenkins, osmo-gsm-tester: fix indent 2 years ago
debian-stretch-titan debian-stretch-titan: Add wireshark-common for dumpcap 2 years ago
debian9-repo-install-test rename {debian => debian9}-repo-install-test 2 years ago
debian10-repo-install-test debian10-repo-install-test: new container 2 years ago
fpga-build fpga-build: don't write path to /etc/environment 2 years ago
gerrit gerrit: upgrade to 3.2.3 2 years ago
git-daemon git-deamon: Make sure to create the git-daemon user 5 years ago
gitolite Makefile support for our production infrastructure containers 5 years ago
gr-gsm-master introduce 'REGISTRY' argument to all Dockerfiles 2 years ago
make Add osmo-gbproxy-* container for osmo-gbproxy 2 years ago
nplab-m3ua-test jenkins-common.sh: Add function to print docker network related parameters 2 years ago
nplab-sua-test jenkins-common.sh: Add function to print docker network related parameters 2 years ago
open5gs-master introduce 'REGISTRY' argument to all Dockerfiles 2 years ago
osmo-bsc-latest common: Introduce OSMOCOM_REPO_MIRROR param 2 years ago
osmo-bsc-master migrate from CentOS_8_Stream to CentOS_8 2 years ago
osmo-bts-latest common: Introduce OSMOCOM_REPO_MIRROR param 2 years ago
osmo-bts-master migrate from CentOS_8_Stream to CentOS_8 2 years ago
osmo-cn-latest common: Introduce OSMOCOM_REPO_MIRROR param 2 years ago
osmo-dev-on-debian-sid add debian-sid-build, osmo-dev-on-debian-sid 5 years ago
osmo-gbproxy-master Add osmo-gbproxy-* container for osmo-gbproxy 2 years ago
osmo-gerrit-libosmo make: use $(nproc) instead of hard-coded number of cores 3 years ago
osmo-ggsn-latest common: Introduce OSMOCOM_REPO_MIRROR param 2 years ago
osmo-ggsn-master migrate from CentOS_8_Stream to CentOS_8 2 years ago
osmo-gsm-tester Cosmetic: debian-stretch-jenkins, osmo-gsm-tester: fix indent 2 years ago
osmo-hlr-latest common: Introduce OSMOCOM_REPO_MIRROR param 2 years ago
osmo-hlr-master migrate from CentOS_8_Stream to CentOS_8 2 years ago
osmo-hnbgw-latest common: Introduce OSMOCOM_REPO_MIRROR param 2 years ago
osmo-hnbgw-master migrate from CentOS_8_Stream to CentOS_8 2 years ago
osmo-mgw-latest common: Introduce OSMOCOM_REPO_MIRROR param 2 years ago
osmo-mgw-master migrate from CentOS_8_Stream to CentOS_8 2 years ago
osmo-msc-latest common: Introduce OSMOCOM_REPO_MIRROR param 2 years ago
osmo-msc-master migrate from CentOS_8_Stream to CentOS_8 2 years ago
osmo-nitb-latest common: Introduce OSMOCOM_REPO_MIRROR param 2 years ago
osmo-nitb-master migrate from CentOS_8_Stream to CentOS_8 2 years ago
osmo-pcu-latest common: Introduce OSMOCOM_REPO_MIRROR param 2 years ago
osmo-pcu-master osmo-pcu-master/Dockerfile: add missing libosmoctrl dependency 2 years ago
osmo-ran Introduce osmo-ran docker image set up 2 years ago
osmo-remsim-latest common: Introduce OSMOCOM_REPO_MIRROR param 2 years ago
osmo-remsim-master migrate from CentOS_8_Stream to CentOS_8 2 years ago
osmo-sgsn-latest common: Introduce OSMOCOM_REPO_MIRROR param 2 years ago
osmo-sgsn-master sgsn: change configuration to the new NS2 2 years ago
osmo-sip-latest common: Introduce OSMOCOM_REPO_MIRROR param 2 years ago
osmo-sip-master migrate from CentOS_8_Stream to CentOS_8 2 years ago
osmo-smlc-master migrate from CentOS_8_Stream to CentOS_8 2 years ago
osmo-stp-latest common: Introduce OSMOCOM_REPO_MIRROR param 2 years ago
osmo-stp-master migrate from CentOS_8_Stream to CentOS_8 2 years ago
osmo-uecups-master common: Introduce OSMOCOM_REPO_MIRROR param 2 years ago
osmocom-bb-host-master common: Introduce OSMOCOM_REPO_MIRROR param 2 years ago
patchwork Makefile support for our production infrastructure containers 5 years ago
public-inbox add "public-inbox" Dockerfile + Makefiel 4 years ago
redmine redmine: Make changeset keywords work with OS# annotation 2 years ago
scripts Enable IPv6 in docker networking 2 years ago
sctp-test Switch all osmo-*-master and ttcn3-*-test from jessie to stretch 4 years ago
sigtran-tests Switch all osmo-*-master and ttcn3-*-test from jessie to stretch 4 years ago
systemd Introduce osmo-ran docker image set up 2 years ago
tmp add non-working yml file with service/stack description 6 years ago
ttcn3-bsc-test bsc: add missing 'smlc / enable' for LCS tests 2 years ago
ttcn3-bsc-test-sccplite symlinks: ttcn3-bsc-test-sccplite 4 years ago
ttcn3-bscnat-test jenkins-common.sh: Add function to print docker network related parameters 2 years ago
ttcn3-bts-test ttcn3-bts-test: fix: sleep 1 second before respawning the IUT 2 years ago
ttcn3-fr-test ttcn3-fr-tests: Configure MTU to 1700 2 years ago
ttcn3-gbproxy-test gbproxy: Fix ip-sns VTY config 2 years ago
ttcn3-gbproxy-test-fr gbproxy: Fix ip-sns VTY config 2 years ago
ttcn3-ggsn-test jenkins-common.sh: Add function to print docker network related parameters 2 years ago
ttcn3-hlr-test jenkins-common.sh: Add function to print docker network related parameters 2 years ago
ttcn3-mgw-test ttcn3-mgw: Update module param addresses naming to support ipv6 2 years ago
ttcn3-msc-test ttcn3-msc: Force MNCCv6 on ttcn3-msc-test-latest 2 years ago
ttcn3-nitb-sysinfo jenkins-common.sh: Add function to print docker network related parameters 2 years ago
ttcn3-pcu-test ttcn3-pcu: Update configs to support NACC tests 2 years ago
ttcn3-pcu-test-sns PCU: Differentiate between tests with classic and SNS Gb dialects 4 years ago
ttcn3-remsim-test jenkins-common.sh: Add function to print docker network related parameters 2 years ago
ttcn3-sccp-test jenkins-common.sh: Add function to print docker network related parameters 2 years ago
ttcn3-sgsn-test sgsn: change configuration to the new NS2 2 years ago
ttcn3-sip-test ttcn3-sip: Update default mp_mncc_version 2 years ago
ttcn3-smlc-test fix ttcn3-smlc-test/Dockerfile 2 years ago
ttcn3-stp-test jenkins-common.sh: Add function to print docker network related parameters 2 years ago
ubuntu-zesty-build introduce 'REGISTRY' argument to all Dockerfiles 2 years ago
.gitignore gitignore: add .release 4 years ago
.gitreview add .gitreview 5 years ago
README.md ttcn3-*-test: remove implicit dependencies 3 years ago
Release.key update OBS Release.key; the old one expired today. 3 years ago
jenkins-common.sh debian10-repo-install-test: new container 2 years ago
osmo-bisect.sh Add script to bisect test failures with ttcn3 and docker 4 years ago

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