Upgrading the operator by running a script

To upgrade the operator, a cluster administrator user can run a script to set up the cluster. The administrator must also provide information that they get from the script to a non-administrator user so they can run the deployment script.

Before you begin

The upgradedeployment.py script uses the following utility tools and needs them to be installed on your client machine:

  • Kubernetes CLI
  • Python
  • container-samples repository from GitHub
To install the specified tools that are used by the upgradedeployment.py script, see topic Preparing a client to connect to the cluster.

If the script finds that any of these tools are missing on the client, it reports which tools are missing and provides a choice to install the tool.

About this task

Note: For operator upgrades from V5.5.8 to V5.6.0 on OCP and ROKS platforms, YAML style deployment is not supported and Operator Lifecycle Manager (OLM) is installed.
The upgradedeployment.py script has two modes.
deployment
When you run the script in deployment mode, the prerequisites validation for the script checks whether the required utility tools like Podman or Docker exist and if the connection to the cluster is successful. It also checks if the required descriptor files exist. If the prerequisites validation fails, the script flags the missing tools and files. The script updates the custom resource with upgrade information, scales down all deployments and upgrades the deployment with the updated custom resource.
operator
When you run the script in operator mode, the prerequisites validation for the script checks whether the required utility tools like Podman or Docker exist and if the connection to the cluster is successful. It also checks if the required descriptor files exist. If the prerequisites validation fails, the script flags the missing tools and files. It checks whether you want to use a global catalog that is shared across multiple deployments or if you want to use a private catalog for your deployment. The script then upgrades the cluster with the artifacts related to the upgraded operator.
After you downloaded the container-samples repository, change the directory to the container-samples/scripts folder. The script can be run from this location and has the following options:
python3 upgradedeployment.py --help

Usage: upgradedeployment.py [OPTIONS] COMMAND [ARGS]...

FileNet Content Manager Upgrade Deployment CLI.

Options:
  --version                      Show version and exit. 
  --install-completion           Install completion for the current shell.
  --show-completion              Show completion for the current shell, to copy it or customize the installation.
  --help                         Show this message and exit.

Customization and Utils:
  --silent     --no-silent       Enable Silent Install (no prompts). [default: no-silent]
  --verbose    --no-verbose      Enable verbose logging. [default: no-verbose]
  --dryrun     --no-dryrun       Perform a dry run [default: no-dryrun]

Commands:  
  deployment     Upgrade FNCM Deployment Only.
  operator       Upgrade FNCM Operator only.
You can run the script interactively, or supply the configuration file beforehand and run the script as a silent deployment.
When you run the script in interactive mode, you can specify the mode that you want. When you run the script without specifying a mode, it runs in all modes. The following command runs the script interactively:
python3 upgradedeployment.py
Tip: Before you run the script in silent mode, make sure that you fill the ./scripts/silent_config/silent_install_upgradedeployment.toml file and then run the following command:
python3 upgradedeployment.py --silent

Procedure

  1. Open a terminal or command prompt and log in to the target cluster as the <cluster-admin> user.
  2. Navigate to the directory where the container-samples repository was downloaded:
    cd ./container-samples/scripts
  3. Run the following command to install the necessary Python packages from the requirements.txt file:
    python3 -m pip install -r requirements.txt
  4. Run the upgrade deployment script in operator mode to upgrade the ibm-fncm-operator in your cluster.
    • Interactive:
      python3 upgradeoperator.py operator
    • Silent:

      Before you run the script in silent mode, make sure that you fill the ./scripts/silent_config/silent_install_upgradedeployment.toml file and then run the following command:

      python3 upgradeoperator.py --silent operator
    The prerequisites validation for the script checks whether the required utility tools like Podman or Docker exist and if the connection to the cluster is successful. It also checks if the required descriptor files exist. If the prerequisites validation fails, the script flags the missing tools and files. It also checks whether you want to use a global catalog that is shared across multiple deployments or if you want to use a private catalog for your deployment.
    The script then upgrades the cluster with the artifacts related to the upgraded operator.
  5. Monitor the operator pod until it shows a STATUS of "Running".
    kubectl get pods -w 

What to do next

Once the operator is upgraded, and an updated custom resource is applied, the deployment upgrade starts. This can take approximately 20 minutes, and after one reconcile loop completes, you can validate your upgrade. To validate the success of your upgrade, see topic Verifying the upgrade.