README update

This commit is contained in:
herlesupreeth
2023-08-05 22:13:57 +02:00
parent 7752d8efdd
commit f7dc1ccd33
2 changed files with 42 additions and 513 deletions

View File

@@ -1,24 +1,35 @@
# docker_open5gs
Docker files to build and run open5gs in a docker
Quite contrary to the name of the repository, this repository contains docker files to deploy an Over-The-Air (OTA) or RF simulated 4G/5G network using following projects:
- Core Network (4G/5G) - open5gs - https://github.com/open5gs/open5gs
- IMS (Only 4G supported i.e. VoLTE) - kamailio
- IMS HSS - https://github.com/nickvsnetworking/pyhss
- Osmocom HLR - https://github.com/osmocom/osmo-hlr
- Osmocom MSC - https://github.com/osmocom/osmo-msc
- srsRAN (4G/5G) - https://github.com/srsran/srsRAN
- UERANSIM (5G) - https://github.com/aligungr/UERANSIM
## Tested Setup
Docker host machine
- Ubuntu 18.04 and 20.04 or 22.04
- Ubuntu 20.04 or 22.04
SDRs tested with srsLTE eNB
Over-The-Air setups:
- Ettus USRP B210
- LimeSDR Mini v1.3
- srsRAN (eNB/gNB) using Ettus USRP B210
- srsRAN eNB using LimeSDR Mini v1.3
- srsRAN eNB using LimeSDR-USB
UERANSIM (gNB + UE) simulator
RF simulated setups:
- srsRAN (gNB + UE) simulation over ZMQ
- UERANSIM (gNB + UE) simulator
## Build and Execution Instructions
* Mandatory requirements:
* [docker-ce](https://docs.docker.com/install/linux/docker-ce/ubuntu)
* [docker-compose](https://docs.docker.com/compose)
* [docker-ce](https://docs.docker.com/install/linux/docker-ce/ubuntu) - Version 22.0.5 or above
* [docker-compose](https://docs.docker.com/compose) - Version 2.14 or above
Clone repository and build base docker image of open5gs, kamailio, ueransim
@@ -50,23 +61,25 @@ source .env
docker-compose build --no-cache
docker-compose up
# srsRAN eNB
docker-compose -f srsenb.yaml up -d && docker attach srsenb
# srsRAN gNB
docker-compose -f srsgnb.yaml up -d && docker attach srsgnb
# srsRAN ZMQ based setup
# eNB
docker-compose -f srsenb_zmq.yaml up -d && docker attach srsenb_zmq
# gNB
docker-compose -f srsgnb_zmq.yaml up -d && docker attach srsgnb_zmq
# 4G UE
docker-compose -f srsue_zmq.yaml up -d && docker attach srsue_zmq
# 5G UE
docker-compose -f srsue_5g_zmq.yaml up -d && docker attach srsue_5g_zmq
Over-The-Air setups:
# srsRAN eNB using SDR
docker-compose -f srsenb.yaml up -d && docker attach srsenb
# srsRAN gNB using SDR
docker-compose -f srsgnb.yaml up -d && docker attach srsgnb
RF simulated setups:
# srsRAN ZMQ eNB
docker-compose -f srsenb_zmq.yaml up -d && docker attach srsenb_zmq
# srsRAN ZMQ gNB
docker-compose -f srsgnb_zmq.yaml up -d && docker attach srsgnb_zmq
# srsRAN ZMQ 4G UE
docker-compose -f srsue_zmq.yaml up -d && docker attach srsue_zmq
# srsRAN ZMQ 5G UE
docker-compose -f srsue_5g_zmq.yaml up -d && docker attach srsue_5g_zmq
# UERANSIM gNB
docker-compose -f nr-gnb.yaml up -d && docker attach nr_gnb
# UERANSIM NR-UE
docker-compose -f nr-ue.yaml up -d && docker attach nr_ue
```
@@ -80,15 +93,15 @@ MCC
MNC
TEST_NETWORK --> Change this only if it clashes with the internal network at your home/office
DOCKER_HOST_IP --> This is the IP address of the host running your docker setup
SGWU_ADVERTISE_IP --> Change this to value of DOCKER_HOST_IP set above only if eNB/gNB is not running the same docker network/host
UPF_ADVERTISE_IP --> Change this to value of DOCKER_HOST_IP set above only if eNB/gNB is not running the same docker network/host
SGWU_ADVERTISE_IP --> Change this to value of DOCKER_HOST_IP set above only if eNB is not running the same docker network/host
UPF_ADVERTISE_IP --> Change this to value of DOCKER_HOST_IP set above only if gNB is not running the same docker network/host
UE_IPV4_INTERNET --> Change this to your desired (Not conflicted) UE network ip range for internet APN
UE_IPV4_IMS --> Change this to your desired (Not conflicted) UE network ip range for ims APN
```
If eNB/gNB is NOT running in the same docker network/host as the host running the dockerized Core/IMS then follow the below additional steps
Under mme section in docker compose file (docker-compose.yaml, nsa-deploy.yaml), uncomment the following part
Under mme section in docker compose file (**docker-compose.yaml**), uncomment the following part
```
...
# ports:
@@ -96,7 +109,7 @@ Under mme section in docker compose file (docker-compose.yaml, nsa-deploy.yaml),
...
```
Under amf section in docker compose file (docker-compose.yaml, nsa-deploy.yaml, sa-deploy.yaml), uncomment the following part
Under amf section in docker compose file (**docker-compose.yaml**, **sa-deploy.yaml**), uncomment the following part
```
...
# ports:
@@ -104,7 +117,7 @@ Under amf section in docker compose file (docker-compose.yaml, nsa-deploy.yaml,
...
```
If deploying in SA mode only (sa-deploy.yaml), then uncomment the following part under upf section
If deploying in 5G mode only (**sa-deploy.yaml**), then uncomment the following part under **upf** section
```
...
# ports:
@@ -112,7 +125,7 @@ If deploying in SA mode only (sa-deploy.yaml), then uncomment the following part
...
```
If deploying in NSA mode only (nsa-deploy.yaml, docker-compose.yaml), then uncomment the following part under sgwu section
If deploying in 4G mode only (**docker-compose.yaml**), then uncomment the following part under **sgwu** section
```
...
# ports:
@@ -120,7 +133,7 @@ If deploying in NSA mode only (nsa-deploy.yaml, docker-compose.yaml), then uncom
...
```
## Register a UE information
## Provisioning of UE information
Open (http://<DOCKER_HOST_IP>:3000) in a web browser, where <DOCKER_HOST_IP> is the IP of the machine/VM running the open5gs containers. Login with following credentials
```
@@ -130,16 +143,5 @@ Password : 1423
Using Web UI, add a subscriber
## srsLTE eNB settings
If SGWU_ADVERTISE_IP is properly set to the host running the SGWU container in NSA deployment, then the following static route is not required.
On the eNB, make sure to have the static route to SGWU container (since internal IP of the SGWU container is advertised in S1AP messages and UE wont find the core in Uplink)
```
# NSA - 4G5G Hybrid deployment
ip r add <SGWU_CONTAINER_IP> via <SGWU_ADVERTISE_IP>
```
## Not supported
- IPv6 usage in Docker

View File

@@ -1,473 +0,0 @@
version: '3'
services:
mongo:
image: mongo:6.0
container_name: mongo
command: --bind_ip 0.0.0.0
env_file:
- .env
volumes:
- mongodbdata:/data/db
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
expose:
- "27017/udp"
- "27017/tcp"
networks:
default:
ipv4_address: ${MONGO_IP}
webui:
image: docker_open5gs
container_name: webui
depends_on:
- mongo
env_file:
- .env
environment:
- COMPONENT_NAME=webui
volumes:
- ./webui:/mnt/webui
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
expose:
- "3000/tcp"
ports:
- "3000:3000/tcp"
networks:
default:
ipv4_address: ${WEBUI_IP}
nrf:
image: docker_open5gs
container_name: nrf
env_file:
- .env
environment:
- COMPONENT_NAME=nrf-1
volumes:
- ./nrf:/mnt/nrf
- ./log:/open5gs/install/var/log/open5gs
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
expose:
- "7777/tcp"
networks:
default:
ipv4_address: ${NRF_IP}
scp:
image: docker_open5gs
container_name: scp
env_file:
- .env
environment:
- COMPONENT_NAME=scp-1
volumes:
- ./scp:/mnt/scp
- ./log:/open5gs/install/var/log/open5gs
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
expose:
- "7777/tcp"
networks:
default:
ipv4_address: ${SCP_IP}
ausf:
image: docker_open5gs
depends_on:
- nrf
container_name: ausf
env_file:
- .env
environment:
- COMPONENT_NAME=ausf-1
volumes:
- ./ausf:/mnt/ausf
- ./log:/open5gs/install/var/log/open5gs
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
expose:
- "7777/tcp"
networks:
default:
ipv4_address: ${AUSF_IP}
udr:
image: docker_open5gs
depends_on:
- nrf
- scp
- mongo
container_name: udr
env_file:
- .env
environment:
- COMPONENT_NAME=udr-1
volumes:
- ./udr:/mnt/udr
- ./log:/open5gs/install/var/log/open5gs
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
expose:
- "7777/tcp"
networks:
default:
ipv4_address: ${UDR_IP}
udm:
image: docker_open5gs
depends_on:
- nrf
- scp
container_name: udm
env_file:
- .env
environment:
- COMPONENT_NAME=udm-1
volumes:
- ./udm:/mnt/udm
- ./log:/open5gs/install/var/log/open5gs
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
expose:
- "7777/tcp"
networks:
default:
ipv4_address: ${UDM_IP}
pcf:
image: docker_open5gs
depends_on:
- nrf
- scp
- mongo
container_name: pcf
env_file:
- .env
environment:
- COMPONENT_NAME=pcf-1
volumes:
- ./pcf:/mnt/pcf
- ./log:/open5gs/install/var/log/open5gs
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
expose:
- "7777/tcp"
- "9091/tcp"
networks:
default:
ipv4_address: ${PCF_IP}
bsf:
image: docker_open5gs
depends_on:
- nrf
- scp
- mongo
container_name: bsf
env_file:
- .env
environment:
- COMPONENT_NAME=bsf-1
volumes:
- ./bsf:/mnt/bsf
- ./log:/open5gs/install/var/log/open5gs
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
expose:
- "7777/tcp"
networks:
default:
ipv4_address: ${BSF_IP}
nssf:
image: docker_open5gs
depends_on:
- nrf
- scp
- mongo
container_name: nssf
env_file:
- .env
environment:
- COMPONENT_NAME=nssf-1
volumes:
- ./nssf:/mnt/nssf
- ./log:/open5gs/install/var/log/open5gs
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
expose:
- "7777/tcp"
networks:
default:
ipv4_address: ${NSSF_IP}
hss:
image: docker_open5gs
container_name: hss
env_file:
- .env
environment:
- COMPONENT_NAME=hss-1
volumes:
- ./hss:/mnt/hss
- ./log:/open5gs/install/var/log/open5gs
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
depends_on:
- mongo
expose:
- "3868/udp"
- "3868/tcp"
- "3868/sctp"
- "5868/udp"
- "5868/tcp"
- "5868/sctp"
networks:
default:
ipv4_address: ${HSS_IP}
sgwc:
image: docker_open5gs
depends_on:
- smf
- upf
container_name: sgwc
env_file:
- .env
environment:
- COMPONENT_NAME=sgwc-1
volumes:
- ./sgwc:/mnt/sgwc
- ./log:/open5gs/install/var/log/open5gs
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
expose:
- "2123/udp"
- "8805/udp"
networks:
default:
ipv4_address: ${SGWC_IP}
sgwu:
image: docker_open5gs
depends_on:
- smf
- upf
container_name: sgwu
env_file:
- .env
environment:
- COMPONENT_NAME=sgwu-1
volumes:
- ./sgwu:/mnt/sgwu
- ./log:/open5gs/install/var/log/open5gs
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
expose:
- "8805/udp"
- "2152/udp"
# ports:
# - "2152:2152/udp"
networks:
default:
ipv4_address: ${SGWU_IP}
smf:
image: docker_open5gs
depends_on:
- nrf
- scp
- amf
container_name: smf
env_file:
- .env
environment:
- COMPONENT_NAME=smf-1
volumes:
- ./smf:/mnt/smf
- ./log:/open5gs/install/var/log/open5gs
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
expose:
- "3868/udp"
- "3868/tcp"
- "3868/sctp"
- "5868/udp"
- "5868/tcp"
- "5868/sctp"
- "8805/udp"
- "2123/udp"
- "7777/tcp"
- "9091/tcp"
networks:
default:
ipv4_address: ${SMF_IP}
upf:
image: docker_open5gs
depends_on:
- nrf
- scp
- smf
container_name: upf
env_file:
- .env
environment:
- COMPONENT_NAME=upf-1
volumes:
- ./upf:/mnt/upf
- ./log:/open5gs/install/var/log/open5gs
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
expose:
- "2152/udp"
- "8805/udp"
- "9091/tcp"
# ports:
# - "2152:2152/udp"
cap_add:
- NET_ADMIN
privileged: true
sysctls:
- net.ipv4.ip_forward=1
#- net.ipv6.conf.all.disable_ipv6=0
networks:
default:
ipv4_address: ${UPF_IP}
amf:
image: docker_open5gs
depends_on:
- nrf
- scp
- ausf
- udm
- udr
- pcf
- bsf
container_name: amf
env_file:
- .env
environment:
- COMPONENT_NAME=amf-1
volumes:
- ./amf:/mnt/amf
- ./log:/open5gs/install/var/log/open5gs
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
expose:
- "38412/sctp"
- "7777/tcp"
- "9091/tcp"
# ports:
# - "38412:38412/sctp"
networks:
default:
ipv4_address: ${AMF_IP}
mme:
image: docker_open5gs
depends_on:
- hss
- sgwc
- sgwu
- smf
- upf
- osmomsc
container_name: mme
env_file:
- .env
environment:
- COMPONENT_NAME=mme-1
volumes:
- ./mme:/mnt/mme
- ./log:/open5gs/install/var/log/open5gs
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
expose:
- "3868/udp"
- "3868/tcp"
- "3868/sctp"
- "5868/udp"
- "5868/tcp"
- "5868/sctp"
- "36412/sctp"
- "2123/udp"
- "9091/tcp"
# ports:
# - "36412:36412/sctp"
networks:
default:
ipv4_address: ${MME_IP}
pcrf:
image: docker_open5gs
container_name: pcrf
env_file:
- .env
environment:
- COMPONENT_NAME=pcrf-1
depends_on:
- mongo
volumes:
- ./pcrf:/mnt/pcrf
- ./log:/open5gs/install/var/log/open5gs
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
expose:
- "3868/udp"
- "3868/tcp"
- "3868/sctp"
- "5868/udp"
- "5868/tcp"
- "5868/sctp"
networks:
default:
ipv4_address: ${PCRF_IP}
osmomsc:
build: ./osmomsc
image: docker_osmomsc
container_name: osmomsc
volumes:
- ./osmomsc:/mnt/osmomsc
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
environment:
- COMPONENT_NAME=osmomsc-1
depends_on:
- osmohlr
expose:
- "29118/sctp"
- "2775/tcp"
networks:
default:
ipv4_address: ${OSMOMSC_IP}
osmohlr:
build: ./osmohlr
image: docker_osmohlr
container_name: osmohlr
volumes:
- ./osmohlr:/mnt/osmohlr
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
env_file:
- .env
environment:
- COMPONENT_NAME=osmohlr-1
expose:
- "4222/tcp"
networks:
default:
ipv4_address: ${OSMOHLR_IP}
metrics:
build: ./metrics
image: docker_metrics
container_name: metrics
env_file:
- .env
volumes:
- ./metrics:/mnt/metrics
- /etc/timezone:/etc/timezone:ro
- /etc/localtime:/etc/localtime:ro
expose:
- "9090/tcp"
ports:
- "9090:9090/tcp"
networks:
default:
ipv4_address: ${METRICS_IP}
networks:
default:
ipam:
config:
- subnet: ${TEST_NETWORK}
volumes:
mongodbdata: {}