Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • oai-cn5g-udr oai-cn5g-udr
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 1
    • Issues 1
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • Deployments
    • Deployments
    • Releases
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
Collapse sidebar
  • oai
  • cn5g
  • oai-cn5g-udroai-cn5g-udr
  • Wiki
  • Installation

Installation · Changes

Page history
Create Installation authored Jun 24, 2021 by Tien-Thinh Nguyen's avatar Tien-Thinh Nguyen
Hide whitespace changes
Inline Side-by-side
Installation.md 0 → 100644
View page @ 1667493a
# UDR Installation
Tested and validated on Ubuntu Bionic arch amd64.
We highly recommend that you use the stable branch, `develop`, to avoid any potential issues.
## Download OAI UDR source code
```
ubuntu@test-udr:~$ git clone https://gitlab.eurecom.fr/oai/oai-cn5g-udr.git -b develop
```
## Install UDR
### Install UDR software dependencies
> - [Spdlog](https://github.com/gabime/spdlog)
> - [Pistache](http://pistache.io/)
> - [Nlohmann Json](https://github.com/nlohmann/json)
```
ubuntu@test-udr:~$ cd oai-cn5g-udr/
ubuntu@test-udr:~/oai-cn5g-udr$ cd ./build/scripts
ubuntu@test-udr:~/oai-cn5g-udr/build/scripts$ ./build_udr -I -f
```
### Build UDR
As a starting point, you can start with a Debug build, then you can change the build type
Check build types with `./build_udr -h`
```
ubuntu@test-udr:~/oai-cn5g-udr/build/scripts$ ./build_udr -c -V -b Debug -j
```
## UDR Configuration
**Create UDR configuration files**
Update the information in `build/scripts/udr_conf` according to your configuration and generate the configuration file for UDR:
```
# prompt has been removed for easier Ctrl+C Ctrl+V
# please update the following information according to your configuration
INSTANCE=1
PREFIX='/usr/local/etc/oai'
sudo mkdir -m 0777 -p $PREFIX
cp ../../etc/udr.conf $PREFIX
declare -A UDR_CONF
SF_CONF[@INSTANCE@]=$INSTANCE
UDR_CONF[@PID_DIRECTORY@]='/var/run'
UDR_CONF[@UDR_INTERFACE_NAME_FOR_NUDR@]='eth0'
UDR_CONF[@UDR_INTERFACE_PORT_FOR_NUDR@]='80'
UDR_CONF[@UDR_INTERFACE_HTTP2_PORT_FOR_NUDR@]='8080'
UDR_CONF[@UDR_API_VERSION@]='v1'
UDR_CONF[@MYSQL_IPV4_ADDRESS@]='172.16.1.103'
UDR_CONF[@MYSQL_USER@]='root'
UDR_CONF[@MYSQL_PASS@]='linux'
UDR_CONF[@MYSQL_DB@]='oai_db'
for K in "${!UDR_CONF[@]}"; do
egrep -lRZ "$K" $PREFIX | xargs -0 -l sed -i -e "s|$K|${UDR_CONF[$K]}|g"
ret=$?;[[ ret -ne 0 ]] && echo "Tried to replace $K with ${UDR_CONF[$K]}"
done
```
Then execute the following command to generate the corresponding configuration file for UDR (`/usr/local/etc/oai/udr.conf`):
```
ubuntu@test-udr:~/oai-cn5g-udr/build/scripts$ ./udr_conf.sh
```
**An example for the configuration file**
More detailed explanation for the UDR configuration is available in the section [UDR configuration](udr_configuration)
# Launch UDR
After that, you can launch UDR by executing the following command
```
ubuntu@test-udr:~/oai-cn5g-udr/build/scripts$ sudo udr -c /usr/local/etc/oai/udr.conf -o
```
Clone repository
  • Installation
  • Testing and Validation
  • Home
  • udr_configuration