Enabling API discovery on VMware

You can optionally configure API discovery in IBM® API Connect on VMware by enabling the API discovery service.

About this task

The API discovery service is an optional add-on to API Connect that can be used to discover and add APIs to your API development process.

Note:
  • These instructions apply only to VMware installations. For Kubernetes, OpenShift, and IBM Cloud Pak for Integration installations, see Enabling API discovery on Kubernetes.
  • APIs cannot be discovered and added to your deployment until the API discovery service is enabled.
  • All of the commands must be run in the apicup management project directory.
  • If you're using a two data center disaster recovery (2DCDR) deployment, the API discovery service must be enabled on both the active and warm-standby centers. Enable the service on the warm-standby data center first, and then the active center.
  • If you enable the API discovery service, the backups that you take can be restored only onto a management subsystem that also has the API discovery service enabled.
To enable or disable the API discovery service, see the following instructions:

After the API discovery service is enabled, API discovery resources can be created. For more information, see API discovery.

Procedure

  • Enabling the API discovery service
    1. Open your API Connect installation project directory.
    2. Run the following apicup command to enable the API discovery service:
      apicup subsys set <mgmt_subsystem_name> api-discovery-enabled=true

      Where <mgmt_subsystem_name> is the name of the management subsystem that you are configuring.

      Note: Optional: Run the following command to enable the proxy collector:
      apicup subsys set <mgmt-subsytem-name> api-discovery-gw-proxy-collector-enabled=true
    3. Install the new setting for the API discovery service by running the following command:
      apicup subsys install <mgmt_subsystem_name> --debug

      Including the --debug option enables the debug output for the command.

    4. Monitor the health-check output until the management subsystem is healthy by running the following command:
      apicup subsys health-check <mgmt_subsystem_name>
      If one or more of the health criteria are not met, the command stops processing and displays a message with the failure, and exits with a status of 1. The following output is an example of unhealthy output while the install is running:
      Error: Cluster not in good health:
       ManagementCluster (current ha mode: active) is not ready | State: 15/17 Phase: Pending
       ManagementCluster (current ha mode: active) is not ready | State: 15/17 Phase: Pending
      When all of the health criteria are successfully met, the command displays no output, and exits with a status of 0.
  • Disabling the API discovery service
    1. Open your API Connect installation project directory.
    2. Run the following apicup command to disable the API discovery service:
      apicup subsys set <mgmt_subsystem_name> api-discovery-enabled=false

      Where <mgmt_subsystem_name> is the name of the management subsystem that you are configuring.

    3. Install the new setting for the API discovery service by running the following command:
      apicup subsys install <mgmt_subsystem_name> --debug

      Including the --debug option enables the debug output for the command.

Results

Note that when the API discovery service is enabled, there are a number of new deployments, jobs, and pods in the ManagementCluster namespace. These Kubernetes API discovery resources have names that contain api-discovery. For example:
kubectl get pods -n apic | grep discovery
management-api-discovery-gw-proxy-collector-8d8bdfbdf5lfbj   1/1     Running     0             88m
management-api-discovery-gw-proxy-collector-8d8bdfbdf67qqz   1/1     Running     0             88m
management-api-discovery-gw-proxy-collector-8d8bdfbdfzrhkv   1/1     Running     0             88m
management-api-discovery-service-f7dc497d8-gc7dn             1/1     Running     0             89m
management-api-discovery-service-f7dc497d8-pd877             1/1     Running     0             89m
management-api-discovery-service-f7dc497d8-shzm9             1/1     Running     0             89m
management-api-discovery-ui-5549df59d9-b4fks                 1/1     Running     0             88m
management-api-discovery-ui-5549df59d9-gjqmx                 1/1     Running     0             88m
management-api-discovery-ui-5549df59d9-pjvsx                 1/1     Running     0             88m
management-up-api-discovery-service-data-populate-0-tvxbvs   0/1     Completed   0             90m
management-up-api-discovery-service-schema-0-to-2-mrs8d      0/1     Completed   0             90m