Skip to content

Commit 35c7a0d

Browse files
committed
Incorporated some comments and added architecture image
1 parent 7008c47 commit 35c7a0d

File tree

5 files changed

+95
-37
lines changed

5 files changed

+95
-37
lines changed
110 KB
Loading

modules/developer-lightspeed/con-llm-requirements.adoc

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,10 @@
55

66
{ls-short} follows a _Bring Your Own Model_ approach. This model means that to function, {ls-short} requires access to a large language model (LLM) which you must provide. An LLM is a type of generative AI that interprets natural language and generates human-like text or audio responses. When an LLM is used as a virtual assistant, the LLM can interpret questions and provide answers in a conversational manner.
77

8-
LLMs are usually provided by a service or server. Since {ls-short} does not provide an LLM for you, you must configure your preferred LLM provider during installation.
9-
You can use {ls-short} with a number of LLM providers that offer the OpenAI API interface including the following LLMS:
8+
LLMs are usually provided by a service or server. Since {ls-short} does not provide an LLM for you, you must configure your preferred LLM provider during installation. You can configure the underlying Llama Stack server to integrate with a number of LLM `providers`` that offer compatibility with the OpenAI API including the following LLMs:
109

1110
* OpenAI (cloud-based inference service)
12-
* Red Hat OpenShift AI (enterprise model builder & inference server)
13-
* Red Hat Enterprise Linux AI (enterprise inference server)
11+
* {rhoai-brand-name} (enterprise model builder & inference server)
12+
* {rhel} AI (enterprise inference server)
1413
* Ollama (popular desktop inference server)
1514
* vLLM (popular enterprise inference server)

modules/developer-lightspeed/con-rag-embeddings.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
:_mod-docs-content-type: CONCEPT
22

33
[id="con-rag-embeddings_{context}"]
4-
= Retrieval Augmented Generation (RAG) embeddings
4+
= Retrieval Augmented Generation embeddings
55

66
The {product} documentation serves as the Retrieval-Augmented Generation (RAG) data source.
77

modules/developer-lightspeed/con-supported-architecture.adoc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,7 @@
77

88
The {lcs-short} container acts as the intermediary layer, which interfaces with and manages the Llama Stack service.
99

10+
image::rhdh-plugins-reference/developer-lightspeed-architecture-1-8-0.png[]
11+
1012
.Additional resources
1113
* link:https://access.redhat.com/support/policy/updates/developerhub[{product} Life Cycle and supported platforms]

modules/developer-lightspeed/proc-installing-and-configuring-lightspeed.adoc

Lines changed: 89 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
[id="proc-installing-and-configuring-lightspeed_{context}"]
44
= Installing and configuring {ls-brand-name}
55

6-
You must install and configure the {ls-short}, the {lcs-name}, and Llama Stack containers manually.
6+
{ls-short} operates on a _Bring Your Own Model_ approach, meaning you must provide and configure access to your preferred Large Language Model (LLM) provider for the service to function. The {lcs-name} ({lcs-short}) acts as an intermediary and service layer for interfacing with LLM providers, relying on the Llama Stack service for core operations. {lcs-short} handles LLM provider setup, authentication, feedback, and Retrieval Augmented Generation (RAG). The {lcs-short} is designed to run as a sidecar container within the {product-very-short} Pod.
7+
8+
[NOTE]
9+
====
10+
If you have already installed the previous {ls-short} (Developer Preview) with Road-Core Service (RCS), remove the previous {ls-short} configurations and settings and reinstall.
11+
This step is necessary as {ls-short} originally required the use of the {rcs-name} as a sidecar container for interfacing with LLM providers. The updated architecture removes and replaces RCS with the new Lightspeed Core Service (LCS) and Llama Stack, which require a new configuration for volumes, containers, and secrets.
12+
====
713

814
.Prerequisites
915
* You are logged into your {ocp-short} account.
@@ -13,6 +19,8 @@ You must install and configure the {ls-short}, the {lcs-name}, and Llama Stack c
1319

1420
.Procedure
1521

22+
You must install and configure the {ls-short}, the {lcs-name}, and Llama Stack containers manually.
23+
1624
. Create the {lcs-short} ConfigMap (`lightspeed-stack.yaml`).
1725
+
1826
[IMPORTANT]
@@ -55,11 +63,9 @@ mcp_servers:
5563
provider_id: model-context-protocol
5664
url: https://<RHDH_HOST>/api/mcp-actions/v1
5765
----
58-
+
5966
where:
6067

61-
62-
(Optional) `mcp_servers`:: Set this configuration if you want to integrate MCP. See {model-context-protocol-link}[{model-context-protocol-title}].
68+
`mcp_servers`:: Optional: Set this configuration if you want to integrate MCP. See {model-context-protocol-link}[{model-context-protocol-title}].
6369
`mcp_servers:name`:: This value must match the entry in the {ls-short} app config file for MCP servers.
6470
`model-context-protocol`:: This is the tool runtime provider defined and configured in the llama-stack `run.yaml` configuration for use in {lcs-short}.
6571

@@ -140,7 +146,6 @@ providers:
140146
type: sqlite
141147
provider_id: meta-reference
142148
provider_type: inline::meta-reference
143-
#START - Adding your LLM provider
144149
inference:
145150
- provider_id: vllm
146151
provider_type: remote::vllm
@@ -152,7 +157,6 @@ providers:
152157
- provider_id: sentence-transformers
153158
provider_type: inline::sentence-transformers
154159
config: {}
155-
#END - Adding your LLM provider
156160
post_training:
157161
- config:
158162
checkpoint_format: huggingface
@@ -270,7 +274,7 @@ providers:
270274
kvstore:
271275
type: sqlite
272276
namespace: null
273-
db_path: /app-root/vector_db/rhdh_product_docs/1.8/faiss_store.db
277+
db_path: /app-root/vector_db/rhdh_product_docs/1.7/faiss_store.db
274278
scoring_fns: []
275279
server:
276280
auth: null
@@ -291,8 +295,11 @@ vector_dbs:
291295
- embedding_dimension: 768
292296
embedding_model: sentence-transformers/all-mpnet-base-v2
293297
provider_id: rhdh-docs
294-
vector_db_id: rhdh-product-docs-1_8
298+
vector_db_id: rhdh-product-docs-1_7
295299
----
300+
where:
301+
`_<llm_server>_`:: Enter your LLM server details.
302+
`_<openai_api_key>_`:: Enter your OpenAI API key.
296303

297304
. Create the {ls-short} ConfigMap.
298305
+
@@ -349,7 +356,27 @@ data:
349356
----
350357
where:
351358

352-
`lightspeed:mcpServers`:: Optional: Set this configuration if you want to integrate MCP.
359+
`mcp_servers`:: Optional: Set this configuration if you want to integrate MCP.
360+
361+
. Create {ls-short} secret file.
362+
.. In the {ocp-short} web console, go to *Secrets*.
363+
.. Click *Create > Key/value secret*.
364+
.. In the *Create key/value secret* page, select the *YAML view* option in *Configure via*, and add the following example:
365+
+
366+
[source,yaml]
367+
----
368+
kind: Secret
369+
apiVersion: v1
370+
metadata:
371+
name: lightspeed-secrets
372+
namespace: _<namespace>_ # Enter your rhdh instance namespace
373+
stringData:
374+
LLM_SERVER_ID: _<server_id>_ # Enter your server ID (for example, `ollama` or `granite`)
375+
LLM_SERVER_TOKEN: _<token>_ # Enter your server token value
376+
LLM_SERVER_URL: _<server_url>_ # Enter your server URL
377+
type: Opaque
378+
----
379+
.. Click *Create*.
353380

354381
. Create the Llama Stack secret file.
355382
.. In the {ocp-short} web console, go to *Secrets*.
@@ -382,7 +409,7 @@ stringData:
382409
includes:
383410
- dynamic-plugins.default.yaml
384411
plugins:
385-
- package: oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-lightspeed:next__1.0.0
412+
- package: oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-lightspeed:bs_1.39.1__0.5.7!red-hat-developer-hub-backstage-plugin-lightspeed
386413
disabled: false
387414
pluginConfig:
388415
lightspeed:
@@ -407,9 +434,16 @@ includes:
407434
menuItem:
408435
icon: LightspeedIcon
409436
text: Lightspeed
410-
- package: oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-lightspeed-backend:next__1.0.1
437+
- package: oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-lightspeed-backend:bs_1.39.1__0.5.7!red-hat-developer-hub-backstage-plugin-lightspeed-backend
411438
disabled: false
412439
pluginConfig:
440+
lightspeed:
441+
# REQUIRED: Configure LLM servers with OpenAI API compatibility
442+
servers:
443+
- id: ${LLM_SERVER_ID}
444+
url: ${LLM_SERVER_URL}
445+
token: ${LLM_SERVER_TOKEN}
446+
413447
# OPTIONAL: Port for lightspeed service (default: 8080)
414448
# servicePort: ${LIGHTSPEED_SERVICE_PORT}
415449
----
@@ -443,28 +477,38 @@ includes:
443477
[source,yaml]
444478
----
445479
volumeMounts:
446-
- mountPath: /app-root/.llama
447-
name: shared-storage
448-
- mountPath: /app-root/embeddings_model
449-
name: rag-data-volume
450-
subPath: embeddings_model
451-
- mountPath: /app-root/vector_db/rhdh_product_docs
452-
name: rag-data-volume
453-
subPath: rhdh_product_docs
454-
480+
- mountPath: /app-root/config/lightspeed-stack.yaml
481+
name: lightspeed-stack
482+
subPath: lightspeed-stack.yaml
483+
- mountPath: /app-root/config/app-config-rhdh.yaml
484+
name: lightspeed-app-config
485+
subPath: app-config.yaml
486+
- mountPath: /app-root-config/llama-stack/run.yaml
487+
subPath: llama-stack/run.yaml
455488
----
456-
... Add the Llama Stack Secret file as shown in the following example:
489+
... Add the {ls-short} and Llama Stack Secret file as shown in the following example:
457490
+
458491
[source,yaml]
459492
----
460493
envFrom:
494+
- secretRef:
495+
name: lightspeed-secrets
461496
- secretRef:
462497
name: llama-stack-secrets
463498
----
499+
... In your `deployment.patch.spec.template.spec.containers.env` section, set the {lcs-short} and Llama Stack environment variables as shown in the following example:
500+
+
501+
[source,yaml]
502+
----
503+
- name: PROJECT
504+
value: rhdh
505+
- name: LLAMA_CONFIG_FILE
506+
value: /app-root/config/llama-stack/run.yaml
507+
----
464508
+
465509
[NOTE]
466510
====
467-
* Your {product-very-short} container is typically already present in your Kubernetes custom resource (CR). You are adding the two additional container definitions for {lcs-short} and Llama Stack as the {lcs-short} sidecar.
511+
* Your {product-very-short} container is typically already present in your CR. You are adding the two additional container definitions for {lcs-short} and Llama Stack as the {lcs-short} sidecar.
468512
====
469513
... Click *Save*. The Pods are automatically restarted.
470514
+
@@ -515,10 +559,6 @@ spec:
515559
subPath: lightspeed-stack.yaml
516560
- mountPath: /tmp/data/feedback
517561
name: shared-storage
518-
# OPTIONAL: `llama-stack-config mount path configuration is only needed if you want to override the custom configuration
519-
- mountPath: /app-root/run.yaml
520-
name: llama-stack-config
521-
subPath: run.yaml
522562
volumes:
523563
- configMap:
524564
name: lightspeed-stack
@@ -538,7 +578,7 @@ dynamic:
538578
includes:
539579
- dynamic-plugins.default.yaml
540580
plugins:
541-
- package: oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-lightspeed:next__1.0.0
581+
- package: oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-lightspeed:bs_1.39.1__0.5.7!red-hat-developer-hub-backstage-plugin-lightspeed
542582
disabled: false
543583
pluginConfig:
544584
lightspeed:
@@ -563,9 +603,15 @@ dynamic:
563603
menuItem:
564604
icon: LightspeedIcon
565605
text: Lightspeed
566-
- package: oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-lightspeed-backend:next__1.0.1
606+
- package: oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-lightspeed-backend:bs_1.39.1__0.5.7!red-hat-developer-hub-backstage-plugin-lightspeed-backend
567607
disabled: false
568608
pluginConfig:
609+
lightspeed:
610+
# REQUIRED: Configure LLM servers with OpenAI API compatibility
611+
servers:
612+
- id: ${LLM_SERVER_ID}
613+
url: ${LLM_SERVER_URL}
614+
token: ${LLM_SERVER_TOKEN}
569615
# OPTIONAL: Port for lightspeed service (default: 8080)
570616
# servicePort: ${LIGHTSPEED_SERVICE_PORT}
571617
----
@@ -594,23 +640,26 @@ extraVolumes:
594640
- mountPath: /app-root/config/lightspeed-stack.yaml
595641
name: lightspeed-stack
596642
----
597-
... Add the Llama Stack Secret file as shown in the following example:
643+
... Add the {ls-short} and Llama Stack Secret file as shown in the following example:
598644
+
599645
[source,yaml]
600646
----
601647
extraEnvVarsSecrets:
602-
- llama-stack-secrets
648+
- lightspeed-secrets
603649
----
604650
... Add the {lcs-short} image as shown in the following example:
605651
+
606652
[source,yaml,subs="+attributes"]
607653
----
608654
extraContainers:
655+
- env:
656+
- name: PROJECT
657+
value: rhdh
609658
envFrom:
610659
- secretRef:
611-
name: llama-stack-secrets
660+
name: lightspeed-secrets
612661
image: 'quay.io/redhat-ai-dev/llama-stack:latest'
613-
name: llama-stack
662+
name: road-core-sidecar
614663
ports:
615664
- containerPort: 8080
616665
name: lcs-backend
@@ -648,6 +697,11 @@ upstream:
648697
- configMapRef: llama-stack-config
649698
filename: run.yaml
650699
extraContainers:
700+
- env:
701+
- name: PROJECT
702+
value: rhdh
703+
- name: LLAMA_STACK_CONFIG_FILE
704+
value: /app-root/run.yaml
651705
envFrom:
652706
- secretRef:
653707
name: lightspeed-secrets
@@ -661,6 +715,9 @@ upstream:
661715
- mountPath: /app-root/config/lightspeed-stack.yaml
662716
name: lightspeed-stack
663717
subPath: lightspeed-stack.yaml
718+
- mountPath: /app-root/run.yaml
719+
name: llama-stack-config
720+
subPath: run.yaml
664721
extraEnvVars:
665722
...
666723
extraEnvVarsSecrets:

0 commit comments

Comments
 (0)