Skip to content

Commit

Permalink
Merge pull request #3 from ruivieira/installing
Browse files Browse the repository at this point in the history
Add ODH installation guide
  • Loading branch information
ruivieira authored Oct 24, 2023
2 parents 310e69e + b20926b commit b5d7085
Show file tree
Hide file tree
Showing 6 changed files with 234 additions and 3 deletions.
Binary file added Writerside/images/odh_operator_install.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions Writerside/redirection-rules.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,8 @@
<description>Created after removal of "This is the first topic" from TrustyAI</description>
<accepts>Default-topic.html</accepts>
</rule>
<rule id="3334115b">
<description>Created after removal of "Install on Open Data Hub" from TrustyAI</description>
<accepts>Install-on-Open-Data-Hub.html</accepts>
</rule>
</rules>
5 changes: 4 additions & 1 deletion Writerside/t.tree
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@
<toc-element topic="TrustyAI-core.md"/>
<toc-element topic="TrustyAI-operator.md">
<toc-element topic="Install-on-Kubernetes.md"/>
<toc-element topic="Install-on-Open-Data-Hub.md"/>
</toc-element>
<toc-element topic="TrustyAI-service.md">
<toc-element topic="Starter.md"/>
<toc-element topic="How-to-schedule-a-metric.md"/>
<toc-element topic="Reference.md"/>
</toc-element>
</toc-element>
<toc-element topic="How-to.md">
<toc-element topic="Install-on-Open-Data-Hub.md"/>
</toc-element>
<toc-element topic="Tutorial.md"/>
</instance-profile>
40 changes: 40 additions & 0 deletions Writerside/topics/How-to.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# How to

A How-to article is an action-oriented type of document.
It explains how to perform a specific task or solve a problem, and usually contains a sequence of steps.
Start with a short introductory paragraph that explains what users will accomplish by following this procedure,
what they need to perform it for, or define the target audience of the doc.

> **Highlight important information**
>
> You can change the element to *tip* or *warning* by renaming the style attribute below.
>
{style="note"}

## Before you start

It is good practice to list the prerequisites that are required or recommended.

Make sure that:
- First prerequisite
- Second prerequisite

## How to perform a task

Some introductory information.

1. Step with a code block

```bash
run this --that
```

2. Step with an image
![](image.png)

<!-- The 'src' attribute should contain the name of an image from the '/images' folder in your project -->

3. Step with a list.
- List item
- List item
- List item
136 changes: 134 additions & 2 deletions Writerside/topics/Install-on-Open-Data-Hub.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,135 @@
# Install on Open Data Hub
# Installing on Open Data Hub

Start typing here...
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](TrustyAI-operator.md), to manage all instances of the [TrustyAI Service](TrustyAI-service.md)
4) A TrustyAI Service, to monitor and analyze all the models deployed into your model namespace.

<deflist style="narrow" sorted="desc">
<def title="$ODH">
Namespace to install ODH into
</def>
<def title="$PROJECT">
Namespace to deploy models into
</def>
</deflist>

<procedure title="Cluster setup" id="cluster-setup">
<step>
<p>Make sure you are <code>oc login</code>'d to your OpenShift cluster</p>
</step>
<step>
<p>Create two projects, <code>$ODH</code> and <code>$PROJECT</code>.<p>
<p>These names are arbitrary, but I'll be using them throughout the rest of this demo</p>
<code-block lang="shell">
oc create project $ODH
oc create project $PROJECT
</code-block>
</step>
<step>
<p>Prepare the <code>$PROJECT</code> for ODH's model serving </p>
<code-block lang="shell">
oc label namespace $PROJECT "modelmesh-enabled=true" --overwrite=true
</code-block>
</step>
</procedure>

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

<procedure title="Enable User-Workload-Monitoring" id="enable-user-workload-monitoring">
<step>
<p>Enable user-workload-monitoring</p>
<code-block>
oc apply -f resources/enable_uwm.yaml
</code-block>
</step>
<step>
<p>Configure user-workload-monitoring to hold metric data for 15 days</p>
<code-block>
oc apply -f resources/uwm_configmap.yaml
</code-block>
</step>
</procedure>

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)

