docker compose override files for testing with locally modified executables.
This commit is contained in:
@@ -535,3 +535,40 @@ snssais:
|
|||||||
```
|
```
|
||||||
|
|
||||||
The `ST` and `SD` values shall also match.
|
The `ST` and `SD` values shall also match.
|
||||||
|
|
||||||
|
|
||||||
|
# 6. Running with local changes
|
||||||
|
|
||||||
|
You can run the testcase with local changes by substituting the binaries in
|
||||||
|
execution images. `local-override.yaml` file provides a way to substitute the
|
||||||
|
gNB and nrUE executables as well as librfsimulator.so. Refer to the `-volumes`
|
||||||
|
section in the file for details. This includes an image build service as well as
|
||||||
|
code compilation service. This is necessary as the executable has to be linked
|
||||||
|
against the same libraries that are present in the executing image. This might
|
||||||
|
take a while the first time but other that that is very fast. Here is a list of
|
||||||
|
commands (wait between each command). Tested with `docker compose` v2.27.0
|
||||||
|
|
||||||
|
|
||||||
|
This command deploys OAI 5G Core Network
|
||||||
|
```bash
|
||||||
|
docker compose -f docker-compose.yaml -f local-override.yaml up -d mysql oai-amf oai-smf oai-upf oai-ext-dn
|
||||||
|
```
|
||||||
|
This command builds base images locally, builds local gNB & nrUE executable and
|
||||||
|
runs the gnb service with modified gNB executable.
|
||||||
|
```bash
|
||||||
|
docker compose -f docker-compose.yaml -f local-override.yaml up -d oai-gnb
|
||||||
|
```
|
||||||
|
This command rebuilds both the gNB & nrUE and runs the oai-nr-ue container with
|
||||||
|
modified nrUE executable.
|
||||||
|
```bash
|
||||||
|
docker compose -f docker-compose.yaml -f local-override.yaml up -d oai-nr-ue
|
||||||
|
```
|
||||||
|
|
||||||
|
## 6.1 Running nrUE in gdb
|
||||||
|
`local-override-ue-gdb.yaml` is an additional override file which can be used
|
||||||
|
to run the UE executable in gdb. Replace the last command above with the
|
||||||
|
following:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker compose -f docker-compose.yaml -f local-override.yaml -f local-override-ue-gdb.yaml run oai-nr-ue
|
||||||
|
```
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
services:
|
||||||
|
oai-nr-ue:
|
||||||
|
privileged: true
|
||||||
|
stdin_open: true
|
||||||
|
tty: true
|
||||||
|
command: gdb --args /opt/oai-nr-ue/bin/nr-uesoftmodem -O /opt/oai-nr-ue/etc/nr-ue.conf -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001100 -C 3619200000 --rfsimulator.serveraddr 192.168.71.140 --log_config.global_log_options level,nocolor,time
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
include:
|
||||||
|
- ../local_common_overrides/build_images.yaml
|
||||||
|
- ../local_common_overrides/rebuild_nr_softmodems.yaml
|
||||||
|
services:
|
||||||
|
oai-gnb:
|
||||||
|
privileged: true
|
||||||
|
depends_on:
|
||||||
|
rebuild-nr-softmodems:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
volumes:
|
||||||
|
- ../../../cmake_targets/ran_build/build/nr-softmodem:/opt/oai-gnb/bin/nr-softmodem
|
||||||
|
- ../../../cmake_targets/ran_build/build/librfsimulator.so:/usr/local/lib/librfsimulator.so
|
||||||
|
oai-nr-ue:
|
||||||
|
privileged: true
|
||||||
|
image: ue-local
|
||||||
|
depends_on:
|
||||||
|
build-ran-build:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
restart: true
|
||||||
|
oai-gnb:
|
||||||
|
condition: service_started
|
||||||
|
rebuild-nr-softmodems:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
volumes:
|
||||||
|
- ../../../cmake_targets/ran_build/build/nr-uesoftmodem:/opt/oai-nr-ue/bin/nr-uesoftmodem
|
||||||
|
- ../../../cmake_targets/ran_build/build/librfsimulator.so:/usr/local/lib/librfsimulator.so
|
||||||
|
- ../../../crashdumps/:/cores/
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
include:
|
||||||
|
- ../local_common_overrides/build_images.yaml
|
||||||
|
- ../local_common_overrides/rebuild_nr_softmodems.yaml
|
||||||
|
services:
|
||||||
|
oai-gnb:
|
||||||
|
privileged: true
|
||||||
|
depends_on:
|
||||||
|
rebuild-nr-softmodems:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
# volumes:
|
||||||
|
# replace the gnb executable here
|
||||||
|
oai-nr-ue:
|
||||||
|
privileged: true
|
||||||
|
image: ue-local
|
||||||
|
depends_on:
|
||||||
|
build-ran-build:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
restart: true
|
||||||
|
oai-gnb:
|
||||||
|
condition: service_started
|
||||||
|
rebuild-nr-softmodems:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
container_name: local-oai-nr-ue
|
||||||
|
volumes:
|
||||||
|
- ../../../cmake_targets/ran_build/build/nr-uesoftmodem:/opt/oai-nr-ue/bin/nr-uesoftmodem
|
||||||
|
- ../../../cmake_targets/ran_build/build/librfsimulator.so:/usr/local/lib/librfsimulator.so
|
||||||
|
- ../../../crashdumps/:/cores/
|
||||||
@@ -0,0 +1,45 @@
|
|||||||
|
services:
|
||||||
|
build-ran-base:
|
||||||
|
image: ran-base
|
||||||
|
build:
|
||||||
|
context: ../../../
|
||||||
|
dockerfile: docker/Dockerfile.base.ubuntu22
|
||||||
|
tags:
|
||||||
|
- ran-base
|
||||||
|
|
||||||
|
build-ran-build:
|
||||||
|
image: ran-build
|
||||||
|
build:
|
||||||
|
context: ../../../
|
||||||
|
dockerfile: docker/Dockerfile.build.ubuntu22
|
||||||
|
tags:
|
||||||
|
- ran-build
|
||||||
|
depends_on:
|
||||||
|
build-ran-base:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
|
||||||
|
build-gnb-image:
|
||||||
|
image: gnb-local
|
||||||
|
build:
|
||||||
|
context: ../../../
|
||||||
|
dockerfile: docker/Dockerfile.gNB.ubuntu22
|
||||||
|
tags:
|
||||||
|
- gnb-local
|
||||||
|
depends_on:
|
||||||
|
build-ran-build:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
entrypoint: ""
|
||||||
|
command: echo "gnb-image built"
|
||||||
|
|
||||||
|
build-ue-image:
|
||||||
|
image: ue-local
|
||||||
|
build:
|
||||||
|
context: ../../../
|
||||||
|
dockerfile: docker/Dockerfile.nrUE.ubuntu22
|
||||||
|
tags:
|
||||||
|
- ue-local
|
||||||
|
depends_on:
|
||||||
|
build-ran-build:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
entrypoint: ""
|
||||||
|
command: echo "ue-image built"
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
services:
|
||||||
|
rebuild-nr-softmodems:
|
||||||
|
image: ran-build
|
||||||
|
volumes:
|
||||||
|
- ../../../:/oai-dir/
|
||||||
|
command:
|
||||||
|
bash -c "cd /oai-dir/ && mkdir -p cmake_targets/ran_build/build && cd cmake_targets/ran_build/build && cmake ../../../ -GNinja && cmake --build . --target nr-uesoftmodem rfsimulator nr-softmodem"
|
||||||
|
entrypoint: ""
|
||||||
|
depends_on:
|
||||||
|
build-gnb-image:
|
||||||
|
condition: service_completed_successfully
|
||||||
|
build-ue-image:
|
||||||
|
condition: service_completed_successfully
|
||||||
Reference in New Issue
Block a user