docker-compose.yaml 8.08 KB
Newer Older
1 2 3 4
version: '3.8'
services:
    oai-nrf:
        container_name: "rfsim5g-oai-nrf"
5
        image: oaisoftwarealliance/oai-nrf:v1.5.0
6 7
        environment:
            - NRF_INTERFACE_NAME_FOR_SBI=eth0
8
            - TZ=Europe/Paris
9 10 11 12 13
        networks:
            public_net:
                ipv4_address: 192.168.71.130
    mysql:
        container_name: "rfsim5g-mysql"
14
        image: mysql:8.0
15 16 17 18 19 20 21 22 23 24 25 26 27
        volumes:
            - ./oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
            - ./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
28
            retries: 30
29 30 31 32 33
        networks:
            public_net:
                ipv4_address: 192.168.71.131
    oai-amf:
        container_name: "rfsim5g-oai-amf"
34
        image: oaisoftwarealliance/oai-amf:v1.5.0
35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
        environment:
            - TZ=Europe/paris
            - MCC=208
            - MNC=99
            - REGION_ID=128
            - AMF_SET_ID=1
            - SERVED_GUAMI_MCC_0=208
            - SERVED_GUAMI_MNC_0=99
            - SERVED_GUAMI_REGION_ID_0=128
            - SERVED_GUAMI_AMF_SET_ID_0=1
            - SERVED_GUAMI_MCC_1=460
            - SERVED_GUAMI_MNC_1=11
            - SERVED_GUAMI_REGION_ID_1=10
            - SERVED_GUAMI_AMF_SET_ID_1=1
            - PLMN_SUPPORT_MCC=208
            - PLMN_SUPPORT_MNC=99
            - PLMN_SUPPORT_TAC=0x0001
52
            # Only one slice is defined (1, 0xFFFFFF).
53 54 55
            - SST_0=1
            - AMF_INTERFACE_NAME_FOR_NGAP=eth0
            - AMF_INTERFACE_NAME_FOR_N11=eth0
56
            # One single SMF instance
57 58
            - SMF_INSTANCE_ID_0=1
            - SMF_FQDN_0=oai-smf
59
            - SMF_IPV4_ADDR_0=192.168.71.133
60
            - SELECTED_0=true
61
            # mysql definition in AMF is mandatory in mini deployment.
62 63 64 65
            - MYSQL_SERVER=192.168.71.131
            - MYSQL_USER=root
            - MYSQL_PASS=linux
            - MYSQL_DB=oai_db
66
            # NF registration
67
            - NRF_IPV4_ADDRESS=192.168.71.130
68
            - NRF_FQDN=oai-nrf
69 70 71
            - NF_REGISTRATION=yes
            - SMF_SELECTION=yes
            - USE_FQDN_DNS=yes
72
            - USE_HTTP2=no
73 74
        depends_on:
            - oai-nrf
75
            - mysql
76 77 78 79 80
        networks:
            public_net:
                ipv4_address: 192.168.71.132
    oai-smf:
        container_name: "rfsim5g-oai-smf"
81
        image: oaisoftwarealliance/oai-smf:v1.5.0
82 83 84 85
        environment:
            - TZ=Europe/Paris
            - SMF_INTERFACE_NAME_FOR_N4=eth0
            - SMF_INTERFACE_NAME_FOR_SBI=eth0
86
            - DEFAULT_DNS_IPV4_ADDRESS=172.21.3.100
87
            - DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4
88
            - AMF_IPV4_ADDRESS=192.168.71.132
89 90 91 92 93 94 95 96
            - AMF_FQDN=oai-amf
            - UPF_IPV4_ADDRESS=192.168.71.134
            - UPF_FQDN_0=oai-spgwu
            - NRF_IPV4_ADDRESS=192.168.71.130
            - NRF_FQDN=oai-nrf
            - REGISTER_NRF=yes
            - DISCOVER_UPF=yes
            - USE_FQDN_DNS=yes
97 98 99
            - USE_LOCAL_SUBSCRIPTION_INFO=yes
            - UE_MTU=1500
            # Only one slice is defined (1, 0xFFFFFF)
100
            - DNN_NI0=oai
101 102 103 104 105
            - TYPE0=IPv4
            - DNN_RANGE0=12.1.1.2 - 12.1.1.127
            - NSSAI_SST0=1
            - SESSION_AMBR_UL0=200Mbps
            - SESSION_AMBR_DL0=400Mbps
