Binding TIBCO BusinessWorks Container Edition to Monitoring Application on Kubernetes
To bind TIBCO BusinessWorks Container Edition applications to monitoring applications on Kubernetes, follow the steps below:
Before you begin
- Ensure that you have configured the database for application monitoring.
- Ensure that you have created the TIBCO BusinessWorks Container Edition base docker image. For more information about creating a base docker image, see "Creating TIBCO BusinessWorks Container Edition base docker image" in the TIBCO BusinessWorks™ Container Edition Application Development.
- Ensure that you have created the TIBCO BusinessWorks Container Edition application docker image. For more information about building an application docker image, see "Building the application docker image" in the TIBCO BusinessWorks™ Container Edition Sample.
- Procedure
- Tag the application docker image by running the following command:
docker tag <application_image_name>your_docker_container_registry/<your_project_name>/<application_image_name>
- Push your application image to the Docker Container Registry.
For example: To push your application docker image on the Google Cloud Registry, run the following command:
gcloud docker -- push gcr.io/<your_project_name>/<application_image_name>
- Confirm that the image is present in the Docker Container Registry
- Create the
manifest.yml
file and update the application image name. Ensure that the image name follows the following format:<your_docker_container_registry>/<your_gcloud_project_name>/<image_name>
To configure a monitoring application with an external database, add the following two environment variables to the manifest file and port 80 with the monitoring URL:- BW_APP_MONITORING_CONFIG
- BW_JAVA_OPTS
The below sample is of amanifest.yml file:
apiVersion: v1 kind: Service metadata: name: <BW_APP_IMAGE_NAME> labels: app: <BW_APP_IMAGE_NAME> spec: type: LoadBalancer ports: - port: 80 targetPort: 8080 selector: app: <monitoring_image> --- apiVersion: v1 kind: ReplicationController metadata: name: <BW_APP_IMAGE_NAME> spec: replicas: 1 selector: app: <BW_APP_IMAGE_NAME> template: metadata: name: <BW_APP_IMAGE_NAME> labels: app: <BW_APP_IMAGE_NAME> spec: containers: - name: <BW_APP_IMAGE_NAME> image: gcr.io/<PROJECT_ID>/<BW_APP_IMAGE_NAME> resources: limits: memory: 512Mi requests: memory: 512Mi imagePullPolicy: Always env: - name: BW_PROFILE value:default - name: BW_LOGLEVEL value: DEBUG - name: BW_APP_MONITORING_CONFIG value: '{"url":"http://<MONITORING_IP>:80"}' ports: - containerPort: 8080
Note: To bind your TIBCO BusinessWorks Container Edition application to monitoring running on a HTTPS server, add the pertaining URL in theBW_APP_MONITORIN_CONFIG
property - To create the monitoring service and replication controller, run the following command:
kubectl create -f manifest.yml
- To verify that the application has started successfully, run the following command:
kubectl logs pod-name
- To get the external IP of a running monitoring service, run the following command:
kubectl get svc
Access the monitoring dashboard in the browser by using the external IP