Skip to content

Commit

Permalink
UI deploy (#433)
Browse files Browse the repository at this point in the history
* init

* fix: Add old ui back in

* fix: lfaiui naming

* Fix: old ui bundle image

* chore: update bundles

* fix: lfaiui naming part 2

* chore: add local version of lfaiui to latest bundles

* fix: api base url

* fix: anon-key

* fix: default empty string for anon key

* fix: zarf values file

* fix: supabase url

* fix: supabase url 2
  • Loading branch information
andrewrisse authored Apr 24, 2024
1 parent 2d828d3 commit 48c3e51
Show file tree
Hide file tree
Showing 15 changed files with 60 additions and 34 deletions.
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: leapfrogai-ui
name: lfaiui
description: UI to interact with LFAI tools

# A chart can be either an 'application' or a 'library' chart.
Expand Down
8 changes: 4 additions & 4 deletions packages/ui/chart/templates/uds-package.yaml
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
apiVersion: uds.dev/v1alpha1
kind: Package
metadata:
name: leapfrogai-ui
name: {{ .Values.package.name }}
namespace: {{ .Release.Namespace }}
spec:
network:
expose:
- service: leapfrogai-ui
- service: {{ .Values.package.name }}
podLabels:
app: leapfrogai-ui
app: {{ .Values.package.name }}
host: {{ .Values.package.host }}
gateway: tenant
port: 3000
Expand All @@ -22,5 +22,5 @@ spec:

- direction: Egress
podLabels:
app: leapfrogai-ui
app: {{ .Values.package.name }}
remoteGenerated: Anywhere
10 changes: 5 additions & 5 deletions packages/ui/chart/templates/ui/deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: leapfrogai-ui
name: {{ .Values.package.name }}
namespace: leapfrogai
spec:
selector:
matchLabels:
app: leapfrogai-ui
app: {{ .Values.package.name }}
replicas: 1
template:
metadata:
labels:
app: leapfrogai-ui
app: {{ .Values.package.name }}
spec:
containers:
- name: leapfrogai-ui
- name: {{ .Values.package.name }}
image: 'ghcr.io/defenseunicorns/leapfrogai/leapfrogai-ui:###ZARF_CONST_IMAGE_VERSION###'
ports:
- containerPort: 3000
Expand All @@ -40,7 +40,7 @@ spec:
valueFrom:
secretKeyRef:
name: supabase-jwt
key: anonKey
key: anon-key
{{ end }}
- name: PUBLIC_DISABLE_KEYCLOAK
value: '###ZARF_VAR_DISABLE_KEYCLOAK###'
Expand Down
10 changes: 5 additions & 5 deletions packages/ui/chart/templates/ui/service.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
apiVersion: v1
kind: Service
metadata:
name: leapfrogai-ui
name: {{ .Values.package.name }}
namespace: leapfrogai
labels:
app: leapfrogai-ui
service: leapfrogai-ui
zarf.dev/connect-name: leapfrogai-ui
app: {{ .Values.package.name }}
service: {{ .Values.package.name }}
zarf.dev/connect-name: {{ .Values.package.name }}
annotations:
zarf.dev/connect-description: 'The LeapfrogAI UI'
spec:
selector:
app: leapfrogai-ui
app: {{ .Values.package.name }}
ports:
- name: http
port: 3000
Expand Down
1 change: 1 addition & 0 deletions packages/ui/chart/values.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
package:
name: lfaiui
host: lfaiui
supabase_url: '###ZARF_VAR_SUPABASE_URL###'
supabase_anon_key: '###ZARF_VAR_SUPABASE_ANON_KEY###'
2 changes: 1 addition & 1 deletion packages/ui/zarf-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ package:
set:
image_repository: 'ghcr.io/defenseunicorns/leapfrogai/leapfrogai-ui'
image_version: dev
name: leapfrogai-ui
name: lfaiui
max_package_size: '1000000000'
13 changes: 8 additions & 5 deletions packages/ui/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ constants:
variables:
- name: LEAPFROGAI_API_BASE_URL #LEAPFROGAI_API_BASE_URL
description: The base URL for the LeapfrogAI API
default: api.leapfrogai.svc.cluster.local:8080/openai/v1
default: http://api.leapfrogai.svc.cluster.local:8080/openai/v1
prompt: true
sensitive: true
- name: LEAPFROGAI_API_KEY
Expand Down Expand Up @@ -45,9 +45,10 @@ variables:
- name: SUPABASE_URL
description: URL for supabase
prompt: true
default: supabase-kong.leapfrogai.svc.cluster.local:8080
default: https://supabase-kong.uds.dev
sensitive: false
- name: SUPABASE_ANON_KEY
default: ''
description: Public key for Supabase
prompt: true
sensitive: false
Expand All @@ -58,13 +59,15 @@ variables:
sensitive: false

components:
- name: leapfrogai-ui
- name: lfaiui
required: true
charts:
- name: leapfrogai-ui
- name: lfaiui
namespace: leapfrogai
localPath: chart
version: '###ZARF_PKG_TMPL_IMAGE_VERSION###'
valuesFiles:
- "chart/values.yaml"
images:
- '###ZARF_PKG_TMPL_IMAGE_REPOSITORY###:###ZARF_PKG_TMPL_IMAGE_VERSION###'
actions:
Expand All @@ -73,6 +76,6 @@ components:
- wait:
cluster:
kind: Deployment
name: leapfrogai-ui
name: lfaiui
namespace: leapfrogai
condition: Available
2 changes: 1 addition & 1 deletion uds-bundles/dev/cpu/uds-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ packages:
ref: dev

# UI
- name: leapfrogai-ui
- name: lfaiui
path: ../../../packages/ui/
ref: dev

4 changes: 2 additions & 2 deletions uds-bundles/dev/cpu/uds-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ variables:
embedding_model_name: text-embeddings
top_k: 20

leapfrogai-ui:
lfaiui:
domain: https://lfaiui.uds.dev
model: vllm
supabase_url: http://supabase.leapfrogai.svc.cluster.local:8080
supabase_url: https://supabase-kong.uds.dev
supabase_anon_key: ''
2 changes: 1 addition & 1 deletion uds-bundles/dev/gpu/uds-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ packages:
ref: dev

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

leapfrogai-ui:
lfaiui:
domain: https://lfaiui.uds.dev
model: vllm
supabase_url: http://supabase.leapfrogai.svc.cluster.local:8080
supabase_url: https://supabase-kong.uds.dev
supabase_anon_key: ''
11 changes: 8 additions & 3 deletions uds-bundles/latest/cpu/uds-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ packages:
repository: ghcr.io/defenseunicorns/packages/leapfrogai/whisper
ref: 0.6.1

# UI
# Legacy: AI chat, transcription, and summarization frontend
- name: leapfrogai-ui
path: ghcr.io/defenseunicorns/leapfrogai/leapfrogai-ui
ref: 0.3.5
repository: ghcr.io/defenseunicorns/packages/leapfrogai/leapfrogai-ui
ref: 0.3.5

# UI - new UI TODO - point to ghcr image after Sprint 0.7.0
- name: lfaiui
path: ../../../packages/ui/
ref: dev
8 changes: 7 additions & 1 deletion uds-bundles/latest/cpu/uds-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,10 @@ variables:
concurrent_requests: "false"
ai4ns_branding: "false"
leapfrogai_rag_url: http://rag.leapfrogai.svc.cluster.local:8000
max_tokens: 8192
max_tokens: 8192

lfaiui:
domain: https://lfaiui.uds.dev
model: vllm
supabase_url: https://supabase-kong.uds.dev
supabase_anon_key: ''
11 changes: 8 additions & 3 deletions uds-bundles/latest/gpu/uds-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@ packages:
repository: ghcr.io/defenseunicorns/packages/leapfrogai/whisper
ref: 0.6.1

# UI
# Legacy: AI chat, transcription, and summarization frontend
- name: leapfrogai-ui
path: ghcr.io/defenseunicorns/leapfrogai/leapfrogai-ui
ref: 0.3.5
repository: ghcr.io/defenseunicorns/packages/leapfrogai/leapfrogai-ui
ref: 0.3.5

# UI - new UI TODO - point to ghcr image after Sprint 0.7.0
- name: lfaiui
path: ../../../packages/ui/
ref: dev
6 changes: 6 additions & 0 deletions uds-bundles/latest/gpu/uds-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,9 @@ variables:
ai4ns_branding: "false"
leapfrogai_rag_url: http://rag.leapfrogai.svc.cluster.local:8000
max_tokens: 16384

lfaiui:
domain: https://lfaiui.uds.dev
model: vllm
supabase_url: https://supabase-kong.uds.dev
supabase_anon_key: ''

0 comments on commit 48c3e51

Please sign in to comment.