106 107
            - DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1
            - ENABLE_USAGE_REPORTING=no
108 109
        depends_on:
            - oai-nrf
110
            - oai-amf
111 112 113 114 115
        networks:
            public_net:
                ipv4_address: 192.168.71.133
    oai-spgwu:
        container_name: "rfsim5g-oai-spgwu"
116
        image: oaisoftwarealliance/oai-spgwu-tiny:v1.5.0
117 118 119 120 121 122 123 124 125 126 127 128 129
        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.71.130
            - NRF_FQDN=oai-nrf
130
            # Only one slice is defined (1, 0xFFFFFF)
131
            - NSSAI_SST_0=1
132
            - NSSAI_SD_0=0xffffff
133 134 135
            - DNN_0=oai
        depends_on:
            - oai-nrf
136
            - oai-smf
137 138 139 140 141 142 143 144 145 146 147 148 149 150
        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: rfsim5g-oai-ext-dn
151
        image: oaisoftwarealliance/trf-gen-cn5g:focal
152 153 154 155 156 157 158 159 160 161 162 163 164 165
        entrypoint: /bin/bash -c \
              "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE;"\
              "ip route add 12.1.1.0/24 via 192.168.72.134 dev eth0; sleep infinity"
        depends_on:
            - oai-spgwu
        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:
166
        image: oaisoftwarealliance/oai-gnb:develop
167 168
        privileged: true
        container_name: rfsim5g-oai-gnb
169
        environment:
170
            RFSIMULATOR: server
171
            USE_VOLUMED_CONF: 'yes'
172
            USE_ADDITIONAL_OPTIONS: --sa -E --rfsim --log_config.global_log_options level,nocolor,time
173 174 175 176
        depends_on:
            - oai-ext-dn
        networks:
            public_net:
177
                ipv4_address: 192.168.71.140
178 179
        volumes:
            - ../../conf_files/gnb.sa.band78.106prb.rfsim.conf:/opt/oai-gnb/etc/mounted.conf
180 181 182 183 184 185
        healthcheck:
            test: /bin/bash -c "pgrep nr-softmodem"
            interval: 10s
            timeout: 5s
            retries: 5
    oai-nr-ue:
186
        image: oaisoftwarealliance/oai-nr-ue:develop
187 188 189
        privileged: true
        container_name: rfsim5g-oai-nr-ue
        environment: 
190
            RFSIMULATOR: 192.168.71.140
191 192
            USE_VOLUMED_CONF: 'yes'
            USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001100 -C 3619200000 --log_config.global_log_options level,nocolor,time
193 194 195 196
        depends_on:
            - oai-gnb
        networks:
            public_net:
197
                ipv4_address: 192.168.71.150
198 199
        volumes:
            - ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/mounted.conf
200 201 202 203 204 205
        healthcheck:
            test: /bin/bash -c "pgrep nr-uesoftmodem"
            interval: 10s
            timeout: 5s
            retries: 5

206
    oai-nr-ue2:
207
        image: oaisoftwarealliance/oai-nr-ue:develop
208 209 210 211
        privileged: true
        container_name: rfsim5g-oai-nr-ue2
        environment: 
            RFSIMULATOR: 192.168.71.140
212 213
            USE_VOLUMED_CONF: 'yes'
            USE_ADDITIONAL_OPTIONS: -E --sa --rfsim -r 106 --numerology 1 --uicc0.imsi 208990100001101 -C 3619200000 --log_config.global_log_options level,nocolor,time
214 215 216 217 218
        depends_on:
            - oai-gnb
        networks:
            public_net:
                ipv4_address: 192.168.71.151
219 220
        volumes:
            - ../../conf_files/nrue.uicc.conf:/opt/oai-nr-ue/etc/mounted.conf
221 222 223 224 225 226
        healthcheck:
            test: /bin/bash -c "pgrep nr-uesoftmodem"
            interval: 10s
            timeout: 5s
            retries: 5

227 228 229 230 231 232 233 234 235 236 237
networks:
    public_net:
        driver: bridge
        name: rfsim5g-oai-public-net
        ipam:
            config:
                - subnet: 192.168.71.128/26
        driver_opts:
            com.docker.network.bridge.name: "rfsim5g-public"
    traffic_net:
        driver: bridge
238
        name: rfsim5g-oai-traffic-net
239 240 241 242 243
        ipam:
            config:
                - subnet: 192.168.72.128/26
        driver_opts:
            com.docker.network.bridge.name: "rfsim5g-traffic"