Installing Watson Machine Learning
A project administrator can upgrade the Watson Machine Learning service on IBM® Cloud Pak for Data
- Permissions you need for this task
- You must be an administrator of the OpenShift® project (Kubernetes namespace) where you will deploy Watson Machine Learning.
- Information you need to complete this task
-
- Watson Machine Learning
needs only the
restricted
security context constraint (SCC). - Watson Machine Learning must be installed in the same project as Cloud Pak for Data.
- Watson Machine Learning requires the Cloud Pak for Data common core services. If the common core services are not installed in the project where you plan to install Watson Machine Learning, the common core services will be automatically installed when you install Watson Machine Learning, which will increase the amount of time the installation takes to complete.
- Watson Machine Learning
uses the following storage classes. If you don't use these storage classes on your cluster, ensure
that you have a storage class with an equivalent definition:
- OpenShift Container
Storage:
ocs-storagecluster-cephfs
- IBM Spectrum®:
ibm-spectrum-scale-sc
- NFS:
managed-nfs-storage
- Portworx:
portworx-shared-gp3
- IBM Cloud File Storage:
ibmc-file-gold-gid
- OpenShift Container
Storage:
- Watson Machine Learning
needs only the
Before you begin
Ensure that the cluster meets the minimum requirements for installing Watson Machine Learning. For details, see System requirements.
Additionally, ensure that a cluster administrator completed the required Pre-installation tasks for your environment. Specifically, verify that a cluster administrator completed the following tasks:
- Cloud Pak for Data is installed. For details, see Installing Cloud Pak for Data.
- For environments that use a private container registry, such as air-gapped environments, the Watson Machine Learning software images are mirrored to the private container registry. For details, see Mirroring images to your container registry.
- The cluster is configured to pull the Watson Machine Learning software images. For details, see Configuring your cluster to pull images.
- The Watson Machine Learning catalog source exists. For details, see Creating catalog sources.
- The Watson Machine Learning operator subscription exists. For details, see Creating operator subscriptions.
If these tasks are not complete, the Watson Machine Learning installation will fail.
Procedure
Complete the following tasks to install Watson Machine Learning:
Installing the service
To install Watson Machine Learning:
- Log in to Red Hat® OpenShift Container Platform as a user with sufficient permissions to
complete the
task:
oc login OpenShift_URL:port
- Create a WmlBase custom resource to install Watson Machine Learning. Follow the appropriate guidance
for your environment.Important: By creating a WmlBase custom resource with
spec.license.accept: true
, you are accepting the license terms for Watson Machine Learning. You can find links to the relevant licenses in IBM Cloud Pak for Data License Information.Create a custom resource with the following format.
cat <<EOF |oc apply -f - apiVersion: wml.cpd.ibm.com/v1beta1 kind: WmlBase metadata: name: wml-cr # This is the recommended name, but you can change it namespace: project-name # Replace with the project where you will install Watson Machine Learning labels: app.kubernetes.io/instance: wml-cr app.kubernetes.io/managed-by: ibm-cpd-wml-operator app.kubernetes.io/name: ibm-cpd-wml-operator spec: ignoreForMaintenance: false scaleConfig: small #This value can be set to small or medium license: accept: true license: Enterprise | Standard # Specify the license you purchased. version: 4.0.9 storageVendor: ocs storageClass: ocs-storagecluster-cephfs #if you use a different storage class, replace it with the appropriate storage class EOF
Create a custom resource with the following format.
cat <<EOF |oc apply -f - apiVersion: wml.cpd.ibm.com/v1beta1 kind: WmlBase metadata: name: wml-cr # This is the recommended name, but you can change it namespace: project-name # Replace with the project where you will install Watson Machine Learning labels: app.kubernetes.io/instance: wml-cr app.kubernetes.io/managed-by: ibm-cpd-wml-operator app.kubernetes.io/name: ibm-cpd-wml-operator spec: ignoreForMaintenance: false scaleConfig: small #This value can be set to small or medium license: accept: true license: Enterprise | Standard # Specify the license you purchased. version: 4.0.9 storageClass: ibm-spectrum-scale-sc #if you use a different storage class, replace it with the appropriate storage class EOF
Create a custom resource with the following format.
cat <<EOF |oc apply -f - apiVersion: wml.cpd.ibm.com/v1beta1 kind: WmlBase metadata: name: wml-cr # This is the recommended name, but you can change it namespace: project-name # Replace with the project where you will install Watson Machine Learning labels: app.kubernetes.io/instance: wml-cr app.kubernetes.io/managed-by: ibm-cpd-wml-operator app.kubernetes.io/name: ibm-cpd-wml-operator spec: ignoreForMaintenance: false scaleConfig: small #This value can be set to small or medium license: accept: true license: Enterprise | Standard # Specify the license you purchased version: 4.0.9 storageVendor: portworx storageClass: portworx-shared-gp3 #if you use a different storage class, replace it with the appropriate storage class EOF
Create a custom resource with the following format.
cat <<EOF |oc apply -f - apiVersion: wml.cpd.ibm.com/v1beta1 kind: WmlBase metadata: name: wml-cr # This is the recommended name, but you can change it namespace: project-name # Replace with the project where you will install Watson Machine Learning labels: app.kubernetes.io/instance: wml-cr app.kubernetes.io/managed-by: ibm-cpd-wml-operator app.kubernetes.io/name: ibm-cpd-wml-operator spec: ignoreForMaintenance: false scaleConfig: small #This value can be set to small or medium license: accept: true license: Enterprise | Standard # Specify the license you purchased version: 4.0.9 storageVendor: "" storageClass: managed-nfs-storage #if you use a different storage class, replace it with the appropriate storage class EOF
Verifying the installation
When you create the custom resource, the Watson Machine Learning operator processes the contents of the custom resource and starts up the
microservices that comprise Watson Machine Learning, including WmlBase. (The WmlBase microservice is defined by the wml-cr custom
resource.) Watson Machine Learning is installed when the WmlBase status is Completed
.
To check the status of the installation:
- Change to the project where you installed Watson Machine Learning:
oc project project-name
- Get the status of Watson Machine Learning (wml-cr):
oc get WmlBase wml-cr -o jsonpath='{.status.wmlStatus} {"\n"}'
Watson Machine Learning is ready when the command returns
Completed
Choosing a service upgrade plan
You can choose how Watson Machine Learning is upgraded when you install a newer version of the Watson Machine Learning operator on the cluster.
- Automatic upgrade (recommended)
-
If you want Watson Machine Learning to be automatically upgraded when you install a newer version of the Watson Machine Learning operator on the cluster, remove the
version
entry from the WmlBase custom resource.To remove the
version
entry, run the following command. You must update the command with the appropriate project name before you run the command.oc patch WmlBase wml-cr \ --namespace project-name \ --type=json \ --patch '[{ "op": "remove", "path": "/spec/version" }]'
- Manual upgrade
-
If you want to manually upgrade Watson Machine Learning after you install a newer version of the Watson Machine Learning operator, you can pin the installation at a specific version in the WmlBase custom resource.
By default, when you create the WmlBase custom resource, it includes the
version
entry, so no additional action is required.If you removed the
version
entry from the WmlBase custom resource, run the following command to pin the installation at Version 4.0.9. You must update the command with the appropriate project name before you run the command.oc patch WmlBase wml-cr \ --namespace project-name \ --type=merge \ --patch '{"spec": {"version":"4.0.9"}}'
For a list of operand versions supported by the Watson Machine Learning operator, see Operator and operand versions.
What to do next
The service is ready to use. For details, see Watson Machine Learning overview
The service must be configured before users can access the service. For details, see Administering Watson Machine Learning.