Deploying Multi-Pod Cluster
Procedure
-
To create a namespace for working with multi container TIBCO FSI deployment on Kubernetes, ensure that the following values are entered in
fsi-namespace.json:
Run the below command to create namespace:
$ kubectl create -f fsi-namespace.json
-
To create storage class, ensure that the following values are entered in
fsi_storageclass.json:
Run the following command to create storage class:
$ kubectl create -f fsi_storageclass.json
- To create a Persistent Volume, ensure that the following values are entered in fsi_pv.json:
-
To create Persistent Volume Claim, ensure that the following values are entered in
fsi_pvc.json:
- Kind: PersistentVolumeClaim
- StorageClassName: Name of the storage class created
- Storage: Size of the Persistent Volume Claim (1Gi for 1 gb)
Run the below command to create Persistent Volume Claim:$ kubectl create -f fsi_pvc.json
-
Deploy the PostgreSQL or Oracle database. Database for TIBCO FSI can either be an on-premises installation on a separate physical or virtual server or deployed as a container application using the Docker image similar to other TIBCO FSI server. In an on-premises installation, skip database deployment and proceed to the next step. If deploying the database as a container application, perform the following steps:
Option Description PostgreSQL For deploying PostgreSQL, perform the following steps: - Create the fsidb Docker image and push to the Docker registry.
- Use the kubectl command to run the database pod and the database service.
$ kubectl create -f fsidb.json $ kubectl create -f fsidbservice.json
- To create fsidb, ensure that the following values are entered in fsidb.json:
- Run the following command to create fsidb:
$ kubectl create -f fsidb.json
- To create fsidbservice, ensure that the following values are entered in fsidbservice.json:
- Run the below command to create
fsidbservice:
$ kubectl create -f fsidbservice.json
Oracle For deploying Oracle in a container, either use an official Oracle 12.2.0.1 image or build one from the official 12.2.0.1 Dockerfile for Oracle database. In either case, the database installation must be partitioning enabled.- After the Oracle image is available, use the
kubectl command to run the Oracle database pod and the database service.
$ kubectl create -f fsi_db_oracle.json $ kubectl create -f fsioracleservice.json
- To create fsi_db_oracle, ensure that the following values are entered in
fsi_db_oracle.json:
- Kind: Deployment
- app in matchLabels: fsioracle (this value must be similar to the app in selector in fsioracleservice.json)
- Image: Docker image registry url of official Oracle Docker image of version 12.2.0.1
- mountPath: /home/postgres/tibco/fsi/2.0/bulkload
- claimName: fsi-pv-claim
- Name in imagePullSecrets: Name of registry credentials created to pull the images
- Run the below command to create
fsi_db_oracle:
$ kubectl create -f fsi_db_oracle.json
Database pod is up and running. See Configuring TIBCO Fulfillment Subscriber Inventory for creating TIBCO FSI database schema.
- To create fsioracleservice, ensure that the following values are entered in fsioracleservice.json:
- Run the below command to create
fsioracleservice:
$ kubectl create -f fsioracleservice.json
-
When deploying with Enterprise Message Service™, perform the following steps:
- Ensure that the following values are entered in the emsapp.json:
-
To create the TIBCO EMS app, run the following command:
$ kubectl create -f emsapp.json
- Ensure that the following values are entered in emsservice.json:
-
To create the TIBCO EMS service, run the following command:
$ kubectl create -f emsservice.json
-
For deployment with TIBCO FTL as the messaging service, perform the following steps:
-
Ensure that the following values are entered in
ftlapp.json:
Ports require two entries:
-
To create the TIBCO FTL app, run the following command:
$ kubectl create -f ftlapp.json
-
Ensure that the following values are entered in
ftlservice.json:
Ports require two entries:
-
To create the TIBCO FTL service, run the following command:
$ kubectl create -f ftlservice.json
-
Ensure that the following values are entered in
ftlapp.json:
-
Add the database service name, port, TIBCO FTL, and Enterprise Message Service™ service name in the fsi_application.properties file. Ensure that the following values are entered in fsi_application.properties:
com.tibco.fos.fsi.pooledDataSource.driverClassName=org.postgresql.Driver com.tibco.fos.fsi.pooledDataSource.host=<db service name> com.tibco.fos.fsi.pooledDataSource.port=5432 com.tibco.fos.fsi.pooledDataSource.database=fsidb com.tibco.fos.fsi.pooledDataSource.username=fsiuser com.tibco.fos.fsi.pooledDataSource.password=fsipassword com.tibco.fos.fsi.pooledDataSource.url=jdbc:postgresql://<db service name>:5432/fsidb?currentSchema=fsischema com.tibco.fos.fsi.hibernate.dialect=org.hibernate.dialect.PostgreSQLDialect This property is used to enable/disable notification generation in locking use cases. Valid values are [true,false] com.tibco.fos.fsi.notification.enable=false This property is used to set messaging provider and must be set to one of [ftl,ems] if notification generation is enabled com.tibco.fos.fsi.notification.provider=none These properties are not used if messaging provider is either [none,ftl] com.tibco.fos.fsi.jms.jndi.url=tibjmsnaming://localhost:7222 These ftl properties are not used if messaging provider is either [none,ems] com.tibco.fos.fsi.ftl.realmServer=http://localhost:8080 com.tibco.fos.fsi.ftl.realm.principal=admin com.tibco.fos.fsi.ftl.realm.credentials=admin com.tibco.fos.fsi.ftl.realm.applicationName=fsiapp com.tibco.fos.fsi.ftl.realm.endpointName=fsiep
-
Run the below command to create a ConfigMap:
$ kubectl create configmap configmap --from-env-file=/path/fsi_application.properties --namespace=tibco-fsi200
Change the ConfigMap name in fsimulticontainerapp.json and deploy TIBCO FSI multi container pods. - Ensure that the following values are entered in fsimulticontainerapp.json:
-
You can change the rolling update strategy according to the requirement of the deployment by using <docker registry url for image with tag version>.
You can use any one of the values below for environment:
-
Run the below command to create a fsimulticontainerapp:
$ kubectl create -f fsimulticontainerapp.json
- Ensure that the following values are entered in fsiservice.json:
-
Run the below command to create a TIBCO FSI service:
$ kubectl create -f fsiservice.json
Note: fsimulticontainerapp.json uses readiness probe to check whether the containers are ready to receive traffic through Kubernetes service. Liveness probe can also be configured in fsimulticontainerapp.json using the same process for configuring the readiness probe. For more information, see Kubernetes documentation. -
Add the below json code to the TIBCO FSI multi-container json file for rolling update strategy:
"strategy": { "type": "RollingUpdate", "rollingUpdate": { "maxSurge": 1, "maxUnavailable": 0 }
You can change maxSurge and maxUnavailable parameters according to your strategy. If you want to update a new image in existing deployment or you have changed the ConfigMap and want to update in the existing deployment then you can patch the changes in the existing deployment. These changes reflect in new pods that are functioning according to the rolling update strategy defined.
For patching, copy the whole content of fsimulticontainerapp.json in fsimultipath.json. You can change the required field in fsimultipath.json. You can patch with the following kubectl command:
$ kubectl patch deployment fsimulticontainerapp --patch "$(cat fsimultipatch.json)" -n tibco-fsi200
-
Perform horizontal scaling by keeping the TIBCO FSI instance as 1 for the first deployment, for example, to scale TIBCO FSI pods as 3, use the following command:
$ kubectl scale --replicas=3 -f fsimulticontainerapp.json