# opennetworkinglab/aether-5gc architecture

> Architecture diagram of the GitHub repository opennetworkinglab/aether-5gc, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/opennetworkinglab/aether-5gc
- Repository: https://github.com/opennetworkinglab/aether-5gc

## Overview

##### Main Components
- Ansible Orchestration Engine – This is the central automation mechanism that uses the playbooks (e.g., roles/core, roles/router, roles/sriov, roles/upf) to deploy and configure the system.
- 5G Core (Aether Core) – Represented by the “core” role, this component handles the installation of the standalone 5G core.
- Router Component – Managed by the “router” role, the router configures networking interfaces and systemd network/network service files to manage access/core interfaces.
- SR-IOV Component – This role is responsible for configuring SR-IOV settings, essential for enabling virtualization on network interface cards.
- UPF (User Plane Function) – The “upf” role installs the UPF and sets up the necessary 5G values (configuration) for user plane processing.
- External Kubernetes Cluster – Since the README indicates a dependency on a Kubernetes infrastructure (from a linked k8s repository), include a Kubernetes cluster component that interacts with the 5GC deployment.
- Configuration Artifacts – Include configuration files like hosts.ini and vars/main.yml that provide node IP configurations and other runtime parameters.
- Make Commands – Highlight the “make ansible”, “make 5gc-install”, and “make 5gc-uninstall” targets that drive the execution flow.

##### Relationships and Interactions
- The Ansible Orchestrator reads the configuration variables (from hosts.ini and vars/main.yml) and triggers various roles.
- The “core” role installs the Aether core independently.
- The “router” role configures the system’s networking, deploying systemd templates for interfaces.
- The “sriov” and “upf” roles are responsible for specialized network hardware configuration and UPF installation respectively.
- The deployment process depends on an already provisioned Kubernetes cluster, which is externally maintained via the k8s repo.

##### Important Architectural Patterns and Design Principles
- Role-Based Modularity – Each function (core, router, sriov, upf) is encapsulated within its own Ansible role, promoting separation of concerns.
- Declarative Infrastructure – The configuration parameters (via hosts.ini and vars/main.yml) enable a declarative approach to deployment.
- Template-Driven Configuration – Use of systemd and YAML templates shows a pattern of dynamic configuration generation.
- External Dependency Integration – Clearly indicate how the project integrates with an external Kubernetes cluster for infrastructure orchestration.

##### Incorporate Relevant Technologies and Frameworks
- Ansible – As the primary automation tool orchestrating the deployment.
- Kubernetes – The external multi-node cluster dependency for hosting or supporting parts of the core.
- Systemd – Shown in the router’s templates which configure system networking aspects.
- YAML & Make – For configuration and build automation.
- Physical RAN Setup – Mention that the overall purpose is to support a physical radio access network environment.

##### Instructing the Principal Software Engineer – Elements
- Clearly labeled blocks for each component: “Ansible Engine”, “5G Core (Aether Core)”, “Router”, “SR-IOV Config”, “UPF”, and “Kubernetes Cluster” (external dependency).
- Annotation near each role that includes key file references (like the presence of templates for systemd configuration in the router role) and key configuration parameters (standalone mode, data_iface, values_file).

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Configuration Inputs
    CA["Configuration Artifacts\n(hosts.ini, vars/main.yml)"]:::config
    MC["Make Commands\n(make ansible, 5gc-install, 5gc-uninstall)"]:::config

    %% Ansible Orchestration Layer
    AE["Ansible Orchestration Engine"]:::orchestrator

    %% Deployment Roles Subgraph
    subgraph "Deployment Roles"
        CORE["5G Core (Aether Core)"]:::role
        ROUTER["Router Component"]:::role
        SRIOV["SR-IOV Config"]:::role
        UPF["UPF (User Plane Function)"]:::role
    end

    %% External Dependency
    K8S["External Kubernetes Cluster"]:::external

    %% Relationships
    CA -->|"provides configuration"| AE
    MC -->|"triggers automation"| AE
    AE -->|"deploys"| CORE
    AE -->|"deploys"| ROUTER
    AE -->|"deploys"| SRIOV
    AE -->|"deploys"| UPF
    AE ---|"requires"| K8S

    %% Click Events
    click AE "https://github.com/opennetworkinglab/aether-5gc/blob/master/ansible.cfg"
    click CORE "https://github.com/opennetworkinglab/aether-5gc/tree/master/roles/core"
    click ROUTER "https://github.com/opennetworkinglab/aether-5gc/tree/master/roles/router"
    click SRIOV "https://github.com/opennetworkinglab/aether-5gc/tree/master/roles/sriov"
    click UPF "https://github.com/opennetworkinglab/aether-5gc/tree/master/roles/upf"
    click CA "https://github.com/opennetworkinglab/aether-5gc/blob/master/vars/main.yml"
    click MC "https://github.com/opennetworkinglab/aether-5gc/tree/master/Makefile"

    %% Styles
    classDef config fill:#e0f7da,stroke:#388e3c,stroke-width:2px
    classDef orchestrator fill:#bbdefb,stroke:#1976d2,stroke-width:2px
    classDef role fill:#ffe082,stroke:#f57f17,stroke-width:2px
    classDef external fill:#f8bbd0,stroke:#c2185b,stroke-width:2px
```
