Skip to content

Commit effdbb0

Browse files
committed
Incorporated Karthik's comments
1 parent 72d10f9 commit effdbb0

File tree

1 file changed

+59
-40
lines changed

1 file changed

+59
-40
lines changed

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

Lines changed: 59 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -36,37 +36,40 @@ You must manually install and configure the {ls-short} plugin, the {lcs-name} ({
3636
.. Click *Create ConfigMaps*.
3737
.. From the *Create ConfigMap* page, select the *YAML view* option and edit the file using the following structure. This example demonstrates the configuration for the LCS ConfigMap, typically named `lightspeed-stack`, which connects to the Llama Stack service locally on port `8321`:
3838
+
39-
[source,yaml,subs=+attributes]
39+
[source,yaml]
4040
----
4141
kind: ConfigMap
4242
apiVersion: v1
4343
metadata:
44-
name: {lcs-name} ({lcs-short})
45-
service:
46-
host: 0.0.0.0
47-
port: 8080
48-
auth_enabled: false
49-
workers: 1
50-
color_log: true
51-
access_log: true
52-
llama_stack:
53-
use_as_library_client: false
54-
url: http://localhost:8321
55-
user_data_collection:
56-
feedback_enabled: true
57-
feedback_storage: "/tmp/data/feedback"
58-
transcripts_enabled: true
59-
transcripts_storage: "/tmp/data/transcripts"
60-
authentication:
61-
module: "noop"
62-
conversation_cache:
63-
type: "sqlite"
64-
sqlite:
65-
db_path: "./lcs_cache.db"
66-
mcp_servers:
67-
- name: mcp::backstage
68-
provider_id: model-context-protocol
69-
url: https://<{product-very-short}_HOST>/api/mcp-actions/v1
44+
name: lightspeed-stack
45+
data:
46+
lightspeed-stack.yaml: |
47+
name: Lightspeed Core Service (LCS)
48+
service:
49+
host: 0.0.0.0
50+
port: 8080
51+
auth_enabled: false
52+
workers: 1
53+
color_log: true
54+
access_log: true
55+
llama_stack:
56+
use_as_library_client: false
57+
url: http://localhost:8321
58+
user_data_collection:
59+
feedback_enabled: true
60+
feedback_storage: "/tmp/data/feedback"
61+
transcripts_enabled: true
62+
transcripts_storage: "/tmp/data/transcripts"
63+
authentication:
64+
module: "noop"
65+
conversation_cache:
66+
type: "sqlite"
67+
sqlite:
68+
db_path: "./lcs_cache.db"
69+
mcp_servers:
70+
- name: mcp::backstage
71+
provider_id: model-context-protocol
72+
url: https://<RHDH_HOST>/api/mcp-actions/v1
7073
----
7174
+
7275
where:
@@ -80,8 +83,24 @@ The {lcs-short} ConfigMap can optionally include configuration for `mcp_servers`
8083

8184
.. Click *Create*.
8285

83-
. Create the {ls-short} ConfigMap: Create a dedicated {ls-short} ConfigMap (`lightspeed-app-config`) to hold specific plugin configurations.
86+
. Create an MCP_TOKEN.
87+
.. https://backstage.io/docs/auth/service-to-service-auth/#static-tokens[Generate the external static token].
88+
.. Create a secret file as shown in the following example:
89+
+
90+
[source,yaml]
91+
----
92+
apiVersion: v1
93+
kind: Secret
94+
metadata:
95+
name: lightspeed-secrets
96+
namespace: <_your_namespace_>
97+
type: Opaque
98+
stringData:
99+
MCP_TOKEN: <_your_static_token>
100+
----
84101

102+
. Create the {ls-short} ConfigMap: Create a dedicated {ls-short} ConfigMap (`lightspeed-app-config`) to hold specific plugin configurations.
103+
.. Create a
85104
.. In the {ocp-short} web console, navigate to your {product-very-short} instance and select the *ConfigMaps* tab.
86105
.. Click *Create ConfigMap*.
87106
.. From the *Create ConfigMap* page, select the *YAML view* option and add the following example:
@@ -92,7 +111,7 @@ kind: ConfigMap
92111
apiVersion: v1
93112
metadata:
94113
name: lightspeed-app-config
95-
namespace: <__namespace__> # Enter your {product-very-short} instance namespace
114+
namespace: <__namespace__> # Enter your RHDH instance namespace
96115
data:
97116
app-config.yaml: |-
98117
backend:
@@ -116,14 +135,14 @@ data:
116135
# OPTIONAL: Custom users prompts displayed to users
117136
# If not provided, the plugin uses built-in default prompts
118137
prompts:
119-
- title: 'Getting Started with {product}'
138+
- title: `Getting Started with Red Hat Developer Hub`
120139
message: Can you guide me through the first steps to start using {product-short} as a developer, like exploring the Software Catalog and adding my service?
121140
122141
# OPTIONAL: Port for lightspeed service (default: 8080)
123142
# servicePort: ${LIGHTSPEED_SERVICE_PORT}
124143
125-
# OPTIONAL: Override default {product-very-short} system prompt
126-
# systemPrompt: "You are a helpful assistant focused on {product} development."
144+
# OPTIONAL: Override default RHDH system prompt
145+
# systemPrompt: "You are a helpful assistant focused on Red Hat Developer Hub development."
127146
----
128147

129148
.. Click *Create*.
@@ -165,7 +184,7 @@ where:
165184

166185
.. Click *Create*.
167186

168-
. Update the dynamic plugins ConfigMap: Add the {ls-short} plugin image to your existing dynamic plugins ConfigMap (`dynamic-plugins-rhdh.yaml`).
187+
. Update the dynamic plugins ConfigMap: Add the {ls-short} plugin image to your existing dynamic plugins ConfigMap (`dynamic-plugins-rhdh`).
169188
+
170189
[source,yaml]
171190
----
@@ -196,10 +215,6 @@ plugins:
196215
text: Lightspeed
197216
- package: oci://ghcr.io/redhat-developer/rhdh-plugin-export-overlays/red-hat-developer-hub-backstage-plugin-lightspeed-backend:next__1.0.1!red-hat-developer-hub-backstage-plugin-lightspeed-backend
198217
disabled: false
199-
pluginConfig:
200-
lightspeed:
201-
# OPTIONAL: Port for lightspeed service (default: 8080)
202-
# servicePort: ${LIGHTSPEED_SERVICE_PORT}
203218
----
204219

205220
. Update your deployment configuration: Update the deployment configuration based on how your {product-very-short} instance was installed. You must add two sidecar containers: `llama-stack` and `lightspeed-core`.
@@ -213,7 +228,6 @@ plugins:
213228
appConfig:
214229
configMaps:
215230
- name: lightspeed-app-config
216-
mountPath: /opt/app-root/src
217231
----
218232
... Update the `spec.deployment.patch.spec.template.spec.volumes` specification to include volumes for {lcs-short} configuration (`lightspeed-stack`), shared storage for feedback (`shared-storage`), and RAG data (`rag-data-volume`):
219233
+
@@ -243,12 +257,17 @@ plugins:
243257
- mountPath: /data
244258
name: rag-data-volume
245259
----
246-
... Add the Llama Stack and {lcs-short} containers to the `spec.deployment.patch.spec.template.spec.containers` section:
260+
... Add the Llama Stack, {lcs-short} containers, and the MCP_TOKEN secret file to the `spec.deployment.patch.spec.template.spec.containers` section:
247261
+
248262
[source,yaml]
249263
----
264+
spec:
265+
application:
266+
- extraEnvs:
267+
secrets:
268+
- name: lightspeed-secrets
250269
containers:
251-
# ... Your existing {product-very-short} container definition ...
270+
# ... Your existing RHDH container definition ...
252271
- envFrom:
253272
- secretRef:
254273
name: llama-stack-secrets

0 commit comments

Comments
 (0)