2 Installing NSSF

This section describes how to install NSSF on a cloud native environment. It contains the following topics:

NSSF Prerequisites

This section includes information about the necessary prerequisites for NSSF deployment.

Following are the prerequisites to install and configure NSSF:

NSSF Software

The NSSF software includes:

  • NSSF Helm charts
  • NSSF docker images

The following software must be installed:

Software Version
Kubernetes v1.12.5
HELM v2.11.0

Additional software that needs to be deployed as per the requirement of the services:

Software Chart Version
elasticsearch 1.21.1
elastic-curator 1.2.1
elastic-exporter 1.1.2
logs 2.0.7
kibana 1.5.2
grafana 2.2.0
prometheus 8.8.0
prometheus-node-exporter 1.4.0
metallb 0.8.4
metrics-server 2.4.0
jaeger 0.13.3

Note:

If any of the software specified in the table above is not installed in CNE, install the software.

If OCCNE is the platform, refer Cloud Native Environment Installation Guide.

Network Access

The Kubernetes cluster host must have network access to:

  • Local docker image repository where the NSSF images are available.
  • Local helm repository where the NSSF helm charts are available.

Note:

All the kubectl and helm related commands that are used in this document must be executed on a system depending on the infrastructure or the deployment. It could be a client machine.

Client Machine Requirements

Following are the requirements for the client machine where the deployment commands need to be executed:
  • It must have network access to the helm repository and docker image repository.
  • Helm repository must be configured on the client.
  • It must have network access to the Kubernetes cluster.
  • It must have necessary environment settings to run the kubectl commands. The environment must have privileges to create namespace in the Kubernetes cluster.
  • It must have helm client installed. The environment must be configured so that the helm install command deploys the software in the Kubernetes cluster.

NSSF Installation Sequence

This section provides details about the sequence in which NSSF must be installed.

  1. Installation Preparation: This includes downloading the required files and loading the files to the system.
  2. Configure the custom_values.yaml file: This step includes configuring the following based on the deployment:
    • Repository path
    • Primary and Secondary node
    • NSSF details

    Note:

    Other configurations might be changed based on the deployment.
  3. NSSF deployment: NSSF can be deployed in either of the following ways:
    • With HELM repository
    • With HELM tar
  4. Verify NSSF deployment: In this step if the services and pods are up and running is verified.

Docker Images for NSSF

Following are the NSSF images:

Table 2-1 NSSF Images

Services Docker Image Name
Egress Gateway ocnssf-egress
Ingress Gateway ocnssf-ingress
NS-Availability ocnssf-nsavailability
NS-Config ocnssf-nsconfig
NS-Selection ocnssf-nsselection
NS-Subscription ocnssf-nssubscription
NRF Client Service ocnssf-nrf-clientservice
Application Info Service ocnssf-appinfo
Configuration Server Service config_server
Performance Monitoring Service perf_info

NSSF Installation Preparation

The following procedure describes the steps to download the NSSF Images and Helm files from OSDC.

