Skip to content

Commit

Permalink
chore: Misc UI package configuration updates (#495)
Browse files Browse the repository at this point in the history
* fix: add 'local-registry' target as dependency to 'build-ui'
* chore: refactor package name from 'lfaiui' to 'leapfrogai-ui'
* chore: update default UI hostname from 'lfaiui' to 'ai'
* chore: update example keycloak_client_id
* fix: update default model for CPU bundles to not use a GPU model
* fix: update subdomain and domain settings for UI deployment
  • Loading branch information
YrrepNoj authored May 10, 2024
1 parent 3527bfc commit ebe4fde
Show file tree
Hide file tree
Showing 17 changed files with 60 additions and 56 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ build-api: local-registry setup-api-deps ## Build the leapfrogai_api container a
uds zarf package create packages/api -o packages/api --registry-override=ghcr.io=localhost:5000 --insecure --set LEAPFROGAI_IMAGE_VERSION=${LOCAL_VERSION} --confirm


build-ui: ## Build the leapfrogai_ui container and Zarf package
build-ui: local-registry ## Build the leapfrogai_ui container and Zarf package
## Build the image (and tag it for the local registry)
docker build -t ghcr.io/defenseunicorns/leapfrogai/leapfrogai-ui:${LOCAL_VERSION} src/leapfrogai_ui
docker tag ghcr.io/defenseunicorns/leapfrogai/leapfrogai-ui:${LOCAL_VERSION} localhost:5000/defenseunicorns/leapfrogai/leapfrogai-ui:${LOCAL_VERSION}
Expand Down
4 changes: 2 additions & 2 deletions packages/supabase/bitnami-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ storage:

studio:
enabled: ###ZARF_VAR_ENABLE_STUDIO###
publicURL: "https://lfaiui.uds.dev"
publicURL: "https://ai.uds.dev"
image:
tag: 0.24.3-debian-12-r0
resourcesPreset: "none"
Expand Down Expand Up @@ -187,4 +187,4 @@ postgresql:
## @param postgresql.postgresqlSharedPreloadLibraries Set the shared_preload_libraries parameter in postgresql.conf
## Setting an empty value in order to force the default extensions of supabase-postgres
##
postgresqlSharedPreloadLibraries: "pg_stat_statements, pg_stat_monitor, pgaudit, plpgsql, plpgsql_check, pg_cron, pg_net, pgsodium, timescaledb, auto_explain, vector"
postgresqlSharedPreloadLibraries: "pg_stat_statements, pg_stat_monitor, pgaudit, plpgsql, plpgsql_check, pg_cron, pg_net, pgsodium, timescaledb, auto_explain, vector"
4 changes: 2 additions & 2 deletions packages/supabase/chart/templates/uds-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ spec:
redirectUris:
- "https://supabase-kong.uds.dev/auth/v1/callback"
webOrigins:
- "https://lfaiui.uds.dev/"
- "https://ai.uds.dev/"
network:
expose:
- service: supabase-kong
Expand All @@ -29,4 +29,4 @@ spec:
podLabels:
app.kubernetes.io/name: {{ .Values.leapfrogai.package.name }}
app.kubernetes.io/component: {{ .Values.leapfrogai.package.component }}
remoteGenerated: Anywhere
remoteGenerated: Anywhere
2 changes: 1 addition & 1 deletion packages/ui/chart/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
apiVersion: v2
name: lfaiui
name: leapfrogai-ui
description: UI to interact with LFAI tools

# A chart can be either an 'application' or a 'library' chart.
Expand Down
2 changes: 1 addition & 1 deletion packages/ui/chart/templates/uds-package.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ spec:
- service: {{ .Values.package.name }}
podLabels:
app: {{ .Values.package.name }}
host: {{ .Values.package.host }}
host: {{ .Values.package.subdomain }}
gateway: tenant
port: 3000

Expand Down
2 changes: 1 addition & 1 deletion packages/ui/chart/templates/ui/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ spec:
- name: LEAPFROGAI_API_BASE_URL
value: '###ZARF_VAR_LEAPFROGAI_API_BASE_URL###'
- name: ORIGIN
value: '###ZARF_VAR_DOMAIN###'
value: "https://{{ .Values.package.subdomain }}.{{ .Values.package.domain }}"
- name: DEFAULT_MODEL
value: '###ZARF_VAR_MODEL###'
- name: DEFAULT_SYSTEM_PROMPT
Expand Down
5 changes: 3 additions & 2 deletions packages/ui/chart/ui-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,9 @@ image:
tag: '###ZARF_CONST_IMAGE_VERSION###'

package:
name: lfaiui
host: lfaiui
name: leapfrogai-ui
subdomain: '###ZARF_VAR_SUBDOMAIN###'
domain: '###ZARF_VAR_DOMAIN###'
supabase_url: '###ZARF_VAR_SUPABASE_URL###'
supabase_anon_key: '###ZARF_VAR_SUPABASE_ANON_KEY###'
message_length_limit: '###ZARF_VAR_MESSAGE_LENGTH_LIMIT###'
11 changes: 7 additions & 4 deletions packages/ui/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,12 @@ variables:
default: my-test-key
prompt: true
sensitive: true
- name: SUBDOMAIN
description: The subdomain for the application, Istio-ingress configuration
default: "ai"
- name: DOMAIN
description: The domain to use for the application, Istio-ingress configuration
default: https://lfaiui.uds.dev
default: "uds.dev"
prompt: true
sensitive: true
- name: MODEL
Expand Down Expand Up @@ -63,10 +66,10 @@ variables:
sensitive: false

components:
- name: lfaiui
- name: leapfrogai-ui
required: true
charts:
- name: lfaiui
- name: leapfrogai-ui
namespace: leapfrogai
localPath: chart
valuesFiles:
Expand All @@ -82,6 +85,6 @@ components:
- wait:
cluster:
kind: Deployment
name: lfaiui
name: leapfrogai-ui
namespace: leapfrogai
condition: Available
2 changes: 1 addition & 1 deletion src/leapfrogai_ui/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ MFA_SECRET=<secret>
# Service Role key comes from Supabase and allows Playwright to bypass row level security for test setup/cleanup. This is only needed for tests.
SERVICE_ROLE_KEY=<key>
# SUPABASE AUTH (when running Supabase Locally)
SUPABASE_AUTH_KEYCLOAK_CLIENT_ID=lfaiui
SUPABASE_AUTH_KEYCLOAK_CLIENT_ID=uds-supabase
SUPABASE_AUTH_KEYCLOAK_SECRET=<secret>
SUPABASE_AUTH_EXTERNAL_KEYCLOAK_URL=https://keycloak.admin.uds.dev/realms/uds
4 changes: 2 additions & 2 deletions uds-bundles/dev/cpu/uds-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,6 @@ packages:
ref: dev

# UI
- name: lfaiui
- name: leapfrogai-ui
path: ../../../packages/ui/
ref: dev
ref: dev
10 changes: 6 additions & 4 deletions uds-bundles/dev/cpu/uds-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,10 @@ variables:
embedding_model_name: text-embeddings
top_k: 20

lfaiui:
domain: https://lfaiui.uds.dev
model: vllm
leapfrogai-ui:
subdomain: ai
domain: uds.dev
model: llama-cpp-python
supabase_url: https://supabase-kong.uds.dev
supabase_anon_key: ''
disable_keycloak: false # If this package is deployed as a bundle, keycloak is assumed default
supabase_anon_key: ''
4 changes: 2 additions & 2 deletions uds-bundles/dev/gpu/uds-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
version: dev

packages:
# OpenAI-like API
# OpenAI-like API
- name: leapfrogai-api
path: ../../../packages/api
ref: dev
Expand Down Expand Up @@ -36,6 +36,6 @@ packages:
ref: dev

# UI
- name: lfaiui
- name: leapfrogai-ui
path: ../../../packages/ui/
ref: dev
8 changes: 5 additions & 3 deletions uds-bundles/dev/gpu/uds-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,10 @@ variables:
embedding_model_name: text-embeddings
top_k: 20

lfaiui:
domain: https://lfaiui.uds.dev
leapfrogai-ui:
subdomain: ai
domain: uds.dev
model: vllm
supabase_url: https://supabase-kong.uds.dev
supabase_anon_key: ''
disable_keycloak: false # If this package is deployed as a bundle, keycloak is assumed default
supabase_anon_key: ''
14 changes: 9 additions & 5 deletions uds-bundles/latest/cpu/uds-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@ packages:

# Supabase backend for the UI and API to interface with Postgresql
- name: supabase
path: ../../../packages/supabase/
ref: dev
path: ghcr.io/defenseunicorns/packages/leapfrogai/supabase
# x-release-please-start-version
ref: 0.6.1
# x-release-please-end

# UI - new UI TODO - point to ghcr image after Sprint 0.7.0
- name: lfaiui
path: ../../../packages/ui/
ref: dev
- name: leapfrogai-ui
path: ghcr.io/defenseunicorns/packages/leapfrogai/leapfrogai-ui
# x-release-please-start-version
ref: 0.6.1
# x-release-please-end
14 changes: 4 additions & 10 deletions uds-bundles/latest/cpu/uds-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,9 @@ variables:
top_k: 20

leapfrogai-ui:
domain: https://ai.uds.dev
subdomain: ai
domain: uds.dev
model: llama-cpp-python
concurrent_requests: "false"
ai4ns_branding: "false"
leapfrogai_rag_url: http://rag.leapfrogai.svc.cluster.local:8000
max_tokens: 8192

lfaiui:
domain: https://lfaiui.uds.dev
model: vllm
supabase_url: https://supabase-kong.uds.dev
supabase_anon_key: ''
disable_keycloak: false # If this package is deployed as a bundle, keycloak is assumed default
supabase_anon_key: ''
14 changes: 9 additions & 5 deletions uds-bundles/latest/gpu/uds-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,14 @@ packages:

# Supabase backend for the UI and API to interface with Postgresql
- name: supabase
path: ../../../packages/supabase/
ref: dev
path: ghcr.io/defenseunicorns/packages/leapfrogai/supabase
# x-release-please-start-version
ref: 0.6.1
# x-release-please-end

# UI - new UI TODO - point to ghcr image after Sprint 0.7.0
- name: lfaiui
path: ../../../packages/ui/
ref: dev
- name: leapfrogai-ui
path: ghcr.io/defenseunicorns/packages/leapfrogai/leapfrogai-ui
# x-release-please-start-version
ref: 0.6.1
# x-release-please-end
14 changes: 4 additions & 10 deletions uds-bundles/latest/gpu/uds-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,9 @@ variables:
top_k: 20

leapfrogai-ui:
domain: https://ai.uds.dev
model: vllm
concurrent_requests: "true"
ai4ns_branding: "false"
leapfrogai_rag_url: http://rag.leapfrogai.svc.cluster.local:8000
max_tokens: 16384

lfaiui:
domain: https://lfaiui.uds.dev
subdomain: ai
domain: uds.dev
model: vllm
supabase_url: https://supabase-kong.uds.dev
supabase_anon_key: ''
disable_keycloak: false # If this package is deployed as a bundle, keycloak is assumed default
supabase_anon_key: ''

0 comments on commit ebe4fde

Please sign in to comment.