Add SCP to deployment

This commit is contained in:
herlesupreeth
2022-10-28 14:46:42 +02:00
parent cd5bf678b6
commit 99a92f13fe
26 changed files with 166 additions and 24 deletions

3
.env
View File

@@ -110,3 +110,6 @@ SMSC_IP=172.22.0.33
# SRSLTE UE
SRS_UE_IP=172.22.0.34
# SCP
SCP_IP=172.22.0.30

View File

@@ -34,8 +34,8 @@ amf:
full: Open5GS
amf_name: open5gs-amf0
nrf:
scp:
sbi:
- addr:
- NRF_IP
- SCP_IP
port: 7777

View File

@@ -28,7 +28,7 @@
cp /mnt/amf/amf.yaml install/etc/open5gs
sed -i 's|AMF_IP|'$AMF_IP'|g' install/etc/open5gs/amf.yaml
sed -i 's|NRF_IP|'$NRF_IP'|g' install/etc/open5gs/amf.yaml
sed -i 's|SCP_IP|'$SCP_IP'|g' install/etc/open5gs/amf.yaml
sed -i 's|MNC|'$MNC'|g' install/etc/open5gs/amf.yaml
sed -i 's|MCC|'$MCC'|g' install/etc/open5gs/amf.yaml

View File

@@ -8,8 +8,8 @@ ausf:
- addr: AUSF_IP
port: 7777
nrf:
scp:
sbi:
- addr:
- NRF_IP
- SCP_IP
port: 7777

View File

@@ -28,7 +28,7 @@
cp /mnt/ausf/ausf.yaml install/etc/open5gs
sed -i 's|AUSF_IP|'$AUSF_IP'|g' install/etc/open5gs/ausf.yaml
sed -i 's|NRF_IP|'$NRF_IP'|g' install/etc/open5gs/ausf.yaml
sed -i 's|SCP_IP|'$SCP_IP'|g' install/etc/open5gs/ausf.yaml
# Sync docker time
#ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

View File

@@ -64,7 +64,7 @@ RUN curl -fsSL https://deb.nodesource.com/setup_14.x | bash - && apt-get install
# Get open5gs code and install
RUN git clone --recursive https://github.com/open5gs/open5gs && cd open5gs && \
git checkout tags/v2.4.11 && meson build --prefix=`pwd`/install && \
git checkout main && meson build --prefix=`pwd`/install && \
ninja -C build && cd build && ninja install && \
mkdir -p /open5gs/install/include

View File

@@ -52,6 +52,10 @@ elif [[ "$COMPONENT_NAME" =~ ^(nrf-[[:digit:]]+$) ]]; then
echo "Deploying component: '$COMPONENT_NAME'"
/mnt/nrf/nrf_init.sh && \
cd install/bin && ./open5gs-nrfd
elif [[ "$COMPONENT_NAME" =~ ^(scp-[[:digit:]]+$) ]]; then
echo "Deploying component: '$COMPONENT_NAME'"
/mnt/scp/scp_init.sh && \
cd install/bin && ./open5gs-scpd
elif [[ "$COMPONENT_NAME" =~ ^(nssf-[[:digit:]]+$) ]]; then
echo "Deploying component: '$COMPONENT_NAME'"
/mnt/nssf/nssf_init.sh && \

View File

@@ -10,8 +10,8 @@ bsf:
- addr: BSF_IP
port: 7777
nrf:
scp:
sbi:
- addr:
- NRF_IP
- SCP_IP
port: 7777

View File

@@ -30,7 +30,7 @@ export DB_URI="mongodb://${MONGO_IP}/open5gs"
cp /mnt/bsf/bsf.yaml install/etc/open5gs
sed -i 's|BSF_IP|'$BSF_IP'|g' install/etc/open5gs/bsf.yaml
sed -i 's|NRF_IP|'$NRF_IP'|g' install/etc/open5gs/bsf.yaml
sed -i 's|SCP_IP|'$SCP_IP'|g' install/etc/open5gs/bsf.yaml
sed -i 's|MONGO_IP|'$MONGO_IP'|g' install/etc/open5gs/bsf.yaml
# Sync docker time

View File

