Installing the Automated API behavior testing application

Update the custom resource for installing IBM® API Connect to deploy the Automated API behavior testing application on Kubernetes.

About this task

You can install the Automated API behavior testing application as part of a new IBM API Connect deployment, or you can add it to an existing deployment:

Adding the Automated API behavior testing application to an existing deployment

Before you begin

Make sure that the following requirements are met before attempting to deploy the Automated API behavior testing application:
  • The IBM API Connect subsystems are installed.
  • The cert-manager is installed for use with IBM API Connectand you are using the default certificates that it generates.

    The Automated API behavior testing application requires that the IBM API Connect deployment use the cert-manager and the default certificates. Custom certificates are not supported and if used, the Automated API behavior testing application will not install correctly.

About this task

Edit the deployed CR (custom resource) for the Management subsystem and add the settings for the Automated API behavior testing application.

Procedure

  1. Retrieve the name of the deployed Management subsystem's deployed CR by running the following command:
    kubectl get managementcluster -n <management_namespace>
  2. Edit the deployed CR by running the following command:
    kubectl edit managementcluster <management-cr-name> -n <management_namespace>
  3. Append the new testAndMonitor definition at the end of the spec section, making sure to adhere to the spacing used in the file.
    Attention: The hub and turnstile endpoints should be distinct and must not overlap with any of the 4 management endpoints.
    testAndMonitor:
      enabled: true
      hubEndpoint:
        annotations:
          cert-manager.io/issuer: ingress-issuer
        hosts:
        - name: hub.$STACK_HOST
          secretName: hub-endpoint
      turnstileEndpoint:
        annotations:
          cert-manager.io/issuer: ingress-issuer
        hosts:
        - name: turnstile.$STACK_HOST
          secretName: turnstile-endpoint

    $STACK_HOST is the ingress subdomain for the API Connect stack, as documented in Installing the Management subsystem cluster.

  4. Save the update.

    The Automated API behavior testing application will be installed into the existing Management subsystem.

  5. Check the Hub and Turnstile pods periodically until their "READY" values are both "1/1" and their "STATUS" are both "Running".

    Verify that the Hub and Turnstile pods are running, by executing the following command:

    kubectl get pods -n <management_namespace>

    Look for pods with names similar to management-hub-XXXX-XXXX and and management-turnstile-XXXX-XXXX. The following example shows how the response might look:

    NAME                                    READY   STATUS    RESTARTS   AGE
    management-hub-68745dc4b7-gmlkk         1/1     Running   0          29m
    management-turnstile-b7d978b56-jghvn    1/1     Running   0          24m

Including the Automated API behavior testing application in a new deployment

Before you begin

Make sure that the cert-manager is installed for use with IBM API Connect and you are using the default certificates that it generates. The Automated API behavior testing application requires that the IBM API Connect deployment use the cert-manager and the default certificates. Custom certificates are not supported and if used, the Automated API behavior testing application will not install correctly.

About this task

Edit the CR (custom resource) for the Management subsystem and add the settings for the Automated API behavior testing application.

Procedure

  1. Edit the ManagementCluster custom resource (CR) and add the following definition for the Automated API behavior testing application.

    Append the new definition at the end of the spec section, making sure to adhere to the spacing used in the file.

    testAndMonitor:
      enabled: true
      hubEndpoint:
        annotations:
          cert-manager.io/issuer: ingress-issuer
        hosts:
        - name: hub.$STACK_HOST
          secretName: hub-endpoint
      turnstileEndpoint:
        annotations:
          cert-manager.io/issuer: ingress-issuer
        hosts:
        - name: turnstile.$STACK_HOST
          secretName: turnstile-endpoint

    $STACK_HOST is the ingress subdomain for the API Connect stack, as documented in Installing the Management subsystem cluster.

    Attention: The hub and turnstile endpoints should be distinct and must not overlap with any of the 4 management endpoints.
  2. Apply the updated CR by running the following command:
    kubectl apply -f management_cr.yaml -n <management_namespace>

    where namespace is the name of the target installation namespace in the Kubernetes cluster.

    The Automated API behavior testing application will be installed with the Management subsystem.

  3. Check the Hub and Turnstile pods periodically until their "READY" values are both "1/1" and their "STATUS" are both "Running".

    Verify that the Hub and Turnstile pods are running, by executing the following command:

    kubectl get pods -n <management_namespace>

    Look for pods with names similar to management-hub-XXXX-XXXX and and management-turnstile-XXXX-XXXX. The following example shows how the response might look:

    NAME                                    READY   STATUS    RESTARTS   AGE
    management-hub-68745dc4b7-gmlkk         1/1     Running   0          29m
    management-turnstile-b7d978b56-jghvn    1/1     Running   0          24m