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. After you install the application, enable the Autotest Assist feature as explained later in this topic.
Note: It is not possible to use the Automated API behavior testing application with a two data center disaster recovery configuration (Two data center warm-standby deployment on Kubernetes and OpenShift).

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 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 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 testAndMonitor host must not conflict with any of the management hosts.
    testAndMonitor:
      enabled: true
      hubEndpoint:
        annotations:
          cert-manager.io/issuer: ingress-issuer
        hosts:
        - name: hub.$STACK_HOST
          secretName: hub-endpoint

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

  4. Apply the updated CR by running the following command:
    kubectl apply -f management_cr.yaml -n <management_namespace>

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

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

  5. Check the atm-api and atm-ui pods periodically until the "READY" value is "1/1" and the "STATUS" is "Running".

    Verify that the pods are running by executing the following command:

    kubectl get pods -n <management_namespace>
  6. Verify that the application deployed properly by completing the following steps:
    1. Log in to API Manager.
    2. On the home page, click the Test APIs tile.
    3. Verify that the Automated API behavior testing opens.

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
      

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

    Attention: The testAndMonitor host must not conflict with any of the management hosts.
  2. Apply the updated CR by running the following command:
    kubectl apply -f management_cr.yaml -n <management_namespace>

    where <management_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 atm-api and atm-ui pods periodically until the "READY" value is "1/1" and the "STATUS" is "Running".

    Verify that the pods are running by executing the following command:

    kubectl get pods -n <management_namespace>
  4. Verify that the application deployed properly by completing the following steps:
    1. Log in to API Manager.
    2. On the home page, click the Test APIs tile.
    3. Verify that the Automated API behavior testing opens.