From dcf499203d49cee4474087da22657fe62f1ffb3d Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Thu, 28 Oct 2021 21:05:06 +0200 Subject: [PATCH] Introduce Docker image for osmo-hnodeb-master Change-Id: I35e5324d981be8130fbc4e6dcd3e8933181e6821 --- make/Makefile | 2 ++ osmo-hnodeb-master/Dockerfile | 51 ++++++++++++++++++++++++++++++ osmo-hnodeb-master/Makefile | 3 ++ osmo-hnodeb-master/osmo-hnodeb.cfg | 22 +++++++++++++ 4 files changed, 78 insertions(+) create mode 100644 osmo-hnodeb-master/Dockerfile create mode 100644 osmo-hnodeb-master/Makefile create mode 100644 osmo-hnodeb-master/osmo-hnodeb.cfg diff --git a/make/Makefile b/make/Makefile index e357803b..416fc187 100644 --- a/make/Makefile +++ b/make/Makefile @@ -26,6 +26,7 @@ OSMO_GBPROXY_BRANCH?=master OSMO_GGSN_BRANCH?=master OSMO_GSM_TESTER_BRANCH?=master OSMO_HLR_BRANCH?=master +OSMO_HNODEB_BRANCH?=master OSMO_IUH_BRANCH?=master OSMO_MGW_BRANCH?=master OSMO_MSC_BRANCH?=master @@ -100,6 +101,7 @@ docker-build: .release --build-arg OSMO_GGSN_BRANCH=$(OSMO_GGSN_BRANCH) \ --build-arg OSMO_GSM_TESTER_BRANCH=$(OSMO_GSM_TESTER_BRANCH) \ --build-arg OSMO_HLR_BRANCH=$(OSMO_HLR_BRANCH) \ + --build-arg OSMO_HNODEB_BRANCH=$(OSMO_HNODEB_BRANCH) \ --build-arg OSMO_IUH_BRANCH=$(OSMO_IUH_BRANCH) \ --build-arg OSMO_MGW_BRANCH=$(OSMO_MGW_BRANCH) \ --build-arg OSMO_MSC_BRANCH=$(OSMO_MSC_BRANCH) \ diff --git a/osmo-hnodeb-master/Dockerfile b/osmo-hnodeb-master/Dockerfile new file mode 100644 index 00000000..1a3ded90 --- /dev/null +++ b/osmo-hnodeb-master/Dockerfile @@ -0,0 +1,51 @@ +ARG USER +ARG DISTRO +FROM $USER/$DISTRO-build +# Arguments used after FROM must be specified again +ARG DISTRO + +RUN apt-get update && \ + apt-get install -y --no-install-recommends \ + libosmocore-dev \ + libosmo-abis-dev \ + libosmo-netif-dev \ + libosmo-sigtran-dev \ + libasn1c-dev && \ + apt-get clean + +WORKDIR /tmp + +ARG OSMO_IUH_BRANCH="master" + +RUN git clone git://git.osmocom.org/osmo-iuh.git +ADD http://git.osmocom.org/osmo-iuh/patch?h=$OSMO_IUH_BRANCH /tmp/commit-osmo-iuh + +RUN cd osmo-iuh && \ + git fetch && git checkout $OSMO_IUH_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_IUH_BRANCH || exit 1); \ + git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ + autoreconf -fi && \ + ./configure && \ + make "-j$(nproc)" install && \ + ldconfig + +ARG OSMO_HNODEB_BRANCH="master" + +RUN git clone git://git.osmocom.org/osmo-hnodeb.git +ADD http://git.osmocom.org/osmo-hnodeb/patch?h=$OSMO_HNODEB_BRANCH /tmp/commit-osmo-hnodeb + +RUN cd osmo-hnodeb && \ + git fetch && git checkout $OSMO_HNODEB_BRANCH && \ + (git symbolic-ref -q HEAD && git reset --hard origin/$OSMO_HNODEB_BRANCH || exit 1); \ + git rev-parse --abbrev-ref HEAD && git rev-parse HEAD && \ + autoreconf -fi && \ + ./configure && \ + make "-j$(nproc)" install && \ + ldconfig + +VOLUME /data + +COPY osmo-hnodeb.cfg /data/osmo-hnodeb.cfg + +WORKDIR /data +CMD ["/bin/sh", "-c", "/usr/local/bin/osmo-hnodeb -c /data/osmo-hnodeb.cfg >/data/osmo-hnodeb.log 2>&1"] diff --git a/osmo-hnodeb-master/Makefile b/osmo-hnodeb-master/Makefile new file mode 100644 index 00000000..47c39995 --- /dev/null +++ b/osmo-hnodeb-master/Makefile @@ -0,0 +1,3 @@ +RUN_ARGS?=--rm --network sigtran --ip 172.18.0.170 -v hnbgw-vol:/data + +include ../make/Makefile diff --git a/osmo-hnodeb-master/osmo-hnodeb.cfg b/osmo-hnodeb-master/osmo-hnodeb.cfg new file mode 100644 index 00000000..b41c67b8 --- /dev/null +++ b/osmo-hnodeb-master/osmo-hnodeb.cfg @@ -0,0 +1,22 @@ +! +! OsmoHNodeB (0) configuration saved from vty +!! +! +log stderr + logging filter all 1 + logging color 1 + logging print category 1 + logging timestamp 1 + logging print extended-timestamp 1 + logging level set-all debug +line vty + no login + bind 0.0.0.0 +hnodeb + cell_identity 1 + location_area_code 2 + routing_area_code 3 + service_area_code 4 + iuh + local-ip 0.0.0.0 + remote-ip 192.168.30.1