Go to primary content
Oracle® Communications Network Repository Function (NRF) Cloud Native Installation and Upgrade Guide
Release 1.0
F16981-02
Go To Table Of Contents
Contents

Previous
Previous
Next
Next

NRF Installation

This chapter contains information about the NRF Installation in Cloud Native Environment.

Pre-installation Procedure

Create Database User/Group

The NRF uses a MySQL database to store the configuration and run time data.

The NRF deployment using MySQL NDB cluster requires the database administrator to create user in MYSQL DB and to provide the user with necessary permissions to access the tables in the NDB cluster.

Note:

This procedure must be performed only once before initiating the NRF deployment.
  1. Login to the server where the ssh keys are stored and SQL nodes are accessible.
  2. Connect to the SQL nodes.
  3. Login to the Database as a root user.
  4. Create a user and assign it to a group having necessary permission to access the tables on all the SQL nodes:
    CREATE USER '<username>'@'%' IDENTIFIED BY '<password>';
    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 '<user>'@'%';
    USE nrfdb;

    Note:

    The <username> and <password> is created by the Database Administrator.
  5. Create NRF tables on one of the SQL Node:
    CREATE TABLE `NfInstances` (
      `nfInstanceId` varchar(36) NOT NULL,
      `nfType` varchar(30) NOT NULL,
      `nfStatus` enum('REGISTERED','SUSPENDED') NOT NULL,
      `doc` json NOT NULL,
      PRIMARY KEY (`nfInstanceId`)
    ) ENGINE=NDBCLUSTER DEFAULT CHARSET=utf8;
     
    CREATE TABLE `NfSubscriptions` (
      `subscriptionId` varchar(36) NOT NULL,
      `nfStatusNotificationUri` varchar(256) NOT NULL,
      `doc` json NOT NULL,
      `validityTime` datetime NOT NULL,
      PRIMARY KEY (`subscriptionId`)
    ) ENGINE=NDBCLUSTER DEFAULT CHARSET=utf8;
      
    CREATE TABLE `NfStatusMonitor` (
      `nfInstanceId` varchar(36) NOT NULL,
      `lastHbTimestamp` datetime DEFAULT NULL,
      `lastNotifLoad` int(11) DEFAULT NULL,
      `nfLoad` int(11) DEFAULT NULL,
      `nfStatus` enum('REGISTERED','SUSPENDED') NOT NULL,
      `numHbMissed` int(11) NOT NULL,
      `suspendedTimestamp` datetime DEFAULT NULL,
      PRIMARY KEY (`nfInstanceId`)
    ) ENGINE=NDBCLUSTER DEFAULT CHARSET=utf8;
  6. Exit from database and logout from SQL node.

NRF Deployment on Kubernetes

Note:

By default, the namespace and helm release for NRF is ocnrf.

Table 3-4 NRF Deployment

Step # Procedure Description

1

Create customized ocnrf-custom-values-1.0.0.yaml file Create the customized ocnrf-custom-values-1.0.0.yaml with the required input parameters.

To configure the parameters, see section NRF Configuration.

or,

The ocnrf-custom-values-1.0.0.yaml template can be downloaded from OHC.

Download the Network Repository Function (NRF) Custom Template. Unzip the ocnrf-custom-configTemplates-1.0.0.0.0.zip to get ocnrf-custom-values-1.0.0.yaml file.

2

Go to the unzipped OCNRF package

Go to the unzipped OCNRF package in the following directory:

cd ocnrf-pkg-1.0.0.0.0

3

Deploy OCNRF Execute the following command:

helm install ocnrf/ --name <helm-release> --namespace <k8s namespace> -f <ocnrf_customized_values.yaml>

For example: helm install ocnrf/ --name ocnrf --namespace ocnrf -f ocnrf-custom-values-1.0.0.yaml

4

Check status of the deployment Execute the following command:

helm status <helm-release>

For example: helm status ocnrf

5

Check status of the services Execute the following command:

kubectl get services -n <namespace>

For example:

kubectl get services -n ocnrf

Note: If metallb is used, EXTERNAL-IP is assigned to ocnrf-endpoint.

6

Check status of the pods Execute the following command:

kubectl get pods -n <ocnrf_namespace>

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:

kubectl get pods -n ocnrf

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-5 Parameters and Definitions for NRF 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.