You can upgrade the operator by running a script to the new version before you apply your
custom resource upgrades.
About this task
Applying an interim fix to the Cloud Pak operator in the same channel is done automatically after
the release of the interim fix. Unless you change the default behavior that approves the upgrade
automatically. To upgrade from one channel to another channel, for example v21.1 to v21.2, download
the upgradeOperator.sh script from the new CASE package and run it. In an air
gap environment, you can also use the upgradeOperator.sh script to make an
upgrade.
Procedure
-
Log in to the target cluster.
oc login https://<CLUSTERIP>:<port> -u <ADMINISTRATOR>
oc project <project_name>
Where <project_name> is the target namespace.
-
Download the
cert-kubernetes
repository to a Linux® based machine (RHEL, CentOS, and macOS).
To download the files, go to the Container Application Software for Enterprises (CASE) package
URL, extract the package, and then extract the contents from
the
.tar file in the
ibm-cp-automation/inventory/cp4aOperatorSdk/files/deploy/crs folder. Use the
tar -xvzf command to extract the
archives.
tar -xvzf ibm-cp-automation-3.1.0.tgz
cd ibm-cp-automation/inventory/cp4aOperatorSdk/files/deploy/crs
tar -xvzf cert-k8s-21.0.2.tar
For
21.0.1-IF001, use this URL and the following
commands.
tar -xvzf ibm-cp-automation-3.0.1.tgz
cd ibm-cp-automation/inventory/cp4aOperatorSdk/files/deploy/crs
tar -xvzf cert-k8s-21.0.1.tar
- Optional:
If you have static storage on OCP, provide group write permission to the persistent volume (PV)
of the operator.
- According to the PV path definition
(/root/operator), run the following
commands.
chown -R :65534 /root/operator
chmod -R g+rw /root/operator
Group
ownership must be set to the anongid
option given in the NFS export definition of
the NFS server associated with the PV. The default anongid
value is
65534.
Remove the .OPERATOR_TYPE
file in case it exists from a previous
deployment.
rm -f /<hostPath>/.OPERATOR_TYPE
Where
<path> is the value in your PV (root/operator).
-
Upgrade the
icp4a-operator
on your cluster.
Use the upgradeOperator.sh script to deploy the operator manifest
descriptors.
./scripts/upgradeOperator.sh -n <project_name> -a accept
Where <project_name> is the target namespace, and accept means that you
accept
the cert-kubernetes/LICENSE.
Use the script -h
parameter for more information.
./scripts/upgradeOperator.sh -h
The -i
parameter is needed only if you loaded the images to a private image
registry. If you did not use the admin.registrykey
secret, the -p
parameter is needed. The secret name must be the secret that is used to access the registry.
Note: If you plan to use a non-administrator user to install the operator, you must add the user to
the
ibm-cp4-operator
role.
oc adm policy add-role-to-user ibm-cp4a-operator <user_name>
The script is finished when the following message is displayed:
All descriptors have been successfully applied. Monitor the pod status with 'kubectl get pods -w'.
Tip: If you see a timeout message "
Timeout Waiting for CP4BA operator to
start", run the
upgradeOperator.sh script again. If the
upgradeOperator.sh script times-out again, wait at least 15 minutes before you
begin
Troubleshooting.
Results
The new "IBM Cloud Pak for Business Automation" operator is now installed
in the targeted namespace and pulls the new images. The IBM Automation
Foundation operator and the IBM Automation Foundation Core
operator are also installed.