OCNRF Deployment
This chapter contains information about the OCNRF Deployment in Cloud Native Environment.
Pre-installation Procedure
Create Database User/Group
The OCNRF uses a MySQL database to store the configuration and run time data.
Note:
This procedure must be performed only once before initiating the OCNRF deployment.- Login to the server where the ssh keys are stored and SQL nodes are accessible.
- Connect to the SQL nodes.
- Login to the Database as a root user.
- Create a user and assign
it to a group having necessary permission to access the tables on all the SQL
nodes:
Create User with permission to access the tables on all the SQL nodes present in the NDB cluster, by executing:
CREATE USER '****'@'%' IDENTIFIED BY '****'; DROP DATABASE if exists nrfdb; CREATE DATABASE nrfdb CHARACTER SET utf8; GRANT SELECT, INSERT, CREATE, ALTER, DROP, LOCK TABLES, CREATE TEMPORARY TABLES, DELETE, UPDATE, EXECUTE ON nrfdb.* TO '****'@'%'; USE nrfdb;
Note:
- Check if the user already exists, if yes then first drop the existing user and create a new one.
- The
<username>
and<password>
is created by the Database Administrator.
- In case OCNRF 1.2 is
installed on a system having MYSQL cluster that was used in OCNRF 1.0 or OCNRF
1.1, the existing tables must be dropped before creating again for OCNRF 1.2,
by executing the following command on one of the NDB SQL Nodes:
DROP TABLE IF EXISTS `NfInstances`; DROP TABLE IF EXISTS `NfStatusMonitor`; DROP TABLE IF EXISTS `NfSubscriptions`; DROP TABLE IF EXISTS `NfScreening`; DROP TABLE IF EXISTS `NrfSystemOptions`;
- Create OCNRF tables on one
of the SQL Nodes by executing:
CREATE TABLE IF NOT EXISTS `NfInstances` ( `nfInstanceId` VARCHAR(36) NOT NULL, `nfType` VARCHAR(30) NOT NULL, `nfStatus` ENUM('REGISTERED', 'SUSPENDED', 'UNDISCOVERABLE') NOT NULL, `doc` JSON NOT NULL, `creationTimestamp` DATETIME NOT NULL, `lastUpdateTimestamp` DATETIME NOT NULL, primary key (`nfInstanceId`) )ENGINE=NDBCLUSTER DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `NfStatusMonitor` ( `nfInstanceId` VARCHAR(36) NOT NULL, `lastHbTimestamp` DATETIME, `lastNotifLoad` INTEGER, `nfLoad` INTEGER, `heartBeatTimer` INTEGER, `nfStatus` ENUM('REGISTERED', 'SUSPENDED','UNDISCOVERABLE') NOT NULL, `numHbMissed` INTEGER NOT NULL, `numHbMissedBeforeAudit` INTEGER NOT NULL, `suspendedTimestamp` DATETIME, `creationTimestamp` DATETIME NOT NULL, `lastUpdateTimestamp` DATETIME NOT NULL, primary key (`nfInstanceId`) )ENGINE=NDBCLUSTER DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `NfSubscriptions`( `subscriptionId` VARCHAR(36) NOT NULL, `nfStatusNotificationUri` VARCHAR(256) NOT NULL, `doc` JSON NOT NULL, `validityTime` DATETIME NOT NULL, `creationTimestamp` DATETIME NOT NULL, `lastUpdateTimestamp` DATETIME NOT NULL, primary key (`subscriptionId`) )ENGINE=NDBCLUSTER DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `NfScreening` ( `nfScreeningRulesListType` ENUM('NF_FQDN', 'NF_IP_ENDPOINT', 'CALLBACK_URI', 'PLMN_ID', 'NF_TYPE_REGISTER') NOT NULL, `nfScreeningType` ENUM('BLACKLIST', 'WHITELIST') NOT NULL, `nfScreeningRulesListStatus` ENUM('ENABLED', 'DISABLED') NOT NULL DEFAULT 'DISABLED', `nfScreeningData` JSON NOT NULL, `creationTimestamp` DATETIME NOT NULL, `lastUpdateTimestamp` DATETIME NOT NULL, primary key (`nfScreeningRulesListType`) )ENGINE=NDBCLUSTER DEFAULT CHARSET=utf8; CREATE TABLE IF NOT EXISTS `NrfSystemOptions` ( `id` VARCHAR(36) UNIQUE NOT NULL, `nfScreeningFeatureStatus` ENUM('ENABLED','DISABLED') NOT NULL, `nfScreeningFailureHttpCode` SMALLINT NOT NULL, `nfHeartBeatTimer` SMALLINT NOT NULL, `nrfPlmnList` JSON NOT NULL, `nfNotifyLoadThreshold` SMALLINT NOT NULL, `nrfSupportForProfileChangesInResponse` BOOLEAN NOT NULL, `subscriptionValidityDuration` INTEGER NOT NULL, `nrfSupportForProfileChangesInNotification` BOOLEAN NOT NULL, `nfProfileSuspendDuration` INTEGER NOT NULL, `nfHearbeatMissAllowed` SMALLINT NOT NULL, `discoveryValidityPeriod` INTEGER NOT NULL, `profilesCountInDiscoveryResponse` SMALLINT, `discoveryResultLoadThreshold` SMALLINT, `creationTimestamp` DATETIME NOT NULL, `lastUpdateTimestamp` DATETIME NOT NULL, primary key (`id`) )ENGINE=NDBCLUSTER DEFAULT CHARSET=utf8;
- Exit from database and logout from SQL node.
OCNRF Deployment on Kubernetes
Note:
By default, the namespace and helm release for OCNRF isocnrf
.
Table 3-3 OCNRF Deployment
Step # | Procedure | Description |
---|---|---|
1 ![]() |
Create customized
ocnrf-custom-values-1.2.0.yaml
file
|
Create the customized
ocnrf-custom-values-1.2.0.yaml
with the required input parameters.
To configure the parameters, see section OCNRF Configuration. or,The
Download the Network Repository Function (NRF) Custom
Template. Unzip the
|
2 ![]() |
Go to the unzipped OCNRF package |
Go to the unzipped OCNRF package in the following directory:
|
3 ![]() |
Deploy OCNRF | Execute the following command:
For example:
|
4 ![]() |
Check status of the deployment | Execute the following command:
For example:
|
5 ![]() |
Check status of the services | Execute the following command:
For example:
Note:
If
|
6 ![]() |
Check status of the pods | Execute the following command:
Status column of all the pods should be 'Running'. Ready column of all the pods should be n/n, where n is number of containers in the pod. For example:
NAME READY STATUS RESTARTS AGE ocnrf-endpoint-6cb48bdc57-s6vws 2/2 Running 0 18h ocnrf-mysql-5d695b599f-5gwhh 1/1 Running 0 18h ocnrf-nfdiscovery-6c4b69c97f-sc84n 1/1 Running 0 18h ocnrf-nfregistration-6bcf5d84b7-qfrjm 1/1 Running 0 18h ocnrf-nfsubscription-67c6cc8fff-gtldj 1/1 Running 0 18h ocnrf-nrfauditor-77d57949c7-gx2p2 1/1 Running 0 18h |
Table 3-4 Parameters and Definitions for OCNRF Installation
Parameters | Definitions |
---|---|
<helm-release>
|
It is a name provided by the user to identify the helm deployment |
<k8s namespace>
|
It is a name provided by the user to identify the kubernetes namespace of the OCNRF. All the OCNRF micro services are deployed in this kubernetes namespace. |