Preparing and applying upgraded custom resource

Upgrade IBM RPA on Red Hat® OpenShift® Container Platform to the most recent version.

Before you begin

In versions before 23.0.20, you might fail to upgrade the operand version to match the operator version. In these cases, you must add the following custom resource definition to apply the operand upgrade. If you are upgrading to version 23.0.20 or higher, this is no longer necessary.

apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
  name: cartridges.core.automation.ibm.com
spec:
  group: core.automation.ibm.com
  names:
    kind: Cartridge
    listKind: CartridgeList
    plural: cartridges
    singular: cartridge
  scope: Namespaced
  versions:
  - additionalPrinterColumns:
    - description: The Cartridge Status
      jsonPath: .status.conditions[?(@.type=="Ready")].status
      name: Ready
      type: string
    name: v1beta1
    schema:
      openAPIV3Schema:
        description: "IBM Automation Foundation Core operator provides UI deployments
          \n Documentation For additional details regarding install parameters: https://ibm.biz/iaf4cloudpaks.
          \n License \n By installing this product you accept the license terms http://ibm.biz/IAF-license."
        properties:
          apiVersion:
            description: 'APIVersion defines the versioned schema of this representation
              of an object. Servers should convert recognized schemas to the latest
              internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
            type: string
          kind:
            description: 'Kind is a string value representing the REST resource this
              object represents. Servers may infer this from the endpoint the client
              submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
            type: string
          metadata:
            type: object
          spec:
            description: CartridgeSpec defines the desired state of Cartridge
            properties:
              description:
                description: Describe about the CartridgeSpec
                type: string
              license:
                description: By installing this component you accept the license terms
                  http://ibm.biz/IAF-license.
                properties:
                  accept:
                    type: boolean
                required:
                - accept
                type: object
              version:
                default: 1.0.0
                description: Specifies the version of the cartridge operand
                type: string
            required:
            - license
            - version
            type: object
          status:
            description: CartridgeStatus defines the observed state of Cartridge
            properties:
              components:
                properties:
                  ui:
                    properties:
                      endpoints:
                        items:
                          properties:
                            casecret:
                              properties:
                                key:
                                  type: string
                                secretname:
                                  type: string
                              type: object
                            name:
                              type: string
                            scope:
                              type: string
                            type:
                              type: string
                            uri:
                              type: string
                          type: object
                        type: array
                    type: object
                type: object
              conditions:
                description: Conditions is a set of Condition instances.
                items:
                  description: "Condition represents an observation of an object's
                    state. Conditions are an extension mechanism intended to be used
                    when the details of an observation are not a priori known or would
                    not apply to all instances of a given Kind. \n Conditions should
                    be added to explicitly convey properties that users and components
                    care about rather than requiring those properties to be inferred
                    from other observations. Once defined, the meaning of a Condition
                    can not be changed arbitrarily - it becomes part of the API, and
                    has the same backwards- and forwards-compatibility concerns of
                    any other part of the API."
                  properties:
                    lastTransitionTime:
                      format: date-time
                      type: string
                    message:
                      type: string
                    reason:
                      description: ConditionReason is intended to be a one-word, CamelCase
                        representation of the category of cause of the current status.
                        It is intended to be used in concise output, such as one-line
                        kubectl get output, and in summarizing occurrences of causes.
                      type: string
                    status:
                      type: string
                    type:
                      description: "ConditionType is the type of the condition and
                        is typically a CamelCased word or short phrase. \n Condition
                        types should indicate state in the \"abnormal-true\" polarity.
                        For example, if the condition indicates when a policy is invalid,
                        the \"is valid\" case is probably the norm, so the condition
                        should be called \"Invalid\"."
                      type: string
                  required:
                  - status
                  - type
                  type: object
                type: array
              managedResources:
                items:
                  type: string
                type: array
              versions:
                properties:
                  available:
                    properties:
                      channels:
                        items:
                          properties:
                            name:
                              type: string
                          required:
                          - name
                          type: object
                        type: array
                      versions:
                        items:
                          properties:
                            name:
                              type: string
                          required:
                          - name
                          type: object
                        type: array
                    type: object
                  reconciled:
                    type: string
                required:
                - reconciled
                type: object
            required:
            - versions
            type: object
        type: object
    served: true
    storage: true
    subresources:
      status: {}
status:
  acceptedNames:
    kind: ""
    plural: ""
  conditions: []
  storedVersions: []

After completing the upgrade process, you can remove this custom resource.

Procedure

  1. In the OpenShift Console, navigate to Operators > Installed Operators and click IBM Robotic Process Automation.

    Installed operators page

  2. On the Robotic Process Automation tab, click the RPA Instance.

  3. On the YAML tab, set the replicas fields to 0 in the IBM RPA CR.

    apiVersion: rpa.automation.ibm.com/v1beta1
    kind: RoboticProcessAutomation
    metadata:
        name: rpa-sample
    spec:
        license:
            accept: true
        version: 2.3.0
        tls: {}
        api:
            externalConnection:
                secretName: rpa-db
            firstTenant:
                groupMappings:
                    adminGroups: IBM Development
                    superAdminsGroups: IBM Manager
                    userGroups: IBM User
                name: ibm
                owner:
                    email: superuser@example.com
                    name: superuser
            replicas: 0
            smtp:
                port: 587
                server: smtp.example.com
                userSecret:
                    secretName: rpa-smtp
            storage: {}
        ui:
            replicas: 0
        ocr:
            replicas: 0
        antivirus:
            replicas: 0
    

    Click Save once you've made your changes.

  4. Wait for the ready condition to appear in the status section of the IBM RPA CR:

    status:
        conditions:
        - lastTransitionTime: '2021-11-30T15:23:36Z'
            message: RPA successfully installed
            reason: Installed
            status: 'True'
            type: Ready
    
  5. Edit the YAML file again and change the spec.version field to the version number of IBM RPA you want to install. Click Save. Refer available versions at Versioning reference.

  6. Wait for the ready condition to appear in the status section of the IBM RPA CR:

    status:
        conditions:
        - lastTransitionTime: '2021-11-30T15:23:36Z'
            message: RPA successfully installed
            reason: Installed
            status: 'True'
            type: Ready
    
  7. Edit the YAML file again and restore the replicas to their previous value.