Running the Application with Shared Nothing Persistence on OpenShift Container Platform

After uploading your TIBCO BusinessEvents application Docker image with shared nothing persistence to the OpenShift Docker registry, you can deploy your application and services to the Kubernetes cluster. The cluster manages the availability and connectivity of the application and service.

In OpenShift Container Platform, you do not have to setup Kubernetes separately. For more information about Kubernetes and OpenShift Container Platform, see OpenShift Container Platform documentation.

TIBCO BusinessEvents provides a readme.html file at BE_HOME\cloud\kubernetes\OpenShift\cache for the Dockerized FraudDetectionStore application. You can follow the instruction in the readme.html file to run the application by the using the provided sample YAML files. These sample YAML files are available at BE_HOME\cloud\kubernetes\OpenShift\cache\shared-nothing for deploying TIBCO BusinessEvents application with shared nothing persistence on OpenShift Container Platform. For details about these sample YAML files, see Sample Kubernetes YAML Files for Applications with Shared Nothing Persistence.

Prerequisites

Your TIBCO BusinessEvents application must be uploaded to the OpenShift Docker registry, see Pushing Application Docker Image to OpenShift Container Registry.

Procedure

  1. Create the persistent volume folders with NFS on the master node and make them accessible from remote server. For details about sharing the folder, refer to your operating system documentation. For example, the following steps create a new folder on the system and make it accessible from remote server.
    1. Create a new directory pv001 and change its permission to read, write, and execute.
      mkdir -p /home/data/pv001
      chmod -R 777 /home/data/
    2. Edit the /etc/exports file and add the following entry for the new folder.
      /home/data/pv0001 *(rw,sync)
    3. Export the file system to the remote server which can mount the folder and use it as local file system. If you are connected to the remote server, do not mention the remote server URL in the command.
      exportfs -a
  2. Create an object definition (.yaml) file for the persistent volume (PV) by using the folder path and URL of machine in which the folder was created.
  3. Create other Kubernetes object specification (.yaml) files based on your deployment requirement.
    For details about describing a Kubernetes object in a YAML file, see Kubernetes documentation. For details about the sample YAML files, see Sample Kubernetes YAML Files for Applications with Shared Nothing Persistence.
  4. Create Kubernetes objects required for deploying and running the application by using the object specification (.yaml) files.
    Syntax:
    oc create -f <kubernetes_object.yaml>
    For example, create the Kubernetes objects by using the sample YAML files mentioned in Sample Kubernetes YAML Files for Applications with Shared Nothing Persistence .
    oc create -f persistentvol.yaml
    
    oc create -f becacheagent.yaml
    
    oc create -f bediscovery-service.yaml
    
    oc create -f beinferenceagent.yaml
    
    oc create -f befdservice.yaml
  5. (Optional) If required, you can check logs of TIBCO BusinessEvents pod.
    Syntax:
    oc logs <pod>
    For example, use the oc get command to get the list of pods and then use the oc logs command to view logs of becacheagent.
    oc get pods
    
    oc logs becacheagent-86d75d5fbc-z9gqt
  6. Get the external IP of your application which you can use to connect to the cluster.
    Syntax:
    oc get services <external_service_name>
    For example,
    oc get service befdservice

What to do next

Test the application by using the external IP obtained. For example, if you have deployed the FraudDetectionStore example application with shared nothing persistence, you can use the provided sample readme.html file at BE_HOME\cloud\kubernetes\OpenShift\cache to test the application. Provide the external IP obtained to the readme.html file and follow the instructions in it to run the application.

However, if you have deployed any other sample application, then update its readme.html file to test the application. Update the server address in application readme.html file from localhost to the external IP obtained. Now, follow the instructions in the readme.html file for testing the application.