5 IWF Installation
This section includes information about the OCIWF installation procedures.
IWF Deployment Procedure
The following procedure guides you through installation of OCIWF on CNE:
OCIWF Deployment
-
Create Database User/Group:
Create User with permission to access the tables on all the SQL nodes present in the NDB cluster, by executing commands:
Note:
- The OCIWF uses a MySQL database to store the configuration and run time data.
- The OCIWF 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.
- Login to the server where the ssh keys are stored and SQL nodes are accessible.
- Connect to the SQL nodes.
ssh <USERNAME>@<HOSTNAME>
- Login to the MYSQL as a root user:
/usr/local/mysql/bin/mysql -h 127.0.0.1 -u root -p <password>
- Create MYSQL user:
CREATE USER '<USERNAME>'@'%' IDENTIFIED BY '<PASSWORD>'; DROP DATABASE if exists iwfdb; CREATE DATABASE iwfdb CHARACTER SET utf8; GRANT SELECT, INSERT, CREATE, ALTER, DROP, LOCK TABLES, CREATE TEMPORARY TABLES, DELETE, UPDATE, EXECUTE ON iwfdb.* TO '<USERNAME>'@'%';
- Execute the following commands on one of the NDB SQL
node:
- Log into the MYSQL user created in the
previous step:
/usr/local/mysql/bin/mysql -h 127.0.0.1 -u <USERNAME> -p <PASSWORD>
- Create MYSQL table:
USE iwfdb; CREATE TABLE IF NOT EXISTS session_correlation ( SESSION_ID varchar(255) NOT NULL, RESOURCE_ID varchar(255) NOT NULL UNIQUE, PEER_IDENTITY varchar(255) NOT NULL, PEER_REALM varchar(255) NOT NULL, REQUEST_COUNT int(11), PRIMARY KEY (SESSION_ID) ) ENGINE=NDBCLUSTER DEFAULT CHARSET=utf8;
Note: The
<username>
and<password>
is created by the Database Administrator. - Log into the MYSQL user created in the
previous step:
- Exit from database and logout from SQL node.
- Customize
ociwf-custom-values.yaml
file:Customize
ociwf-custom-values.yaml
file as per the deployment requirement:Update service ports accordingly.
For more information, see IWF Installation Preparation.
To configure the parameters, see section IWF Configuration
or,The
ociwf-custom-values-1.5.0.yaml
template can be downloaded from OHC.Download the InterWorking and Mediation Function (IWF) Custom Template ZIP file and Unzip to get
ociwf-custom-values-1.5.0.yaml
file.Refer Appendix for Sample IWF yaml file.
- Perform the Diameter configuration:Configure diameter
peer(s) in the following file:
ociwf/charts/pcf/templates/configmap-pcf-diam-gateway-service-diameter.yaml
Refer to IWF User guide for diameter peer configuration details.
- Update the BSF (Binding Support Function) Configuration:Update the
BSF details in the pcf Discovery section in the
ociwf-custom-values-1.5.0.yaml
- BSF (Binding Support Function)
- Configuration bsfSvc: FQDN or IP of BSF service
- bsfPort: Node Port of BSF service
- NRF Configuration
- requesterNfType: e.g. CUSTOM_IWF
- targetNfType: e.g. BSF
- NRF Client configuration
- update primaryNrfApiRoot with fqdn of the deployed nrf's ingress gateway
- update nrfClientType in profile (it must match with requesterNfType value provided in pcfDiscovery)
- BSF (Binding Support Function)
- Deploy IWF
- Deploy IWF from Helm repository:
To deploy IWF from Helm repository, execute:
helm install ociwf/ -f <ociwf-custom-values.yaml> --name <helm-release> --namespace <k8s namespace> --version <ociwf version>
Example:
helm install ociwf-helm-repo/ociwf -f ociwf-custom-values.yaml --name ociwf --namespace iwfsvc --version <ociwf version>
- Deploy IWF from local repository:
To deploy IWF from local
repository, execute:
helm install ociwf -f <ociwf-custom-values.yaml> --name <helm-release> --namespace <k8s namespace>
Example:
helm install ociwf -f ociwf-custom-values.yaml --name ociwf --namespace iwfsvc
- Deploy IWF from Helm repository:
- Check status of the services:Execute the following
command:
kubectl get services -n <namespace>
Example:
kubectl get services -n iwfsvc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE ociwf-egress-gateway ClusterIP 10.111.86.188 <none> 8080/TCP 2m49s ociwf-egress-gateway-hazelcast ClusterIP None <none> 5701/TCP 2m49s ociwf-ingress-gateway LoadBalancer 10.97.224.26 <pending> 80:30075/TCP 2m49s ociwf-iwf-configmgr LoadBalancer 10.102.127.159 <pending> 8080:30066/TCP 2m49s ociwf-iwf-d2h ClusterIP 10.105.189.19 <none> 8080/TCP 2m49s ociwf-iwf-diameterproxy ClusterIP 10.98.135.5 <none> 8080/TCP 2m49s ociwf-iwf-h2d ClusterIP 10.111.72.93 <none> 8080/TCP 2m49s ociwf-iwf-mediation LoadBalancer 10.110.149.7 <pending> 9090:30079/TCP,9091:30080/TCP2m48s ociwf-iwf-mediation-test ClusterIP 10.102.161.69 <none> 9090/TCP 2m49s ociwf-iwf-pcfdiscovery ClusterIP 10.105.167.147 <none> 8080/TCP 2m48s ociwf-nf-mediation LoadBalancer 10.107.119.17 <pending> 9090:30081/TCP,9091:30082/TCP2m48s ociwf-nf-mediation-test ClusterIP 10.104.203.244 <none> 9090/TCP 2m48s ociwf-ocpm-config ClusterIP 10.98.223.36 <none> 5807/TCP,9000/TCP 2m48s ociwf-pcf-diam-gateway ClusterIP None <none> 8080/TCP,3868/TCP 2m49s ociwf-pcf-diam-gateway-serviceNodePort 10.101.171.175 <none> 8080:30453/TCP,3868:30090/TCP 2m49s
Note: If
metallb
is used,EXTERNAL-IP
is assigned toociwf-endpoint
. - Check status of the pods: Execute the following
command:
kubectl get pods -n <ociwf_namespace>
Status column of all the pods should be '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 iwfsvc
NAME READY STATUS RESTARTS AGE ociwf-egress-gateway-5d86d7755b-8c4rx 1/1 Running 0 13s ociwf-ingress-gateway-6d5bdcd859-mn2pz 1/1 Running 0 13s ociwf-iwf-configmgr-65957546d5-jfwwr 1/1 Running 0 13s ociwf-iwf-d2h-d6ffd8788-qk52j 1/1 Running 0 13s ociwf-iwf-diameterproxy-56479d8c7-szcwh 1/1 Running 0 13s ociwf-iwf-h2d-6cfff7754d-ppmsk 1/1 Running 0 13s ociwf-iwf-mediation-66fbf5c98f-lzn2j 1/1 Running 0 13s ociwf-iwf-mediation-test-7c5dc59ff5-hsd4p 1/1 Running 0 13s ociwf-iwf-pcfdiscovery-67966f7b6b-4rvf4 1/1 Running 0 13s ociwf-nf-mediation-8554fcd55f-wnncw 1/1 Running 0 13s ociwf-nf-mediation-test-5cd6c489fd-86gdh 1/1 Running 0 13s ociwf-pcf-diam-gateway-0 1/1 Running 0 13s