Setting Up BWCE Application Monitoring for HTTPS Server on Kubernetes

The following steps describe how to set up TIBCO BusinessWorks Container Edition Monitoring application on HTTPS for Kubernetes.

Prerequisites

Download the bwce_mon-<version>.zip TIBCO BusinessWorks™ Container Edition monitoring zip file, from http://edelivery.tibco.com.

Procedure

  1. Extract the bwce_mon-<version>.zip file.
  2. Navigate to the bwce_mon directory and add the keys and certificates files in the certs folder and update the https_config.json file. For more information on updating the https file see, "".
  3. Tag the monitoring application image by running the following command:
    docker tag <monitoring_application_name> your_docker_container_registry/<your_project_name>/
    <monitoring_application_name>
  4. Push your monitoring application image to the Docker Container Registry. For example, to push your monitoring application docker image on Google Cloud Registry, run the following command:
    gcloud docker -- push gcr.io/<your_project_name>/<monitoring_application_name>
  5. Confirm that the image is present in the Docker Container Registry.
  6. Create the manifest.yml file and update the monitoring application image name. Ensure that the image name follows the following format:
    <your_docker_container_registry>/<your_gcloud_project_name>/<monitoring_application_image_name>
  7. To configure monitoring application with external database, add the following two environment variables to the manifest.yml file.
    • PERSISTENCE_TYPE
    • DB_URL

    The below is a sample of the manifest.yml file:

    apiVersion: v1
    kind: Service
    metadata:
      name: <monitoring_image>
      labels:
        app: <monitoring_image>
    spec:
      type: LoadBalancer
      ports:
      - port: 80
        name: http
        targetPort: 8080
      - port: 443
        name: https
        targetport: 443
      selector:
        app: <monitoring_image>
    ---
    apiVersion: v1
    kind: ReplicationController
    metadata:
      name: <monitoring_image>
    spec: 
      replicas: 1
      selector:
        app: <monitoring_image>
      template:
        metadata:
          name: <monitoring_image>
          labels:
            app: <monitoring_image>
        spec:
          containers:
            - name: <monitoring_image>
            image: gcr.io/<project_name>/<monitoring_image>
            resources:
              limits:
                 memory: 512Mi
              requests:
                 memory: 512Mi
            imagePullPolicy: Always
            env:
            - name: PERSISTENCE_TYPE 
              value:postgres
            - name: DB_URL
              value: postgres://<DB_USERNAME>:<PASSWORD>@<DB_IP>:<DB_PORT>/<DB_NAME>
            - name: HTTPS
              value: 'true'
            ports:
              - containerPort: 8080
              - containerPort: 443
  8. To create the monitoring service and replication controller, run the following command:
    kubectl create -f manifest.yml
    Note: Please find the monitoring sample manifest file for configuring the environment variables.
    • PERSISTENCE_TYPE
    • DB_URL
    • HTTPS
  9. To verify that the monitoring application has started successfully, run the following command:
    kubectl logs pod-name
  10. To get the external IP of running monitoring service, run the following command:
    kubectl get svc
    Access the monitoring dashboard in the browser by using the external IP.