Skip to content

Commit 9eda773

Browse files
committed
RHOAI Model catalog bridge
1 parent 9f7dd3e commit 9eda773

18 files changed

+436
-1
lines changed

artifacts/attributes.adoc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@
6565
:rhdeveloper-name: Red Hat Developer
6666
:rhel: Red Hat Enterprise Linux
6767
:rhoai-brand-name: Red Hat OpenShift AI
68+
:rhoai-short: RHOAI
6869
:rhoserverless-brand-name: Red Hat OpenShift Serverless
6970
:rhsso-brand-name: Red Hat Single-Sign On
7071
:rhsso: RHSSO
@@ -168,3 +169,9 @@
168169
:upgrading-book-title: Upgrading {product}
169170
:using-dynamic-plugins-book-link: {product-docs-link}/html-single/installing_and_viewing_plugins_in_red_hat_developer_hub/index
170171
:using-dynamic-plugins-book-title: Using dynamic plugins
172+
173+
:openshift-ai-connector-for-rhdh-link: {product-docs-link}/html-single/integrating_rhdh_with_openshift_ai_connector_for_rhdh/index
174+
:openshift-ai-connector-for-rhdh-title: Integrate {product} with {openshift-ai-connector-name} to leverage AI models
175+
176+
:openshift-ai-connector-name: OpenShift AI Connector for {product}
177+
:openshift-ai-connector-name-short: OpenShift AI Connector for {product-very-short}
File renamed without changes.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[IMPORTANT]
2+
====
3+
This section describes Developer Preview features in the {openshift-ai-connector-name} plugin. Developer Preview features are not supported by Red Hat in any way and are not functionally complete or production-ready. Do not use Developer Preview features for production or business-critical workloads. Developer Preview features provide early access to functionality in advance of possible inclusion in a Red Hat product offering. Customers can use these features to test functionality and provide feedback during the development process. Developer Preview features might not have any documentation, are subject to change or removal at any time, and have received limited testing. Red Hat might provide ways to submit feedback on Developer Preview features without an associated SLA.
4+
5+
For more information about the support scope of Red Hat Developer Preview features, see https://access.redhat.com/support/offerings/devpreview/[Developer Preview Support Scope].
6+
====

modules/developer-lightspeed/con-about-developer-lightspeed.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
[id="con-about-developer-lightspeed_{context}"]
44
= About {ls-short}
55

6-
include::{docdir}/artifacts/snip-developer-preview.adoc[]
6+
include::{docdir}/artifacts/snip-developer-preview-lightspeed.adoc[]
77

