Automation assets deployment by using the CLI

Use the CLI to deploy IBM Automation foundation assets (Automation assets), a capability in IBM Cloud Pak® for Integration that lets you store, manage, and retrieve integration assets.

For more information about deployment considerations, see Automation assets deployment.

Before you begin

Complete these prerequisites before you create an Automation assets instance. An Integration Specialist should carry out these tasks:

  • Confirm that the oc OpenShift CLI tool is installed. This tool is required for CLI tasks such as creating custom keys and credentials. For more information, see Getting started with the OpenShift CLI in the Red Hat OpenShift documentation.

  • Ensure that the operator for Automation assets is installed. For more information, see Installing the operators by using the CLI.

  • Identify the namespace where the Platform UI is already deployed. You need to deploy Automation assets in the same namespace as Platform UI; otherwise, it will not function properly.

  • If you are using the IBM Entitled Registry, confirm that a pull secret exists in the namespace that contains the entitlement key. For more information, see Finding and applying your entitlement key by using the CLI (online installation).

  • Decide whether to deploy Automation assets in "single replica-only" mode or "scalable" mode:

    • Single replica-only mode restricts the number of replicas to one. This mode allows you to use a Block RWO volume for storing your asset data.
      Important: If using this mode, you can't increase the number of replicas after deployment. Also, upgrading an instance of Automation assets that was deployed in single replica-only mode causes Automation assets to become unavailable while the upgrade completes.
    • Scalable mode allows you to deploy Automation assets using one or more replicas. This mode requires you to use a File RWX volume for storing your asset data.
      Tip: This mode allows you to modify the number of replicas after deployment. Also, you can upgrade Automation assets without any downtime.
  • Provide two different types of storage classes for use by the Automation assets:

    • Asset data storage - Requires either a Block RWO volume (when deploying in single replica-only mode) or a File RWX volume (when deploying in scalable mode). For IBM Cloud Block, use the ibmc-block-gold storage class. For IBM Cloud File, use the ibmc-file-gold-gid storage class (specifically the gid variant).

    • Asset metadata storage - Requires a Block RWO volume that meets POSIX requirements and has other characteristics as required by CouchDB persistence storage. For IBM Cloud Block, the ibmc-block-gold storage class must be used. For more information on storage classes in OpenShift, see Understanding persistent storage or Cluster storage.

Deploying the Automation assets instance with a block storage class

Important: For high availability and disaster recovery with RWO volumes, the failover characteristics depend on your storage provider. For example, if you’re using EBS in AWS (to avoid using a replicated storage provider, such as ODF), then using EBS restricts you to a single availability zone (AZ). This architecture prevents Automation assets from starting up in a different AZ in the event of a failure. You could lose your Automation assets instance, unless you’ve backed it up separately and can restore a new instance from the backup.
  1. To create an Automation assets instance by using block storage class in single replica mode, create a basic custom resource:

    cat <<EOF > aa-instance.yaml
    apiVersion: integration.ibm.com/v1beta1
    kind: AssetRepository
    metadata:
      name: production
      namespace: cp4i
    spec:
      designerAIFeatures:
        enabled: true
      license:
        accept: true
        license: L-RJON-CD3JKX
      replicas: 1
      singleReplicaOnly: true
      storage:
        assetDataVolume:
          class: <RWO_STORAGE_CLASS>
        couchVolume:
          class: <RWO_STORAGE_CLASS>
      version: 2022.2.1
    EOF
  2. In the aa-instance.yaml file, update these fields as indicated:

    • metadata.name - enter a name for the new instance, or use the default.

    • metadata.namespace - enter the namespace for the instance. This must be the same namespace that contains your Platform UI instance.

    • spec.license.license - keep the default value, unless you change the value for spec.version. For more information about specific license versions, see "Table of license versions" in Licensing.

    • spec.designerAIFeatures.enabled - if you do not wish to have AI features enabled, set to false.

    • spec.storage.assetDataVolume and spec.storage.couchVolume - configure the storage class for each. Replace <RWO_STORAGE_CLASS> with a block storage class that supports ReadWriteOnce (RWO) volumes. Supported storage providers include ibmc-block-gold, OpenShift Data Foundation (formerly OpenShift Container Storage), Spectrum, and Portworx. For more information about storage support and configuration, see Storage considerations.

  3. After you edit the custom resource, apply it to the cluster:

    oc apply -f aa-instance.yaml

Deploying the Automation assets instance with a file storage class

  1. To create an Automation assets instance using file storage class in scalable mode, create a basic custom resource:

    cat <<EOF > aa-instance.yaml
    apiVersion: integration.ibm.com/v1beta1
    kind: AssetRepository
    metadata:
      name: production
      namespace: cp4i
    spec:
      designerAIFeatures:
        enabled: true
      license:
        accept: true
        license: L-RJON-CD3JKX
      replicas: 1
      storage:
        assetDataVolume:
          class: <RWX_STORAGE_CLASS>
        couchVolume:
          class: <RWO_STORAGE_CLASS>
      version: 2022.2.1
    EOF
  2. In the aa-instance.yaml file, update these fields as indicated:

    • metadata.name - enter a name for the new instance, or use the default.

    • metadata.namespace - enter the namespace for the instance. This must be the same namespace that contains your Platform UI instance.

    • spec.license.license - keep the default value, unless you change the value for spec.version. For more information about specific license versions, see "Table of license versions" in Licensing.

    • spec.designerAIFeatures.enabled - if you do not wish to have AI features enabled, set to false.

    • spec.storage.assetDataVolume - configure the storage class. Replace <RWX_STORAGE_CLASS> with a file storage class that supports ReadWriteMany (RWX) volumes. Supported storage providers include ibmc-file-gold-gid, OpenShift Data Foundation (formerly OpenShift Container Storage), Spectrum, and Portworx. For more details about storage support and configuration, see Storage considerations.

    • spec.storage.couchVolume - configure the storage class. Replace <RWO_STORAGE_CLASS> with a block storage class that supports ReadWriteOnce (RWO) volumes. Supported storage providers include ibmc-block-gold, OpenShift Data Foundation (formerly OpenShift Container Storage), Spectrum, and Portworx.

  3. After you edit the custom resource, apply it to the cluster:

    oc apply -f aa-instance.yaml