2 Planning Your Installation

This chapter describes how to plan your installation of the Binding Support Function (BSFF) cloud native deployment package.

Overview

Binding Support Function (BSF) cloud native deployment package includes ready-to-use images and Helm charts to help you orchestrate containers in Kubernetes.

You can use the Docker images and Helm chart to help you deploy and manage Pods of BSF product services in Kubernetes. Communication between Pods of services of BSF products are preconfigured in the Helm charts.

Below table lists the docker images for BSF.

Table 2-1 Docker Images for BSF

S.No Service Name Docker Image Name
1 Application info service app_info
2 BSF Service bsf_management_service
3 CM Service ocpm_cm_service
4 Config Server Service ocpm_config_server
5 Diameter Connector diam-connector
6 Diameter Gateway diam-gateway
7 Performance Monitoring Service perf_info
8 Readiness check readiness-detector

Software Compatibility

The following softwares must be installed before installing Binding Support Function (BSF):

Software Version
Kubernetes v1.15.3
HELM v2.14.3

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

Software App Version Notes
alertmanager 0.18.0 Needed for Tracing Area
elasticsearch 6.8.2 Needed for Logging Area
elastic-curator 5.5.4 Needed for Logging Area
elastic-exporter 1.0.2 Needed for Logging Area
logs 2.0.7 Needed for Logging Area
kibana 6.7.0 Needed for Logging Area
grafana 6.1.6 Needed for Metrics Area
prometheus 9.1.2 Needed for Metrics Area
prometheus-node-exporter 0.17.0 Needed for Metrics Area
metallb 0.7.3 Needed for External IP
metrics-server 0.3.1 Needed for Metric Server
occne-snmp-notifier 0.3.0 Needed for Metric Server
tracer 0.8.3 Needed for Tracing Area

Note:

The above softwares are available if the BSF is deployed in the Oracle Communications Cloud Native Environment (OCCNE). If you are deploying BSF in any other environment, the above softwares must be installed before installing the BSF. To check the installed software items,
helm ls
Some of the systems may need to use helm command with admin.conf file as follows:
helm --kubeconfig admin.conf

Environment Setup

Note:

This section is applicable only when the Binding Support Function (BSF) is deployed in the environment, other than OCCNE.

Network access

The Kubernetes cluster hosts must have network access to:

  • Local helm repository, where the BSF helm charts are available.
    To check if the Kubernetes cluster hosts have network access to the local helm repository, execute the following command:
    helm repo update

    Note:

    Some of the systems may need to use helm command with admin.conf file as follows:
    helm --kubeconfig admin.conf
  • Local docker image repository, where the BSF images are available.
    To check if the Kubernetes cluster hosts have network access to the local docker image repository, pull any image with tag name to check connectivity by executing the following command:
    docker pull docker-repo/image-name:image-tag
    where:

    docker-repo is the IP address or host name of the repository.

    image-name is the docker image name.

    image-tag is the tag the image used for the BSF pod.

Note:

All the kubectl and helm related commands that are used in this guide must be executed on a system depending on the infrastructure/deployment. It could be a client machine, such as, a VM, server, local desktop, and so on.

Client Machine Requirements

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

Server or Space Requirements

For information on the server or space requirements, see the Oracle Communications Cloud Native Environment (OCCNE) Installation Guide.

Configuring Database

Introduction

Binding Support Function (BSF) microservices use MySQL database to store the configuration and run time data. Following microservices require dedicated MySQL databases created in MySQL data tier.
  • BSF Management Service - To store Binding session state
  • Config Server - To store configuration data
The BSF requires the database administrator to create user in MySQL DB and provide necessary permissions to access the databases. Before installing the BSF it is required that the MySQL user and databases are created.

Customizing Database Name

Each microservice has a default database name assigned as mentioned in below table:
Service Name Default Database Name
BSF Management Service ocpm_bsf
Config Server Service ocpm_config_server

It is recommended to use unique database name when there are multiple instances of BSF deployed in the network and they share the same data tier (MySQL cluster).

