Skip to content

LTTNG Tracepoints for AMF

Raphael Defosseux requested to merge amf-lttng-integration into develop

@anuragta

I am opening a merge request on your branch.

I just want to see the impact on CI.

Update Mar-11

common-src: https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-common-src/-/tree/lttng-integration

associated MR: oai-cn5g-common-src!43 (merged)

Sample docker-compose.yaml file

version: '3.8'
services:
    mysql:
        container_name: "mysql"
        image: mysql:8.0
        volumes:
            - ./database/oai_db2.sql:/docker-entrypoint-initdb.d/oai_db.sql
            - ./healthscripts/mysql-healthcheck2.sh:/tmp/mysql-healthcheck.sh
        environment:
            - TZ=Europe/Paris
            - MYSQL_DATABASE=oai_db
            - MYSQL_USER=test
            - MYSQL_PASSWORD=test
            - MYSQL_ROOT_PASSWORD=linux
        healthcheck:
            test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
            interval: 10s
            timeout: 5s
            retries: 30
        networks:
            public_net:
                ipv4_address: 192.168.70.131
    oai-udr:
        container_name: "oai-udr"
        image: registry.gitlab.com/firecell/r-d/firecellrd/oai-udr:lttng
        expose:
            - 80/tcp
            - 8080/tcp
            - 5342                                                                                               
            - 5343 
            - 5344              
        volumes:
            - ./conf/basic_nrf_config.yaml:/openair-udr/etc/config.yaml
            - /home/firecell/.lttng:/var/run/lttng
        environment:
            - TZ=Europe/Paris
        depends_on:
            - mysql
            - oai-nrf
        networks:
            public_net:
                ipv4_address: 192.168.70.136
    oai-udm:
        container_name: "oai-udm"
        image: registry.gitlab.com/firecell/r-d/firecellrd/oai-udm:lttng
        expose:
            - 80/tcp
            - 8080/tcp
            - 5342                                                                                               
            - 5343 
            - 5344              
        volumes:
            - ./conf/basic_nrf_config.yaml:/openair-udm/etc/config.yaml
            - /home/firecell/.lttng:/var/run/lttng
        environment:
            - TZ=Europe/Paris
        depends_on:
            - oai-udr
        networks:
            public_net:
                ipv4_address: 192.168.70.137
    oai-ausf:
        container_name: "oai-ausf"
        image: registry.gitlab.com/firecell/r-d/firecellrd/oai-ausf:lttng
        expose:
            - 80/tcp
            - 8080/tcp
            - 5342                                                                                               
            - 5343 
            - 5344              
        volumes:
            - ./conf/basic_nrf_config.yaml:/openair-ausf/etc/config.yaml
            - /home/firecell/.lttng:/var/run/lttng
        environment:
            - TZ=Europe/Paris
        depends_on:
            - oai-udm
        networks:
            public_net:
                ipv4_address: 192.168.70.138
    oai-nrf:
        container_name: "oai-nrf"
        image: registry.gitlab.com/firecell/r-d/firecellrd/oai-nrf:lttng
        expose:
            - 80/tcp
            - 8080/tcp
            - 5342                                                                                               
            - 5343 
            - 5344              
        volumes:
            - ./conf/basic_nrf_config.yaml:/openair-nrf/etc/config.yaml
            - /home/firecell/.lttng:/var/run/lttng
        environment:
            - TZ=Europe/Paris
        networks:
            public_net:
                ipv4_address: 192.168.70.130
    oai-amf:
        container_name: "oai-amf"
        image: registry.gitlab.com/firecell/r-d/firecellrd/oai-amf:lttng
        expose:
            - 80/tcp
            - 8080/tcp
            - 38412/sctp
            - 5342                                                                                               
            - 5343 
            - 5344              
        volumes:
            - ./conf/basic_nrf_config.yaml:/openair-amf/etc/config.yaml
            - /home/firecell/.lttng:/var/run/lttng
        environment:
            - TZ=Europe/Paris
        depends_on:
            - mysql
            - oai-nrf
            - oai-ausf
        networks:
            public_net:
                ipv4_address: 192.168.70.132
    oai-smf:
        container_name: "oai-smf"
        image: registry.gitlab.com/firecell/r-d/firecellrd/oai-smf:lttng
        expose:
            - 80/tcp
            - 8080/tcp
            - 8805/udp
            - 5342
            - 5343
            - 5344              
        volumes:
            - ./conf/basic_nrf_config.yaml:/openair-smf/etc/config.yaml
            - /home/firecell/.lttng:/var/run/lttng
        environment:
            - TZ=Europe/Paris
        depends_on:
            - oai-nrf
            - oai-amf
        networks:
            public_net:
                ipv4_address: 192.168.70.133
    oai-spgwu:
        container_name: "oai-spgwu"
        image: registry.gitlab.com/firecell/r-d/firecellrd/oai-spgwu-tiny:lttng
        expose:
            - 2152/udp
            - 8805/udp
            - 8080/tcp
            - 5342
            - 5343
            - 5344              
        # TODO: oai-spgwu-tiny will not support the new common yaml config file feature
        #       waiting for the new oai-upf NF
        volumes:
            - /home/firecell/.lttng:/var/run/lttng
        environment:
            - TZ=Europe/Paris
            - SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
            - SGW_INTERFACE_NAME_FOR_SX=eth0
            - PGW_INTERFACE_NAME_FOR_SGI=eth0
            - NETWORK_UE_NAT_OPTION=yes
            - NETWORK_UE_IP=12.1.1.0/24
            - ENABLE_5G_FEATURES=yes
            - REGISTER_NRF=yes
            - USE_FQDN_NRF=yes
            - UPF_FQDN_5G=oai-spgwu
            - NRF_IPV4_ADDRESS=192.168.70.130
            - NRF_FQDN=oai-nrf
            # Mandatory to set the NRF PORT to 8080 (it is set to default to 80 otherwise)
            - HTTP_VERSION=1
            - NRF_PORT=8080
            # Slice 0 (1, 0xFFFFFF)
            - NSSAI_SST_0=1
            - NSSAI_SD_0=1
            - DNN_0=oai
            # Slice 1 (1, 1)
            - NSSAI_SST_1=1
            - NSSAI_SD_1=1
            - DNN_1=oai.ipv4
            # Slice 2 (222, 123)
            - NSSAI_SST_2=222
            - NSSAI_SD_2=123
            - DNN_2=default
            - LTTNG=enable
        depends_on:
            - oai-nrf
            - oai-smf
        cap_add:
            - NET_ADMIN
            - SYS_ADMIN
        cap_drop:
            - ALL
        privileged: true
        networks:
            public_net:
                ipv4_address: 192.168.70.134
    oai-ext-dn:
        privileged: true
        init: true
        container_name: oai-ext-dn
        image: registry.gitlab.com/firecell/r-d/firecellrd/trf-gen-cn5g:latest
        entrypoint: /bin/bash -c \
              "ip route add 12.1.1.0/24 via 192.168.70.134 dev eth0; ip route; sleep infinity"
        command: ["/bin/bash", "-c", "trap : SIGTERM SIGINT; sleep infinity & wait"]
        healthcheck:
            test: /bin/bash -c "ip r | grep 12.1.1"
            interval: 10s
            timeout: 5s
            retries: 5
        networks:
            public_net:
                ipv4_address: 192.168.70.135

    firecell_agent:
        image: registry.gitlab.com/firecell/r-d/firecellrd/cn-agent:v2.1.1.7
        container_name: cn-agent
        volumes:
        - /var/run/docker.sock:/var/run/docker.sock
        environment:
        - DOCKER_HOST=unix:///var/run/docker.sock
        networks:
            public_net:
                ipv4_address: 192.168.70.139
        working_dir: /agent/src/cn-agent/src
        entrypoint: ["flask", "run", "--host", "192.168.70.139", "--port", "80"]  

networks:
    # public_net:
    #     external:
    #         name: oaicore-public-net
    public_net:
        driver: bridge
        name: oaicore-public-net
        ipam:
            config:
                - subnet: 192.168.70.128/26
        driver_opts:
            com.docker.network.bridge.name: "oaicore"

Add the below for setting lttng as the logger (inside the yaml file for configuration)

lttng:
  active: true

example:

:37
############# Common configuration
lttng:
  active: true
# Log level for all the NFs
log_level:
  general: debug

# If you enable registration, the other NFs will use the NRF discovery mechanism
register_nf:
  general: yes

http_version: 1
Edited by Raphael Defosseux

Merge request reports

Loading