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 Cloud Pak® for Data instance where the Flight service is running. However, a Red Hat® OpenShift® Container Platform project administrator can create an external route to the Flight service to enable other applications to interact with it.

Permissions you need for this task
You must be either:
  • A cluster administrator
  • An administrator of the Red Hat OpenShift project (namespace) where Cloud Pak for Data is installed.

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:

  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 Cloud Pak for Data is installed.
    oc project ${PROJECT_CPD_INSTANCE}
  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}

    Use this URL to access the Flight service from external applications.