Skip to content

feat: bundled af with single docker container - #22

Merged
tariromukute merged 13 commits into
mainfrom
feat-single-af
Jul 9, 2026
Merged

tariromukute merged 13 commits into
mainfrom
feat-single-af

Conversation

@tariromukute

@tariromukute tariromukute commented May 18, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

This pull request introduces support for building and deploying the project as a single bundled application (combining AF Core and the southbound PCF handler into one binary and container), while retaining support for the existing microservice deployment. It also improves build configuration, updates documentation for both modes, and refines configuration management and code structure for easier maintenance and deployment.

Changelog KeepA

[Added] :

  • Added a new BUILD_BUNDLED CMake option and logic in CMakeLists.txt to build a single af executable that links AF Core and the PCF handler, with appropriate include directories and linker settings.
  • Introduced a top-level Dockerfile to build and package the bundled application, including all dependencies and runtime configuration for containerized deployment.
  • Added detailed build and deployment instructions to README.md, covering both microservice and bundled modes, prerequisites, Docker builds, and compose environments.
  • Introduced a unified configuration file format (config/af.yaml) for the bundled mode, and restructured af_core/config/af_core.yaml to separate AF Core and PCF handler settings.

[Changed]:

  • Refactored af_core/CMakeLists.txt to create a reusable af_core_lib static library, enabling both standalone and bundled builds, and updated include/link targets accordingly.
  • Improved spdlog discovery in CMakeLists.txt to first attempt config-based detection for better compatibility.
  • Updated af_orchestrator.h to use a typed configuration object and provide access to the configured PCF handler destination, improving maintainability and clarity.
  • Updated adapter documentation to reference the correct Docker image repository.

Related Issues

Closing: #15

Checklist

  • Code is tested and passes locally
  • Documentation is updated if needed
  • Follows code style and guidelines [Lint, Guidelines and co will follow if not existing]

- Updated CMakeLists.txt to create static libraries for core components and a standalone executable for the AF application.
- Modified FindgRPC.cmake to ensure proper target definitions.
- Updated submodule reference for common libraries.
- Enhanced api_component CMakeLists.txt to conditionally find dependencies.
- Refactored pcf_handler CMakeLists.txt to create a static library and standalone executable.
- Added Dockerfile for building a bundled AF application with all components.
- Created unified configuration file (af.yaml) for bundled deployment.
- Added Docker Compose configuration for bundled deployment of AF components alongside free5gc.
- Implemented main entry point (main.cpp) for the bundled AF application, managing lifecycle of components.

Signed-off-by: Tariro Mukute <18515926+tariromukute@users.noreply.github.com>
… CMake, Dockerfile, README, and Docker Compose.

Signed-off-by: Tariro Mukute <18515926+tariromukute@users.noreply.github.com>
Signed-off-by: Tariro Mukute <18515926+tariromukute@users.noreply.github.com>
- Updated QodSessionManager to accept PCF destination as a parameter and log initialization details.
- Modified CI helper script to check for AF Core container and adjust waiting messages accordingly.
- Revised af.yaml and docker-compose configurations to reflect the new architecture separating northbound API from core and southbound components.
- Enhanced documentation to clarify deployment modes (bundled vs microservice) and their respective configurations.
- Updated API adapter and handlers to support dynamic core communication settings.
- Improved PCF handler to configure communication parameters from YAML and log relevant information.
- Refactored main application entry point to focus on bundled AF Core and PCF Handler initialization.
- Added new configuration file for the standalone API adapter in Docker Compose setup.

Signed-off-by: Tariro Mukute <18515926+tariromukute@users.noreply.github.com>
…factor communication setup

Signed-off-by: Tariro Mukute <18515926+tariromukute@users.noreply.github.com>
…s Docker Compose files

Signed-off-by: Tariro Mukute <18515926+tariromukute@users.noreply.github.com>
@tariromukute
tariromukute requested a review from phine-lukas May 18, 2026 18:19
@tariromukute

Copy link
Copy Markdown
Collaborator Author

Note: We need to merge the following first phinetech/phine.af-common#1