@@ -54,10 +54,28 @@ services:
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
- scp
container_name: ausf
env_file:
- .env
@@ -77,6 +95,7 @@ services:
image: docker_open5gs
depends_on:
- nrf
- scp
- mongo
container_name: udr
env_file:
@@ -97,6 +116,7 @@ services:
image: docker_open5gs
depends_on:
- nrf
- scp
container_name: udm
env_file:
- .env
@@ -116,6 +136,7 @@ services:
image: docker_open5gs
depends_on:
- nrf
- scp
- mongo
container_name: pcf
env_file:
@@ -136,6 +157,7 @@ services:
image: docker_open5gs
depends_on:
- nrf
- scp
- mongo
container_name: bsf
env_file:
@@ -156,6 +178,7 @@ services:
image: docker_open5gs
depends_on:
- nrf
- scp
- mongo
container_name: nssf
env_file:
@@ -244,6 +267,7 @@ services:
image: docker_open5gs
depends_on:
- nrf
- scp
container_name: smf
env_file:
- .env
@@ -271,6 +295,7 @@ services:
image: docker_open5gs
depends_on:
- nrf
- scp
- smf
container_name: upf
env_file:
@@ -302,6 +327,7 @@ services:
- smf
- upf
- nrf
- scp
- ausf
- udm
- udr

View File

@@ -8,3 +8,9 @@ nrf:
addr:
- NRF_IP
port: 7777
scp:
sbi:
addr:
- SCP_IP
port: 7777

View File

@@ -28,6 +28,7 @@
cp /mnt/nrf/nrf.yaml install/etc/open5gs
sed -i 's|NRF_IP|'$NRF_IP'|g' install/etc/open5gs/nrf.yaml
sed -i 's|SCP_IP|'$SCP_IP'|g' install/etc/open5gs/nrf.yaml
# Sync docker time
#ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

View File

@@ -54,6 +54,23 @@ services:
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:
@@ -77,6 +94,7 @@ services:
image: docker_open5gs
depends_on:
- nrf
- scp
- mongo
container_name: udr
env_file:
@@ -97,6 +115,7 @@ services:
image: docker_open5gs
depends_on:
- nrf
- scp
container_name: udm
env_file:
- .env
@@ -116,6 +135,7 @@ services:
image: docker_open5gs
depends_on:
- nrf
- scp
- mongo
container_name: pcf
env_file:
@@ -136,6 +156,7 @@ services:
image: docker_open5gs
depends_on:
- nrf
- scp
- mongo
container_name: bsf
env_file:
@@ -156,6 +177,7 @@ services:
image: docker_open5gs
depends_on:
- nrf
- scp
- mongo
container_name: nssf
env_file:
@@ -244,6 +266,7 @@ services:
image: docker_open5gs
depends_on:
- nrf
- scp
container_name: smf
env_file:
- .env
@@ -271,6 +294,7 @@ services:
image: docker_open5gs
depends_on:
- nrf
- scp
- smf
container_name: upf
env_file:
@@ -302,6 +326,7 @@ services:
- smf
- upf
- nrf
- scp
- ausf
- udm
- udr

View File

@@ -13,8 +13,8 @@ nssf:
s_nssai:
sst: 1
nrf:
scp:
sbi:
- addr:
- NRF_IP
- SCP_IP
port: 7777

View File

@@ -29,6 +29,7 @@
cp /mnt/nssf/nssf.yaml install/etc/open5gs
sed -i 's|NSSF_IP|'$NSSF_IP'|g' install/etc/open5gs/nssf.yaml
sed -i 's|NRF_IP|'$NRF_IP'|g' install/etc/open5gs/nssf.yaml
sed -i 's|SCP_IP|'$SCP_IP'|g' install/etc/open5gs/nssf.yaml
# Sync docker time
#ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

View File

@@ -10,8 +10,8 @@ pcf:
- addr: PCF_IP
port: 7777
nrf:
scp:
sbi:
- addr:
- NRF_IP
- SCP_IP
port: 7777

View File

@@ -30,7 +30,7 @@ export DB_URI="mongodb://${MONGO_IP}/open5gs"
cp /mnt/pcf/pcf.yaml install/etc/open5gs
sed -i 's|PCF_IP|'$PCF_IP'|g' install/etc/open5gs/pcf.yaml
sed -i 's|NRF_IP|'$NRF_IP'|g' install/etc/open5gs/pcf.yaml
sed -i 's|SCP_IP|'$SCP_IP'|g' install/etc/open5gs/pcf.yaml
sed -i 's|MONGO_IP|'$MONGO_IP'|g' install/etc/open5gs/pcf.yaml
# Sync docker time

View File

