aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPau Espin Pedrol <pespin@espeweb.net>2020-12-07 18:45:42 +0100
committerPau Espin Pedrol <pespin@espeweb.net>2020-12-07 20:56:56 +0100
commit5c21a1cc9cd099f894201a19ad8939cfce4bc600 (patch)
treedf41932865dbd4e04b70013706c9999ee814dd12
parent27d315f26e8cb422eb743da3889e22f16144fcb6 (diff)
WIP splitpespin/ran
-rw-r--r--jenkins-common.sh5
-rw-r--r--osmo-ran/Dockerfile36
-rwxr-xr-xosmo-ran/jenkins.sh1
-rwxr-xr-xosmo-ran/split/jenkins-split.sh96
-rw-r--r--osmo-ran/split/ran-bsc_mgw/Dockerfile80
-rw-r--r--osmo-ran/split/ran-bsc_mgw/Makefile2
-rw-r--r--osmo-ran/split/ran-bsc_mgw/Release.key20
-rw-r--r--osmo-ran/split/ran-bsc_mgw/osmocom/osmo-bsc.cfg123
-rw-r--r--osmo-ran/split/ran-bsc_mgw/osmocom/osmo-mgw.cfg22
-rw-r--r--osmo-ran/split/ran-bts_pcu/Dockerfile78
-rw-r--r--osmo-ran/split/ran-bts_pcu/Makefile2
-rw-r--r--osmo-ran/split/ran-bts_pcu/Release.key20
-rw-r--r--osmo-ran/split/ran-bts_pcu/osmocom/osmo-bts-trx.cfg36
-rw-r--r--osmo-ran/split/ran-bts_pcu/osmocom/osmo-pcu.cfg11
-rw-r--r--osmo-ran/split/ran-trx-ipc/Dockerfile76
-rw-r--r--osmo-ran/split/ran-trx-ipc/Makefile2
-rw-r--r--osmo-ran/split/ran-trx-ipc/Release.key20
-rw-r--r--osmo-ran/split/ran-trx-ipc/osmocom/osmo-trx-ipc.cfg29
-rw-r--r--systemd/Dockerfile41
-rw-r--r--systemd/Makefile2
20 files changed, 666 insertions, 36 deletions
diff --git a/jenkins-common.sh b/jenkins-common.sh
index 0832f0d..e172a4f 100644
--- a/jenkins-common.sh
+++ b/jenkins-common.sh
@@ -44,6 +44,7 @@ docker_dir_from_image_name() {
# Dockerfile for multiple distributions, without duplicating configs for
# each distribution. Dependencies listed in docker_depends() are built
# automatically too.
+IMAGE_DIR_PREFIX=".."
docker_images_require() {
local i
local from_line
@@ -68,13 +69,13 @@ docker_images_require() {
# Pull upstream base images
pull_arg="--pull"
- from_line="$(grep '^FROM' ../$dir/Dockerfile)"
+ from_line="$(grep '^FROM' ${IMAGE_DIR_PREFIX}/${dir}/Dockerfile)"
if echo "$from_line" | grep -q '$USER'; then
pull_arg=""
fi
echo "Building image: $i (export NO_DOCKER_IMAGE_BUILD=1 to prevent this)"
- make -C "../$dir" \
+ make -C "${IMAGE_DIR_PREFIX}/${dir}" \
PULL="$pull_arg" \
UPSTREAM_DISTRO="$upstream_distro_arg" \
DISTRO="$distro_arg" \
diff --git a/osmo-ran/Dockerfile b/osmo-ran/Dockerfile
index f456c55..2112db3 100644
--- a/osmo-ran/Dockerfile
+++ b/osmo-ran/Dockerfile
@@ -1,6 +1,5 @@
-ARG REGISTRY=docker.io
-ARG UPSTREAM_DISTRO=centos:centos8
-FROM ${REGISTRY}/${UPSTREAM_DISTRO}
+ARG USER
+FROM $USER/systemd
# Arguments used after FROM must be specified again
ARG DISTRO
ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org"
@@ -11,7 +10,6 @@ MAINTAINER Pau Espin Pedrol <pespin@sysmocom.de>
ARG OSMOCOM_REPO_DEBIAN="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/$OSMOCOM_REPO_VERSION/Debian_9.0/"
ARG OSMOCOM_REPO_CENTOS="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/$OSMOCOM_REPO_VERSION/CentOS_8_Stream/"
-
COPY Release.key /tmp/Release.key
RUN case "$DISTRO" in \
@@ -37,36 +35,6 @@ RUN case "$DISTRO" in \
ADD $OSMOCOM_REPO_DEBIAN/Release /tmp/Release
ADD $OSMOCOM_REPO_CENTOS/repodata/repomd.xml /tmp/repomd.xml
-# set up systemd
-# container=docker: systemd likes to know it is running inside a container
-ENV container docker
-RUN case "$DISTRO" in \
- debian*) \
- apt-get update && \
- apt-get install -y --no-install-recommends systemd; \
- (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do test "$i" = "systemd-tmpfiles-setup.service" || rm -f $i; done); \
- rm -f /lib/systemd/system/multi-user.target.wants/*; \
- rm -f /etc/systemd/system/*.wants/*; \
- rm -f /lib/systemd/system/local-fs.target.wants/*; \
- rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
- rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
- rm -f /lib/systemd/system/basic.target.wants/*; \
- rm -f /lib/systemd/system/anaconda.target.wants/*; \
- ;; \
- centos*) \
- yum -y install systemd; yum clean all; \
- (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do test "$i" = "systemd-tmpfiles-setup.service" || rm -f $i; done); \
- rm -f /lib/systemd/system/multi-user.target.wants/*; \
- rm -f /etc/systemd/system/*.wants/*; \
- rm -f /lib/systemd/system/local-fs.target.wants/*; \
- rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
- rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
- rm -f /lib/systemd/system/basic.target.wants/*; \
- rm -f /lib/systemd/system/anaconda.target.wants/*; \
- ;; \
- esac
-VOLUME [ "/sys/fs/cgroup" ]
-
RUN case "$DISTRO" in \
debian*) \
apt-get update && \
diff --git a/osmo-ran/jenkins.sh b/osmo-ran/jenkins.sh
index 5cdd5ba..1b5d93a 100755
--- a/osmo-ran/jenkins.sh
+++ b/osmo-ran/jenkins.sh
@@ -6,6 +6,7 @@ if [ "x$IMAGE_SUFFIX" != "x" ]; then
IMAGE_SUFFIX="-${IMAGE_SUFFIX}" # append dash
fi
docker_images_require \
+ "systemd" \
"osmo-ran$IMAGE_SUFFIX"
SUBNET=${SUBNET:-25}
diff --git a/osmo-ran/split/jenkins-split.sh b/osmo-ran/split/jenkins-split.sh
new file mode 100755
index 0000000..cf42c02
--- /dev/null
+++ b/osmo-ran/split/jenkins-split.sh
@@ -0,0 +1,96 @@
+#!/bin/bash
+
+. ../../jenkins-common.sh
+IMAGE_SUFFIX="${IMAGE_SUFFIX?centos8}"
+if [ "x$IMAGE_SUFFIX" != "x" ]; then
+ IMAGE_SUFFIX="-${IMAGE_SUFFIX}" # append dash
+fi
+
+IMAGE_DIR_PREFIX="../.." docker_images_require \
+ "systemd"
+
+networks=()
+docker_names=()
+
+SUBNET=${SUBNET:-25}
+
+NET_NAME="osmo-ran-subnet$subnet"
+networks+=("$NET_NAME")
+network_bridge_create $SUBNET
+
+#$1:image_name, $2: subnet, $3: ip suffix, $4: docker args
+run_image() {
+ local image_name=$1
+ local subnet=$2
+ local ipsuffix=$3
+ local docker_args=$4
+
+ IMAGE_DIR_PREFIX="."
+ docker_images_require \
+ $image_name
+
+ VOL_RAN_DIR="$VOL_BASE_DIR/$image_name-$subnet"
+ mkdir $VOL_RAN_DIR
+ mkdir $VOL_RAN_DIR/data
+ mkdir $VOL_RAN_DIR/osmocom
+ cp $IMAGE_DIR_PREFIX/${image_name}/osmocom/* $VOL_RAN_DIR/osmocom/
+
+ DOCKER_IN_IP="172.18.$subnet.$ipsuffix"
+ SGSN_IP="${SGSN_IP:-192.168.30.1}"
+ STP_IP="${STP_IP:-192.168.30.1}"
+ BSC_IP="172.18.$SUBNET.200"
+ MGW_IP="172.18.$SUBNET.200"
+ BTS_IP="172.18.$SUBNET.201"
+ PCU_IP="172.18.$SUBNET.201"
+ TRX_IP="172.18.$SUBNET.202"
+ sed -i "s/\$DOCKER_IN_IP/${DOCKER_IN_IP}/g" $VOL_RAN_DIR/osmocom/*
+ sed -i "s/\$SGSN_IP/${SGSN_IP}/g" $VOL_RAN_DIR/osmocom/*
+ sed -i "s/\$STP_IP/${STP_IP}/g" $VOL_RAN_DIR/osmocom/*
+ sed -i "s/\$BSC_IP/${BSC_IP}/g" $VOL_RAN_DIR/osmocom/*
+ sed -i "s/\$MGW_IP/${MGW_IP}/g" $VOL_RAN_DIR/osmocom/*
+ sed -i "s/\$BTS_IP/${BTS_IP}/g" $VOL_RAN_DIR/osmocom/*
+ sed -i "s/\$PCU_IP/${PCU_IP}/g" $VOL_RAN_DIR/osmocom/*
+ sed -i "s/\$TRX_IP/${TRX_IP}/g" $VOL_RAN_DIR/osmocom/*
+
+ echo Starting container with RAN
+ docker_name="${BUILD_TAG}-ran-${image_name}-subnet$subnet"
+ docker run --rm \
+ $(docker_network_params $subnet $ipsuffix) \
+ --privileged \
+ --ulimit core=-1 \
+ -v /sys/fs/cgroup:/sys/fs/cgroup:ro \
+ -v $VOL_RAN_DIR/data:/data \
+ -v $VOL_RAN_DIR/osmocom:/etc/osmocom \
+ --name ${docker_name} -d \
+ $docker_args \
+ $REPO_USER/${image_name}${IMAGE_SUFFIX}
+ docker_names+=("$docker_name")
+}
+
+kill_containers() {
+ for i in "${docker_names[@]}"; do
+ docker kill $i
+ done
+}
+
+remove_networks() {
+ for i in "${networks[@]}"; do
+ NET_NAME="$i"
+ network_remove
+ done
+}
+
+sighandler() {
+ echo "SIGINT, exiting..."
+ kill_containers
+ remove_networks
+ exit 0
+}
+
+trap 'sighandler' SIGINT
+
+run_image "ran-bsc_mgw" $SUBNET 200 "-p 4242:4242 -p 4249:4249 -p 4243:4243 -p 4267:4267"
+run_image "ran-bts_pcu" $SUBNET 201 "-p 4241:4241 -p 4238:4238 -p 4240:4240"
+run_image "ran-trx-ipc" $SUBNET 202 "-p 4237:4237 -p 4236:4236 -p 5700:5700 -p 5701:5701 -p 5702:5702 -v /tmp/ud:/tmp/ud --ipc=host"
+
+while true; do sleep 1000; done
diff --git a/osmo-ran/split/ran-bsc_mgw/Dockerfile b/osmo-ran/split/ran-bsc_mgw/Dockerfile
new file mode 100644
index 0000000..91ce693
--- /dev/null
+++ b/osmo-ran/split/ran-bsc_mgw/Dockerfile
@@ -0,0 +1,80 @@
+ARG USER
+FROM $USER/systemd
+# Arguments used after FROM must be specified again
+ARG DISTRO
+ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org"
+ARG OSMOCOM_REPO_VERSION=latest
+
+MAINTAINER Pau Espin Pedrol <pespin@sysmocom.de>
+
+ARG OSMOCOM_REPO_DEBIAN="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/$OSMOCOM_REPO_VERSION/Debian_9.0/"
+ARG OSMOCOM_REPO_CENTOS="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/$OSMOCOM_REPO_VERSION/CentOS_8_Stream/"
+
+COPY Release.key /tmp/Release.key
+
+RUN case "$DISTRO" in \
+ debian*) \
+ apt-get update && \
+ apt-get install -y --no-install-recommends \
+ gnupg && \
+ apt-key add /tmp/Release.key && \
+ rm /tmp/Release.key && \
+ echo "deb " $OSMOCOM_REPO_DEBIAN " ./" > /etc/apt/sources.list.d/osmocom-$OSMOCOM_REPO_VERSION.list \
+ ;; \
+ centos*) \
+ echo "metadata_expire=60" >> /etc/dnf/dnf.conf && cat /etc/dnf/dnf.conf && \
+ dnf install -y dnf-utils wget && \
+ yum config-manager --set-enabled PowerTools && \
+ cd /etc/yum.repos.d/ && \
+ wget ${OSMOCOM_REPO_CENTOS}/network:osmocom:$OSMOCOM_REPO_VERSION.repo \
+ ;; \
+ esac
+
+# we need to add this to invalidate the cache once the repository is updated.
+# unfortunately Dockerfiles don't support a conditional ARG, so we need to add both DPKG + RPM
+ADD $OSMOCOM_REPO_DEBIAN/Release /tmp/Release
+ADD $OSMOCOM_REPO_CENTOS/repodata/repomd.xml /tmp/repomd.xml
+
+RUN case "$DISTRO" in \
+ debian*) \
+ apt-get update && \
+ apt-get install -y --no-install-recommends \
+ less \
+ apt-utils \
+ strace \
+ tcpdump \
+ telnet \
+ vim \
+ osmo-bsc \
+ osmo-bsc-ipaccess-utils \
+ osmo-mgw && \
+ apt-get clean \
+ ;; \
+ centos*) \
+ dnf install -y \
+ less \
+ strace \
+ tcpdump \
+ telnet \
+ vim \
+ osmo-bsc \
+ osmo-bsc-ipaccess-utils \
+ osmo-mgw \
+ ;; \
+ esac
+
+RUN systemctl enable osmo-bsc osmo-mgw
+
+WORKDIR /tmp
+RUN cp -r /etc/osmocom /etc/osmocom-default
+VOLUME /data
+VOLUME /etc/osmocom
+
+COPY osmocom/* /etc/osmocom/
+
+CMD ["/lib/systemd/systemd", "--system", "--unit=multi-user.target"]
+
+#osmo-bsc: VTY CTRL
+EXPOSE 4242 4249
+#osmo-mgw: VTY CTRL
+EXPOSE 4243 4267
diff --git a/osmo-ran/split/ran-bsc_mgw/Makefile b/osmo-ran/split/ran-bsc_mgw/Makefile
new file mode 100644
index 0000000..0239a23
--- /dev/null
+++ b/osmo-ran/split/ran-bsc_mgw/Makefile
@@ -0,0 +1,2 @@
+RUN_ARGS?=--sysctl net.ipv6.conf.all.disable_ipv6=0 --rm --network sigtran --ip 172.18.25.200 -v bsc-vol:/data
+include ../../../make/Makefile
diff --git a/osmo-ran/split/ran-bsc_mgw/Release.key b/osmo-ran/split/ran-bsc_mgw/Release.key
new file mode 100644
index 0000000..a737316
--- /dev/null
+++ b/osmo-ran/split/ran-bsc_mgw/Release.key
@@ -0,0 +1,20 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.5 (GNU/Linux)
+
+mQENBFJBt/wBCADAht3d/ilNuyzaXYw/QwTRvmjyoDvfXw+H/3Fvk1zlDZoiKPPc
+a1wCVBINUZl7vYM2OXqbJwYa++JP2Q48xKSvC6thbRc/YLievkbcvTemf7IaREfl
+CTjoYpoqXHa9kHMw1aALDm8CNU88jZmnV7v9L6hKkbYDxie+jpoj7D6B9JlxgNJ4
+5dQyRNsFGVcIl4Vplt1HyGc5Q5nQI/VgS2rlF/IOXmhRQBc4LEDdU8R2IKnkU4ee
+S7TWanAigGAQhxGuCkS39/CWzc1DhLhjlNhBl/+RTPejkqJtAy00ZLps3+RqUN1Y
+CU/Fsr7aRlYVGqQ/BlptwV0XQ2VVYJX2oEBBABEBAAG0MG5ldHdvcmsgT0JTIFBy
+b2plY3QgPG5ldHdvcmtAYnVpbGQub3BlbnN1c2Uub3JnPokBPAQTAQIAJgUCXm/4
+pgIbAwUJEEzwqgYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEGLrGgkXKA3f/1AH
+/A7WVSpfM4wV/DMqZPTsSjChB4JyDotxpV7qHZzBC5aaP2dINZyi9PayIwZWbvCY
+VKvt+Fw8oCGC9F9mdh10Xe+ElHeVNSihzABPuu1RkRkb1nvkymScy0yxydodYOBi
+K4WQ+BhpijXWmYvOekIwbS5Hi9BHpfgK4TinK0xsvh1bVLeQJ8YjrnNFIAR2CnBa
+X7Y72Up/kKL08DdQzuS+mKrJtAQlGMtIsukWC2ajYQMkNwm8Gvhpn8za113dCkBW
+XAFnlQqQobKwC7b19QgEtJI/YpGSrRc6WaZxPyAjscbWQlFEAB900sVj4BWT55ig
+7O2uSdsCVhTuU7T0ztwsgvmIRgQTEQIABgUCUkG3/AAKCRA7MBG3a51lIzhdAJ9v
+d6XPffMZRcCGgDEY5OaTn/MsCQCgrXbeZpFJgnirSrc8rRonvzYFiF4=
+=/Tek
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/osmo-ran/split/ran-bsc_mgw/osmocom/osmo-bsc.cfg b/osmo-ran/split/ran-bsc_mgw/osmocom/osmo-bsc.cfg
new file mode 100644
index 0000000..af53647
--- /dev/null
+++ b/osmo-ran/split/ran-bsc_mgw/osmocom/osmo-bsc.cfg
@@ -0,0 +1,123 @@
+line vty
+ no login
+ bind 0.0.0.0
+!
+e1_input
+ e1_line 0 driver ipa
+network
+ network country code 234
+ mobile network code 70
+ encryption a5 0
+ neci 1
+ paging any use tch 0
+ handover 0
+ handover algorithm 1
+ handover1 window rxlev averaging 10
+ handover1 window rxqual averaging 1
+ handover1 window rxlev neighbor averaging 10
+ handover1 power budget interval 6
+ handover1 power budget hysteresis 3
+ handover1 maximum distance 9999
+ periodic location update 30
+ bts 0
+ type sysmobts
+ band DCS1800
+ cell_identity 0
+ location_area_code 5
+ base_station_id_code 63
+ ms max power 15
+ cell reselection hysteresis 4
+ rxlev access min 0
+ radio-link-timeout 32
+ channel allocator ascending
+ rach tx integer 9
+ rach max transmission 7
+ channel-description attach 1
+ channel-description bs-pa-mfrms 5
+ channel-description bs-ag-blks-res 1
+ early-classmark-sending forbidden
+ ip.access unit_id 6969 0
+ oml ip.access stream_id 255 line 0
+ codec-support fr amr
+ gprs mode egprs
+ gprs routing area 0
+ gprs network-control-order nc1
+ gprs cell bvci 1800
+ gprs nsei 1800
+ gprs nsvc 0 nsvci 1800
+ gprs nsvc 0 local udp port 23020
+ gprs nsvc 0 remote udp port 23000
+ gprs nsvc 0 remote ip $SGSN_IP
+ trx 0
+ rf_locked 0
+ arfcn 871
+ nominal power 23
+ ! to use full TRX power, set max_power_red 0
+ max_power_red 4
+ rsl e1 tei 0
+ timeslot 0
+ phys_chan_config CCCH+SDCCH4
+ hopping enabled 0
+ timeslot 1
+ phys_chan_config TCH/F
+ hopping enabled 0
+ timeslot 2
+ phys_chan_config TCH/F
+ hopping enabled 0
+ timeslot 3
+ phys_chan_config TCH/F
+ hopping enabled 0
+ timeslot 4
+ phys_chan_config TCH/F
+ hopping enabled 0
+ timeslot 5
+ phys_chan_config PDCH
+ hopping enabled 0
+ timeslot 6
+ phys_chan_config PDCH
+ !phys_chan_config TCH/F
+ hopping enabled 0
+ timeslot 7
+ phys_chan_config PDCH
+ !phys_chan_config TCH/F
+ hopping enabled 0
+!
+cs7 instance 0
+ point-code 0.0.2
+ asp asp0 2905 0 m3ua
+ local-ip $DOCKER_IN_IP
+ remote-ip $STP_IP
+ as as0 m3ua
+ asp asp0
+ routing-key 30 0.0.2
+ traffic-mode loadshare
+ sccp-address bsc_local
+ point-code 0.0.2
+ routing-indicator PC
+ sccp-address msc_remote
+ point-code 0.23.1
+ routing-indicator PC
+!
+msc 0
+ no bsc-welcome-text
+ no bsc-msc-lost-text
+ no bsc-grace-text
+ type normal
+ allow-emergency allow
+ codec-list hr3 fr3
+ !mgw remote-ip 192.168.30.1
+ mgw remote-ip 127.0.0.1
+ mgw remote-port 2427
+ amr-config 12_2k forbidden
+ amr-config 10_2k forbidden
+ amr-config 7_95k forbidden
+ amr-config 7_40k forbidden
+ amr-config 6_70k forbidden
+ amr-config 5_90k allowed
+ amr-config 5_15k forbidden
+ amr-config 4_75k forbidden
+ msc-addr msc_remote
+ bsc-addr bsc_local
+bsc
+ mid-call-timeout 0
+ no missing-msc-text
diff --git a/osmo-ran/split/ran-bsc_mgw/osmocom/osmo-mgw.cfg b/osmo-ran/split/ran-bsc_mgw/osmocom/osmo-mgw.cfg
new file mode 100644
index 0000000..421816f
--- /dev/null
+++ b/osmo-ran/split/ran-bsc_mgw/osmocom/osmo-mgw.cfg
@@ -0,0 +1,22 @@
+!
+! MGCP configuration example
+!
+line vty
+ no login
+ bind 0.0.0.0
+!
+mgcp
+ bind ip 127.0.0.1
+ rtp port-range 4002 16000
+ rtp bind-ip $DOCKER_IN_IP
+ rtp ip-probing
+ rtp ip-tos 184
+ bind port 2427
+ sdp audio payload number 98
+ sdp audio payload name GSM
+ number endpoints 31
+ loop 0
+ force-realloc 1
+ rtcp-omit
+ rtp-patch ssrc
+ rtp-patch timestamp
diff --git a/osmo-ran/split/ran-bts_pcu/Dockerfile b/osmo-ran/split/ran-bts_pcu/Dockerfile
new file mode 100644
index 0000000..6a35676
--- /dev/null
+++ b/osmo-ran/split/ran-bts_pcu/Dockerfile
@@ -0,0 +1,78 @@
+ARG USER
+FROM $USER/systemd
+# Arguments used after FROM must be specified again
+ARG DISTRO
+ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org"
+ARG OSMOCOM_REPO_VERSION=latest
+
+MAINTAINER Pau Espin Pedrol <pespin@sysmocom.de>
+
+ARG OSMOCOM_REPO_DEBIAN="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/$OSMOCOM_REPO_VERSION/Debian_9.0/"
+ARG OSMOCOM_REPO_CENTOS="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/$OSMOCOM_REPO_VERSION/CentOS_8_Stream/"
+
+COPY Release.key /tmp/Release.key
+
+RUN case "$DISTRO" in \
+ debian*) \
+ apt-get update && \
+ apt-get install -y --no-install-recommends \
+ gnupg && \
+ apt-key add /tmp/Release.key && \
+ rm /tmp/Release.key && \
+ echo "deb " $OSMOCOM_REPO_DEBIAN " ./" > /etc/apt/sources.list.d/osmocom-$OSMOCOM_REPO_VERSION.list \
+ ;; \
+ centos*) \
+ echo "metadata_expire=60" >> /etc/dnf/dnf.conf && cat /etc/dnf/dnf.conf && \
+ dnf install -y dnf-utils wget && \
+ yum config-manager --set-enabled PowerTools && \
+ cd /etc/yum.repos.d/ && \
+ wget ${OSMOCOM_REPO_CENTOS}/network:osmocom:$OSMOCOM_REPO_VERSION.repo \
+ ;; \
+ esac
+
+# we need to add this to invalidate the cache once the repository is updated.
+# unfortunately Dockerfiles don't support a conditional ARG, so we need to add both DPKG + RPM
+ADD $OSMOCOM_REPO_DEBIAN/Release /tmp/Release
+ADD $OSMOCOM_REPO_CENTOS/repodata/repomd.xml /tmp/repomd.xml
+
+RUN case "$DISTRO" in \
+ debian*) \
+ apt-get update && \
+ apt-get install -y --no-install-recommends \
+ less \
+ apt-utils \
+ strace \
+ tcpdump \
+ telnet \
+ vim \
+ osmo-bts-trx \
+ osmo-pcu && \
+ apt-get clean \
+ ;; \
+ centos*) \
+ dnf install -y \
+ less \
+ strace \
+ tcpdump \
+ telnet \
+ vim \
+ osmo-bts \
+ osmo-pcu \
+ ;; \
+ esac
+
+RUN systemctl enable osmo-bts-trx osmo-pcu
+
+WORKDIR /tmp
+RUN cp -r /etc/osmocom /etc/osmocom-default
+VOLUME /data
+VOLUME /etc/osmocom
+
+COPY osmocom/* /etc/osmocom/
+
+CMD ["/lib/systemd/systemd", "--system", "--unit=multi-user.target"]
+
+#osmo-bts: VTY CTRL
+EXPOSE 4241 4238
+#osmo-pcu: VTY CTRL
+EXPOSE 4240
diff --git a/osmo-ran/split/ran-bts_pcu/Makefile b/osmo-ran/split/ran-bts_pcu/Makefile
new file mode 100644
index 0000000..3d539d1
--- /dev/null
+++ b/osmo-ran/split/ran-bts_pcu/Makefile
@@ -0,0 +1,2 @@
+RUN_ARGS?=--sysctl net.ipv6.conf.all.disable_ipv6=0 --rm --network sigtran --ip 172.18.25.201 -v bsc-vol:/data
+include ../../../make/Makefile
diff --git a/osmo-ran/split/ran-bts_pcu/Release.key b/osmo-ran/split/ran-bts_pcu/Release.key
new file mode 100644
index 0000000..a737316
--- /dev/null
+++ b/osmo-ran/split/ran-bts_pcu/Release.key
@@ -0,0 +1,20 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.5 (GNU/Linux)
+
+mQENBFJBt/wBCADAht3d/ilNuyzaXYw/QwTRvmjyoDvfXw+H/3Fvk1zlDZoiKPPc
+a1wCVBINUZl7vYM2OXqbJwYa++JP2Q48xKSvC6thbRc/YLievkbcvTemf7IaREfl
+CTjoYpoqXHa9kHMw1aALDm8CNU88jZmnV7v9L6hKkbYDxie+jpoj7D6B9JlxgNJ4
+5dQyRNsFGVcIl4Vplt1HyGc5Q5nQI/VgS2rlF/IOXmhRQBc4LEDdU8R2IKnkU4ee
+S7TWanAigGAQhxGuCkS39/CWzc1DhLhjlNhBl/+RTPejkqJtAy00ZLps3+RqUN1Y
+CU/Fsr7aRlYVGqQ/BlptwV0XQ2VVYJX2oEBBABEBAAG0MG5ldHdvcmsgT0JTIFBy
+b2plY3QgPG5ldHdvcmtAYnVpbGQub3BlbnN1c2Uub3JnPokBPAQTAQIAJgUCXm/4
+pgIbAwUJEEzwqgYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEGLrGgkXKA3f/1AH
+/A7WVSpfM4wV/DMqZPTsSjChB4JyDotxpV7qHZzBC5aaP2dINZyi9PayIwZWbvCY
+VKvt+Fw8oCGC9F9mdh10Xe+ElHeVNSihzABPuu1RkRkb1nvkymScy0yxydodYOBi
+K4WQ+BhpijXWmYvOekIwbS5Hi9BHpfgK4TinK0xsvh1bVLeQJ8YjrnNFIAR2CnBa
+X7Y72Up/kKL08DdQzuS+mKrJtAQlGMtIsukWC2ajYQMkNwm8Gvhpn8za113dCkBW
+XAFnlQqQobKwC7b19QgEtJI/YpGSrRc6WaZxPyAjscbWQlFEAB900sVj4BWT55ig
+7O2uSdsCVhTuU7T0ztwsgvmIRgQTEQIABgUCUkG3/AAKCRA7MBG3a51lIzhdAJ9v
+d6XPffMZRcCGgDEY5OaTn/MsCQCgrXbeZpFJgnirSrc8rRonvzYFiF4=
+=/Tek
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/osmo-ran/split/ran-bts_pcu/osmocom/osmo-bts-trx.cfg b/osmo-ran/split/ran-bts_pcu/osmocom/osmo-bts-trx.cfg
new file mode 100644
index 0000000..df20e5e
--- /dev/null
+++ b/osmo-ran/split/ran-bts_pcu/osmocom/osmo-bts-trx.cfg
@@ -0,0 +1,36 @@
+!
+! OsmoBTS () configuration saved from vty
+!!
+!
+log stderr
+ logging color 1
+ logging timestamp 0
+ logging level rsl notice
+ logging level oml notice
+ logging level rll notice
+ logging level rr notice
+ logging level meas error
+ logging level pag error
+ logging level l1c error
+ logging level l1p error
+ logging level dsp error
+ logging level abis error
+!
+line vty
+ no login
+ bind 0.0.0.0
+!
+phy 0
+ instance 0
+ osmotrx ip local $DOCKER_IN_IP
+ osmotrx ip remote $TRX_IP
+bts 0
+ band 1800
+ ipa unit-id 6969 0
+ oml remote-ip $BSC_IP
+ gsmtap-sapi ccch
+ gsmtap-sapi pdtch
+ trx 0
+ phy 0 instance 0
+cpu-sched
+ policy rr 1
diff --git a/osmo-ran/split/ran-bts_pcu/osmocom/osmo-pcu.cfg b/osmo-ran/split/ran-bts_pcu/osmocom/osmo-pcu.cfg
new file mode 100644
index 0000000..2e31cbc
--- /dev/null
+++ b/osmo-ran/split/ran-bts_pcu/osmocom/osmo-pcu.cfg
@@ -0,0 +1,11 @@
+!
+line vty
+ no login
+ bind 0.0.0.0
+!
+pcu
+ flow-control-interval 10
+ cs 2
+ alloc-algorithm dynamic
+ alpha 0
+ gamma 0
diff --git a/osmo-ran/split/ran-trx-ipc/Dockerfile b/osmo-ran/split/ran-trx-ipc/Dockerfile
new file mode 100644
index 0000000..b0aaf50
--- /dev/null
+++ b/osmo-ran/split/ran-trx-ipc/Dockerfile
@@ -0,0 +1,76 @@
+ARG USER
+FROM $USER/systemd
+# Arguments used after FROM must be specified again
+ARG DISTRO
+ARG OSMOCOM_REPO_MIRROR="http://download.opensuse.org"
+ARG OSMOCOM_REPO_VERSION=latest
+
+MAINTAINER Pau Espin Pedrol <pespin@sysmocom.de>
+
+ARG OSMOCOM_REPO_DEBIAN="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/$OSMOCOM_REPO_VERSION/Debian_9.0/"
+ARG OSMOCOM_REPO_CENTOS="$OSMOCOM_REPO_MIRROR/repositories/network:/osmocom:/$OSMOCOM_REPO_VERSION/CentOS_8_Stream/"
+
+COPY Release.key /tmp/Release.key
+
+RUN case "$DISTRO" in \
+ debian*) \
+ apt-get update && \
+ apt-get install -y --no-install-recommends \
+ gnupg && \
+ apt-key add /tmp/Release.key && \
+ rm /tmp/Release.key && \
+ echo "deb " $OSMOCOM_REPO_DEBIAN " ./" > /etc/apt/sources.list.d/osmocom-$OSMOCOM_REPO_VERSION.list \
+ ;; \
+ centos*) \
+ echo "metadata_expire=60" >> /etc/dnf/dnf.conf && cat /etc/dnf/dnf.conf && \
+ dnf install -y dnf-utils wget && \
+ yum config-manager --set-enabled PowerTools && \
+ cd /etc/yum.repos.d/ && \
+ wget ${OSMOCOM_REPO_CENTOS}/network:osmocom:$OSMOCOM_REPO_VERSION.repo \
+ ;; \
+ esac
+
+# we need to add this to invalidate the cache once the repository is updated.
+# unfortunately Dockerfiles don't support a conditional ARG, so we need to add both DPKG + RPM
+ADD $OSMOCOM_REPO_DEBIAN/Release /tmp/Release
+ADD $OSMOCOM_REPO_CENTOS/repodata/repomd.xml /tmp/repomd.xml
+
+RUN case "$DISTRO" in \
+ debian*) \
+ apt-get update && \
+ apt-get install -y --no-install-recommends \
+ less \
+ apt-utils \
+ strace \
+ tcpdump \
+ telnet \
+ vim \
+ osmo-trx-ipc && \
+ apt-get clean \
+ ;; \
+ centos*) \
+ dnf install -y \
+ less \
+ strace \
+ tcpdump \
+ telnet \
+ vim \
+ osmo-trx-ipc \
+ ;; \
+ esac
+
+RUN systemctl enable osmo-trx-ipc
+
+WORKDIR /tmp
+RUN cp -r /etc/osmocom /etc/osmocom-default
+VOLUME /data
+VOLUME /etc/osmocom
+VOLUME /tmp/ud
+
+COPY osmocom/* /etc/osmocom/
+
+CMD ["/lib/systemd/systemd", "--system", "--unit=multi-user.target"]
+
+#osmo-trx-ipc: VTY CTRL
+EXPOSE 4237 4236
+EXPOSE 5700 5701 5702
diff --git a/osmo-ran/split/ran-trx-ipc/Makefile b/osmo-ran/split/ran-trx-ipc/Makefile
new file mode 100644
index 0000000..1d99f06
--- /dev/null
+++ b/osmo-ran/split/ran-trx-ipc/Makefile
@@ -0,0 +1,2 @@
+RUN_ARGS?=--sysctl net.ipv6.conf.all.disable_ipv6=0 --rm --network sigtran --ip 172.18.25.202 -v bsc-vol:/data
+include ../../../make/Makefile
diff --git a/osmo-ran/split/ran-trx-ipc/Release.key b/osmo-ran/split/ran-trx-ipc/Release.key
new file mode 100644
index 0000000..a737316
--- /dev/null
+++ b/osmo-ran/split/ran-trx-ipc/Release.key
@@ -0,0 +1,20 @@
+-----BEGIN PGP PUBLIC KEY BLOCK-----
+Version: GnuPG v1.4.5 (GNU/Linux)
+
+mQENBFJBt/wBCADAht3d/ilNuyzaXYw/QwTRvmjyoDvfXw+H/3Fvk1zlDZoiKPPc
+a1wCVBINUZl7vYM2OXqbJwYa++JP2Q48xKSvC6thbRc/YLievkbcvTemf7IaREfl
+CTjoYpoqXHa9kHMw1aALDm8CNU88jZmnV7v9L6hKkbYDxie+jpoj7D6B9JlxgNJ4
+5dQyRNsFGVcIl4Vplt1HyGc5Q5nQI/VgS2rlF/IOXmhRQBc4LEDdU8R2IKnkU4ee
+S7TWanAigGAQhxGuCkS39/CWzc1DhLhjlNhBl/+RTPejkqJtAy00ZLps3+RqUN1Y
+CU/Fsr7aRlYVGqQ/BlptwV0XQ2VVYJX2oEBBABEBAAG0MG5ldHdvcmsgT0JTIFBy
+b2plY3QgPG5ldHdvcmtAYnVpbGQub3BlbnN1c2Uub3JnPokBPAQTAQIAJgUCXm/4
+pgIbAwUJEEzwqgYLCQgHAwIEFQIIAwQWAgMBAh4BAheAAAoJEGLrGgkXKA3f/1AH
+/A7WVSpfM4wV/DMqZPTsSjChB4JyDotxpV7qHZzBC5aaP2dINZyi9PayIwZWbvCY
+VKvt+Fw8oCGC9F9mdh10Xe+ElHeVNSihzABPuu1RkRkb1nvkymScy0yxydodYOBi
+K4WQ+BhpijXWmYvOekIwbS5Hi9BHpfgK4TinK0xsvh1bVLeQJ8YjrnNFIAR2CnBa
+X7Y72Up/kKL08DdQzuS+mKrJtAQlGMtIsukWC2ajYQMkNwm8Gvhpn8za113dCkBW
+XAFnlQqQobKwC7b19QgEtJI/YpGSrRc6WaZxPyAjscbWQlFEAB900sVj4BWT55ig
+7O2uSdsCVhTuU7T0ztwsgvmIRgQTEQIABgUCUkG3/AAKCRA7MBG3a51lIzhdAJ9v
+d6XPffMZRcCGgDEY5OaTn/MsCQCgrXbeZpFJgnirSrc8rRonvzYFiF4=
+=/Tek
+-----END PGP PUBLIC KEY BLOCK-----
diff --git a/osmo-ran/split/ran-trx-ipc/osmocom/osmo-trx-ipc.cfg b/osmo-ran/split/ran-trx-ipc/osmocom/osmo-trx-ipc.cfg
new file mode 100644
index 0000000..38a758c
--- /dev/null
+++ b/osmo-ran/split/ran-trx-ipc/osmocom/osmo-trx-ipc.cfg
@@ -0,0 +1,29 @@
+log stderr
+ logging filter all 1
+ logging color 1
+ logging print category 1
+ logging timestamp 1
+ logging print file basename
+ logging level set-all notice
+!
+line vty
+ no login
+!
+cpu-sched
+ policy rr 18
+trx
+ bind-ip $DOCKER_IN_IP
+ remote-ip $BTS_IP
+ ! 28 dB offset below is valid only for the B2xx in 1800 MHz band, see
+ ! https://osmocom.org/issues/4468 for more details
+ rssi-offset 28.000000
+ tx-sps 4
+ rx-sps 4
+ clock-ref external
+ egprs disable
+ ext-rach disable
+ dev-args ipc_msock=/tmp/ud/ipc_sock0
+ multi-arfcn disable
+ chan 0
+ tx-path TX/RX
+ rx-path RX2
diff --git a/systemd/Dockerfile b/systemd/Dockerfile
new file mode 100644
index 0000000..8f1763d
--- /dev/null
+++ b/systemd/Dockerfile
@@ -0,0 +1,41 @@
+ARG REGISTRY=docker.io
+ARG UPSTREAM_DISTRO=centos:centos8
+FROM ${REGISTRY}/${UPSTREAM_DISTRO}
+# Arguments used after FROM must be specified again
+ARG DISTRO
+
+MAINTAINER Pau Espin Pedrol <pespin@sysmocom.de>
+
+# set up systemd
+# container=docker: systemd likes to know it is running inside a container
+ENV container docker
+RUN case "$DISTRO" in \
+ debian*) \
+ apt-get update && \
+ apt-get install -y --no-install-recommends systemd; \
+ (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do test "$i" = "systemd-tmpfiles-setup.service" || rm -f $i; done); \
+ rm -f /lib/systemd/system/multi-user.target.wants/*; \
+ rm -f /etc/systemd/system/*.wants/*; \
+ rm -f /lib/systemd/system/local-fs.target.wants/*; \
+ rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
+ rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
+ rm -f /lib/systemd/system/basic.target.wants/*; \
+ rm -f /lib/systemd/system/anaconda.target.wants/*; \
+ ;; \
+ centos*) \
+ yum -y install systemd; yum clean all; \
+ (cd /lib/systemd/system/sysinit.target.wants/; for i in *; do test "$i" = "systemd-tmpfiles-setup.service" || rm -f $i; done); \
+ rm -f /lib/systemd/system/multi-user.target.wants/*; \
+ rm -f /etc/systemd/system/*.wants/*; \
+ rm -f /lib/systemd/system/local-fs.target.wants/*; \
+ rm -f /lib/systemd/system/sockets.target.wants/*udev*; \
+ rm -f /lib/systemd/system/sockets.target.wants/*initctl*; \
+ rm -f /lib/systemd/system/basic.target.wants/*; \
+ rm -f /lib/systemd/system/anaconda.target.wants/*; \
+ ;; \
+ esac
+VOLUME [ "/sys/fs/cgroup" ]
+
+#RUN systemctl enable osmo-bsc osmo-bts-trx osmo-mgw osmo-pcu
+
+CMD ["/lib/systemd/systemd", "--system", "--unit=multi-user.target"]
diff --git a/systemd/Makefile b/systemd/Makefile
new file mode 100644
index 0000000..80b1069
--- /dev/null
+++ b/systemd/Makefile
@@ -0,0 +1,2 @@
+RUN_ARGS?=--sysctl net.ipv6.conf.all.disable_ipv6=0 --rm --network sigtran --ip 172.18.25.200 -v bsc-vol:/data
+include ../make/Makefile