It is recommended to create custom unique database name, by simply prefixing the default database name with an identifier that uniquely identifies this instance of BSF deployment. This way database name uniqueness can be achieved across all deployments. However, you can use any prefix to create the unique database name. For example, if the OCBSF deployment name is "site1" then the BSF Management Service database can be named as " site1_ocpm_bsf". Refer the BSF Customization Parameters section for how to override default database names with custom database names.

Configuring MYSQL Database

The BSF deployment requires the database administrator to create a user in the MYSQL database, and to assign it to the group having necessary permissions to access the tables on all SQL nodes.

Note:

This procedure must be performed only once before initiating the BSF deployment.

To configure MYSQL database for the different microservices:

  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 tables for the different microservices:

    Note:

    User with admin privileges can create the tables.

    BSF Management Service

    In the following script default database name " ocpm_bsf" is used, if custom database name is used then replace it wherever applicable.
    CREATE DATABASE IF NOT EXISTS `ocpm_bsf`;
      
    CREATE TABLE IF NOT EXISTS ocpm_bsf.pcf_binding (
      binding_id binary(16) not null,
      ipv4_addr varchar(64),
      ip_domain varchar(128),
      ipv6_prefix varchar(64),
      mac_addr_48 varchar(64),
      dnn varchar(128),
      supi varchar(64),
      gpsi varchar(64),
      snssai_sd varchar(64),
      snssai_sst integer,
      created_date_time datetime(6) not null,
      json_content longblob not null,
      primary key (binding_id),
      key idx_created_date_time (created_date_time),
      key idx_ipv4Addr (ipv4_addr, created_date_time),
      key idx_ipv6Prefix (ipv6_prefix, created_date_time),
      key idx_macAddr48 (mac_addr_48, created_date_time),
      key idx_supi (supi, created_date_time),
      key idx_gpsi (gpsi, created_date_time)
    );

    Config Server Service

    In the following script default database name " ocpm_config_server" is used, if custom database name is used then replace it wherever applicable.
    CREATE DATABASE IF NOT EXISTS `ocpm_config_server`;
     
     
    CREATE TABLE IF NOT EXISTS `ocpm_config_server`.`topic_info` (
      `id` bigint(20) NOT NULL AUTO_INCREMENT,
      `description` varchar(255) COLLATE utf8_unicode_ci DEFAULT 'Default Topics.',
      `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
      `modify_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
      `version` int(11) NOT NULL,
      PRIMARY KEY (`id`),
      UNIQUE KEY `UK_gd6b0a6mdpxc55qbibre2cldc` (`name`)
    ) AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
     
    CREATE TABLE IF NOT EXISTS `ocpm_config_server`.`configuration_item` (
      `id` bigint(20) NOT NULL AUTO_INCREMENT,
      `cfg_key` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
      `md5sum` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
      `cfg_value` mediumtext COLLATE utf8_unicode_ci,
      `version` int(11) NOT NULL,
      `topic_info_id` bigint(20) NOT NULL,
      PRIMARY KEY (`id`),
      KEY `FKdue8drxn6acrdt63iacireky1` (`topic_info_id`)
    ) DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
  5. Create the user and assign it to a group having necessary permissions to access the tables on all of the SQL nodes by executing the following command: :
    CREATE USER 'username'@'%' IDENTIFIED BY 'password';
    
    where:

    username is the username and password is the password for MySQL database user.

    For Example: In the below example, "bsfusr" is used as username, "bsfpasswd" is used as password.

    CREATE USER 'bsfusr'@'%' IDENTIFIED BY 'bsfpasswd';
    GRANT SELECT, INSERT, UPDATE, DELETE ON ocpm_bsf.* TO 'bsfusr'@'%';
    GRANT SELECT, INSERT, UPDATE, DELETE ON ocpm_config_server.* TO 'bsfusr'@'%';
  6. Execute the command, show databases, to view database.
  7. Exit from database and logout from MYSQL node.