Configuring an external route to the Flight service

The Flight service is a data connection service that enables assets, such as notebooks, to interact with various data sources without calling the REST APIs for the data sources. By default, the Flight service is only available to the IBM® Software Hub instance where the Flight service is running. However, an administrator can create an external route to the Flight service to enable other applications to interact with it.

Permissions that you need for this task
You must be either:
  • A cluster administrator
  • An instance administrator

Before you begin

Best practice: You can run many of the commands in this task exactly as written if you set up environment variables for your installation. For instructions, see Setting up installation environment variables.

Ensure that you source the environment variables before you run the commands in this task.

About this task

Common core services The Flight service is available only if the common core services are installed.

Remember: The common core services are not a separately installable component. They are automatically installed if you install a service that has a dependency on them. For information about which services install the common core services, see Service software requirements.

Procedure

To create an external route to the Flight service, follow these steps.

  1. Log in to your Red Hat® OpenShift® Container Platform as a user with sufficient permissions to complete the task.
    oc login ${OCP_URL}
  2. Change to the project where IBM Software Hub is installed.
    oc project ${PROJECT_CPD_INST_OPERANDS}
  3. Set the ROUTE_NAME environment variable to the label that you want to use for the route to the Flight service.
    export ROUTE_NAME=<label-for-flight-service-route>
  4. Optional: If you want to use a specific hostname when you connect to the Flight service, set the HOSTNAME environment variable.
    export HOSTNAME=<hostname-for-flight-service-route>
  5. Run the appropriate command to create the route.

    Create a route with the default hostname
    oc create route passthrough ${ROUTE_NAME} --service=wdp-connect-flight

    Create a route with a custom hostname
    oc create route passthrough ${ROUTE_NAME} --hostname ${HOSTNAME} --service=wdp-connect-flight

  6. Run the following command to get the URL.
    oc get route ${ROUTE_NAME}
  7. Add grpc+tls:// before the start of your URL and append the port number to format your URL. As an example, a URL that uses port 443 would have the following format:
    grpc+tls://domain.com:443
    Use this URL to access the Flight service from external applications.