diff --git a/Makefile b/Makefile index 7fa091a8a..ba6d65101 100644 --- a/Makefile +++ b/Makefile @@ -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} diff --git a/packages/supabase/bitnami-values.yaml b/packages/supabase/bitnami-values.yaml index 665b964bf..2577ebfd7 100644 --- a/packages/supabase/bitnami-values.yaml +++ b/packages/supabase/bitnami-values.yaml @@ -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" @@ -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" \ No newline at end of file + postgresqlSharedPreloadLibraries: "pg_stat_statements, pg_stat_monitor, pgaudit, plpgsql, plpgsql_check, pg_cron, pg_net, pgsodium, timescaledb, auto_explain, vector" diff --git a/packages/supabase/chart/templates/uds-package.yaml b/packages/supabase/chart/templates/uds-package.yaml index 79442fee8..2f12f6029 100644 --- a/packages/supabase/chart/templates/uds-package.yaml +++ b/packages/supabase/chart/templates/uds-package.yaml @@ -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 @@ -29,4 +29,4 @@ spec: podLabels: app.kubernetes.io/name: {{ .Values.leapfrogai.package.name }} app.kubernetes.io/component: {{ .Values.leapfrogai.package.component }} - remoteGenerated: Anywhere \ No newline at end of file + remoteGenerated: Anywhere diff --git a/packages/ui/chart/Chart.yaml b/packages/ui/chart/Chart.yaml index fb155cf36..c1c9763f2 100644 --- a/packages/ui/chart/Chart.yaml +++ b/packages/ui/chart/Chart.yaml @@ -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. diff --git a/packages/ui/chart/templates/uds-package.yaml b/packages/ui/chart/templates/uds-package.yaml index 6087c3dda..cb475570b 100644 --- a/packages/ui/chart/templates/uds-package.yaml +++ b/packages/ui/chart/templates/uds-package.yaml @@ -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 diff --git a/packages/ui/chart/templates/ui/deployment.yaml b/packages/ui/chart/templates/ui/deployment.yaml index 2f88b8bd6..d63e79fe7 100644 --- a/packages/ui/chart/templates/ui/deployment.yaml +++ b/packages/ui/chart/templates/ui/deployment.yaml @@ -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 diff --git a/packages/ui/chart/ui-values.yaml b/packages/ui/chart/ui-values.yaml index 24f28cde1..df3b7270d 100644 --- a/packages/ui/chart/ui-values.yaml +++ b/packages/ui/chart/ui-values.yaml @@ -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###' diff --git a/packages/ui/zarf.yaml b/packages/ui/zarf.yaml index 55222a48a..f2163e22a 100644 --- a/packages/ui/zarf.yaml +++ b/packages/ui/zarf.yaml @@ -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 @@ -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: @@ -82,6 +85,6 @@ components: - wait: cluster: kind: Deployment - name: lfaiui + name: leapfrogai-ui namespace: leapfrogai condition: Available diff --git a/src/leapfrogai_ui/.env.example b/src/leapfrogai_ui/.env.example index 4a64dac2d..00ccd6d57 100644 --- a/src/leapfrogai_ui/.env.example +++ b/src/leapfrogai_ui/.env.example @@ -18,6 +18,6 @@ MFA_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= # SUPABASE AUTH (when running Supabase Locally) -SUPABASE_AUTH_KEYCLOAK_CLIENT_ID=lfaiui +SUPABASE_AUTH_KEYCLOAK_CLIENT_ID=uds-supabase SUPABASE_AUTH_KEYCLOAK_SECRET= SUPABASE_AUTH_EXTERNAL_KEYCLOAK_URL=https://keycloak.admin.uds.dev/realms/uds diff --git a/uds-bundles/dev/cpu/uds-bundle.yaml b/uds-bundles/dev/cpu/uds-bundle.yaml index 0d4f77db8..464a2cb46 100644 --- a/uds-bundles/dev/cpu/uds-bundle.yaml +++ b/uds-bundles/dev/cpu/uds-bundle.yaml @@ -36,6 +36,6 @@ packages: ref: dev # UI - - name: lfaiui + - name: leapfrogai-ui path: ../../../packages/ui/ - ref: dev \ No newline at end of file + ref: dev diff --git a/uds-bundles/dev/cpu/uds-config.yaml b/uds-bundles/dev/cpu/uds-config.yaml index 4004a6e27..891980809 100644 --- a/uds-bundles/dev/cpu/uds-config.yaml +++ b/uds-bundles/dev/cpu/uds-config.yaml @@ -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: '' \ No newline at end of file + disable_keycloak: false # If this package is deployed as a bundle, keycloak is assumed default + supabase_anon_key: '' diff --git a/uds-bundles/dev/gpu/uds-bundle.yaml b/uds-bundles/dev/gpu/uds-bundle.yaml index 5b095c5b9..abf752f7a 100644 --- a/uds-bundles/dev/gpu/uds-bundle.yaml +++ b/uds-bundles/dev/gpu/uds-bundle.yaml @@ -5,7 +5,7 @@ metadata: version: dev packages: - # OpenAI-like API + # OpenAI-like API - name: leapfrogai-api path: ../../../packages/api ref: dev @@ -36,6 +36,6 @@ packages: ref: dev # UI - - name: lfaiui + - name: leapfrogai-ui path: ../../../packages/ui/ ref: dev diff --git a/uds-bundles/dev/gpu/uds-config.yaml b/uds-bundles/dev/gpu/uds-config.yaml index 78856d22a..e93499d6d 100644 --- a/uds-bundles/dev/gpu/uds-config.yaml +++ b/uds-bundles/dev/gpu/uds-config.yaml @@ -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: '' \ No newline at end of file + disable_keycloak: false # If this package is deployed as a bundle, keycloak is assumed default + supabase_anon_key: '' diff --git a/uds-bundles/latest/cpu/uds-bundle.yaml b/uds-bundles/latest/cpu/uds-bundle.yaml index 208f7ba58..50ba780e9 100644 --- a/uds-bundles/latest/cpu/uds-bundle.yaml +++ b/uds-bundles/latest/cpu/uds-bundle.yaml @@ -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 diff --git a/uds-bundles/latest/cpu/uds-config.yaml b/uds-bundles/latest/cpu/uds-config.yaml index 64d6a73ef..891980809 100644 --- a/uds-bundles/latest/cpu/uds-config.yaml +++ b/uds-bundles/latest/cpu/uds-config.yaml @@ -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: '' \ No newline at end of file + disable_keycloak: false # If this package is deployed as a bundle, keycloak is assumed default + supabase_anon_key: '' diff --git a/uds-bundles/latest/gpu/uds-bundle.yaml b/uds-bundles/latest/gpu/uds-bundle.yaml index decffdd9e..30642fa59 100644 --- a/uds-bundles/latest/gpu/uds-bundle.yaml +++ b/uds-bundles/latest/gpu/uds-bundle.yaml @@ -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 diff --git a/uds-bundles/latest/gpu/uds-config.yaml b/uds-bundles/latest/gpu/uds-config.yaml index a0bb2a06f..e93499d6d 100644 --- a/uds-bundles/latest/gpu/uds-config.yaml +++ b/uds-bundles/latest/gpu/uds-config.yaml @@ -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: '' \ No newline at end of file + disable_keycloak: false # If this package is deployed as a bundle, keycloak is assumed default + supabase_anon_key: ''