docker-compose.yaml 5.09 KB
Newer Older
1 2 3 4
version: '3.8'
services:
    mysql:
        container_name: "l2sim-mysql"
5
        image: mysql:8.0
6 7 8 9 10 11 12 13 14 15 16 17 18
        volumes:
            - ../5g_rfsimulator/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
            - ../5g_rfsimulator/mysql-healthcheck.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
19
            retries: 30
20 21 22 23 24
        networks:
            public_net:
                ipv4_address: 192.168.71.131
    oai-amf:
        container_name: "l2sim-oai-amf"
25
        image: oaisoftwarealliance/oai-amf:v2.0.0
26 27
        environment:
            - TZ=Europe/paris
28 29
        volumes:
            - ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-amf/etc/config.yaml
30 31 32 33 34 35 36
        depends_on:
            - mysql
        networks:
            public_net:
                ipv4_address: 192.168.71.132
    oai-smf:
        container_name: "l2sim-oai-smf"
37
        image: oaisoftwarealliance/oai-smf:v2.0.0
38 39
        environment:
            - TZ=Europe/Paris
40 41
        volumes:
            - ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-smf/etc/config.yaml
42 43 44 45 46
        depends_on:
            - oai-amf
        networks:
            public_net:
                ipv4_address: 192.168.71.133
47 48 49
    oai-upf:
        container_name: "l2sim-oai-upf"
        image: oaisoftwarealliance/oai-upf:v2.0.0
50 51
        environment:
            - TZ=Europe/Paris
52 53
        volumes:
            - ../5g_rfsimulator/mini_nonrf_config.yaml:/openair-upf/etc/config.yaml
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69
        depends_on:
            - oai-smf
        cap_add:
            - NET_ADMIN
            - SYS_ADMIN
        cap_drop:
            - ALL
        privileged: true
        networks:
            public_net:
                ipv4_address: 192.168.71.134
            traffic_net:
                ipv4_address: 192.168.72.134
    oai-ext-dn:
        privileged: true
        container_name: "l2sim-oai-ext-dn"
70
        image: oaisoftwarealliance/trf-gen-cn5g:focal
71
        entrypoint: /bin/bash -c \
72
              "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
73 74
              "ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
        depends_on:
75
            - oai-upf
76 77 78 79 80 81 82 83 84
        networks:
            traffic_net:
                ipv4_address: 192.168.72.135
        healthcheck:
            test: /bin/bash -c "ping -c 2 192.168.72.134"
            interval: 10s
            timeout: 5s
            retries: 5
    oai-gnb:
85
        image: oaisoftwarealliance/oai-gnb:develop
86 87 88 89 90
        privileged: true
        container_name: "l2sim-oai-gnb"
        network_mode: "host"
        environment:
            TZ: Europe/Paris
91
            USE_ADDITIONAL_OPTIONS: --sa --nfapi VNF --emulate-l1 --log_config.global_log_options level,time,thread_id,nocolor
92
            ASAN_OPTIONS: detect_leaks=0
93
        depends_on:
94
            - oai-upf
95
            - oai-amf
96
        volumes:
97
            - ../../conf_files/gnb.sa.band78.106prb.l2sim.conf:/opt/oai-gnb/etc/gnb.conf
98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120
        healthcheck:
            test: /bin/bash -c "pgrep nr-softmodem"
            interval: 10s
            timeout: 5s
            retries: 5

    proxy:
        image: oai-lte-multi-ue-proxy:latest
        privileged: true
        container_name: "l2sim-proxy"
        network_mode: "host"
        environment:
            TZ: Europe/Paris
        command: "/oai-lte-multi-ue-proxy/bin/proxy 1 --nr"
        depends_on:
            - oai-gnb
        healthcheck:
            test: /bin/bash -c "pgrep proxy"
            interval: 10s
            timeout: 5s
            retries: 5

    oai-nr-ue0:
121
        image: oaisoftwarealliance/oai-nr-ue:develop
122 123 124 125 126 127
        privileged: true
        container_name: "l2sim-oai-nr-ue0"
        network_mode: "host"
        environment:
            TZ: Europe/Paris
            OPENAIR_DIR: /opt/oai-nr-ue
128
            USE_ADDITIONAL_OPTIONS: --nfapi STANDALONE_PNF --node-number 2 --sa --emulate-l1 --log_config.global_log_options level,time,thread_id,nocolor
129
            ASAN_OPTIONS: detect_leaks=0
130
        volumes:
131
            - ../../conf_files/nrue.band78.106prb.l2sim.conf:/opt/oai-nr-ue/etc/nr-ue.conf
132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158
            - ../../../openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results:/opt/oai-nr-ue/openair1/SIMULATION/LTE_PHY/BLER_SIMULATIONS/AWGN/AWGN_results
        depends_on:
            - oai-gnb
            - proxy
        healthcheck:
            test: /bin/bash -c "pgrep nr-uesoftmodem"
            interval: 10s
            timeout: 5s
            retries: 5

networks:
    public_net:
        driver: bridge
        name: l2sim-oai-public-net
        ipam:
            config:
                - subnet: 192.168.71.128/26
        driver_opts:
            com.docker.network.bridge.name: "l2sim-public"
    traffic_net:
        driver: bridge
        name: l2sim-oai-traffic-net
        ipam:
            config:
                - subnet: 192.168.72.128/26
        driver_opts:
            com.docker.network.bridge.name: "l2sim-traffic"