Chapter 6. Installing and managing version 2 of the Red Hat OpenShift Data Science Operator
This section shows to install version 2 (that is, version 2.2 or 2.1) of the Red Hat OpenShift Data Science Operator on your OpenShift Container Platform cluster using the command-line interface (CLI) and the OpenShift web console. The section also shows how to uninstall the Operator.
Version 2 of the Red Hat OpenShift Data Science Operator is a Limited Availability feature. Limited Availability means that you can install and receive support for the feature only with specific approval from Red Hat. Without such approval, the feature is unsupported.
6.1. Installing version 2 of the Red Hat OpenShift Data Science Operator by using the CLI
The following procedure shows how to use the OpenShift command-line interface (CLI) to install version 2 (that is, version 2.2 or 2.1) of the Red Hat OpenShift Data Science Operator on your OpenShift Container Platform cluster. The steps describe how to perform a basic installation of the Operator without installing any OpenShift Data Science components.
Prerequisites
- You are an IBM watsonx user or Red Hat has granted you installation entitlements for this version of the Operator.
- You have a running OpenShift Container Platform cluster, version 4.11 or greater, configured with a default storage class that can be dynamically provisioned.
- You have cluster administrator privileges for your OpenShift Container Platform cluster.
- You have downloaded and installed the OpenShift command-line interface (CLI).
Procedure
- Open a new terminal window.
In the OpenShift command-line interface (CLI), log in to your OpenShift Container Platform cluster as a cluster administrator, as shown in the following example:
$ oc login <openshift_cluster_url> -u system:admin
Create a namespace for installation of the Operator by performing the following actions:
Create a namespace YAML file, for example,
rhods-operator-namespace.yaml
.apiVersion: v1 kind: Namespace metadata: name: redhat-ods-operator 1
- 1
redhat-ods-operator
is the recommended namespace for the Operator.
Create the namespace in your OpenShift Container Platform cluster.
$ oc create -f rhods-operator-namespace.yaml
You see output that resembles the following:
namespace/redhat-ods-operator created
Create an operator group for installation of the Operator by performing the following actions:
Create an
OperatorGroup
object custom resource (CR) file, for example,rhods-operator-group.yaml
.apiVersion: operators.coreos.com/v1 kind: OperatorGroup metadata: name: rhods-operator namespace: redhat-ods-operator 1
- 1
- You must specify the same namespace that you created earlier in this procedure.
Create the
OperatorGroup
object in your OpenShift Container Platform cluster.$ oc create -f rhods-operator-group.yaml
You see output that resembles the following:
operatorgroup.operators.coreos.com/rhods-operator created
Create a subscription for installation of the Operator by performing the following actions:
Create a
Subscription
object CR file, for example,rhods-operator-subscription.yaml
.apiVersion: operators.coreos.com/v1alpha1 kind: Subscription metadata: name: rhods-operator namespace: redhat-ods-operator 1 spec: name: rhods-operator channel: alpha 2 source: redhat-operators sourceNamespace: openshift-marketplace
- As described in the preceding step, ensure that the channel name is correct for the version of the Operator that you want to install.
Create the
Subscription
object in your OpenShift Container Platform cluster to install the Operator.$ oc create -f rhods-operator-subscription.yaml
You see output that resembles the following:
subscription.operators.coreos.com/rhods-operator created
Verification
In the OpenShift Container Platform web console, click Operators
Installed Operators and confirm that the Red Hat OpenShift Data Science Operator shows one of the following statuses: -
Installing
- installation is in progress; wait for this to change toSucceeded
. This might take several minutes. -
Succeeded
- installation is successful.
-
In the web console, click Home
Projects and confirm that the following project namespaces are visible and listed as Active
:-
redhat-ods-applications
-
redhat-ods-monitoring
-
redhat-ods-operator
-
6.2. Installing version 2 of the Red Hat OpenShift Data Science Operator by using the web console
The following procedure shows how to use the OpenShift Container Platform web console to install version 2 (that is, version 2.2 or 2.1) of the Red Hat OpenShift Data Science Operator on your cluster. The steps describe how to perform a basic installation of the Operator without installing any OpenShift Data Science components.
Prerequisites
- You are an IBM watsonx user or Red Hat has granted you installation entitlements for this version of the Operator.
- You have a running OpenShift Container Platform cluster, version 4.11 or greater, configured with a default storage class that can be dynamically provisioned.
- You have cluster administrator privileges for your OpenShift Container Platform cluster.
Procedure
- Log in to the OpenShift Container Platform web console as a cluster administrator.
In the web console, click Operators
OperatorHub. The OperatorHub page opens.
Locate the Red Hat OpenShift Data Science Operator.
-
Scroll through available Operators or type
Red Hat OpenShift Data Science
into the Filter by keyword box to find the Red Hat OpenShift Data Science Operator.
-
Scroll through available Operators or type
- Select the Operator to display additional information.
Read the information about the Operator and click Install.
The Install Operator page opens.
For Update channel, select a value as follows:
-
To install version 2.2 of the Operator, select
alpha
. -
To install version 2.1 of the Operator, select
embedded
.
-
To install version 2.2 of the Operator, select
-
For Installation mode, observe that the only available value is
All namespaces on the cluster (default)
. This installation mode makes the Operator available to all namespaces in the cluster. -
For Installed Namespace, select
redhat-ods-operator (Operator recommended)
. -
Under Update approval, select either
Automatic
orManual
. Click Install.
An installation pane opens. When the installation finishes, a check mark appears beside the Operator name in the installation pane.
Verification
In the OpenShift Container Platform web console, click Operators
Installed Operators and confirm that the Red Hat OpenShift Data Science Operator shows one of the following statuses: -
Installing
- installation is in progress; wait for this to change toSucceeded
. This might take several minutes. -
Succeeded
- installation is successful.
-
In the web console, click Home
Projects and confirm that the following project namespaces are visible and listed as Active
:-
redhat-ods-applications
-
redhat-ods-monitoring
-
redhat-ods-operator
-
6.3. Uninstalling version 2 of the Red Hat OpenShift Data Science Operator
The following procedure shows how to use the OpenShift command-line interface (CLI) to uninstall version 2 (that is, version 2.2 or 2.1) of the Red Hat OpenShift Data Science Operator and any OpenShift Data Science components installed and managed by the Operator. Using the CLI is the recommended way to perform this uninstallation.
Prerequisites
- You have cluster administrator privileges for your OpenShift Container Platform cluster.
- You have downloaded and installed the OpenShift command-line interface (CLI).
Procedure
- Open a new terminal window.
In the OpenShift command-line interface (CLI), log in to your OpenShift Container Platform cluster as a cluster administrator, as shown in the following example:
$ oc login <openshift_cluster_url> -u system:admin
Optional: If you created a
DataScienceCluster
object to install OpenShift Data Science components, delete theDataScienceCluster
object.$ oc delete datasciencecluster $(oc get datasciencecluster --no-headers | awk '{print $1}')
You see output that resembles the following:
datasciencecluster.datasciencecluster.opendatahub.io "default" deleted
NoteDeleting the
DataScienceCluster
object also deletes the pods for any OpenShift Data Science components that you installed. This removes the OpenShift Data Science components.Delete the
DSCInitialization
object that the Operator created during installation.$ oc delete dscinitialization $(oc get dscinitialization --no-headers | awk '{print $1}')
You see the following output:
dscinitialization.dscinitialization.opendatahub.io "default" deleted
Delete the
Subscription
object that you created to install the Operator.$ oc delete subscription <subscription_name> -n <namespace_name>
In the following example, the command shown deletes the
rhods-operator
subscription from theredhat-ods-operator
namespace:$ oc delete subscription rhods-operator -n redhat-ods-operator
You see output that resembles the following:
subscription.operators.coreos.com "rhods-operator" deleted
- Navigate to the directory that contains the YAML file you used to create a namespace to install the Operator.
Delete the namespace that you created to install the Operator.
$ oc delete -f <namespace_file_name>.yaml
You see output that resembles the following:
namespace "redhat-ods-operator" deleted
NoteDeleting the namespace also deletes the
OperatorGroup
object that you created during installation of the Operator.Delete the namespaces that the Operator created during installation.
$ oc delete ns -l opendatahub.io/generated-namespace
For the default Operator installation, you see the following output:
namespace "redhat-ods-applications" deleted namespace "redhat-ods-monitoring" deleted
NoteIf you installed the workbenches component of OpenShift Data Science, the preceding command also deletes the
rhods-notebooks
namespace created during that installation.
Verification
On the command line, get the list of current Operator subscriptions in all namespaces.
$ oc get subscriptions --all-namespaces
Confirm that the subscription for the Red Hat OpenShift Data Science Operator (for example,
rhods-operator
) is not listed.