For more information about configuring docker image and registry, refer to chapter OCCNE Docker Image Registry Configuration in OCCNE Installation Guide.

  1. Download the NSSF package file:

    Customers are required to download the NSSF package file from Oracle Software Delivery Cloud (OSDC). Package is named as follows:

    <nfname>-pkg-<marketing-release-number>

    Example: ocnssf-pkg-1.4.0.0.0.tgz

  2. Untar the NSSF Package File:

    Untar the NSSF package to the specific repository:

    tar -xvf <<nfname>-pkg-<marketing-release-number>> 
    The package file consists of following:
    • NSSF Docker Images File

      ocnssf-images-1.4.0.tar

    • Helm File

      ocnssf-1.4.0.tgz

    • Readme txt file

      Readme.txt (Contains cksum and md5sum of tarballs)

  3. Check the checksums:

    Check the checksums of tarballs mentioned in Readme.txt. Refer to the Readme.txt file for commands and checksum details.
  4. Load the tarball to system:

    Execute the following command to load the tarball to system:

    docker load --input ocnssf-images-1.4.0.tar 
  5. Check if all the images are loaded:

    Execute the following command to check whether alll the images are loaded:

    docker images

    Refer table NSSF Images in section NSSF Installation Sequence for the list of images.

  6. Push docker images to docker registry:

    Execute the following commands to push the docker images to docker registry:

    docker tag <image-name>:<image-tag> <docker-repo>/<image-name>:<image-tag>
    docker push <docker-repo>/<image-name>:<image-tag> 
  7. Untar Helm Files:

    Execute the following command to untar the helm files:

    tar -xvzf ocnssf-1.4.0.tgz
    
  8. Download the Network Slice Selection Function (NSSF) Custom Template ZIP file:

    Download the Network Slice Selection Function (NSSF) Custom Template ZIP file from OHC:

    • Go to the URL, docs.oracle.com
    • Navigate to Industries >Communications >Signaling & Policy >Cloud Native Core
    • Click the Network Slice Selection Function (NSSF) Custom Template link to download the zip file.
    • Unzip the template to get the following files:
      • ocnssf-custom-values-1.4.0.yaml 
      • onssfDashboard.json

NSSF Installation

This section includes information about NSSF deployment.

Following are the parameters and definitions used during NSSF deployment:

Table 2-2 Parameters and Definitions

Parameters Definitions
<helm chart> It is the name of the chart that is of the form <helm repo>/ocnssf.
<OCNSSF version> It is the software version (helm chart version) of the NSSF. This is optional, if omitted, the default version is the latest version available in helm repository.
<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 NSSF. All the NSSF microservices are deployed in this kubernetes namespace.
<mysql host> It is the hostname of the mysql service and can be provided as, <release>-mysql.<k8s namespace>.

NSSF Deployment on Kubernetes

Note:

To configure the parameters, refer Customizing NSSF.

Create Database User and Group

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

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

  1. Login to the server where the ssh keys are stored and the 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 primary SQL nodes:
    
    CREATE USER '<username>'@'%' IDENTIFIED BY '<password>';
    DROP DATABASE if exists nssfdb;
    CREATE DATABASE nssfdb CHARACTER SET utf8;
    GRANT SELECT, INSERT, CREATE, ALTER, DROP, LOCK TABLES, CREATE TEMPORARY
    TABLES, DELETE, UPDATE,
    EXECUTE ON nssfdb.* TO '<username>'@'%';
    USE nssfdb;
    
  5. Grand necessary permissoins to access the tables on seconary SQL nodes:
    GRANT SELECT, INSERT, CREATE, ALTER, DROP, LOCK TABLES, CREATE TEMPORARY
    TABLES, DELETE, UPDATE,
    EXECUTE ON nssfdb.* TO '<username>'@'%';
    USE nssfdb;
    

    Note:

    The <username> and <password> is created by the Database Administrator.
  6. Exit from database and logout from SQL node.

