Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
OpenXG-SMF
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
OpenXG
OpenXG-SMF
Commits
133850c1
Commit
133850c1
authored
Sep 02, 2020
by
Tien-Thinh Nguyen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update script to create conf file for 2 modes: all-in-one and standalone
parent
6730a20b
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
11 deletions
+46
-11
build/scripts/smf_conf.sh
build/scripts/smf_conf.sh
+5
-11
build/scripts/smf_local_conf.sh
build/scripts/smf_local_conf.sh
+41
-0
No files found.
build/scripts/smf_conf.sh
View file @
133850c1
# prompt has been removed for easier Ctrl+C Ctrl+V
sudo
ifconfig eno1:smf 172.16.1.101 up
# SMF
sudo
ifconfig eno1:amf 172.16.1.102 up
# AMF
sudo
ifconfig eno1:udm 172.16.1.103 up
# UDM
sudo
ifconfig eno1:sn4 172.16.2.101 up
# SMF N4 interface
sudo
ifconfig eno1:un4 172.16.2.102 up
# UPF N4 interface
# please update the following information according to your configuration
INSTANCE
=
1
PREFIX
=
'/usr/local/etc/oai'
...
...
@@ -17,20 +12,19 @@ SMF_CONF[@INSTANCE@]=$INSTANCE
SMF_CONF[@PREFIX@]
=
$PREFIX
SMF_CONF[@PID_DIRECTORY@]
=
'/var/run'
SMF_CONF[@SMF_INTERFACE_NAME_FOR_N4@]
=
'en
o1:sn4
'
SMF_CONF[@SMF_INTERFACE_NAME_FOR_SBI@]
=
'en
o1:smf
'
SMF_CONF[@SMF_INTERFACE_NAME_FOR_N4@]
=
'en
s3
'
SMF_CONF[@SMF_INTERFACE_NAME_FOR_SBI@]
=
'en
s3
'
SMF_CONF[@SMF_INTERFACE_IPV4_ADDRESS_FOR_SBI@]
=
'172.16.1.101'
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@]
=
'1
72.16.1.102
'
SMF_CONF[@AMF_IPV4_ADDRESS@]
=
'1
92.168.122.183
'
SMF_CONF[@AMF_PORT@]
=
'80'
SMF_CONF[@UPF_IPV4_ADDRESS@]
=
'1
72.16.2.102
'
SMF_CONF[@UPF_IPV4_ADDRESS@]
=
'1
92.168.122.151
'
SMF_CONF[@DEFAULT_DNS_IPV4_ADDRESS@]
=
'8.8.8.8'
SMF_CONF[@DEFAULT_DNS_SEC_IPV4_ADDRESS@]
=
'4.4.4.4'
...
...
build/scripts/smf_local_conf.sh
0 → 100755
View file @
133850c1
# prompt has been removed for easier Ctrl+C Ctrl+V
sudo
ifconfig eno1:smf 172.16.1.101 up
# SMF
sudo
ifconfig eno1:amf 172.16.1.102 up
# AMF
sudo
ifconfig eno1:udm 172.16.1.103 up
# UDM
sudo
ifconfig eno1:sn4 172.16.2.101 up
# SMF N4 interface
sudo
ifconfig eno1:un4 172.16.2.102 up
# UPF N4 interface
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_IPV4_ADDRESS_FOR_SBI@]
=
'172.16.1.101'
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment