Deploying the IBM Workload Automation Operator

You can use these instructions to start the IBM Workload Automation Operator on your OpenShift cluster. You can then use the operator to install the IBM Workload Automation product components on your cluster and manage the deployment of your nodes.

The Operator deployment supports the following installation modes:

Type:

Log in to the OpenShift Enterprise cluster

To perform these steps you need to be logged in to the OpenShift Enterprise cluster from the CLI and either create the project (first time only) or select an existing project:

Log in to the OpenShift Enterprise cluster from the CLI:

Create a new project

To create a new project, run the following commands:

  1. oc new-project <workload-automation-project>

  2. oc project <workload-automation-project>

Add security and access policies

Specific security and access policies need to be added to the project. Use the following steps to apply the policies to your OpenShift project:

  1. Set the SecurityContextConstraints to the project by running the following command:

     oc apply -f ibm-workload-automation-restricted-scc.yaml
    
  2. To ensure that all service accounts related to the <workload-automation-project> are granted the SecurityContextConstraints applied in the previous step, run the following command:

      oc adm policy add-scc-to-group ibm-workload-automation-restricted-scc system:serviceaccounts:<workload-automation-project>
    

Create the Secrets

Obtain your entitlement key and store it on your cluster by creating a Kubernetes Secret. Using a Kubernetes secret allows you to securely store the key on your cluster and pass it to the operator and the product component deployments.

  1. Get your key to the entitled registry. Log in to MyIBM Container Software Library with the IBMid and password that are associated with the entitled software.

  2. In the Container software library tile, click View library and then click Copy key to copy the entitlement key to the clipboard.

  3. Log into OpenShift Enterprise cluster as described in Log in to the OpenShift Enterprise cluster.

  4. To create a pull secret for your entitlement key that enables access to the IBM entitled registry, run the following commands:

    a. Create the secret for sa-workload-automation:

    oc create secret docker-registry sa-workload-automation --docker-server=<registry_server> --docker-username=<user_name> --docker-password= <ibm_apki_key>  
    

    b. Create the secret for sa-<workload-automation-project>:

    oc create secret docker-registry sa-<workload-automation-project> --docker-server=<registry_server> --docker-username=<user_name> --docker-password= <ibm_apki_key> 
    

    where

    • <registry_server> is cp.icr.io
    • <user_name> is cp
    • <password> is the entitled key copied from the IBM Entitled Registry <ibm_api_key>

Deploy the Operator

You need to deploy the IBM Workload Automation Operator before you can install the product components. You can start the operator on your cluster by adding a custom resource to your project by using the OpenShift CLI. The custom resource pulls the operator image from the registry and starts it on your cluster.

Ensure you have the cluster admin role and complete the following steps:

  1. Deploy the Operator in the OpenShift Marketplace. Log into OpenShift Enterprise cluster as described in Log in to the OpenShift Enterprise cluster.

  2. Switch to the openshift-marketplace project.

        oc project openshift-marketplace
    
  3. Apply the following source catalog YAML file by copying the following template into a file named ibm-workload-automation-operators.yaml:

apiVersion: operators.coreos.com/v1alpha1
kind: CatalogSource
metadata:
  name: ibm-workload-automation-operators
  namespace: openshift-marketplace
spec:
  displayName: ibm-workload-automation-operators
  image: 'ibmcom/ibm-workload-automation-catalog:latest'
  publisher: 'IBM'
  sourceType: grpc
  updateStrategy:
    registryPoll:
      interval: 45m
  1. Apply the YAML file:

    oc apply -f ibm-workload-automation-operators.yaml

  2. From the OpenShift Container Platform web console, navigate to the Catalog -> OperatorHub page.

  3. Ensure that you have selected the correct project, , or switch to this project. This is the project in which you want to install the Operator. Browse for or type IBM-WORKLOAD-AUTOMATION in the Filter by keyword box.

  4. Select the IBM-WORKLOAD-AUTOMATION Operator and a dialog containing configurable parameters is displayed. Make any necessary changes to the values of the parameters.

  5. Click Subscribe.

The Operator is now installed and configured and you can verify it from the OpenShift console in Operators -> Installed Operators. You can also verify that it was installed and configured successfully from the command line submitting the following command:

oc get deployments

The following is the output for this command:

NAME READY UP-TO-DATE AVAILABLE
ibm-workload-automation-operator 1/1 1 1

Upgrade and Rollback

The following procedures are provided to upgrade and roll back the Operator. Since the product configuration files are isolated on a persistent volume in a dedicated directory, these procedures do not impact availability or performance.

Upgrading the Operator

When a new version of the Operator becomes available, the IBM Workload Automation operator is updated automatically.

Rolling back the Operator

Rolling back the IBM Workload Automation operator to the previous version is not supported at the time of the release of this document because it is the first release of the IBM Workload Automation Operator on the OpenShift Container Platform 4.x.

Next steps

When the operator is running on your cluster, you can install the IBM Workload Automation product components. You can find the instructions in the README Deploying the IBM Workload Automation components.

Removing the Operator

If you are no longer working with your IBM Workload Automation network, you can remove the Operator from your project. The Operator maintains the availability of your network and will restart any stopped nodes.

You can remove the operator deployment as follows:

  1. From the OpenShift web console, click Operators -> Installed Operators.

  2. Click the more options icon (the veritical ellipsis) for the IBM Workload Automation Operator and select Uninstall Operator.

The IBM Workload Automation Operator is removed from the project.