Tutorials: split tutorials in three files, OAI_CN5G, COTS_UE and OAI_nrUE
This commit is contained in:
@@ -1,345 +0,0 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
mysql:
|
||||
container_name: "mysql"
|
||||
image: mysql:5.7
|
||||
volumes:
|
||||
- ./database/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ./healthscripts/mysql-healthcheck2.sh:/tmp/mysql-healthcheck.sh
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- MYSQL_DATABASE=oai_db
|
||||
- MYSQL_USER=test
|
||||
- MYSQL_PASSWORD=test
|
||||
- MYSQL_ROOT_PASSWORD=linux
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.131
|
||||
oai-udr:
|
||||
container_name: "oai-udr"
|
||||
image: oai-udr:develop
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- INSTANCE=0
|
||||
- PID_DIRECTORY=/var/run
|
||||
- UDR_NAME=OAI_UDR
|
||||
- UDR_INTERFACE_NAME_FOR_NUDR=eth0
|
||||
- UDR_INTERFACE_PORT_FOR_NUDR=80
|
||||
- UDR_INTERFACE_HTTP2_PORT_FOR_NUDR=8080
|
||||
- USE_HTTP2=no
|
||||
- UDR_API_VERSION=v1
|
||||
- MYSQL_IPV4_ADDRESS=192.168.70.131
|
||||
- MYSQL_USER=test
|
||||
- MYSQL_PASS=test
|
||||
- DB_CONNECTION_TIMEOUT=300 # Reset the connection to the DB after expiring the timeout (in second) currently can't be changed
|
||||
- MYSQL_DB=oai_db
|
||||
- WAIT_MYSQL=120
|
||||
- USE_FQDN_DNS=yes
|
||||
- REGISTER_NRF=yes
|
||||
- NRF_IPV4_ADDRESS=192.168.70.130
|
||||
- NRF_PORT=80
|
||||
- NRF_API_VERSION=v1
|
||||
- NRF_FQDN=oai-nrf
|
||||
depends_on:
|
||||
- mysql
|
||||
- oai-nrf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.136
|
||||
oai-udm:
|
||||
container_name: "oai-udm"
|
||||
image: oai-udm:develop
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- INSTANCE=0
|
||||
- PID_DIRECTORY=/var/run
|
||||
- UDM_NAME=OAI_UDM
|
||||
- SBI_IF_NAME=eth0
|
||||
- SBI_PORT=80
|
||||
- SBI_HTTP2_PORT=8080
|
||||
- USE_HTTP2=no
|
||||
- UDM_VERSION_NB=v1
|
||||
- USE_FQDN_DNS=yes
|
||||
- UDR_IP_ADDRESS=192.168.70.136
|
||||
- UDR_PORT=80
|
||||
- UDR_VERSION_NB=v1
|
||||
- UDR_FQDN=oai-udr
|
||||
- REGISTER_NRF=yes
|
||||
- NRF_IPV4_ADDRESS=192.168.70.130
|
||||
- NRF_PORT=80
|
||||
- NRF_API_VERSION=v1
|
||||
- NRF_FQDN=oai-nrf
|
||||
depends_on:
|
||||
- oai-udr
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.137
|
||||
oai-ausf:
|
||||
container_name: "oai-ausf"
|
||||
image: oai-ausf:develop
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- INSTANCE_ID=0
|
||||
- PID_DIR=/var/run
|
||||
- AUSF_NAME=OAI_AUSF
|
||||
- SBI_IF_NAME=eth0
|
||||
- SBI_PORT=80
|
||||
- USE_HTTP2=no
|
||||
- SBI_HTTP2_PORT=8080
|
||||
- USE_FQDN_DNS=yes
|
||||
- UDM_IP_ADDRESS=192.168.70.137
|
||||
- UDM_PORT=80
|
||||
- UDM_VERSION_NB=v1
|
||||
- UDM_FQDN=oai-udm
|
||||
- REGISTER_NRF=yes
|
||||
- NRF_IPV4_ADDRESS=192.168.70.130
|
||||
- NRF_PORT=80
|
||||
- NRF_API_VERSION=v1
|
||||
- NRF_FQDN=oai-nrf
|
||||
depends_on:
|
||||
- oai-udm
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.138
|
||||
oai-nrf:
|
||||
container_name: "oai-nrf"
|
||||
image: oai-nrf:develop
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- NRF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- NRF_INTERFACE_PORT_FOR_SBI=80
|
||||
- NRF_INTERFACE_HTTP2_PORT_FOR_SBI=8080
|
||||
- NRF_API_VERSION=v1
|
||||
- INSTANCE=0
|
||||
- PID_DIRECTORY=/var/run
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.130
|
||||
oai-amf:
|
||||
container_name: "oai-amf"
|
||||
image: oai-amf:develop
|
||||
environment:
|
||||
- TZ=Europe/paris
|
||||
- INSTANCE=0
|
||||
- PID_DIRECTORY=/var/run
|
||||
- MCC=001
|
||||
- MNC=01
|
||||
- REGION_ID=128
|
||||
- AMF_SET_ID=1
|
||||
- SERVED_GUAMI_MCC_0=001
|
||||
- SERVED_GUAMI_MNC_0=01
|
||||
- SERVED_GUAMI_REGION_ID_0=128
|
||||
- SERVED_GUAMI_AMF_SET_ID_0=1
|
||||
- SERVED_GUAMI_MCC_1=460
|
||||
- SERVED_GUAMI_MNC_1=11
|
||||
- SERVED_GUAMI_REGION_ID_1=10
|
||||
- SERVED_GUAMI_AMF_SET_ID_1=1
|
||||
- PLMN_SUPPORT_MCC=001
|
||||
- PLMN_SUPPORT_MNC=01
|
||||
- PLMN_SUPPORT_TAC=0x0001
|
||||
- SST_0=1
|
||||
- SD_0=0x1
|
||||
- SST_1=1
|
||||
- SD_1=0x2
|
||||
- SST_2=1
|
||||
- SD_2=0x3
|
||||
- AMF_INTERFACE_NAME_FOR_NGAP=eth0
|
||||
- AMF_INTERFACE_NAME_FOR_N11=eth0
|
||||
- SMF_INSTANCE_ID_0=1
|
||||
- SMF_FQDN_0=oai-smf
|
||||
- SMF_IPV4_ADDR_0=192.168.70.133
|
||||
- SMF_HTTP_VERSION_0=v1
|
||||
- SELECTED_0=true
|
||||
- SMF_INSTANCE_ID_1=2
|
||||
- SMF_FQDN_1=oai-smf
|
||||
- SMF_IPV4_ADDR_1=0.0.0.0
|
||||
- SMF_HTTP_VERSION_1=v1
|
||||
- SELECTED_1=false
|
||||
- MYSQL_SERVER=192.168.70.131
|
||||
- MYSQL_USER=root
|
||||
- MYSQL_PASS=linux
|
||||
- MYSQL_DB=oai_db
|
||||
- OPERATOR_KEY=1006020f0a478bf6b699f15c062e42b3
|
||||
- NRF_IPV4_ADDRESS=192.168.70.130
|
||||
- NRF_PORT=80
|
||||
- EXTERNAL_NRF=no
|
||||
- NF_REGISTRATION=yes
|
||||
- SMF_SELECTION=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
- EXTERNAL_AUSF=yes
|
||||
- EXTERNAL_UDM=no
|
||||
- EXTERNAL_NSSF=no
|
||||
- USE_HTTP2=no
|
||||
- NRF_API_VERSION=v1
|
||||
- NRF_FQDN=oai-nrf
|
||||
- AUSF_IPV4_ADDRESS=192.168.70.138
|
||||
- AUSF_PORT=80
|
||||
- AUSF_API_VERSION=v1
|
||||
- AUSF_FQDN=oai-ausf
|
||||
- UDM_IPV4_ADDRESS=192.168.70.137
|
||||
- UDM_PORT=80
|
||||
- UDM_API_VERSION=v2
|
||||
- UDM_FQDN=oai-udm
|
||||
- INT_ALGO_LIST=["NIA1", "NIA2"]
|
||||
- CIPH_ALGO_LIST=["NEA0", "NEA2"]
|
||||
depends_on:
|
||||
- mysql
|
||||
- oai-nrf
|
||||
- oai-ausf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.132
|
||||
oai-smf:
|
||||
container_name: "oai-smf"
|
||||
image: oai-smf:develop
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- INSTANCE=0
|
||||
- PID_DIRECTORY=/var/run
|
||||
- SMF_INTERFACE_NAME_FOR_N4=eth0
|
||||
- SMF_INTERFACE_NAME_FOR_SBI=eth0
|
||||
- SMF_INTERFACE_PORT_FOR_SBI=80
|
||||
- SMF_INTERFACE_HTTP2_PORT_FOR_SBI=9090
|
||||
- SMF_API_VERSION=v1
|
||||
- DEFAULT_DNS_IPV4_ADDRESS=8.8.8.8
|
||||
- DEFAULT_DNS_SEC_IPV4_ADDRESS=4.4.4.4
|
||||
- AMF_IPV4_ADDRESS=192.168.70.132
|
||||
- AMF_PORT=80
|
||||
- AMF_API_VERSION=v1
|
||||
- AMF_FQDN=oai-amf
|
||||
- UDM_IPV4_ADDRESS=192.168.70.137
|
||||
- UDM_PORT=80
|
||||
- UDM_API_VERSION=v2
|
||||
- UDM_FQDN=oai-udm
|
||||
- UPF_IPV4_ADDRESS=192.168.70.134
|
||||
- UPF_FQDN_0=oai-spgwu
|
||||
- NRF_IPV4_ADDRESS=192.168.70.130
|
||||
- NRF_PORT=80
|
||||
- NRF_API_VERSION=v1
|
||||
- USE_LOCAL_SUBSCRIPTION_INFO=yes #Set to yes if SMF uses local subscription information instead of from an UDM
|
||||
- USE_NETWORK_INSTANCE=no #Set yes if network instance is to be used for given UPF
|
||||
- NRF_FQDN=oai-nrf
|
||||
- REGISTER_NRF=yes
|
||||
- DISCOVER_UPF=yes
|
||||
- USE_FQDN_DNS=yes
|
||||
- HTTP_VERSION=1 # Default: 1
|
||||
- UE_MTU=1500
|
||||
- DNN_NI0=oai
|
||||
- TYPE0=IPv4
|
||||
- DNN_RANGE0=12.1.1.2 - 12.1.1.253
|
||||
- NSSAI_SST0=1
|
||||
- NSSAI_SD0=0x1
|
||||
- SESSION_AMBR_UL0=10000Mbps
|
||||
- SESSION_AMBR_DL0=10000Mbps
|
||||
- DNN_NI1=oai2
|
||||
- TYPE1=IPv4
|
||||
- DNN_RANGE1=12.1.2.2 - 12.1.2.253
|
||||
- NSSAI_SST1=1
|
||||
- NSSAI_SD1=0x2
|
||||
- SESSION_AMBR_UL1=10000Mbps
|
||||
- SESSION_AMBR_DL1=10000Mbps
|
||||
- DNN_NI2=oai3
|
||||
- TYPE2=IPv4
|
||||
- DNN_RANGE2=12.1.3.2 - 12.1.3.253
|
||||
- NSSAI_SST2=1
|
||||
- NSSAI_SD2=0x3
|
||||
- SESSION_AMBR_UL2=10000Mbps
|
||||
- SESSION_AMBR_DL2=10000Mbps
|
||||
- DNN_NI3=ims
|
||||
- TYPE3=IPv4v6
|
||||
- DNN_RANGE3=14.1.1.2 - 14.1.1.253
|
||||
- DEFAULT_CSCF_IPV4_ADDRESS=127.0.0.1 # only needed when ims is being used
|
||||
- ENABLE_USAGE_REPORTING=no # Set yes if UE USAGE REPORTING is to be done at UPF
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-amf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.133
|
||||
oai-spgwu:
|
||||
container_name: "oai-spgwu"
|
||||
image: oai-spgwu-tiny:develop
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- PID_DIRECTORY=/var/run
|
||||
- SGW_INTERFACE_NAME_FOR_S1U_S12_S4_UP=eth0
|
||||
- SGW_INTERFACE_NAME_FOR_SX=eth0
|
||||
- PGW_INTERFACE_NAME_FOR_SGI=eth0
|
||||
- NETWORK_UE_NAT_OPTION=yes
|
||||
- NETWORK_UE_IP=12.1.1.0/24
|
||||
- SPGWC0_IP_ADDRESS=192.168.70.133
|
||||
- BYPASS_UL_PFCP_RULES=no
|
||||
- MCC=001
|
||||
- MNC=01
|
||||
- MNC03=001
|
||||
- TAC=1
|
||||
- GW_ID=1
|
||||
- THREAD_S1U_PRIO=80
|
||||
- S1U_THREADS=8
|
||||
- THREAD_SX_PRIO=81
|
||||
- SX_THREADS=1
|
||||
- THREAD_SGI_PRIO=80
|
||||
- SGI_THREADS=8
|
||||
- REALM=openairinterface.org
|
||||
- ENABLE_5G_FEATURES=yes
|
||||
- REGISTER_NRF=yes
|
||||
- USE_FQDN_NRF=yes
|
||||
- UPF_FQDN_5G=oai-spgwu
|
||||
- NRF_IPV4_ADDRESS=192.168.70.130
|
||||
- NRF_PORT=80
|
||||
- NRF_API_VERSION=v1
|
||||
- NRF_FQDN=oai-nrf
|
||||
- NSSAI_SST_0=1
|
||||
- NSSAI_SD_0=0x1
|
||||
- DNN_0=oai
|
||||
- NSSAI_SST_1=1
|
||||
- NSSAI_SD_1=0x2
|
||||
- DNN_1=oai2
|
||||
- NSSAI_SST_2=1
|
||||
- NSSAI_SD_2=0x3
|
||||
- DNN_2=oai3
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
- oai-smf
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
- SYS_ADMIN
|
||||
cap_drop:
|
||||
- ALL
|
||||
privileged: true
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.134
|
||||
oai-ext-dn:
|
||||
image: trf-gen-cn5g:latest
|
||||
privileged: true
|
||||
container_name: oai-ext-dn
|
||||
entrypoint: /bin/bash -c \
|
||||
"ip route add 12.1.1.0/24 via 192.168.70.134 dev eth0; sleep infinity"
|
||||
depends_on:
|
||||
- oai-spgwu
|
||||
healthcheck:
|
||||
test: /bin/bash -c "ip r | grep 12.1.1"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.135
|
||||
networks:
|
||||
# public_net:
|
||||
# external:
|
||||
# name: demo-oai-public-net
|
||||
public_net:
|
||||
driver: bridge
|
||||
name: demo-oai-public-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.70.128/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "demo-oai"
|
||||
@@ -0,0 +1,15 @@
|
||||
ARG BASE_IMAGE=ubuntu:jammy
|
||||
|
||||
FROM $BASE_IMAGE as ims
|
||||
|
||||
ENV DEBIAN_FRONTEND=noninteractive
|
||||
|
||||
RUN apt-get update && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get upgrade --yes && \
|
||||
DEBIAN_FRONTEND=noninteractive apt-get install --yes \
|
||||
psmisc \
|
||||
git \
|
||||
asterisk \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
ENTRYPOINT ["asterisk", "-fp"]
|
||||
@@ -0,0 +1,146 @@
|
||||
################################################################################
|
||||
# Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.openairinterface.org/?page_id=698
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#-------------------------------------------------------------------------------
|
||||
# For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# contact@openairinterface.org
|
||||
################################################################################
|
||||
|
||||
AMF =
|
||||
{
|
||||
INSTANCE_ID = 0; # 0 is the default
|
||||
PID_DIRECTORY = "/var/run"; # /var/run is the default
|
||||
|
||||
AMF_NAME = "OAI-AMF";
|
||||
|
||||
RELATIVE_CAPACITY = 30;
|
||||
# Display statistics about whole system (in seconds)
|
||||
STATISTICS_TIMER_INTERVAL = 20; # YOUR CONFIG HERE
|
||||
|
||||
CORE_CONFIGURATION:
|
||||
{
|
||||
EMERGENCY_SUPPORT = "false";
|
||||
};
|
||||
|
||||
GUAMI:
|
||||
{
|
||||
MCC = "001"; MNC = "01"; RegionID = "128"; AMFSetID = "1"; AMFPointer = "1" # YOUR GUAMI CONFIG HERE
|
||||
}
|
||||
|
||||
SERVED_GUAMI_LIST = (
|
||||
{MCC = "001"; MNC = "01"; RegionID = "128"; AMFSetID = "1"; AMFPointer = "0"} #48bits <MCC><MNC><RegionID><AMFSetID><AMFPointer>
|
||||
);
|
||||
|
||||
PLMN_SUPPORT_LIST = (
|
||||
{
|
||||
MCC = "001"; MNC = "01"; TAC = 0x0001; # YOUR PLMN CONFIG HERE
|
||||
SLICE_SUPPORT_LIST = (
|
||||
{SST = 1,SD= "0xFFFFFF"} #SST, SD value can be decimal or hexadecimal
|
||||
)
|
||||
}
|
||||
); # At the moment only one PLMN configuration is supported
|
||||
|
||||
INTERFACES:
|
||||
{
|
||||
# AMF binded interface for N1/N2 interface (NGAP)
|
||||
NGAP_AMF:
|
||||
{
|
||||
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
|
||||
IPV4_ADDRESS = "read";
|
||||
PORT = 38412; # YOUR NETWORK CONFIG HERE
|
||||
PPID = 60; # YOUR NETWORK CONFIG HERE
|
||||
};
|
||||
|
||||
# AMF binded interface for SBI (N11 (SMF)/N12 (AUSF), etc.)
|
||||
SBI:
|
||||
{
|
||||
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
|
||||
IPV4_ADDRESS = "read";
|
||||
PORT = 80; # YOUR NETWORK CONFIG HERE
|
||||
API_VERSION = "v1"; # YOUR AMF API VERSION CONFIG HERE
|
||||
HTTP2_PORT = 8080; # YOUR NETWORK CONFIG HERE
|
||||
|
||||
SMF_INSTANCES_POOL = (
|
||||
{SMF_INSTANCE_ID = 1; IPV4_ADDRESS = "192.168.70.133"; PORT = "80"; HTTP2_PORT = 8080, VERSION = "v1"; FQDN = "oai-smf", SELECTED = "true"} # YOUR SMF CONFIG HERE
|
||||
);
|
||||
};
|
||||
|
||||
NRF :
|
||||
{
|
||||
IPV4_ADDRESS = "192.168.70.130"; # YOUR NRF CONFIG HERE
|
||||
PORT = 80; # YOUR NRF CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR NRF API VERSION FOR SBI CONFIG HERE
|
||||
FQDN = "oai-nrf" # YOUR NRF FQDN CONFIG HERE
|
||||
};
|
||||
|
||||
AUSF :
|
||||
{
|
||||
IPV4_ADDRESS = "192.168.70.138"; # YOUR AUSF CONFIG HERE
|
||||
PORT = 80; # YOUR AUSF CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR AUSF API VERSION FOR SBI CONFIG HERE
|
||||
FQDN = "oai-ausf" # YOUR AUSF FQDN CONFIG HERE
|
||||
};
|
||||
|
||||
NSSF :
|
||||
{
|
||||
IPV4_ADDRESS = "192.168.70.138"; # YOUR NSSF CONFIG HERE
|
||||
PORT = 80; # YOUR NSSF CONFIG HERE (default: 80)
|
||||
API_VERSION = "v2"; # YOUR NSSF API VERSION FOR SBI CONFIG HERE
|
||||
FQDN = "oai-nssf" # YOUR NSSF FQDN CONFIG HERE
|
||||
};
|
||||
};
|
||||
|
||||
SUPPORT_FEATURES:
|
||||
{
|
||||
# STRING, {"yes", "no"},
|
||||
NF_REGISTRATION = "yes"; # Set to yes if AMF resgisters to an NRF
|
||||
NRF_SELECTION = "no"; # Set to yes to enable NRF discovery and selection
|
||||
SMF_SELECTION = "no"; # Set to yes to enable SMF discovery and selection
|
||||
EXTERNAL_NRF = "no"; # Set to yes if AMF works with an external NRF
|
||||
EXTERNAL_NSSF = "no";
|
||||
EXTERNAL_AUSF = "yes"; # Set to yes if AMF works with an external AUSF
|
||||
EXTERNAL_UDM = "no"; # Set to yes if AMF works with an external UDM
|
||||
USE_FQDN_DNS = "no"; # Set to yes if AMF relies on a DNS to resolve NRF/SMF/UDM/AUSF's FQDN
|
||||
USE_HTTP2 = "no"; # Set to yes to enable HTTP2 for AMF server
|
||||
}
|
||||
|
||||
AUTHENTICATION:
|
||||
{ #NOT USED because authentication requests go via AUSF
|
||||
## MySQL mandatory options
|
||||
MYSQL_server = "mysql"; # MySQL Server address
|
||||
MYSQL_user = "root"; # Database server login
|
||||
MYSQL_pass = "linux"; # Database server password
|
||||
MYSQL_db = "oai_db"; # Your database name
|
||||
|
||||
## OP
|
||||
RANDOM = "true";
|
||||
};
|
||||
|
||||
NAS:
|
||||
{
|
||||
ORDERED_SUPPORTED_INTEGRITY_ALGORITHM_LIST = [ "NIA1" , "NIA1" , "NIA2" ]; #Default [ "NIA0" , "NIA1" , "NIA2" ];
|
||||
ORDERED_SUPPORTED_CIPHERING_ALGORITHM_LIST = [ "NEA0" , "NEA1" , "NEA2" ]; #Default [ "NEA0" , "NEA1" , "NEA2" ];
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
MODULES =
|
||||
{
|
||||
NGAP_MESSAGE = (
|
||||
{MSG_NAME = "NGSetupRequest"; ProcedureCode = 21; TypeOfMessage = "initialMessage"}
|
||||
);
|
||||
};
|
||||
@@ -0,0 +1,62 @@
|
||||
################################################################################
|
||||
# Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.openairinterface.org/?page_id=698
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#-------------------------------------------------------------------------------
|
||||
# For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# contact@openairinterface.org
|
||||
################################################################################
|
||||
|
||||
AUSF =
|
||||
{
|
||||
INSTANCE_ID = 0;
|
||||
PID_DIRECTORY = "/var/run";
|
||||
AUSF_NAME = "OAI_AUSF";
|
||||
|
||||
INTERFACES:{
|
||||
# AUSF binded interface for SBI interface (e.g., communication with AMF, UDM)
|
||||
SBI:{
|
||||
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
|
||||
IPV4_ADDRESS = "read";
|
||||
PORT = 80; # YOUR NETWORK CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR API VERSION FOR UDM CONFIG HERE
|
||||
HTTP2_PORT = 8080; # YOUR NETWORK CONFIG HERE
|
||||
};
|
||||
};
|
||||
|
||||
# SUPPORT FEATURES
|
||||
SUPPORT_FEATURES:{
|
||||
# STRING, {"yes", "no"},
|
||||
USE_FQDN_DNS = "no"; # Set to yes if AUSF will relying on a DNS to resolve UDM's FQDN
|
||||
USE_HTTP2 = "no"; # Set to yes to enable HTTP2 for AMF server
|
||||
REGISTER_NRF = "no"; # Set to 'yes' if AUSF resgisters to an NRF
|
||||
}
|
||||
|
||||
# UDM Information
|
||||
UDM:{
|
||||
IPV4_ADDRESS = "192.168.70.137"; # YOUR NETWORK CONFIG HERE
|
||||
PORT = 80; # YOUR NETWORK CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR API VERSION FOR UDM CONFIG HERE
|
||||
FQDN = "oai-udm" # YOUR UDM FQDN CONFIG HERE
|
||||
};
|
||||
|
||||
NRF :
|
||||
{
|
||||
IPV4_ADDRESS = "192.168.70.130"; # YOUR NRF CONFIG HERE
|
||||
PORT = 80; # YOUR NRF CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR NRF API VERSION HERE
|
||||
FQDN = "oai-nrf";
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,39 @@
|
||||
################################################################################
|
||||
# Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.openairinterface.org/?page_id=698
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#-------------------------------------------------------------------------------
|
||||
# For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# contact@openairinterface.org
|
||||
################################################################################
|
||||
|
||||
NRF =
|
||||
{
|
||||
INSTANCE = 0; # 0 is the default
|
||||
PID_DIRECTORY = "/var/run"; # /var/run is the default
|
||||
|
||||
|
||||
SBI_INTERFACE :
|
||||
{
|
||||
# NRF binded interface for SBI interface (e.g., communication with other NFs e.g., AMF, SMF, UDM)
|
||||
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
|
||||
IPV4_ADDRESS = "read";
|
||||
PORT = 80; # YOUR NETWORK CONFIG HERE (default: 80)
|
||||
HTTP2_PORT = 8080; # YOUR NETWORK CONFIG HERE
|
||||
API_VERSION = "v1"; # YOUR NRF API VERSION CONFIG HERE
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
@@ -0,0 +1,131 @@
|
||||
################################################################################
|
||||
# Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.openairinterface.org/?page_id=698
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#-------------------------------------------------------------------------------
|
||||
# For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# contact@openairinterface.org
|
||||
################################################################################
|
||||
|
||||
SMF =
|
||||
{
|
||||
FQDN = "oai-smf";
|
||||
INSTANCE = 1; # 0 is the default
|
||||
PID_DIRECTORY = "/var/run"; # /var/run is the default
|
||||
|
||||
INTERFACES :
|
||||
{
|
||||
N4 :
|
||||
{
|
||||
# SMF binded interface for N4 communication (UPF)
|
||||
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
|
||||
IPV4_ADDRESS = "read";
|
||||
};
|
||||
|
||||
SBI :
|
||||
{
|
||||
# SMF binded interface for SBI interface (e.g., communication with AMF, UDM)
|
||||
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
|
||||
IPV4_ADDRESS = "read";
|
||||
PORT = 80; # YOUR NETWORK CONFIG HERE (default: 80)
|
||||
HTTP2_PORT = 8080; # YOUR NETWORK CONFIG HERE
|
||||
API_VERSION = "v1"; # YOUR SMF API VERSION CONFIG HERE
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
# DNN configurations with pool of UE assigned IP addresses
|
||||
# Do not make IP pools overlap
|
||||
# first IPv4 address X.Y.Z.1 is reserved for GTP network device on UPF
|
||||
DNN_LIST = (
|
||||
# PDU_SESSION_TYPE choice in {IPv4, IPv6, IPv4v6}
|
||||
{DNN_NI = "oai"; PDU_SESSION_TYPE = "IPv4"; IPV4_RANGE = "12.1.1.2 - 12.1.1.254"; IPV6_PREFIX = "2001:1:2::/64"},
|
||||
{DNN_NI = "openairinterface"; PDU_SESSION_TYPE = "IPv4v6"; IPV4_RANGE = "12.1.2.2 - 12.1.2.254"; IPV6_PREFIX = "2001:1:2::/64"},
|
||||
{DNN_NI = "ims"; PDU_SESSION_TYPE = "IPv4v6"; IPV4_RANGE = "12.2.1.1 - 12.2.1.254"; IPV6_PREFIX = "2001:1:2::/64"}
|
||||
);
|
||||
|
||||
# DNS address communicated to UEs
|
||||
DEFAULT_DNS_IPV4_ADDRESS = "8.8.8.8"; # YOUR DNS CONFIG HERE
|
||||
DEFAULT_DNS_SEC_IPV4_ADDRESS = "4.4.4.4"; # YOUR DNS CONFIG HERE
|
||||
DEFAULT_DNS_IPV6_ADDRESS = "2001:4860:4860::8888"; # YOUR DNS CONFIG HERE
|
||||
DEFAULT_DNS_SEC_IPV6_ADDRESS = "2001:4860:4860::8844"; # YOUR DNS CONFIG HERE
|
||||
|
||||
DEFAULT_CSCF_IPV4_ADDRESS = "192.168.70.139"; #not defined at the moment
|
||||
DEFAULT_CSCF_IPV6_ADDRESS = "fe80::7915:f408:1787:db8b";
|
||||
|
||||
#Default UE MTU
|
||||
UE_MTU = 1500;
|
||||
|
||||
# SUPPORT FEATURES
|
||||
SUPPORT_FEATURES:
|
||||
{
|
||||
# STRING, {"yes", "no"},
|
||||
REGISTER_NRF = "yes"; # Set to yes if SMF resgisters to an NRF
|
||||
DISCOVER_UPF = "yes"; # Set to yes to enable UPF discovery and selection
|
||||
FORCE_PUSH_PROTOCOL_CONFIGURATION_OPTIONS = "no"; # Non standard feature, normally should be set to "no",
|
||||
# but you may need to set to yes for UE that do not explicitly request a PDN address through NAS signalling
|
||||
USE_LOCAL_SUBSCRIPTION_INFO = "yes"; # Set to yes if SMF uses local subscription information instead of from an UDM
|
||||
USE_FQDN_DNS = "no"; # Set to yes if AMF/UDM/NRF/UPF will relying on a DNS to resolve FQDN
|
||||
HTTP_VERSION = 1; # Default: 1
|
||||
USE_NETWORK_INSTANCE = "no" # Set yes if network instance is to be used for given UPF
|
||||
DISCOVER_PCF = "no";
|
||||
USE_LOCAL_PCC_RULES = "yes";
|
||||
INCLUDE_DL_PDR_IN_PFCP_SESSION_ESTAB = "no";
|
||||
ENABLE_REL15_SUPPORT = "no";
|
||||
}
|
||||
|
||||
AMF :
|
||||
{
|
||||
IPV4_ADDRESS = "192.168.70.132"; # YOUR AMF CONFIG HERE
|
||||
PORT = 80; # YOUR AMF CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR AMF API VERSION FOR SBI CONFIG HERE
|
||||
FQDN = "oai-amf" # YOUR AMF FQDN CONFIG HERE
|
||||
};
|
||||
|
||||
UDM :
|
||||
{
|
||||
IPV4_ADDRESS = "192.168.70.137"; # YOUR UDM CONFIG HERE
|
||||
PORT = 80; # YOUR UDM CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR UDM API VERSION FOR SBI CONFIG HERE
|
||||
FQDN = "oai-udm" # YOUR UDM FQDN CONFIG HERE
|
||||
};
|
||||
|
||||
NRF :
|
||||
{
|
||||
IPV4_ADDRESS = "192.168.70.130"; # YOUR NRF CONFIG HERE
|
||||
PORT = 80; # YOUR NRF CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR NRF API VERSION FOR SBI CONFIG HERE
|
||||
FQDN = "oai-nrf" # YOUR NRF FQDN CONFIG HERE
|
||||
};
|
||||
|
||||
UPF_LIST = (
|
||||
{IPV4_ADDRESS = "192.168.70.134" ; FQDN = "oai-spgwu-tiny"; NWI_LIST = ({DOMAIN_ACCESS = "access.oai.org", DOMAIN_CORE = "core.oai.org"})}
|
||||
); # NWI_LIST IS OPTIONAL PARAMETER
|
||||
# Not in use because information is getting fetched from UDR
|
||||
LOCAL_CONFIGURATION :
|
||||
{
|
||||
SESSION_MANAGEMENT_SUBSCRIPTION_LIST = (
|
||||
{ NSSAI_SST = 1; NSSAI_SD = "0xFFFFFF", DNN = "oai", DEFAULT_SESSION_TYPE = "IPv4", DEFAULT_SSC_MODE = 1,
|
||||
QOS_PROFILE_5QI = 1, QOS_PROFILE_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PRIORITY_LEVEL = 15, QOS_PROFILE_ARP_PREEMPTCAP = "NOT_PREEMPT",
|
||||
QOS_PROFILE_ARP_PREEMPTVULN = "NOT_PREEMPTABLE", SESSION_AMBR_UL = "10000Mbps", SESSION_AMBR_DL = "10000Mbps"},
|
||||
{ NSSAI_SST = 1; NSSAI_SD = "0xFFFFFF", DNN = "openairinterface", DEFAULT_SESSION_TYPE = "IPv4v6", DEFAULT_SSC_MODE = 1,
|
||||
QOS_PROFILE_5QI = 1, QOS_PROFILE_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PRIORITY_LEVEL = 15, QOS_PROFILE_ARP_PREEMPTCAP = "NOT_PREEMPT",
|
||||
QOS_PROFILE_ARP_PREEMPTVULN = "NOT_PREEMPTABLE", SESSION_AMBR_UL = "10000Mbps", SESSION_AMBR_DL = "10000Mbps"},
|
||||
{ NSSAI_SST = 1; NSSAI_SD = "0xFFFFFF", DNN = "ims", DEFAULT_SESSION_TYPE = "IPv4v6", DEFAULT_SSC_MODE = 1,
|
||||
QOS_PROFILE_5QI = 1, QOS_PROFILE_PRIORITY_LEVEL = 1, QOS_PROFILE_ARP_PRIORITY_LEVEL = 15, QOS_PROFILE_ARP_PREEMPTCAP = "NOT_PREEMPT",
|
||||
QOS_PROFILE_ARP_PREEMPTVULN = "NOT_PREEMPTABLE", SESSION_AMBR_UL = "330Mbps", SESSION_AMBR_DL = "330Mbps"}
|
||||
);
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,138 @@
|
||||
################################################################################
|
||||
# Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.openairinterface.org/?page_id=698
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#-------------------------------------------------------------------------------
|
||||
# For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# contact@openairinterface.org
|
||||
################################################################################
|
||||
SPGW-U =
|
||||
{
|
||||
FQDN = "gw1.spgw.node.epc.mnc01.mcc001.3gpp.org"; # FQDN for 4G
|
||||
INSTANCE = 0; # 0 is the default
|
||||
PID_DIRECTORY = "/var/run"; # /var/run is the default
|
||||
|
||||
#ITTI_TASKS :
|
||||
#{
|
||||
#ITTI_TIMER_SCHED_PARAMS :
|
||||
#{
|
||||
#CPU_ID = 1;
|
||||
#SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
|
||||
#SCHED_PRIORITY = 85;
|
||||
#};
|
||||
#S1U_SCHED_PARAMS :
|
||||
#{
|
||||
#CPU_ID = 1;
|
||||
#SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
|
||||
#SCHED_PRIORITY = 84;
|
||||
#};
|
||||
#SX_SCHED_PARAMS :
|
||||
#{
|
||||
#CPU_ID = 1;
|
||||
#SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
|
||||
#SCHED_PRIORITY = 84;
|
||||
#};
|
||||
#ASYNC_CMD_SCHED_PARAMS :
|
||||
#{
|
||||
#CPU_ID = 1;
|
||||
#SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
|
||||
#SCHED_PRIORITY = 84;
|
||||
#};
|
||||
#};
|
||||
|
||||
INTERFACES :
|
||||
{
|
||||
S1U_S12_S4_UP :
|
||||
{
|
||||
# S-GW binded interface for S1-U (N3) communication (GTPV1-U) can be ethernet interface, virtual ethernet interface, we don't advise wireless interfaces
|
||||
INTERFACE_NAME = "eth0"; # STRING, interface name, YOUR NETWORK CONFIG HERE
|
||||
IPV4_ADDRESS = "read"; # STRING, CIDR or "read to let app read interface configured IP address
|
||||
#PORT = 2152; # Default is 2152
|
||||
SCHED_PARAMS :
|
||||
{
|
||||
#CPU_ID = 2;
|
||||
SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
|
||||
SCHED_PRIORITY = 98;
|
||||
POOL_SIZE = 1; # NUM THREADS
|
||||
};
|
||||
};
|
||||
SX :
|
||||
{
|
||||
# S/P-GW binded interface for SX (N4) communication
|
||||
INTERFACE_NAME = "eth0"; # STRING, interface name
|
||||
IPV4_ADDRESS = "read"; # STRING, CIDR or "read" to let app read interface configured IP address
|
||||
#PORT = 8805; # Default is 8805
|
||||
SCHED_PARAMS :
|
||||
{
|
||||
#CPU_ID = 1;
|
||||
SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
|
||||
SCHED_PRIORITY = 88;
|
||||
POOL_SIZE = 1; # NUM THREADS
|
||||
};
|
||||
};
|
||||
SGI :
|
||||
{
|
||||
# No config to set, the software will set the SGi (N6) interface to the interface used for the default route.
|
||||
INTERFACE_NAME = "eth0"; # STRING, interface name or "default_gateway"
|
||||
IPV4_ADDRESS = "read"; # STRING, CIDR or "read" to let app read interface configured IP address
|
||||
SCHED_PARAMS :
|
||||
{
|
||||
#CPU_ID = 3;
|
||||
SCHED_POLICY = "SCHED_FIFO"; # Values in { SCHED_OTHER, SCHED_IDLE, SCHED_BATCH, SCHED_FIFO, SCHED_RR }
|
||||
SCHED_PRIORITY = 99;
|
||||
POOL_SIZE = 1; # NUM THREADS
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
SNAT = "yes"; # SNAT Values in {yes, no}
|
||||
PDN_NETWORK_LIST = (
|
||||
{NETWORK_IPV4 = "12.1.0.0/16";} # 1 ITEM SUPPORTED ONLY
|
||||
);
|
||||
# SMF LIST
|
||||
SPGW-C_LIST = (
|
||||
{IPV4_ADDRESS="192.168.70.133" ;}
|
||||
);
|
||||
|
||||
NON_STANDART_FEATURES :
|
||||
{
|
||||
BYPASS_UL_PFCP_RULES = "no"; # 'no' for standard features, yes for enhancing UL throughput
|
||||
};
|
||||
|
||||
SUPPORT_5G_FEATURES:
|
||||
{
|
||||
# STRING, {"yes", "no"},
|
||||
ENABLE_5G_FEATURES = "yes" # Set to 'yes' to support 5G Features
|
||||
REGISTER_NRF = "yes"; # Set to 'yes' if UPF resgisters to an NRF
|
||||
USE_FQDN_NRF = "no"; # Set to 'yes' if UPF relies on a DNS/FQDN service to resolve NRF's FQDN
|
||||
UPF_FQDN_5G = "oai-spgwu-tiny"; #Set FQDN of UPF
|
||||
|
||||
NRF :
|
||||
{
|
||||
IPV4_ADDRESS = "192.168.70.130"; # YOUR NRF CONFIG HERE
|
||||
PORT = 80; # YOUR NRF CONFIG HERE (default: 80)
|
||||
HTTP_VERSION = 1; #Set HTTP version for NRF (1 or 2)Default 1
|
||||
API_VERSION = "v1"; # YOUR NRF API VERSION HERE
|
||||
FQDN = "oai-nrf";
|
||||
};
|
||||
|
||||
# Additional info to be sent to NRF for supporting Network Slicing
|
||||
UPF_INFO = (
|
||||
{ NSSAI_SST = 1; NSSAI_SD = "0xFFFFFF"; DNN_LIST = ({DNN = "oai";}); },
|
||||
{ NSSAI_SST = 1; NSSAI_SD = "0xFFFFFF"; DNN_LIST = ({DNN = "openairinterface";}); },
|
||||
{ NSSAI_SST = 1; NSSAI_SD = "0xFFFFFF"; DNN_LIST = ({DNN = "ims";}); }
|
||||
);
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,63 @@
|
||||
################################################################################
|
||||
# Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.openairinterface.org/?page_id=698
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#-------------------------------------------------------------------------------
|
||||
# For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# contact@openairinterface.org
|
||||
################################################################################
|
||||
|
||||
UDM =
|
||||
{
|
||||
INSTANCE_ID = 0;
|
||||
PID_DIRECTORY = "/var/run";
|
||||
|
||||
UDM_NAME = "OAI_UDM";
|
||||
|
||||
INTERFACES:{
|
||||
# UDM binded interface for SBI interface (e.g., communication with UDR, AUSF)
|
||||
SBI:{
|
||||
INTERFACE_NAME = "eth0"; # YOUR NETWORK CONFIG HERE
|
||||
IPV4_ADDRESS = "read";
|
||||
PORT = 80; # YOUR NETWORK CONFIG HERE (default: 80)
|
||||
PPID = 60;
|
||||
API_VERSION = "v1";
|
||||
HTTP2_PORT = 8080; # YOUR NETWORK CONFIG HERE
|
||||
};
|
||||
};
|
||||
|
||||
# SUPPORT FEATURES
|
||||
SUPPORT_FEATURES: {
|
||||
# STRING, {"yes", "no"},
|
||||
USE_FQDN_DNS = "no"; # Set to yes if UDM will relying on a DNS to resolve UDR's FQDN
|
||||
USE_HTTP2 = "no"; # Set to yes to enable HTTP2 for AUSF server
|
||||
REGISTER_NRF = "no"; # Set to 'yes' if UDM resgisters to an NRF
|
||||
}
|
||||
|
||||
UDR:{
|
||||
IPV4_ADDRESS = "192.168.70.136"; # YOUR NETWORK CONFIG HERE
|
||||
PORT = 80; # YOUR NETWORK CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR API VERSION FOR UDR CONFIG HERE
|
||||
FQDN = "oai-udr" # YOUR UDR FQDN CONFIG HERE
|
||||
};
|
||||
|
||||
NRF :
|
||||
{
|
||||
IPV4_ADDRESS = "192.168.70.130"; # YOUR NRF CONFIG HERE
|
||||
PORT = 80; # YOUR NRF CONFIG HERE (default: 80)
|
||||
API_VERSION = "v1"; # YOUR NRF API VERSION HERE
|
||||
FQDN = "oai-nrf"; # YOUR NRF FQDN HERE
|
||||
};
|
||||
};
|
||||
@@ -0,0 +1,66 @@
|
||||
################################################################################
|
||||
# Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||
# contributor license agreements. See the NOTICE file distributed with
|
||||
# this work for additional information regarding copyright ownership.
|
||||
# The OpenAirInterface Software Alliance licenses this file to You under
|
||||
# the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||
# except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.openairinterface.org/?page_id=698
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#-------------------------------------------------------------------------------
|
||||
# For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||
# contact@openairinterface.org
|
||||
################################################################################
|
||||
UDR =
|
||||
{
|
||||
INSTANCE_ID = 0; # 0 is the default
|
||||
PID_DIRECTORY = "/var/run"; # /var/run is the default
|
||||
UDR_NAME = "OAI_UDR";
|
||||
|
||||
|
||||
SUPPORT_FEATURES:{
|
||||
USE_FQDN_DNS = "no"; # Set to yes if UDR will relying on a DNS to resolve UDM's FQDN
|
||||
REGISTER_NRF = "no"; # Set to yes if UDR resgisters to an NRF
|
||||
USE_HTTP2 = "no"; # Set to yes to enable HTTP2 for UDR server
|
||||
DATABASE = "MySQL"; # Set to 'MySQL'/'Cassandra' to use MySQL/Cassandra
|
||||
};
|
||||
|
||||
INTERFACES:
|
||||
{
|
||||
# NUDR Interface (SBI)
|
||||
NUDR:
|
||||
{
|
||||
INTERFACE_NAME = "eth0";
|
||||
IPV4_ADDRESS = "read";
|
||||
PORT = 80; # Default value: 80
|
||||
HTTP2_PORT = 8080;
|
||||
API_VERSION = "v1";
|
||||
};
|
||||
};
|
||||
|
||||
NRF:
|
||||
{
|
||||
IPV4_ADDRESS = "192.168.70.130";
|
||||
PORT = 80; # Default value: 80
|
||||
API_VERSION = "v1";
|
||||
FQDN = "oai-nrf";
|
||||
};
|
||||
|
||||
MYSQL:
|
||||
{
|
||||
# MySQL options
|
||||
MYSQL_SERVER = "mysql";
|
||||
MYSQL_USER = "root";
|
||||
MYSQL_PASS = "linux";
|
||||
MYSQL_DB = "oai_db";
|
||||
DB_CONNECTION_TIMEOUT = 300; # Reset the connection to the DB after expiring the timeout (in second)
|
||||
};
|
||||
};
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
[general]
|
||||
language=fr
|
||||
tcpenable=yes
|
||||
tcpbindaddr=0.0.0.0
|
||||
tcpbindport=5060
|
||||
srvlookup=yes
|
||||
@@ -0,0 +1,27 @@
|
||||
[001010000000001]
|
||||
fullname = user1
|
||||
hassip = yes
|
||||
context = users
|
||||
host = dynamic
|
||||
transport=udp
|
||||
|
||||
[001010000000002]
|
||||
fullname = user2
|
||||
hassip = yes
|
||||
context = users
|
||||
host = dynamic
|
||||
transport=udp
|
||||
|
||||
[001010000000003]
|
||||
fullname = user3
|
||||
hassip = yes
|
||||
context = users
|
||||
host = dynamic
|
||||
transport=udp
|
||||
|
||||
[001010000000004]
|
||||
fullname = user4
|
||||
hassip = yes
|
||||
context = users
|
||||
host = dynamic
|
||||
transport=udp
|
||||
+7
-3
@@ -156,6 +156,8 @@ INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPe
|
||||
('001010000000002', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000000\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000002');
|
||||
INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES
|
||||
('001010000000003', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000000\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000003');
|
||||
INSERT INTO `AuthenticationSubscription` (`ueid`, `authenticationMethod`, `encPermanentKey`, `protectionParameterId`, `sequenceNumber`, `authenticationManagementField`, `algorithmId`, `encOpcKey`, `encTopcKey`, `vectorGenerationInHss`, `n5gcAuthMethod`, `rgAuthenticationInd`, `supi`) VALUES
|
||||
('001010000000004', '5G_AKA', 'fec86ba6eb707ed08905757b1bb44b8f', 'fec86ba6eb707ed08905757b1bb44b8f', '{\"sqn\": \"000000000000\", \"sqnScheme\": \"NON_TIME_BASED\", \"lastIndexes\": {\"ausf\": 0}}', '8000', 'milenage', 'C42449363BBAD02B66D16BC975D77CC1', NULL, NULL, NULL, NULL, '001010000000004');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
@@ -209,11 +211,13 @@ CREATE TABLE `SessionManagementSubscriptionData` (
|
||||
--
|
||||
|
||||
INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES
|
||||
('001010000000001', '00101', '{\"sst\": 1, \"sd\": \"1\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 1,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"NOT_PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"10000Mbps\", \"downlink\":\"10000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.2\"}]}}');
|
||||
('001010000000001', '00101', '{\"sst\": 1, \"sd\": \"0xFFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.99\"}]},\"ims\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4V6\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 2,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}');
|
||||
INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES
|
||||
('001010000000002', '00101', '{\"sst\": 1, \"sd\": \"1\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 1,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"NOT_PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"10000Mbps\", \"downlink\":\"10000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.3\"}]}}');
|
||||
('001010000000002', '00101', '{\"sst\": 1, \"sd\": \"0xFFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.100\"}]},\"ims\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4V6\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 2,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}');
|
||||
INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES
|
||||
('001010000000003', '00101', '{\"sst\": 1, \"sd\": \"1\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 1,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"NOT_PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"10000Mbps\", \"downlink\":\"10000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.4\"}]}}');
|
||||
('001010000000003', '00101', '{\"sst\": 1, \"sd\": \"0xFFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.101\"}]},\"ims\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4V6\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 2,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}');
|
||||
INSERT INTO `SessionManagementSubscriptionData` (`ueid`, `servingPlmnid`, `singleNssai`, `dnnConfigurations`) VALUES
|
||||
('001010000000004', '00101', '{\"sst\": 1, \"sd\": \"0xFFFFFF\"}','{\"oai\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 6,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"},\"staticIpAddress\":[{\"ipv4Addr\": \"12.1.1.102\"}]},\"ims\":{\"pduSessionTypes\":{ \"defaultSessionType\": \"IPV4V6\"},\"sscModes\": {\"defaultSscMode\": \"SSC_MODE_1\"},\"5gQosProfile\": {\"5qi\": 2,\"arp\":{\"priorityLevel\": 15,\"preemptCap\": \"NOT_PREEMPT\",\"preemptVuln\":\"PREEMPTABLE\"},\"priorityLevel\":1},\"sessionAmbr\":{\"uplink\":\"1000Mbps\", \"downlink\":\"1000Mbps\"}}}');
|
||||
|
||||
-- --------------------------------------------------------
|
||||
|
||||
@@ -0,0 +1,145 @@
|
||||
version: '3.8'
|
||||
services:
|
||||
mysql:
|
||||
container_name: "mysql"
|
||||
image: mysql:8.0
|
||||
volumes:
|
||||
- ./database/oai_db.sql:/docker-entrypoint-initdb.d/oai_db.sql
|
||||
- ./healthscripts/mysql-healthcheck.sh:/tmp/mysql-healthcheck.sh
|
||||
environment:
|
||||
- TZ=Europe/Paris
|
||||
- MYSQL_DATABASE=oai_db
|
||||
- MYSQL_USER=test
|
||||
- MYSQL_PASSWORD=test
|
||||
- MYSQL_ROOT_PASSWORD=linux
|
||||
healthcheck:
|
||||
test: /bin/bash -c "/tmp/mysql-healthcheck.sh"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.131
|
||||
ims:
|
||||
container_name: "asterisk-ims"
|
||||
image: asterisk-ims:latest
|
||||
volumes:
|
||||
- ./conf/sip.conf:/etc/asterisk/sip.conf
|
||||
- ./conf/users.conf:/etc/asterisk/users.conf
|
||||
healthcheck:
|
||||
test: /bin/bash -c "pgrep asterisk"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.139
|
||||
oai-udr:
|
||||
container_name: "oai-udr"
|
||||
image: oaisoftwarealliance/oai-udr:develop
|
||||
entrypoint: ["/openair-udr/bin/oai_udr", "-c", "/openair-udr/etc/udr.conf", "-o"]
|
||||
depends_on:
|
||||
- mysql
|
||||
- oai-nrf
|
||||
volumes:
|
||||
- ./conf/oai-udr.conf:/openair-udr/etc/udr.conf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.136
|
||||
oai-udm:
|
||||
container_name: "oai-udm"
|
||||
image: oaisoftwarealliance/oai-udm:develop
|
||||
entrypoint: ["/openair-udm/bin/oai_udm", "-c", "/openair-udm/etc/udm.conf", "-o"]
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
volumes:
|
||||
- ./conf/oai-udm.conf:/openair-udm/etc/udm.conf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.137
|
||||
oai-ausf:
|
||||
container_name: "oai-ausf"
|
||||
image: oaisoftwarealliance/oai-ausf:develop
|
||||
entrypoint: ["/openair-ausf/bin/oai_ausf", "-c", "/openair-ausf/etc/ausf.conf", "-o"]
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
volumes:
|
||||
- ./conf/oai-ausf.conf:/openair-ausf/etc/ausf.conf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.138
|
||||
oai-nrf:
|
||||
container_name: "oai-nrf"
|
||||
image: oaisoftwarealliance/oai-nrf:develop
|
||||
entrypoint: ["/openair-nrf/bin/oai_nrf", "-c", "/openair-nrf/etc/nrf.conf", "-o"]
|
||||
volumes:
|
||||
- ./conf/oai-nrf.conf:/openair-nrf/etc/nrf.conf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.130
|
||||
oai-amf:
|
||||
container_name: "oai-amf"
|
||||
image: oaisoftwarealliance/oai-amf:develop
|
||||
entrypoint: ["/openair-amf/bin/oai_amf", "-c", "/openair-amf/etc/amf.conf", "-o"]
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
volumes:
|
||||
- ./conf/oai-amf.conf:/openair-amf/etc/amf.conf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.132
|
||||
oai-smf:
|
||||
container_name: "oai-smf"
|
||||
image: oaisoftwarealliance/oai-smf:develop
|
||||
entrypoint: ["/openair-smf/bin/oai_smf", "-c", "/openair-smf/etc/smf.conf", "-o"]
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
volumes:
|
||||
- ./conf/oai-smf.conf:/openair-smf/etc/smf.conf
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.133
|
||||
oai-spgwu-tiny:
|
||||
container_name: "oai-spgwu-tiny"
|
||||
image: oaisoftwarealliance/oai-spgwu-tiny:develop
|
||||
#for ims we need to execute below command once the container is running
|
||||
# iptables -t nat -A POSTROUTING -o eth0 -s 12.2.1.0/24 -j SNAT --to 192.168.70.134
|
||||
entrypoint: ["/openair-spgwu-tiny/bin/oai_spgwu", "-c", "/openair-spgwu-tiny/etc/spgw_u.conf","-o"]
|
||||
depends_on:
|
||||
- oai-nrf
|
||||
volumes:
|
||||
- ./conf/oai-spgwu-tiny.conf:/openair-spgwu-tiny/etc/spgw_u.conf
|
||||
cap_add:
|
||||
- NET_ADMIN
|
||||
- SYS_ADMIN
|
||||
cap_drop:
|
||||
- ALL
|
||||
privileged: true
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.134
|
||||
oai-ext-dn:
|
||||
image: oaisoftwarealliance/trf-gen-cn5g:latest
|
||||
privileged: true
|
||||
container_name: oai-ext-dn
|
||||
entrypoint: /bin/bash -c \
|
||||
"ip route add 12.1.0.0/16 via 192.168.70.134 dev eth0; sleep infinity"
|
||||
depends_on:
|
||||
- oai-spgwu-tiny
|
||||
healthcheck:
|
||||
test: /bin/bash -c "ip r | grep 12.1.1"
|
||||
interval: 10s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
networks:
|
||||
public_net:
|
||||
ipv4_address: 192.168.70.135
|
||||
networks:
|
||||
public_net:
|
||||
driver: bridge
|
||||
name: demo-oai-public-net
|
||||
ipam:
|
||||
config:
|
||||
- subnet: 192.168.70.128/26
|
||||
driver_opts:
|
||||
com.docker.network.bridge.name: "demo-oai"
|
||||
@@ -0,0 +1,46 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
if [ "$MYSQL_ROOT_PASSWORD" ] && [ -z "$MYSQL_USER" ] && [ -z "$MYSQL_PASSWORD" ]; then
|
||||
echo >&2 'Healthcheck error: cannot determine root password (and MYSQL_USER and MYSQL_PASSWORD were not set)'
|
||||
exit 0
|
||||
fi
|
||||
|
||||
host="$(hostname --ip-address || echo '127.0.0.1')"
|
||||
user="${MYSQL_USER:-root}"
|
||||
export MYSQL_PWD="${MYSQL_PASSWORD:-$MYSQL_ROOT_PASSWORD}"
|
||||
|
||||
args=(
|
||||
# force mysql to not use the local "mysqld.sock" (test "external" connectivity)
|
||||
-h"$host"
|
||||
-u"$user"
|
||||
--silent
|
||||
)
|
||||
|
||||
STATUS=0
|
||||
if command -v mysqladmin &> /dev/null; then
|
||||
if mysqladmin "${args[@]}" ping > /dev/null; then
|
||||
database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM AuthenticationSubscription;")
|
||||
if [[ -z $database_check ]]; then
|
||||
echo "Healthcheck error: oai_db not populated"
|
||||
STATUS=1
|
||||
fi
|
||||
STATUS=0
|
||||
else
|
||||
echo "Healthcheck error: Mysql port inactive"
|
||||
STATUS=1
|
||||
fi
|
||||
else
|
||||
if select="$(echo 'SELECT 1' | mysql "${args[@]}")" && [ "$select" = '1' ]; then
|
||||
database_check=$(mysql -u$user -D oai_db --silent -e "SELECT * FROM AuthenticationSubscription;")
|
||||
if [[ -z $database_check ]]; then
|
||||
echo "Healthcheck error: oai_db not populated"
|
||||
STATUS=1
|
||||
fi
|
||||
STATUS=0
|
||||
else
|
||||
echo "Healthcheck error: Mysql port inactive"
|
||||
STATUS=1
|
||||
fi
|
||||
fi
|
||||
exit $STATUS
|
||||
Reference in New Issue
Block a user