All namespaces migration

The AllNamespaces migration migrates a single shared instance of foundational services that is commonly deployed in the openshift-operators namespace.

This migration method is used in the following situations:

Note: The AllNamespace migration process can be completed by using a script or manual steps.

Prerequisites

Upgrade by using the script

  1. Execute the script migrate_tenant.sh with the following options:

    ./migrate_tenant.sh --license-accept --enable-licensing \
    --operator-namespace openshift-operators \
    --cert-manager-source ibm-cert-manager-catalog \
    --licensing-source ibm-licensing-catalog \
    -c v4.3 -i Automatic \
    -s opencloud-operators -v 1
    
  2. After executing the preceding automation script, IBM Cloud Paks should update all OperandRequests in the IBM Cloud Paks namespaces to only request ibm-im-operator and ibm-platformui-operator (for example, tenant1-cp4i-capability-1-namespace and tenant1-cp4i-capability-2-namespace):

    apiVersion: operator.ibm.com/v1alpha1
    kind: OperandRequest
    metadata:
      name: common-service
      namespace: tenant1-cp4i-capability-1-namespace
    spec:
      requests:
        - operands:
            - name: ibm-im-operator
            - name: ibm-platformui-operator
          registry: common-service
          registryNamespace: ibm-common-services
    
    • All remaining operators must be migrated from ibm-common-services to openshift-operators namespace.
    • All the services stay in their original ibm-common-services and IBM Cloud Paks namespaces.
    • IBM NamespaceScope operator in ibm-common-servicesand its corresponding custom resources (CR) will be automatically removed after foundational services 4.x.x upgrade is completed.

Upgrade by using manual steps

  1. Scale down the original IBM Cloud Pak foundational services instances.

    • Foundational services operator (typically in the openshift-operators namespace) is in a different namespace as the Operand Deployment Lifecycle Manager (ibm-common-services namespace)
    oc scale deployment ibm-common-service-operator -n openshift-operators --replicas=0
    
  2. Delete the operandRegistry named common-service in the ibm-common-services namespace:

    oc delete operandregistry common-service -n ibm-common-services
    
  3. Migrate and set up a new singleton service for Licensing and Cert-Manager.

    • The new singleton service migration and setup is completed by running the setup_singleton.sh script. For more information on scripts, see Installing IBM Cert Manager and Licensing by script.

    • --operator-namespace is the parameter in the script used to locate the namespace for foundational services 3.x.x singleton service, and it will migrate the singleton service to its corresponding namespace.

    • Other parameters can be customized.

    ./setup_singleton.sh --license-accept --enable-licensing --operator-namespace ibm-common-services
    
  4. Switch the channel (and switch the CatalogSource, if necessary) for ibm-common-service-operator in the openshift-operators namespace. After the ibm-common-service-operator is upgraded to the v4.x version:

    • ODLM is migrated from the ibm-common-services to openshift-operators namespace.

    • IBM Business Teams Service (BTS) and Events operator are migrated from ibm-common-services to openshift-operators namespace (if installed)

    • IAM, Zen, and other dependencies (such as management-ingress, MongoDB, and CommonUI) are working still as-is in ibm-common-services namespace, until the IBM Cloud Paks are upgraded and stop creating OperandRequests for ibm-iam-operator and ibm-zen-operator.

  5. Check the status of the CommonService CR and the OperandRequests.

    1. To check the status of the CommonService CR in your operator namespace, run the following command and make sure that the status is Succeeded:

      oc get commonservice common-service -n <foundational-service-operator-namespace> -o jsonpath='{.status.phase}'
      
    2. Make sure that all the OperandRequests in IBM Cloud Paks namespace are in Running status before you update these OperandRequests in the next step. Run the following command:

      oc get operandrequest <IBM Cloud Paks-operandrequest-name> -n <IBM Cloud Paks namespace> -o jsonpath='{.status.phase}'
      
  6. IBM Cloud Paks should update all OperandRequests in the IBM Cloud Paks namespaces to only request ibm-im-operator and ibm-platformui-operator (for example, tenant1-cp4i-capability-1-namespace and tenant1-cp4i-capability-2-namespace).

    apiVersion: operator.ibm.com/v1alpha1
    kind: OperandRequest
    metadata:
      name: common-service
      namespace: tenant1-cp4i-capability-1-namespace
    spec:
      requests:
        - operands:
            - name: ibm-im-operator
            - name: ibm-platformui-operator
          registry: common-service
          registryNamespace: ibm-common-services
    
    • All remaining operators should be migrated from the ibm-common-services to openshift-operators namespace
      • The IBM NamespaceScope operator is in ibm-common-services, but it is not used at all. You can remove the IBM NamespaceScope operator and its corresponding CR after IBM Cloud Paks upgrade is done.
    • All the services stay in their original ibm-common-services and IBM Cloud Paks namespaces.