Skip to content

Commit

Permalink
chore!: uds bundle refs for upstream flavor and namespace (#977)
Browse files Browse the repository at this point in the history
  • Loading branch information
justinthelaw authored Sep 10, 2024
1 parent 11526e8 commit caf4f9c
Show file tree
Hide file tree
Showing 5 changed files with 69 additions and 54 deletions.
55 changes: 37 additions & 18 deletions .github/workflows/e2e-registry1-weekly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,10 @@ jobs:
- name: Setup Python
uses: ./.github/actions/python

- name: Install API and SDK Dev Dependencies
run : |
make install
- name: Setup UDS Cluster
uses: ./.github/actions/uds-cluster
with:
Expand Down Expand Up @@ -69,45 +73,60 @@ jobs:
run: |
cd bundles/latest/cpu
uds create . --confirm && \
uds deploy uds-bundle-leapfrogai-amd64-registry1.tar.zst \
--set LEAPFROGAI_API_BASE_URL="http://leapfrogai-api.leapfrogai.svc.cluster.local:8080" --confirm --no-progress && \
uds deploy uds-bundle-leapfrogai-amd64-registry1.tar.zst --confirm --no-progress && \
rm -rf uds-bundle-leapfrogai-amd64-registry1.tar.zst && \
docker system prune -af
- name: Generate Secrets
id: generate_secrets
run: |
PASSWORD=$(cat <(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9!@#$%^&*()_+-=[]{}|;:,.<>?' | head -c 20) <(echo '!@1Aa') | fold -w1 | shuf | tr -d '\n')
echo "::add-mask::$PASSWORD"
echo "FAKE_E2E_USER_PASSWORD=$PASSWORD" >> $GITHUB_OUTPUT
ANON_KEY=$(uds zarf tools kubectl get secret supabase-bootstrap-jwt -n leapfrogai -o jsonpath='{.data.anon-key}' | base64 -d)
echo "::add-mask::$ANON_KEY"
echo "ANON_KEY=$ANON_KEY" >> $GITHUB_OUTPUT
SERVICE_ROLE_KEY=$(uds zarf tools kubectl get secret -n leapfrogai supabase-bootstrap-jwt -o jsonpath={.data.service-key} | base64 -d)
echo "::add-mask::$SERVICE_ROLE_KEY"
echo "SERVICE_ROLE_KEY=$SERVICE_ROLE_KEY" >> $GITHUB_OUTPUT
FAKE_PASSWORD=$(cat <(openssl rand -base64 32 | tr -dc 'a-zA-Z0-9!@#$%^&*()_+-=[]{}|;:,.<>?' | head -c 20) <(echo '!@1Aa') | fold -w1 | shuf | tr -d '\n')
echo "::add-mask::$FAKE_PASSWORD"
echo "FAKE_PASSWORD=$FAKE_PASSWORD" >> $GITHUB_OUTPUT
SERVICE_KEY=$(uds zarf tools kubectl get secret -n leapfrogai supabase-bootstrap-jwt -o jsonpath={.data.service-key} | base64 -d)
echo "::add-mask::$SERVICE_KEY"
echo "SERVICE_KEY=$SERVICE_KEY" >> $GITHUB_OUTPUT
- name: Verify Secrets
run: |
echo "FAKE_E2E_USER_PASSWORD is set: ${{ steps.generate_secrets.outputs.FAKE_E2E_USER_PASSWORD != '' }}"
echo "FAKE_PASSWORD is set: ${{ steps.generate_secrets.outputs.FAKE_PASSWORD != '' }}"
echo "ANON_KEY is set: ${{ steps.generate_secrets.outputs.ANON_KEY != '' }}"
echo "SERVICE_ROLE_KEY is set: ${{ steps.generate_secrets.outputs.SERVICE_ROLE_KEY != '' }}"
echo "SERVICE_KEY is set: ${{ steps.generate_secrets.outputs.SERVICE_KEY != '' }}"
- name: Run Integration Tests
env:
SUPABASE_ANON_KEY: ${{ steps.generate_secrets.outputs.ANON_KEY }}
SUPABASE_PASS: ${{ steps.generate_secrets.outputs.FAKE_PASSWORD }}
SUPABASE_EMAIL: [email protected]
SUPABASE_URL: https://supabase-kong.uds.dev
# Turn off NIAH tests that are not applicable for integration testing using the Repeater model
LFAI_RUN_NIAH_TESTS: "false"
run: |
uds zarf connect --name=llama-cpp-python-model --namespace=leapfrogai --local-port=50051 --remote-port=50051 &
while ! nc -z localhost 50051; do sleep 1; done
make test-user-pipeline
env $(cat .env | xargs) python -m pytest -v -s tests/integration/api
# Backends
- name: Run Backend Tests
- name: Run Backend E2E Tests
env:
ANON_KEY: ${{ steps.generate_secrets.outputs.ANON_KEY }}
SERVICE_KEY: ${{ steps.generate_secrets.outputs.SERVICE_KEY }}
run: |
python -m pytest ./tests/e2e/test_llama.py -v
python -m pytest ./tests/e2e/test_text_embeddings.py -v
python -m pytest ./tests/e2e/test_whisper.py -v
python -m pytest ./tests/e2e/test_supabase.py -v
python -m pytest ./tests/e2e/test_api.py -v
python -m pytest ./tests/e2e/test_llama.py -vv
python -m pytest ./tests/e2e/test_text_embeddings.py -vv
python -m pytest ./tests/e2e/test_whisper.py -vv
python -m pytest ./tests/e2e/test_supabase.py -vv
python -m pytest ./tests/e2e/test_api.py -vv
- name: Run Playwright E2E Tests
env:
SERVICE_ROLE_KEY: ${{ steps.generate_secrets.outputs.SERVICE_ROLE_KEY }}
FAKE_E2E_USER_PASSWORD: ${{ steps.generate_secrets.outputs.FAKE_E2E_USER_PASSWORD }}
SERVICE_ROLE_KEY: ${{ steps.generate_secrets.outputs.SERVICE_KEY }}
FAKE_E2E_USER_PASSWORD: ${{ steps.generate_secrets.outputs.FAKE_PASSWORD }}
ANON_KEY: ${{ steps.generate_secrets.outputs.ANON_KEY }}
run: |
chmod +x ./.github/scripts/createUser.sh
Expand Down
36 changes: 17 additions & 19 deletions bundles/latest/cpu/uds-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,35 @@ kind: UDSBundle
metadata:
name: leapfrogai
description: A UDS bundle for deploying LeapfrogAI
# x-release-please-start-version
version: 0.12.2
# x-release-please-end
version: 0.12.2-upstream

packages:
# Supabase backend for the UI and API to interface with Postgresql
- name: supabase
repository: ghcr.io/defenseunicorns/packages/leapfrogai/supabase
ref: 0.11.0
repository: ghcr.io/defenseunicorns/packages/uds/leapfrogai/supabase
ref: 0.12.2-upstream

# OpenAI-like API
# API
- name: leapfrogai-api
repository: ghcr.io/defenseunicorns/packages/leapfrogai/leapfrogai-api
ref: 0.11.0
repository: ghcr.io/defenseunicorns/packages/uds/leapfrogai/leapfrogai-api
ref: 0.12.2-upstream

# Model for generic chat and summarization
# Chat Model
- name: llama-cpp-python
repository: ghcr.io/defenseunicorns/packages/leapfrogai/llama-cpp-python
ref: 0.11.0
repository: ghcr.io/defenseunicorns/packages/uds/leapfrogai/llama-cpp-python
ref: 0.12.2-upstream

# Model for providing vector embeddings for text
# Text Embeddings Model
- name: text-embeddings
repository: ghcr.io/defenseunicorns/packages/leapfrogai/text-embeddings
ref: 0.11.0
repository: ghcr.io/defenseunicorns/packages/uds/leapfrogai/text-embeddings
ref: 0.12.2-upstream

# Model for converting audio to text
# Transcription Model
- name: whisper
repository: ghcr.io/defenseunicorns/packages/leapfrogai/whisper
ref: 0.11.0
repository: ghcr.io/defenseunicorns/packages/uds/leapfrogai/whisper
ref: 0.12.2-upstream

# UI
- name: leapfrogai-ui
repository: ghcr.io/defenseunicorns/packages/leapfrogai/leapfrogai-ui
ref: 0.11.0
repository: ghcr.io/defenseunicorns/packages/uds/leapfrogai/leapfrogai-ui
ref: 0.12.2-upstream
28 changes: 13 additions & 15 deletions bundles/latest/gpu/uds-bundle.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,37 +4,35 @@ kind: UDSBundle
metadata:
name: leapfrogai
description: A UDS bundle for deploying LeapfrogAI
# x-release-please-start-version
version: 0.12.2
# x-release-please-end
version: 0.12.2-upstream

packages:
# Supabase backend for the UI and API to interface with Postgresql
- name: supabase
repository: ghcr.io/defenseunicorns/packages/leapfrogai/supabase
ref: 0.11.0
repository: ghcr.io/defenseunicorns/packages/uds/leapfrogai/supabase
ref: 0.12.2-upstream

# OpenAI-like API
- name: leapfrogai-api
repository: ghcr.io/defenseunicorns/packages/leapfrogai/leapfrogai-api
ref: 0.11.0
repository: ghcr.io/defenseunicorns/packages/uds/leapfrogai/leapfrogai-api
ref: 0.12.2-upstream

# Model for generic chat and summarization
- name: vllm
repository: ghcr.io/defenseunicorns/packages/leapfrogai/vllm
ref: 0.11.0
repository: ghcr.io/defenseunicorns/packages/uds/leapfrogai/vllm
ref: 0.12.2-upstream

# Model for providing vector embeddings for text
- name: text-embeddings
repository: ghcr.io/defenseunicorns/packages/leapfrogai/text-embeddings
ref: 0.11.0
repository: ghcr.io/defenseunicorns/packages/uds/leapfrogai/text-embeddings
ref: 0.12.2-upstream

# Model for converting audio to text
- name: whisper
repository: ghcr.io/defenseunicorns/packages/leapfrogai/whisper
ref: 0.11.0
repository: ghcr.io/defenseunicorns/packages/uds/leapfrogai/whisper
ref: 0.12.2-upstream

# UI
- name: leapfrogai-ui
repository: ghcr.io/defenseunicorns/packages/leapfrogai/leapfrogai-ui
ref: 0.11.0
repository: ghcr.io/defenseunicorns/packages/uds/leapfrogai/leapfrogai-ui
ref: 0.12.2-upstream
2 changes: 1 addition & 1 deletion packages/api/values/registry1-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ api:
image:
repository: registry1.dso.mil/ironbank/opensource/defenseunicorns/leapfrogai/api
# x-release-please-start-version
tag: v0.11.0
tag: v0.12.2
# x-release-please-end

env:
Expand Down
2 changes: 1 addition & 1 deletion packages/api/zarf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ components:
valuesFiles:
- "values/registry1-values.yaml"
images:
- "registry1.dso.mil/ironbank/opensource/defenseunicorns/leapfrogai/api:v0.11.0"
- "registry1.dso.mil/ironbank/opensource/defenseunicorns/leapfrogai/api:v0.12.2"
# TODO: replace with Ironbank image once hardened: registry1.dso.mil/ironbank/opensource/defenseunicorns/leapfrogai/api/migrations
- "ghcr.io/defenseunicorns/leapfrogai/api-migrations:###ZARF_PKG_TMPL_IMAGE_VERSION###"
- "registry1.dso.mil/ironbank/kiwigrid/k8s-sidecar:1.23.3"

0 comments on commit caf4f9c

Please sign in to comment.