Installing on Open Data Hub

This guide will walk through installing Open Data Hub and TrustyAI into your cluster. Starting from a completely blank cluster, you will be left with:

  1. An Open Data Hub installation

  2. A namespace to deploy models into

  3. A TrustyAI Operator, to manage all instances of the TrustyAI Service

  4. A TrustyAI Service, to monitor and analyze all the models deployed into your model namespace.

Definitions

$ODH

Namespace to install ODH into.

$PROJECT

Namespace to deploy models into.

Environment Setup

  1. Download the demo repository, which contains the various resource files you’ll need for the tutorial:

    git clone https://github.com/trustyai-explainability/odh-trustyai-demos
  2. Navigate to the Installation tutorial directory:

    cd odh-trustyai-demos/1-Installation

    All future commands within this tutorial should be run from this directory.

Cluster Setup

  1. Make sure you are `oc login’d to your OpenShift cluster.

  2. Create two projects, $ODH and $PROJECT.

    These names are arbitrary, but I’ll be using them throughout the rest of this demo.

    oc create project $ODH
    oc create project $PROJECT
  3. Prepare the $PROJECT for ODH’s model serving.

    oc label namespace $PROJECT "modelmesh-enabled=true" --overwrite=true

    To enable ODH’s monitoring stack, user-workload-monitoring must be configured.

Enable User-Workload-Monitoring

  1. Enable user-workload-monitoring by creating the following ConfigMap.

    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: cluster-monitoring-config
      namespace: openshift-monitoring
    data:
      config.yaml: |
        enableUserWorkload: true
  2. Apply the file using.

    oc apply -f resources/enable_uwm.yaml
  3. Configure user-workload-monitoring to hold metric data for 15 days by creating the following ConfigMap.

    apiVersion: v1
    kind: ConfigMap
    metadata:
      name: user-workload-monitoring-config
      namespace: openshift-user-workload-monitoring
    data:
      config.yaml: |
        prometheus:
          logLevel: debug 
          retention: 15d
  4. And applying it with.

    oc apply -f resources/uwm_configmap.yaml

Depending on how your cluster was created, you may need to enable a User Workload Monitoring setting from your cluster management UI (for example, on console.redhat.com).

Install ODH Operator

  1. From the OpenShift Console, navigate to Operators > OperatorHub, and search for Open Data Hub.

    ODH in OperatorHub
  2. Click on Open Data Hub Operator.

    • If the "Show community Operator" warning opens, hit "Continue".

    • Hit "Install".

  3. From the "Install Operator" screen.

    • Make sure "All namespaces on the cluster" in selected as the "Installation Mode".

    • Hit install.

  4. Wait for the Operator to finish installing.

ODH v2

Since ODH 2.3.0, TrustyAI is included as an ODH component.

For versions prior to 2.3.0, use the ODH v1 method.

If the provided ODH version in your cluster’s OperatorHub is version 2.3.0+, use the following steps:

Install ODH (ODH v2.x)

  1. Navigate to your opendatahub project.

  2. From "Installed Operators", select "Open Data Hub Operator".

  3. Navigate to the "Data Science Cluster" tab and hit "Create DataScienceCluster".

  4. In the YAML view Make sure trustyai is set to Managed.

    ODH V2
  5. Hit the "Create" button.

  6. Within the "Pods" menu, you should begin to see various ODH components being created, including the trustyai-service-operator-controller-manager-xxx.

Install a TrustyAI service

  1. Navigate to your model-namespace project: oc project model-namespace.

  2. Run oc apply -f resources/trustyai_crd.yaml.

    This will install the TrustyAI Service into your model-namespace project, which will then provide TrustyAI features to all subsequent models deployed into that project, such as explainability, fairness monitoring, and data drift monitoring.

ODH v1

If the provided ODH version in your cluster’s OperatorHub is version 1.x, use the following steps.

Install ODH v1

  1. Navigate to your $ODH project.

  2. Go to Installed Operators > Open Data Hub Operator > KfDef. .

  • Hit "Create KfDef".

  • Hit "Create" without making any changes to the default configuration.

  1. Within the "Pods" menu, you should begin to see various ODH components being created.

Install TrustyAI on ODH v1

  1. Navigate to your $ODH project.

    oc project $ODH
  2. Run oc apply -f resources/trustyai_operator_kfdef.yaml.

    This will install the TrustyAI Operator into your $ODH namespace alongside the ODH installation.

  3. Within the "Pods" menu, you should see the TrustyAI Operator pod being created.

  4. Navigate to your $PROJECT project.

    oc project $PROJECT
  5. Run oc apply -f resources/trustyai_crd.yaml.

    This will install the TrustyAI Service into your $PROJECT project, which will then provide TrustyAI features to all subsequent models deployed into that project, such as explainability, fairness monitoring, and data drift monitoring.