Signed-off-by: Tariro Mukute <18515926+tariromukute@users.noreply.github.com>
Comment thread src/main.cpp
@phine-lukas

Copy link
Copy Markdown
Contributor

No need to fix it within this PR, but I have seen now that we are still using "oai", for example in the log or config path int the containers.

…port

- Implemented the demo QoD adapter with configuration loading and session management.
- Added BundleInject.cmake for integration into the root build.
- Created Dockerfile.bundle for bundled deployment of the adapter.
- Updated docker-compose file for bundled deployment of AF Core and the demo QoD adapter.
- Documented the process for adding a new adapter in the development guide.
- Enhanced log collection in ci_helper.sh to include demo QoD logs.

Signed-off-by: Tariro Mukute <18515926+tariromukute@users.noreply.github.com>
Comment thread docker-compose/conf/af.yaml

@phine-lukas phine-lukas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As already discussed:
While testing I was confused by the /northbound folder and it's role in the docker-compose files.
Our finding was that it is a leftover of the initial version where we did not have any example adapters. So we can either move it also to the adapters folder or remove it. I think it should also be removed from docker-compose files if it is not used by any tutorial or runme.

Comment thread docker-compose/compose.free5gc.yaml
…ionality

- Created `compose.free5gc.yaml` for Free5GC services including UPF, NRF, AMF, AUSF, NSSF, PCF, SMF, UDM, UDR, CHF, TNGF, NEF, and WebUI with appropriate configurations and dependencies.
- Created `compose.oai.yaml` for OAI core services including MySQL, UDR, UDM, AUSF, NRF, AMF, SMF, PCF, and UPF with necessary configurations and dependencies.
- Created `compose.ueransim.yaml` for UERANSIM services including gNB and UE with configurations for network settings and dependencies.
- Unified Docker Compose file `compose.yaml` to include Free5GC, OAI, and UERANSIM configurations with profiles for different deployment variants.
- Added starter configurations for Free5GC and UERANSIM in `starter.free5gc.yaml` and `starter.ueransim.yaml` respectively, including service dependencies and network settings.
- Introduced configuration files for UERANSIM gNB and UE in `ueransim/gnb.yaml` and `ueransim/ue.yaml` to define network parameters and subscription details.

Signed-off-by: Tariro Mukute <18515926+tariromukute@users.noreply.github.com>
… bundled shutdown

add compile-time switches for southbound handlers
add runtime enabled config flags for PCF, NEF, and UDR
refactor southbound creation into a registry-based factory
make bundled runtime use explicit lifecycle states for start/stop
replace shutdown polling with condition-variable coordination
simplify shutdown finalization and thread join flow
keep AF Core wait/start lifecycle aligned with bundled runtime
update default and compose AF configs for per-handler enablement

Signed-off-by: Tariro Mukute <18515926+tariromukute@users.noreply.github.com>
… clarity

Signed-off-by: Tariro Mukute <18515926+tariromukute@users.noreply.github.com>
@tariromukute
tariromukute marked this pull request as ready for review May 21, 2026 14:58
@tariromukute
tariromukute requested a review from phine-lukas May 21, 2026 15:02
@tariromukute
tariromukute marked this pull request as draft May 21, 2026 15:03
@tariromukute
tariromukute marked this pull request as ready for review May 21, 2026 15:03
@tariromukute
tariromukute requested a review from phineSte May 26, 2026 08:43
@phineSte

Copy link
Copy Markdown

@phine-lukas Tariro told me you already had a look and last 2 commits were only for house keeping so I approved pro-forma without checking the code

@phine-lukas phine-lukas left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Signed-off-by: Tariro Mukute <18515926+tariromukute@users.noreply.github.com>
Signed-off-by: Tariro Mukute <18515926+tariromukute@users.noreply.github.com>
@tariromukute
tariromukute merged commit 0d8f6a4 into main Jul 9, 2026
8 checks passed
@tariromukute
tariromukute deleted the feat-single-af branch July 9, 2026 12:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[TECH DEBT] Enable building entire application from root CMakeLists.txt and create unified Dockerfile

3 participants