<procedure title="Install ODH Operator" id="install-odh-operator">
<step>
<p>From the OpenShift Console, navigate to "Operators" -> "OperatorHub", and search for "Open Data Hub"</p>
<img src="odh_operator_install.png" alt="ODH in OperatorHub" border-effect="line"/>
</step>
<step>
<p>Click on "Open Data Hub Operator"</p>
<list>
<li>If the "Show community Operator" warning opens, hit "Continue"</li>
<li>Hit "Install"</li>
</list>
</step>
<step>
<p>From the "Install Operator" screen</p>
<list>
<li>Make sure "All namespaces on the cluster" in selected as the "Installation Mode"</li>
<li>Hit install</li>
</list>
</step>
<step>
<p>Wait for the Operator to finish installing</p>
</step>
</procedure>

## ODH v1

<note>
<p>If the provided ODH version in your cluster's OperatorHub is version 1.x, use the following steps</p>
</note>

<procedure title="Install ODH v1" id="install-odh-v1">
<step>
<p>Navigate to your <code>$ODH</code> project</p>
</step>
<step>
<p>From "Installed Operators", select "Open Data Hub Operator"</p>
</step>
<step>
<p>Navigate to the "Kf Def" tab</p>
<list>
<li>Hit "Create KfDef"</li>
<li>Hit "Create" without making any changes to the default configuration</li>
</list>
</step>
<step>
<p>Within the "Pods" menu, you should begin to see various ODH components being created</p>
</step>
</procedure>

<procedure title="Install TrustyAI on ODH v1" id="install-trustyai-on-odh-v1">
<step>
<p>Navigate to your <code>$ODH</code> project</p>
<code-block lang="shell">oc project $ODH</code-block>
</step>
<step>
<p>Run <code>oc apply -f resources/trustyai_operator_kfdef.yaml</code>. This will install the TrustyAI Operator
into your <code>$ODH</code> namespace alongside the ODH installation.</p>
</step>
<step>
<p>Within the "Pods" menu, you should see the TrustyAI Operator pod being created</p></step>
<step>
<p>Navigate to your <code>$PROJECT</code> project</p>
<code-block lang="shell">oc project $PROJECT</code-block>
</step>
<step>
<p>Run <code>oc apply -f resources/trustyai_crd.yaml</code>. This will install the TrustyAI Service
into your <code>$PROJECT</code> project, which will then provide TrustyAI features to all subsequent models deployed into
that project, such as explainability, fairness monitoring, and data drift monitoring</p>
</step>
</procedure>

## ODH v2.x

If the provided ODH version in your cluster's OperatorHub is version 2.x, use the following steps:

(todo)
52 changes: 52 additions & 0 deletions Writerside/topics/Tutorial.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Tutorial

Tutorials are learning-oriented articles that help users to go through a process and achieve a deliverable.
Start with an introduction: for whom is this tutorial and what the reader will achieve by reading it.
Answer the question: "Why should I follow this?".

Provide a short outline for the tutorial.
In this tutorial, you will learn how to:
* Do this
* Deal with that

## Before you start

List the prerequisites that are required or recommended.

Make sure that:
- First prerequisite
- Second prerequisite

## Part 1

Describe what the user will learn and accomplish in the first part,
then write a step-by-step procedure but on a real-world example.

1. Execute the following command in the terminal:

```bash
run this --that
```

2. Step with an image
![](image.png)

<!-- The 'src' attribute should contain the name of an image from the '/images' folder in your project -->

3. Final step in part 1.

## Part 2

This is the second part of the tutorial:

1. Step 1
2. Step 2
3. Step n

## What you've learned {id="what-learned"}

Summarize what the reader achieved by completing this tutorial.

<seealso>
<!--Give some related links to how-to articles-->
</seealso>

0 comments on commit b5d7085

Please sign in to comment.