Deploying an assembly canvas by using the CLI

An assembly is an instance type that you can use to deploy multiple instances of other IBM Cloud Pak® for Integration instances and components from the same YAML file.

You can author and deploy assemblies by using the canvas in the Platform UI. For more information, see Using the assembly canvas.

Before you begin

Procedure

  1. Log into your OpenShift cluster with your OpenShift user credentials:

    oc login
  2. If you installed the operators in All namespaces on the cluster mode, use a project other than openshift-operators in which to deploy the instance.

    Create a new project:

    oc new-project <project_name>

    For example:

    oc new-project integration
  3. Create an IntegrationAssembly YAML file. As an example, you could create a file called assembly.yaml with the following example configuration. Update the values as indicated:

    • For metadata.namespace, enter your project (namespace) name.

    • In the matchLabels section, edit the example-canvas: 'true' label; you can change it to any other label name that you want. You can add other labels as well. Any instance that contains all the labels in this section will be imported to the canvas in the next step (instance labels must match all labels in the assembly, not just a subset of them).

    • Cloud Pak for Integration searches the OpenShift cluster for resources that have matching labels. Any resources that match are imported (added) to the assembly canvas.

    Example configuration file:

    apiVersion: integration.ibm.com/v1beta1
    kind: IntegrationAssembly
    metadata:
      name: example
      namespace: integration
    spec:
      independentResources:
        selector:
          matchLabels:
            example-canvas: 'true'
  4. Apply the yaml file to the cluster

    oc apply assembly.yaml
  5. Access the Platform UI and open the Assembly canvas to see all the instances selected by the label selector.