NSSF Deployment

  1. Create customized ocnssf-custom-values-1.4.0.yaml file :

    Create the customized ocnssf-custom-values-1.4.0.yaml with the required input parameters.

    To configure the ocnssf-custom-values-1.4.0.yaml, refer to Customizing NSSF

    or,

    The ocnssf-custom-values-1.4.0.yaml template can be downloaded from OHC.

    Download the package ocnssf-custom-configTemplates-1.4.0.0.0.zip and Unzip to get ocnssf-custom-values-1.4.0.yaml file.

  2. Go to the unzipped OCNSSF package:

    Go to the following directory:

    cd OCNSSF-pkg-1.4.0.0.0

  3. Deploy OCNSSF:

    Execute the following command:

    For helm 2 based:

    helm install ocnssf/ --name <helm-release> --namespace <k8s namespace> -f <ocnssf_customized_values.yaml> 
    Example: helm install ocnssf/ --name ocnssf --namespace ocnssf -f ocnssf-custom-values-1.4.0.yaml

    Example:

    helm install ocnssf/ --name ocnssf --namespace ocnssf -f ocnssf-custom-values-1.4.0.yaml

    For helm 3 based:

    helm install <helm-release> ocnssf/ --namespace <k8s namespace> f <ocnssf_customized_values.yaml>  
    
    Example:
    helm install ocnssf ocnssf/ --namespace ocnssf -f ocnssf-custom-values-1.4.0.yaml  
  4. Check status of the deployment:

    Execute the following command to check the status of the deployment:

    helm status --name <helm-release>

    Example: helm status --name ocnssf

  5. Check status of the services:

    Execute the following command to check the status of services:

    kubectl -n <k8s namespace> get services

    Example:

    kubectl -n ocnssf get services

    Note:

    If metallb is used, EXTERNAL-IP is assigned to<helm release name>-endpoint. ocnssf is the helm release name.
    Sample output:
    NAME                 TYPE         CLUSTER-IP  EXTERNAL-IP     PORT(S)                AGE
    ocnssf-appinfo                ClusterIP    10.98.169.9    <none>    5906/TCP                      44h
    ocnssf-egress                 ClusterIP    10.107.165.12  <none>    8080/TCP                      44h
    ocnssf-ingress                LoadBalancer 10.107.131.252 <pending> 80:30075/TCP                  44h
    ocnssf-nrf-client-nfdiscovery NodePort     10.104.86.218  <none>    5910:30598/TCP,5805:31734/TCP 44h  
    ocnssf-nrf-client-nfmanagementNodePort     10.104.31.40   <none>    5910:30847/TCP,5805:31488/TCP 44h
    ocnssf-nsavailability         NodePort     10.97.145.148  <none>    5745:32218/TCP                44h
    ocnssf-nsconfig               NodePort     10.104.57.232  <none>    5755:30225/TCP                44h
    ocnssf-nsdb                   ClusterIP    10.109.80.141  <none>    3306/TCP                      44h
    ocnssf-nsselection            NodePort     10.102.208.48  <none>    5745:31302/TCP,4546:32109/TCP 44h
    ocnssf-nssubscription         NodePort     10.107.153.91  <none>    5745:30302/TCP,4546:31375/TCP 44h
    ocnssf-ocpm-config            ClusterIP    10.103.10.228  <none>    5807/TCP,9000/TCP             44h
    ocnssf-performance            NodePort     10.107.40.119  <none>    5905:31553/TCP                44h
    
  6. Check status of the pods:

    Execute the following command to status of the pods:

    kubectl get pods -n <k8s namespace>

    Status column of all the pods must indicate 'Running'.

    Ready column of all the pods must be n/n, where n is number of containers in the pod.

    Example:

    kubectl get pods -n ocnssf

    Sample output :
    NAME                                  READY STATUS RESTARTS AGE
    ocnssf-appinfo-7969c9fbf7-4fmgj                 1/1  Running   0   18m 
    ocnssf-config-server-54bf4bc8f9-s82cv           1/1  Running   0   18m 
    ocnssf-egress-6b6bff8949-2mf7b                  1/1  Running   0   18m 
    ocnssf-ingress-68d76954f5-9fsfq                 1/1  Running   0   18m 
    ocnssf-nrf-client-nfdiscovery-cf48cd8d8-l4q2q   1/1  Running   0   18m
    ocnssf-nrf-client-nfdiscovery-cf48cd8d8-vmt5v   1/1  Running   0   18m
    ocnssf-nrf-client-nfmanagement-7db4598fbb-672hc 1/1  Running   0   18m 
    ocnssf-nsavailability-644999bbfb-9gcm5          1/1  Running   0   18m 
    ocnssf-nsconfig-577446c487-dzsh6                1/1  Running   0   18m
    ocnssf-nsdb-585f7bd7d-tdth4                     1/1  Running   0   18m 
    ocnssf-nsselection-5dfcc94bc7-q9gct             1/1  Running   0   18m 
    ocnssf-nssubscription-5c898fbbb9-fqcw6          1/1  Running   0   18m 
    ocnssf-performance-6d75c7f966-qm5fq             1/1  Running   0   18m