88
This early access program enables customers to share feedback on the user experience, features, capabilities, and any issues encountered. Your input helps ensure that {ls-short} better meets your needs when it is officially released and made generally available.
99

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
:_mod-docs-content-type: CONCEPT
2+
3+
[id="con-understand-how-ai-assets-map-to-rhdh-catalog_{context}"]
4+
= Understand how AI assets map to the {product} Catalog
5+
6+
include::{docdir}/artifacts/snip-developer-preview-rhoai.adoc[]
7+
8+
The {openshift-ai-connector-name} ({openshift-ai-connector-name-short}) serves as a crucial link, enabling the discovery and accessibility of AI assets managed within the {rhoai-brand-name} offering directly within your {product-very-short} instance.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
3+
[id="proc-populating-the-api-definition-tab_{context}"]
4+
= Populating the API Definition tab
5+
6+
The AI platform engineer must follow these steps to provide this valuable information because {rhoai-short} does not expose the OpenAPI specification by default.
7+
8+
.Procedure
9+
10+
. Retrieve OpenAPI JSON: Use a tool like `curl` to fetch the specification directly from the running endpoint of the AI model server. The following command provides the precise endpoint (`/openapi.json`) and shows how to include a `Bearer` token if the model requires authentication for access.
11+
+
12+
[source,bash]
13+
----
14+
curl -k -H "Authorization: Bearer $MODEL_API_KEY" https://$MODEL_ROOT_URL_INCLUDING_PORT/openapi.json | jq > open-api.json
15+
----
16+
17+
. Set Property in {rhoai-short}.
18+
.. In the *{rhoai-short}* dashboard, go to *Model Registry* and select the appropriate *Model Version*.
19+
+
20+
[NOTE]
21+
====
22+
We recommend using *Model Version* instead of *Registered Model* to maintain stability if the API changes between versions.
23+
====
24+
25+
.. In the **Properties** section, set a key/value pair where the key is `API Spec` and the value is the entire JSON content from the `open-api.json` file.
26+
27+
. Propagation: The {openshift-ai-connector-name} periodically polls the {rhoai-short} Model Registry, propagates this JSON, and renders the interactive API documentation in the {product-very-short} API Entity *Definition* tab.
Lines changed: 143 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,143 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
3+
[id="proc-setting-up-openshift-ai-connector-for-rhdh-with-rhoai_{context}"]
4+
= Setting up {openshift-ai-connector-name} with {rhoai-brand-name}
5+
6+
The installation of the {openshift-ai-connector-name} requires manual updates to {product-very-short}-related Kubernetes resources.
7+
8+
.{rhoai-short} Prerequisites
9+
10+
* To have Model Cards from the Model Catalog imported as Tech Docs, you must use {rhoai-short} version 2.25 or later, and the Model Catalog dashboard and a Model Registry need to be enabled (they are both off by default).
11+
* If you employed Model Catalog at earlier versions of {rhoai-short}, Tech Doc propagation does not work for any models you registered into the Model Registry while at those earlier versions; only models registered into Model Registry from a 2.25 (or later) Model Catalog have their Model Cards transferred to {product-very-short} as TechDocs.
12+
* For the rest of the features, version 2.20 or later suffices. Enabling Model Registry and its associated dashboard allows for a user experience that more directly allows for customizing AI Model metadata.
13+
14+
//connect with Lindsey to update the above prereqs
15+
16+
.Procedure
17+
18+
. Configure {rhoai-short}-related RBAC and credentials.
19+
A Kubernetes `ServiceAccount` and a `service-account-token` Secret are required for the connector to retrieve data from {rhoai-short}. The following resources must be created, replacing namespace names (`ai-rhdh` for {product-very-short}, `rhoai-model-registries` for {rhoa``}) as needed:
20+
** `ServiceAccount` (`rhdh-rhoai-bridge`)
21+
** `ClusterRole` and `ClusterRoleBinding` (`rhdh-rhoai-bridge`) to allow access to OCP resources like `routes`, `services`, and `inferenceservices`.
22+
** `Role` and `RoleBinding` to allow ConfigMap updates within the {product-very-short} namespace.
23+
** `RoleBinding` in the {rhoai-short} namespace to grant the {product-very-short} `ServiceAccount` read permissions to the Model Registry data (binding to `registry-user-modelregistry-public`).
24+
** Secret (`rhdh-rhoai-bridge-token`) of type `kubernetes.io/service-account-token` that goes along with the `rhdh-rhoai-bridge` `ServiceAccount`.
25+
26+
. Update your {product-very-short} dynamic plugin configuration.
27+
The {product-very-short} Pod requires two dynamic plugins.
28+
.. In your {product-very-short} dynamic plugins ConfigMap, add the following code:
29+
+
30+
[source,yaml]
31+
----
32+
plugins:
33+
- disabled: false
34+
package: oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-catalog-backend-module-model-catalog:bs_1.42.5__0.7.0!red-hat-developer-hub-backstage-plugin-catalog-backend-module-model-catalog
35+
- disabled: false
36+
package: oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-catalog-techdoc-url-reader-backend:bs_1.42.5__0.3.0!red-hat-developer-hub-backstage-plugin-catalog-techdoc-url-reader-backend
37+
----
38+
39+
. Add Connector sidecar containers to the {product-very-short} Pod.
40+
The system relies on three sidecar containers (Model Catalog Bridge) running alongside the `backstage-backend` container. These sidecar containers must be added to your {product-very-short} deployment specification, referencing the `rhdh-rhoai-bridge-token` Secret:
41+
** `location`: Provides the REST API for RHDH plugins to fetch model metadata.
42+
** `storage-rest`: Maintains a cache of AI Model metadata in a ConfigMap called `bac-import-model`.
43+
** `rhoai-normalizer`: Acts as a Kubernetes controller and RHOAI client, normalizing RHOAI metadata for the connector. The following code block is an example:
44+
+
45+
[source,yaml]
46+
----
47+
spec:
48+
template:
49+
spec:
50+
containers:
51+
- name: backstage-backend
52+
- env:
53+
- name: NORMALIZER_FORMAT
54+
value: JsonArrayFormat
55+
- name: POD_IP
56+
valueFrom:
57+
fieldRef:
58+
fieldPath: status.podIP
59+
- name: POD_NAMESPACE
60+
valueFrom:
61+
fieldRef:
62+
fieldPath: metadata.namespace
63+
envFrom:
64+
- secretRef:
65+
name: rhdh-rhoai-bridge-token
66+
image: quay.io/redhat-ai-dev/model-catalog-location-service@sha256:4f6ab6624a29f627f9f861cfcd5d18177d46aa2c67a81a75a1502c49bc2ff012
67+
68+
imagePullPolicy: Always
69+
name: location
70+
ports:
71+
- containerPort: 9090
72+
name: location
73+
protocol: TCP
74+
volumeMounts:
75+
- mountPath: /opt/app-root/src/dynamic-plugins-root
76+
name: dynamic-plugins-root
77+
workingDir: /opt/app-root/src
78+
- env:
79+
- name: NORMALIZER_FORMAT
80+
value: JsonArrayFormat
81+
- name: STORAGE_TYPE
82+
value: ConfigMap
83+
- name: BRIDGE_URL
84+
value: http://localhost:9090
85+
- name: POD_IP
86+
valueFrom:
87+
fieldRef:
88+
fieldPath: status.podIP
89+
- name: POD_NAMESPACE
90+
valueFrom:
91+
fieldRef:
92+
fieldPath: metadata.namespace
93+
envFrom:
94+
- secretRef:
95+
name: rhdh-rhoai-bridge-token
96+
image: quay.io/redhat-ai-dev/model-catalog-storage-rest@sha256:398095e7469e86d84b1196371286363f4b7668aa3e26370b4d78cb8d4ace1dc9
97+
98+
imagePullPolicy: Always
99+
name: storage-rest
100+
volumeMounts:
101+
- mountPath: /opt/app-root/src/dynamic-plugins-root
102+
name: dynamic-plugins-root
103+
workingDir: /opt/app-root/src
104+
- env:
105+
- name: NORMALIZER_FORMAT
106+
value: JsonArrayFormat
107+
- name: POD_IP
108+
valueFrom:
109+
fieldRef:
110+
fieldPath: status.podIP
111+
- name: POD_NAMESPACE
112+
valueFrom:
113+
fieldRef:
114+
fieldPath: metadata.namespace
115+
envFrom:
116+
- secretRef:
117+
name: rhdh-rhoai-bridge-token
118+
image: quay.io/redhat-ai-dev/model-catalog-rhoai-normalizer@sha256:fe6c05d57495d6217c4d584940ec552c3727847ff60f39f5d04f94be024576d8
119+
120+
imagePullPolicy: Always
121+
name: rhoai-normalizer
122+
volumeMounts:
123+
- mountPath: /opt/app-root/src/dynamic-plugins-root
124+
name: dynamic-plugins-root
125+
workingDir: /opt/app-root/src
126+
----
127+
128+
. Enable `Connector` in your `{product-very-short}{my-app-config-file}` file.
129+
In your `{backstage} `app-config.extra.yaml` file, configure `Entity Provider` under the `catalog.providers` section:
130+
+
131+
[source,yaml]
132+
----
133+
providers:
134+
modelCatalog:
135+
development:
136+
baseUrl: http://localhost:9090
137+
----
138+
139+
where:
140+
141+
`modelCatalog`:: Specifies the name of the provider.
142+
`development`:: Defines future connector capability beyond a single `baseUrl`.
143+
`baseUrl`:: For Developer Preview, this value is the only one supported. Future releases might support external routes.
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
:_mod-docs-content-type: PROCEDURE
2+
3+
[id="proc-troubleshooting-connector-functionality_{context}"]
4+
= Troubleshooting Connector functionality
5+
6+
The connector system consists of the two dynamic plugins and the three Model Catalog Bridge sidecar containers. Generally speaking, the logs collected should be provided to {company-name} Support for analysis.
7+
8+
== Checking Dynamic Plugins status
9+
10+
Validate that the dynamic plugins have been successfully installed into your {product-very-short} project Pod by using the following command:
11+
+
12+
[source,bash]
13+
----
14+
oc logs -c install-dynamic-plugins deployment/<your RHDH deployment>
15+
----
16+
17+
The `install-dynamic-plugin` logs allow you to check the following installation logs for successful logs:
18+
19+
* `red-hat-developer-hub-backstage-plugin-catalog-backend-module-model-catalog` (Entity Provider)
20+
* `red-hat-developer-hub-backstage-plugin-catalog-techdoc-url-reader-backend` (TechDoc URL Reader)
21+
22+
== Inspecting plugin logs
23+
24+
View the {openshift-ai-connector-name}plugins in the `backstage-backend` container. Items to look for:
25+
26+
[cols="3,4,4"]
27+
|===
28+
|Plugin Component |Logger Service Target |Common Log Text
29+
30+
|Model Catalog Entity Provider
31+
|`ModelCatalogResourceEntityProvider`
32+
|`Discovering ResourceEntities from Model Server...`
33+
34+
|Model Catalog TechDoc URL Reader
35+
|`ModelCatalogBridgeTechdocUrlReader`
36+
|`ModelCatalogBridgeTechdocUrlReader.readUrl`
37+
|===
38+
39+
To enable debug logging, set the `LOG_LEVEL` environment variable to `debug` on the `backstage-backend` container. For more information, see {monitoring-and-logging-book-link}[{monitoring-and-logging-book-title}].
40+
41+
== Inspecting the Model Catalog Bridge
42+
43+
The Model Catalog Bridge sidecars manage the data fetching and storage:
44+
45+
. Check Cached Data (ConfigMap): The processed AI Model metadata is stored in a `ConfigMap`.
46+
+
47+
[source,bash]
48+
----
49+
oc get configmap bac-import-model -o json | jq -r '.binaryData | to_entries[] | "=== \(.key) ===\n" + (.value | @base64d | fromjson | .body | @base64d | fromjson | tostring)' | jq -R 'if startswith("=== ") then . else (. | fromjson) end'
50+
----
51+
52+
. Check Location Service API: Confirm the location service is providing data to the {product-very-short} Entity Provider.
53+
+
54+
[source,bash]
55+
----
56+
oc rsh -c backstage-backend deployment/<your RHDH deployment>
57+
curl http://localhost:9090/list
58+
----
59+
60+
. Check Sidecar Container Logs:
61+
+
62+
[source,bash]
63+
----
64+
oc logs -c rhoai-normalizer deployment/<your RHDH deployment>
65+
oc logs -c storage-rest deployment/<your RHDH deployment>
66+
oc logs -c location deployment/<your RHDH deployment>
67+
----
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
:_mod-docs-content-type: REFERENCE
2+
3+
[id="ref-enrich-ai-model-metadata_{context}"]
4+
= Enrich AI model metadata for enhanced {product} experience
5+
6+
While {rhoai-short} provides essential data, an AI platform engineer can enrich the {backstage} experience by adding custom properties to the `ModelVersion` or `RegisteredModel` (or annotations to the `KServe InferenceService` if the Model Registry is not used) so that the {openshift-ai-connector-name} can add the information to the {product-very-short} entities it creates.
7+
8+
|===
9+
|Property Key |Entity Field Populated |Description
10+
11+
|`API Spec`
12+
|API Definition Tab
13+
|The OpenAPI / Swagger JSON specification for the model REST API.
14+
15+
|`API Type`
16+
|API Type
17+
|Correlates to supported {product-very-short}/{backstage} API types (defaults to `openapi`).
18+
19+
|`TechDocs`
20+
|TechDocs
21+
|URL pointing to a Git repository that follows {product-very-short} TechDocs conventions for the Model Card.
22+
23+
|`Homepage URL`
24+
|Links
25+
|A URL considered the home page for the model.
26+
27+
|`Owner`
28+
|Owner
29+
|Overrides the default OpenShift user as the entity owner.
30+
31+
|`Lifecycle`
32+
|Lifecycle
33+
|Serves a means to express the lifecycle notion of {product-very-short}/{backstage}.
34+
35+
|`How to use`
36+
|Links
37+
|A URL that points to usage documentation.
38+
39+
|`License`
40+
|Links
41+
|A URL to the license file of the model.
42+
|===
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
:_mod-docs-content-type: REFERENCE
2+
3+
[id="ref-model-to-entity-mapping_{context}"]
4+
= Model-to-Entity mapping
5+
6+
This offering interfaces with the {openshift-ai-connector-name-short}, Model Catalog, and KServe-based Model Deployments (InferenceServices) to create familiar {backstage} entities.
7+
8+
|===
9+
|{rhoai-short} Artifact |{product-very-short}/{backstage} Entity Kind |{product-very-short}/{backstage} Entity Type |Purpose
10+
11+
|Model Server (InferenceService)
12+
|Component
13+
|`model-server`
14+
|Represents a running, accessible AI model endpoint. //Requires RHOAI 2.20 or later to obtain this mapping.
15+
16+
|AI Model (Model Registry Version)
17+
|Resource
18+
|`ai-model`
19+
|Represents the specific AI model artifact (e.g., Llama-3-8B). Requires RHOAI 2.20 or later to obtain this mapping.
20+
21+
|Model Server API Details
22+
|API
23+
|`openapi` (Default)
24+
|Provides the OpenAPI/Swagger specification for the model's REST endpoint. Requires RHOAI 2.20 or later to obtain this mapping.
25+
26+
|Model Cards
27+
|TechDocs
28+
|N/A
29+
|Model Cards from the {rhoai-short} Model Catalog are associated with the Component and Resource entities. Requires RHOAI 2.25 to obtain this mapping.
30+
|===
31+
32+
Once the {openshift-ai-connector-name-short} is installed and connected with {rhoai-short}, the transfer of information commences automatically.
33+
34+
//To connect with Lindsey to update links here

0 commit comments

Comments
 (0)