Deploying the API Analytics subsystem by using the CLI

You can deploy individual API Connect subsystems by using the subsystem Kubernetes resource (CR). This procedure uses the CLI.

There are four subsystems that can be installed:

Deploying Analytics involves three main tasks:

  1. Installing a certificate manager

  2. Setting up the certificates

  3. Deploying API Analytics

Setting up the certificates

  1. Change to the namespace where you want to install the subsystem:

    oc project <namespace>
  2. If you have installed the API Manager subsystem in another namespace, extract the API Manager ingress-ca certificates.

    oc -n <api manager namespace> get secret ingress-ca -o yaml > ingress-ca.yaml
  3. Edit the ingress-ca.yaml file and remove the following properties:

    • metadata.creationTimestamp

    • metadata.namespace

    • metadata.resourceVersion

    • metadata.uid

    • metadata.selfLink Keep this file. You will need to apply it in the namespaces of your other subsystems so that they can communicate with the API Manager subsystem.

  4. Apply the file to the API Analytics namespace:

    oc apply -f ingress-ca.yaml
  5. Create a file that is called api-analytics-certs.yaml and paste in the following contents:

    apiVersion: cert-manager.io/v1
    kind: Issuer
    metadata:
      name: selfsigning-issuer
      labels: {
        app.kubernetes.io/instance: "api-manager",
        app.kubernetes.io/managed-by: "ibm-apiconnect",
        app.kubernetes.io/name: "selfsigning-issuer"
      }
    spec:
      selfSigned: {}
    ---
    apiVersion: cert-manager.io/v1
    kind: Issuer
    metadata:
      name: ingress-issuer
      labels: {
        app.kubernetes.io/instance: "api-manager",
        app.kubernetes.io/managed-by: "ibm-apiconnect",
        app.kubernetes.io/name: "ingress-issuer"
      }
    spec:
      ca:
        secretName: ingress-ca
  6. Apply the file to your namespace:

    oc apply -f api-analytics-certs.yaml
  7. Verify that the command installation succeeded:

    oc get issuers

    All issuers created successfully:

    NAME                 READY
    ingress-issuer       True
    selfsigning-issuer   True

Deploying API Analytics

  1. Create a AnalyticsCluster YAML file. For example, you can create a file that is called api-analytics.yaml with the following example configuration. All fields in the example are required. Update the values as applicable for your configuration.

    apiVersion: analytics.apiconnect.ibm.com/v1beta1
    kind: AnalyticsCluster
    metadata:
      name: api-analytics
      annotations:
        apiconnect-operator/cp4i: "false"
    spec:
      version: 10.0.8.7
      license:
        accept: false
        use: production
        license: L-HTFS-UAXYM3
      profile: n1xc2.m16
      microServiceSecurity: certManager
      certManagerIssuer:
        name: selfsigning-issuer
        kind: Issuer
      ingestion:
        endpoint:
          annotations:
            cert-manager.io/issuer: ingress-issuer
          hosts: 
          - name: ai.$STACK_HOST
            secretName: analytics-ai-endpoint
        clientSubjectDN: CN=analytics-ingestion-client,O=cert-manager
      storage:
        type: shared
        shared:
          volumeClaimTemplate:
            storageClassName: <storage-class>
            volumeSize: 50Gi
    • Change the value of spec.license.accept to true if you accept the license agreement. For more information, see Licensing.

    • In metadata.annotations, do not remove apiconnect-operator/cp4i: "false". This annotation guarantees that API Gateway does not attempt to integrate with Cloud Pak for Integration identity and access management. It does not prevent you from managing the instance in the Platform UI.

    • For spec.license.use enter production or nonproduction to match the type of license that you purchased.

    • For spec.license.license enter the license ID for the API Connect program that you purchased. To get the available license IDs, see API Connect licenses in the API Connect documentation.

    • For spec.profile enter the type of installation profile that you want. For more information, see Analytics component deployment profile limits.

    • For spec.version enter the API Connect product version or channel to be installed.

    • For <storage-class>, specify the RWO block storage class to use for persistence storage. For more information about selecting storage classes for Cloud Pak for Integration, see Storage considerations. To review API Connect storage support, see the "Supported storage types" section in Deployment requirements, in the API Connect documentation.

    • Replace $STACK_HOST with the desired ingress subdomain for the API Connect stack. This variable is used when specifying endpoints. Domain names that are used for endpoints cannot contain the underscore "_" character. The host on OpenShift is typically prefixed by apps. Such as apps.subnet.example.com.

    • If you want to enable additional analytics features, you can set them as described in Enabling additional analytics features.

  2. Optional: Three replica deployments only: Enable dedicated storage. If you want to use dedicated storage, update the spec.storage section of the yaml file as follows:

    storage:
      type: dedicated
      shared:
        volumeClaimTemplate:
          storageClassName: <storage-class>
          volumeSize: 50Gi
      master:
        volumeClaimTemplate:
          storageClassName: <storage-class>

    For more information about dedicated storage, see Dedicated storage and scaling up.

  3. Apply the YAML file to the cluster:

    oc apply -f api-analytics.yaml
  4. Check the status of API Analytics by running the following command in the project (namespace) where it was deployed:

    oc get AnalyticsCluster

    The installation is complete when the READY status changes to True, and the SUMMARY reports that all services are online:

    NAME         READY   SUMMARY   VERSION    RECONCILED VERSION       AGE
    api-analytics   True   6/1       <version>   <version-build>       7m17s

What's next?

  • Install other subsystems as needed.

  • When you have completed the installation of all required API Connect subsystems, you can proceed to defining your API Connect configuration by using the API Connect Cloud Manager; refer to the Cloud Manager configuration checklist.