@@ -54,10 +54,28 @@ services:
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
- scp
container_name: ausf
env_file:
- .env
@@ -77,6 +95,7 @@ services:
image: docker_open5gs
depends_on:
- nrf
- scp
- mongo
container_name: udr
env_file:
@@ -97,6 +116,7 @@ services:
image: docker_open5gs
depends_on:
- nrf
- scp
container_name: udm
env_file:
- .env
@@ -116,6 +136,7 @@ services:
image: docker_open5gs
depends_on:
- nrf
- scp
container_name: smf
env_file:
- .env
@@ -143,6 +164,7 @@ services:
image: docker_open5gs
depends_on:
- nrf
- scp
- smf
container_name: upf
env_file:
@@ -174,6 +196,7 @@ services:
- smf
- upf
- nrf
- scp
- ausf
- udm
- udr
@@ -201,6 +224,7 @@ services:
image: docker_open5gs
depends_on:
- nrf
- scp
- mongo
container_name: pcf
env_file:
@@ -221,6 +245,7 @@ services:
image: docker_open5gs
depends_on:
- nrf
- scp
- mongo
container_name: bsf
env_file:
@@ -241,6 +266,7 @@ services:
image: docker_open5gs
depends_on:
- nrf
- scp
- mongo
container_name: nssf
env_file:

16
scp/scp.yaml Normal file
View File

@@ -0,0 +1,16 @@
logger:
file: /open5gs/install/var/log/open5gs/scp.log
parameter:
scp:
sbi:
addr:
- SCP_IP
port: 7777
nrf:
sbi:
- addr:
- NRF_IP
port: 7777

34
scp/scp_init.sh Executable file
View File

@@ -0,0 +1,34 @@
#!/bin/bash
# BSD 2-Clause License
# Copyright (c) 2020, Supreeth Herle
# All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
cp /mnt/scp/scp.yaml install/etc/open5gs
sed -i 's|SCP_IP|'$SCP_IP'|g' install/etc/open5gs/scp.yaml
sed -i 's|NRF_IP|'$NRF_IP'|g' install/etc/open5gs/scp.yaml
# Sync docker time
#ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

View File

@@ -37,10 +37,10 @@ smf:
- PCSCF_IP
mtu: 1400
nrf:
scp:
sbi:
- addr:
- NRF_IP
- SCP_IP
port: 7777
upf:

View File

@@ -38,7 +38,7 @@ cp /mnt/smf/smf.conf install/etc/freeDiameter
cp /mnt/smf/make_certs.sh install/etc/freeDiameter
sed -i 's|SMF_IP|'$SMF_IP'|g' install/etc/open5gs/smf.yaml
sed -i 's|NRF_IP|'$NRF_IP'|g' install/etc/open5gs/smf.yaml
sed -i 's|SCP_IP|'$SCP_IP'|g' install/etc/open5gs/smf.yaml
sed -i 's|UPF_IP|'$UPF_IP'|g' install/etc/open5gs/smf.yaml
sed -i 's|PCSCF_IP|'$PCSCF_IP'|g' install/etc/open5gs/smf.yaml
sed -i 's|SMF_IP|'$SMF_IP'|g' install/etc/freeDiameter/smf.conf

View File

@@ -8,8 +8,8 @@ udm:
- addr: UDM_IP
port: 7777
nrf:
scp:
sbi:
- addr:
- NRF_IP
- SCP_IP
port: 7777

View File

@@ -28,7 +28,7 @@
cp /mnt/udm/udm.yaml install/etc/open5gs
sed -i 's|UDM_IP|'$UDM_IP'|g' install/etc/open5gs/udm.yaml
sed -i 's|NRF_IP|'$NRF_IP'|g' install/etc/open5gs/udm.yaml
sed -i 's|SCP_IP|'$SCP_IP'|g' install/etc/open5gs/udm.yaml
# Sync docker time
#ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone

View File

@@ -10,8 +10,8 @@ udr:
- addr: UDR_IP
port: 7777
nrf:
scp:
sbi:
- addr:
- NRF_IP
- SCP_IP
port: 7777

View File

@@ -30,7 +30,7 @@ export DB_URI="mongodb://${MONGO_IP}/open5gs"
cp /mnt/udr/udr.yaml install/etc/open5gs
sed -i 's|UDR_IP|'$UDR_IP'|g' install/etc/open5gs/udr.yaml
sed -i 's|NRF_IP|'$NRF_IP'|g' install/etc/open5gs/udr.yaml
sed -i 's|SCP_IP|'$SCP_IP'|g' install/etc/open5gs/udr.yaml
sed -i 's|MONGO_IP|'$MONGO_IP'|g' install/etc/open5gs/udr.yaml
# Sync docker time