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 Deploying Automation assets.

Before you begin

Complete these prerequisites before you create an Automation assets instance. An Integration Specialist needs to perform 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.

  • Confirm that the operator for Automation assets is installed. See Installing the operators with the OpenShift console or Installing the operators with the CLI.

  • Deploy Automation assets in the namespace where the Platform UI is already deployed or it will not function properly.

  • If you are using the IBM Entitled Registry, confirm that a pull secret exists in the namespace containing an entitlement key. For more information, see Finding and applying your entitlement key by using the UI (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 only. This mode requires you to use a Block RWO volume for storing your asset data.
      Attention: You cannot increase the number of replicas after deployment if you are using this mode.
    • Scalable mode allows you to deploy Automation assets by using one or more replicas. This mode allows you to modify the number of replicas after deployment. This mode requires you to use a File RWX volume for storing your asset data.

  • Provide two different types of storage classes for use by Automation assets:

    • Asset data storage - Requires either a Block RWO volume (when you are deploying in single replica-only mode) or a File RWX volume (when you are 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 the basic instance definition CR:

    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. Edit the aa-instance.yaml file as follows:

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

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

    • In the spec.license.license field, keep the default value unless you change the value for spec.version. For details about specific version licenses, consult the "Table of license versions" section in Licensing.

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

    • In the spec.storage.assetDataVolume field and the spec.storage.couchVolume field, configure the storage class. Change <RWO_STORAGE_CLASS> to 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 details about storage support and configuration, see Storage considerations.

  3. After you edit the instance definition, apply the CR 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 the basic instance definition CR:

    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. Edit the aa-instance.yaml file as follows:

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

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

    • In the spec.license.license field, keep the default value unless you change the value for spec.version. For details about specific version licenses, consult the "Table of license versions" section in Licensing.

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

    • In the spec.storage.assetDataVolume field, configure the storage class. Change <RWX_STORAGE_CLASS> to 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.

    • In the spec.storage.couchVolume field, change <RWO_STORAGE_CLASS> to 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 instance definition, apply it to the cluster:

    oc apply -f aa-instance.yaml