Deployment of TIBCO Order Management on Kubernetes
You can containerize the TIBCO Order Management application in Docker and then deploy it on the Kubernetes cluster. To containerize the application, you must build and run the Docker images by using the bundled Dockerfile. The deployment uses Kubernetes concepts such as, deployment, pod, kubectl, kubernetes service. For more details, see Kubernetes Documentation.
Building Docker Images
Preparation for the deployment starts with building Docker images using the Dockerfiles. The $OM_HOME/docker directory contains subdirectories with the ready-to-use Dockerfile and other scripts required to build the images. Detailed instructions on how to use the Docker file and build the image are provided in the respective Docker file and the Readme located at the same location. See the "Docker" section in the TIBCO® Order Management Administration guide for more details.
Deployment on Kubernetes
After creating the Docker files you must push them in the Docker registry so that they can be accessed by Kubernetes deployment. Kubernetes scripts are available at the $OM_HOME/kubernetes directory.
Prerequisites
- Copying dependency: See Post-Installation Task 1: Copying Dependencies for more details.
- Creating the Database: See Post-Installation Task 2: Creating the Database for more details.
- TIBCO EMS service channel creation: See Post-Installation Task 3: Creating the TIBCO Enterprise Message Service Channel for more details.
- Configuring the Installation: See Post-Installation Task 7: Configuring the Installation for more details.
Example
The following example includes a snippet of the kubernetes-deploy-run-catalog-service.yml file:
apiVersion: apps/v1 kind: Deployment metadata: name: catalog-service labels: app: catalog-service spec: replicas: 1 selector: matchLabels: app: catalog-service template: metadata: name: catalog-service labels: app: catalog-service spec: containers: - name: catalog-service image: tibco/catalog-service:5.1.0 ports: - containerPort: 9092 --- apiVersion: v1 kind: Service metadata: name: catalog-service-service spec: selector: app: catalog-service ports: - port: 9092 targetPort: 9092 nodePort: 30004 type: LoadBalancer
-
Run the following command on worker node (in master-worker kubernetes cluster setup) to create TIBCO Order Management Catalog deployment and service:
CMD>kubectl apply -f D:/Folder_Path/kubernetes-deploy-run-catalog-service.yml
The deployment.apps/catalog-service and service/catalog-service-service folders are created.
-
To check the container status, run the following commands:
- kubectl get all
- kubectl get pods
-
To check logs inside the container, run the following command: CMD>kubectl exec -it Podname -- bash
Example: kubectl exec -it catalog-service-755fb5f69c-jch2s -- bash
When the catalog pod is up and running, users can access the Swagger-UI by accessing endpoints exposed for the service.
Example: http://EXTERNAL-IP:9092/swagger-ui.html
-
To delete deployment and service, run the following command:
CMD> kubectl delete -f D:/Folder_Path /kubernetes-deploy-run-catalog-service.yml
The deployment.apps "catalog-service" and service "catalog-service-service" folders are deleted.