Chapter 2. Cryostat migration process The process of migrating to Cryostat 3.0 includes the following tasks: Familiarize with your current Cryostat installation and configured instances . Upgrade your existing Cryostat installation . Update your deployed applications . Restore configurations . 2.1. Familiarizing with your current Cryostat installation and configured instances The Cryostat Operator is normally updated automatically if the Update approval strategy is set as Automatic . However, because Cryostat 3.0 introduces changes to the installation mode and provided APIs as described in Major Cryostat Operator changes , you might need to perform manual actions to ensure that Cryostat is properly updated. To determine whether manual intervention is required, review the following steps to familiarize with your current Cryostat installation and configured instances. Procedure As an administrator, in the main navigation of the Red Hat OpenShift web console, click the drop-down menu and select Administrator . In the navigation menu, click Operators > Installed Operators . Search for the installed Red Hat build of Cryostat Operator. To check Cryostat's installation mode, note the value in the Managed Namespaces column. This value can be All Namespaces or a user-defined namespace. Figure 2.1. Managed Namespaces details in Cryostat In the Name column, click Red Hat build of Cryostat . In the Operator details panel, click the Subscription tab. In the Subscription details panel, to check Cryostat's update approval strategy, note the value in the Update approval area. This value can be Manual or Automatic . Figure 2.2. Update approval details in Cryostat To check your configured instances: Click the Cluster Cryostat tab. This displays a list of the ClusterCryostat instances that have already been created. If there are no instances, the page diplays No operands found . Click the Cryostat tab. This displays a list of the Cryostat instances that have already been created. If there are no instances, the page diplays No operands found . Once you have identified the combination of installation mode and configured instances, you can upgrade Cryostat by completing the appropriate steps in Upgrading your Cryostat installation that match your deployment. 2.2. Upgrading your Cryostat installation The steps you must follow to upgrade Cryostat will vary depending on which of the following scenarios matches your existing Cryostat installation, based on Cryostat installation and instance combinations: Cryostat was installed to All Namespaces and Cryostat instances were previously created . Cryostat was installed to All Namespaces and ClusterCryostat instances were previously created . Cryostat was installed to All Namespaces and ClusterCryostat and Cryostat instances were previously created . Cryostat was installed to a target namespace and Cryostat instances were previously created . Cryostat was installed to a target namespace and ClusterCryostat instances were previously created . Cryostat was installed to a target namespace and ClusterCryostat and Cryostat instances were previously created . 2.2.1. Upgrading installations where Cryostat was installed to "All Namespaces" and "Cryostat" instances were previously created Note For this scenario, if the Update approval strategy is set to Automatic , no upgrade steps are required. For this scenario, if the Update approval strategy is set to Manual , complete the steps in the following procedure. Procedure As an administrator, in the main navigation of the Red Hat OpenShift web console, click the drop-down menu and select Administrator . In the navigation menu, click Operators > Installed Operators . Search for the installed Red Hat build of Cryostat Operator. Check the version and status of the Cryostat Operator. The Cryostat version will be 2.4 and the Status column should display Upgrade available . Click Upgrade available . Click Preview InstallPlan and then click Approve . You have now successfully upgraded to Cryostat 3.0. Note To ensure that cached sessions are reset, a hard browser refresh might be required when opening the Cryostat web application. 2.2.2. Upgrading installations where Cryostat was installed to "All Namespaces" and "ClusterCryostat" instances were previously created For this scenario, complete the steps in the following procedure: Procedure As an administrator, in the main navigation of the Red Hat OpenShift web console, click the drop-down menu and select Administrator . In the navigation menu, click Operators > Installed Operators . Search for the installed Red Hat build of Cryostat Operator. Check the version and status of the Cryostat Operator. If the Update approval strategy for Cryostat is Automatic , the Cryostat version will have already been upgraded to 3.0. Continue to Step 5 . If the Update approval Strategy for Cryostat is Manual , the Cryostat version will be 2.4 and the Status column should display Upgrade available . Click Upgrade available . Click Preview InstallPlan and then click Approve . Once Cryostat 3.0 is installed, navigate to Administration > CustomResourceDefinitions . Search for and click into ClusterCryostat CRD (custom resource definition). Click the Instances tab. For each ClusterCryostat instance that you need to migrate, make a copy of the YAML configuration: Click the name of the ClusterCryostat instance. Then click the YAML tab and click Download in the lower-right corner of the panel. Repeat step 8a for each instance that you need to migrate. Navigate back to the ClusterCryostat Instances tab. Remove each ClusterCryostat instance by clicking the ellipsis icon on the right. This includes the instances that you downloaded in Step 8 . Navigate to the Installed Operators > Red Hat build of Cryostat > Cryostat tab. For each ClusterCryostat instance in Step 8 : Click Create Cryostat . Use the YAML view to modify your ClusterCryostat configurations. For example: Old YAML settings: New YAML settings: Click Create . You have now successfully migrated your Cryostat instances. For more information about updating your deployed applications, see Updating your deployed applications . 2.2.3. Upgrading installations where Cryostat was installed to "All Namespaces" and "ClusterCryostat" and "Cryostat" instances were previously created For information about migrating ClusterCryostat instances, see Upgrading installations where Cryostat was installed to "All Namespaces" and "ClusterCryostat" instances were previously created . Note Cryostat instances do not need to be modified or removed. 2.2.4. Upgrading installations where Cryostat was installed to a target namespace and "Cryostat" instances were previously created For this scenario, regardless of whether the Update approval strategy is Automatic or Manual , the upgrade paths for Cryostat Operators will fail with the following error: error: OwnNamespace InstallModeType not supported, cannot configure to watch own namespace Before you continue, review the information in Migration recommendations . For this scenario, complete the steps in the following procedure. Procedure As an administrator, in the main navigation of the Red Hat OpenShift web console, click the drop-down menu and select Administrator . In the navigation menu, click Operators > Installed Operators . Note Ensure that you have selected the correct project (namespace) in which Cryostat was installed. Search for the installed Red Hat build of Cryostat version 2.4 Operator. Uninstall Red Hat build of Cryostat from Operators > Installed Operators . If the Update approval strategy is Manual , only Cryostat 2.4 is displayed in the Installed Operators table. Click the ellipsis icon on the right and select Uninstall Operator . If the Update approval Strategy is Automatic , Cryostat 2.4 and 3.0 are both displayed in the Installed Operators table. For Cryostat 2.4, click the ellipsis icon and select Delete ClusterServiceVersion . For Cryostat 3.0, click the ellipsis icon and select Uninstall Operator . Navigate to Operators > OperatorHub and search for Cryostat. Click the Red Hat build of Cryostat tile and install version 3.0 into the openshift-operators namespace. Openshift-operators is the default namespace for Operator installations to "All Namespaces". You have now successfully migrated to the Cryostat 3.0 Operator. For more information about updating your deployed applications, see Updating your deployed applications . Note To ensure that cached sessions are reset, a hard browser refresh might be required when opening the Cryostat web application. 2.2.5. Upgrading installations where Cryostat was installed to a target namespace and "ClusterCryostat" instances were previously created For this scenario, regardless of whether the Update approval strategy is Automatic or Manual , the upgrade paths for Cryostat Operators will fail with the following error: error: OwnNamespace InstallModeType not supported, cannot configure to watch own namespace Before you continue, review the information in Migration recommendations . For this scenario, complete the steps in the following procedure. Procedure As an administrator, in the main navigation of the Red Hat OpenShift web console, click the drop-down menu and select Administrator . In the navigation menu, click Operators > Installed Operators . Note Ensure that you have selected the correct project (namespace) in which Cryostat was installed. Search for the installed Red Hat build of Cryostat version 2.4 Operator. Click the Cluster Cryostat tab. To export an instance that needs to be migrated, click this instance name. Then click the YAML tab and click Download in the lower-right corner of the panel. Repeat step 4a for each instance that you need to migrate. Once the instances have been exported, to delete these instances, select Delete ClusterCryostat from the Actions drop-down menu in the upper-right corner of the panel. Uninstall Red Hat build of Cryostat from Operators > Installed Operators . If the Update approval strategy is Manual , only Cryostat 2.4 is displayed in the Installed Operators table. Click the ellipsis icon on the right and select Uninstall Operator . If the Update approval Strategy is Automatic , Cryostat 2.4 and 3.0 are both displayed in the Installed Operators table. For Cryostat 2.4, click the ellipsis icon and select Delete ClusterServiceVersion . For Cryostat 3.0, click the ellipsis icon and select Uninstall Operator . Navigate to Operators > OperatorHub and search for Cryostat. Click the Red Hat build of Cryostat tile and install version 3.0 into the openshift-operators namespace. Openshift-operators is the default namespace for Operator installations to "All Namespaces". For each ClusterCryostat instance that you exported in Step 4 : Click Create Cryostat . Using the YAML from Step 4 , use the YAML view to modify your ClusterCryostat configurations. For example: Old YAML settings: New YAML settings: Click Create . You have now successfully migrated to the Cryostat 3.0 Operator. For more information about updating your deployed applications, see Updating your deployed applications . 2.2.6. Upgrading installations where Cryostat was installed to a target namespace and "ClusterCryostat" and "Cryostat" instances were previously created For information about migrating ClusterCryostat instances, see Upgrading installations where Cryostat was installed to a target namespace and ClusterCryostat instances were previously created . Note Cryostat instances do not need to be modified or removed. 2.3. Updating your deployed applications For more information about configuring your Java applications in Cryostat 3.0, see Configuring Java applications . 2.4. Restoring configurations For previously customized Cryostat configurations such as event templates, dashboard layouts, JFR recordings, and automated rules, review the following guides to restore these customizations: Event templates For more information, see Step 7 in Using custom event templates . Dashboard layouts For more information, see Restoring a dashboard layout . JFR recordings For more information, see Uploading a JFR recording to the Cryostat archives location . Automated rules For more information, see Uploading an automated rule in JSON . Revised on 2024-07-02 14:48:24 UTC

Commands:
apiVersion: operator.cryostat.io/v1beta1 kind: ClusterCryostat metadata: name: cryostat-sample spec: enableCertManager: true installNamespace: cryostat targetNamespaces: - openshift-operators
apiVersion: operator.cryostat.io/v1beta2 kind: Cryostat metadata: name: cryostat-sample namespace: openshift-operators spec: enableCertManager: true targetNamespaces: - openshift-operators
apiVersion: operator.cryostat.io/v1beta1 kind: ClusterCryostat metadata: name: cryostat-sample spec: enableCertManager: true installNamespace: cryostat targetNamespaces: - openshift-operators
apiVersion: operator.cryostat.io/v1beta2 kind: Cryostat metadata: name: cryostat-sample namespace: openshift-operators spec: enableCertManager: true targetNamespaces: - openshift-operators (or Target Namespace)