... | ... | @@ -40,11 +40,53 @@ ubuntu@test-smf:~/oai-cn5g-smf/build/scripts$ ./build_smf -c -V -b Debug -j |
|
|
|
|
|
Update the information in `build/scripts/smf_conf` according to your configuration and generate the configuration file for SMF (`build/scripts/smf_local_conf.sh` should be used when you want to deploy the [deployment example](https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-smf/-/wikis/deployment_example) for all-in-one mode):
|
|
|
|
|
|
|
|
|
```
|
|
|
# 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/smf.conf $PREFIX
|
|
|
|
|
|
declare -A SMF_CONF
|
|
|
|
|
|
SMF_CONF[@INSTANCE@]=$INSTANCE
|
|
|
SMF_CONF[@PREFIX@]=$PREFIX
|
|
|
SMF_CONF[@PID_DIRECTORY@]='/var/run'
|
|
|
|
|
|
SMF_CONF[@SMF_INTERFACE_NAME_FOR_N4@]='eno1:sn4'
|
|
|
SMF_CONF[@SMF_INTERFACE_NAME_FOR_SBI@]='eno1:smf'
|
|
|
|
|
|
SMF_CONF[@SMF_INTERFACE_PORT_FOR_SBI@]='80'
|
|
|
SMF_CONF[@SMF_INTERFACE_HTTP2_PORT_FOR_SBI@]='9090'
|
|
|
|
|
|
SMF_CONF[@UDM_IPV4_ADDRESS@]='172.16.1.103'
|
|
|
SMF_CONF[@UDM_PORT@]='80'
|
|
|
|
|
|
SMF_CONF[@AMF_IPV4_ADDRESS@]='172.16.1.102'
|
|
|
SMF_CONF[@AMF_PORT@]='80'
|
|
|
|
|
|
SMF_CONF[@UPF_IPV4_ADDRESS@]='172.16.2.102'
|
|
|
|
|
|
SMF_CONF[@DEFAULT_DNS_IPV4_ADDRESS@]='8.8.8.8'
|
|
|
SMF_CONF[@DEFAULT_DNS_SEC_IPV4_ADDRESS@]='4.4.4.4'
|
|
|
|
|
|
for K in "${!SMF_CONF[@]}"; do
|
|
|
egrep -lRZ "$K" $PREFIX | xargs -0 -l sed -i -e "s|$K|${SMF_CONF[$K]}|g"
|
|
|
ret=$?;[[ ret -ne 0 ]] && echo "Tried to replace $K with ${SMF_CONF[$K]}"
|
|
|
done
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
Then execute the following command to generate the corresponding configuration file for SMF (`/usr/local/etc/oai/smf.conf`):
|
|
|
```
|
|
|
ubuntu@test-smf:~/oai-cn5g-smf/build/scripts$ ./smf_conf.sh
|
|
|
```
|
|
|
|
|
|
**Configuration example**
|
|
|
**An example for the configuration file**
|
|
|
|
|
|
More detailed explanation for the SMF configuration is available in the section [SMF configuration](smf_configuration)
|
|
|
|
... | ... | |