5.2 KiB
|
OAI Docker/Podman Build and Usage Procedures |
Table of Contents
- Build Strategy
- File organization
- Building using docker under Ubuntu 18.04
- Building using podman under Red Hat Entreprise Linux 8.2
- Running modems using docker under Ubuntu 18.04
- Running modems using podman under Red Hat Entreprise Linux 8.2
1. Build Strategy
For all platforms, the strategy for building docker/podman images is the same:
- First we create a common shared image
ran-basethat contains:- the latest source files (by using the
COPYfunction) - all the means to build an OAI RAN executable
- all packages, compilers, ...
- especially UHD is installed
- the latest source files (by using the
- Then, from the
ran-baseshared image, we create a shared imageran-buildin which all targets are compiled:- eNB
- gNB
- lte-UE
- nr-UE
- Then from the
ran-buildshared image we can build target images for:- eNB
- gNB
- lte-UE
- nr-UE
- These target images will only contain:
- the generated executable (for example
lte-softmodem.Rel15) - the generated shared libraries (for example
liboai_usrpdevif.so.Rel15) - the needed libraries and packages to run these generated binaries
- Some configuration file templates
- Some tools (such as
ping,ifconfig)
- the generated executable (for example
TO DO:
- Proper entrypoints
- Proper port exposure
- ...
2. File organization
Dockerfiles are named with the following naming convention: Dockerfile.${target}.${OS-version}.${cluster-version}
Targets can be:
basefor an image namedran-base(shared image)ranfor an image namedran-build(shared image)eNBfor an image namedoai-enbgNBfor an image namedoai-gnblteUEfor an image namedoai-lte-uenrUEfor an image namedoai-nr-ue
The currently-supported OS are:
rhel8.2for Red Hat Entreprise Linuxubuntu18for Ubuntu 18.04 LTS
The currently-supported cluster version is:
rhel8.2.oc4-9
For more details in build within a Openshift Cluster, see OpenShift README for more details.
3. Building using docker under Ubuntu 18.04
3.1. Pre-requisites
gitinstalleddocker-ceinstalled- Pulling
ubuntu:bionicfrom DockerHub
3.2. Building the shared images
Note: This can be done starting 2020.XX tag on the develop branch, or any branch that includes that tag.
There are two shared images: one that has all dependencies, and a second that compiles all targets (eNB, gNB, [nr]UE).
git clone https://gitlab.eurecom.fr/oai/openairinterface5g.git
cd openairinterface5g
git checkout develop
In our Eurecom/OSA environment we need to pass a GIT proxy.
docker build --target ran-base --tag ran-base:latest --file docker/Dockerfile.base.ubuntu18 --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" .
docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.build.ubuntu18 --build-arg NEEDED_GIT_PROXY="http://proxy.eurecom.fr:8080" .
if you don't need it, do NOT pass any value:
docker build --target ran-base --tag ran-base:latest --file docker/Dockerfile.base.ubuntu18 .
docker build --target ran-build --tag ran-build:latest --file docker/Dockerfile.build.ubuntu18 .
After building both:
docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
ran-build latest f2633a7f5102 1 minute ago 6.81GB
ran-base latest 5c9c02a5b4a8 1 minute ago 2.4GB
...
3.3. Building any target image
For example, the eNB:
docker build --target oai-enb --tag oai-enb:latest --file docker/Dockerfile.eNB.ubuntu18 .
After a while:
docker image ls
REPOSITORY TAG IMAGE ID CREATED SIZE
oai-enb latest 25ddbd8b7187 1 minute ago 516MB
<none> <none> 875ea3b05b60 8 minutes ago 8.18GB
ran-build latest f2633a7f5102 1 hour ago 6.81GB
ran-base latest 5c9c02a5b4a8 1 hour ago 2.4GB
Do not forget to remove the temporary image:
docker image prune --force
4. Building using podman under Red Hat Entreprise Linux 8.2
TODO.
5. Running modems using docker under Ubuntu 18.04
TODO.
6. Running modems using podman under Red Hat Entreprise Linux 8.2
TODO.