Accessing Business Automation Insights services

To retrieve the URLs, credentials, and certificates of each Business Automation Insights service, look up the information from the status.components section in the custom resource of the Cloud Pak for Business Automation Insights Engine component.

About this task

The general command is the following one.
export INSIGHTS_ENGINE_CR=$(kubectl get insightsengine --no-headers --ignore-not-found -n <namespace> |awk '{print $1}')

oc get insightsengine $INSIGHTS_ENGINE_CR -n <namespace> -o jsonpath='{.status.components}'
Business Performance Center
Look up the status.components.cockpit section. This section is absent if the bai_configuration.business_performance_center.install parameter was set to false in the custom resource to disable the deployment of Business Performance Center. You authenticate through the Zen UI.
Management service
Look up the status.components.management section. You can find the basic authentication credentials in the username and password keys of the Kubernetes secret. The name of this secret is provided in the authentication.secret.secretName parameter for the external endpoint.
Kafka
To learn how to retrieve credentials and certificates to establish the connection to Kafka, see Option 1: Retrieving information for connection to Kafka using commands.
OpenSearch
To learn how to retrieve OpenSearch credentials, see step 2 of Taking snapshots by using _snapshot API.
Note:

In code lines, the NAMESPACE, bai_namespace, , or ${NAMESPACE} placeholder is the namespace where Business Automation Insights is deployed. The CR_NAME or custom_resource_name placeholder is the name of the custom resource that was used to deploy IBM Cloud Pak® for Business Automation.

Procedure

Run the following commands as a convenient way to retrieve the URLs and credentials.

export NAMESPACE=bai
export INSIGHTS_ENGINE_CR=$(kubectl get insightsengine --no-headers --ignore-not-found -n ${NAMESPACE} |awk '{print $1}')

# Business Performance Center
export BPC_URL=$(oc get insightsengine ${INSIGHTS_ENGINE_CR} -n ${NAMESPACE} -o jsonpath='{.status.components.cockpit.endpoints[?(@.scope=="External")].uri}')
# Credentials: Zen frontdoor authentication

# Business Automation Insights Management
export MANAGEMENT_URL=$(oc get insightsengine ${INSIGHTS_ENGINE_CR} -n ${NAMESPACE} -o jsonpath='{.status.components.management.endpoints[?(@.scope=="External")].uri}')

export MANAGEMENT_AUTH_SECRET=$(oc get insightsengine ${INSIGHTS_ENGINE_CR} -n ${NAMESPACE} -o jsonpath='{.status.components.management.endpoints[?(@.scope=="External")].authentication.secret.secretName}')
export MANAGEMENT_USERNAME=$(oc get secret ${MANAGEMENT_AUTH_SECRET} -n ${NAMESPACE} -o jsonpath='{.data.username}' | base64 -d)
export MANAGEMENT_PASSWORD=$(oc get secret ${MANAGEMENT_AUTH_SECRET} -n ${NAMESPACE} -o jsonpath='{.data.password}' | base64 -d)

# or:
oc extract secret/${MANAGEMENT_AUTH_SECRET} -n ${NAMESPACE} --keys=username,password --to=-

# Flink UI
export FLINK_UI_URL=$(oc get insightsengine ${INSIGHTS_ENGINE_CR} -n ${NAMESPACE} -o jsonpath='{.status.components.flinkUi.endpoints[?(@.scope=="External")].uri}')

export FLINK_AUTH_SECRET=$(oc get insightsengine ${INSIGHTS_ENGINE_CR} -n ${NAMESPACE} -o jsonpath='{.status.components.flinkUi.endpoints[?(@.scope=="External")].authentication.secret.secretName}')
export FLINK_USERNAME=$(oc get secret ${FLINK_AUTH_SECRET} -n ${NAMESPACE} -o jsonpath='{.data.username}' | base64 -d)
export FLINK_PASSWORD=$(oc get secret ${FLINK_AUTH_SECRET} -n ${NAMESPACE} -o jsonpath='{.data.password}' | base64 -d)

# or:
oc extract secret/${FLINK_AUTH_SECRET} -n ${NAMESPACE} --keys=username,password --to=-

Example

This code sample shows the status.components section of the IBM Business Automation Insights EngineCloud Pak for Business Automation Insights Engine custom resource, which contains the URLs, credentials, and certificates of Business Automation Insights services.
status:
    components:
      cockpit:
        endpoints:
        - caSecret:
            key: ca.crt
            secretName: bai-root-ca
          name: bai-cockpit-external
          scope: External
          type: API
          uri: <Business Performance Center external URL under Zen>
          [...]
      flinkUi:
        endpoints:
        - authentication:
            secret:
              secretName: bai-insights-engine-flink-admin-user
            type: BasicSecret
          caSecret:
            key: ca.crt
            secretName: bai-insights-engine-flink-ss-cacert-kp
          name: bai-flink-ui-external
          scope: External
          type: API
          uri: <Flink UI external URL under Zen>
          [...]
      management:
        endpoints:
        - authentication:
            secret:
              secretName: bai-insights-engine-management-auth
            type: BasicSecret
          caSecret:
            key: ca.crt
            secretName: bai-root-ca
          name: bai-management-external
          scope: External
          type: API
          uri: <Business Automation Insights Management external URL under Zen>
          [...]