Skip to content

Commit

Permalink
Merge branch 'main' into fix-typo
Browse files Browse the repository at this point in the history
  • Loading branch information
mkbhanda authored Sep 3, 2024
2 parents 812a3e1 + 22d012e commit 5c7a4c9
Show file tree
Hide file tree
Showing 71 changed files with 495 additions and 261 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/_helm-e2e.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ jobs:
# insert a prefix before opea/.*, the prefix is OPEA_IMAGE_REPO
find . -name '*values.yaml' -type f -exec sed -i "s#repository: opea/*#repository: ${OPEA_IMAGE_REPO}opea/#g" {} \;
# set OPEA image tag to ${{ inputs.tag }}
find . -name '*values.yaml' -type f -exec sed -i 's#tag: ""#tag: ${{ inputs.tag }}#g' {} \;
find . -name '*values.yaml' -type f -exec sed -i 's#tag: "latest"#tag: ${{ inputs.tag }}#g' {} \;
# set huggingface token
find . -name '*values.yaml' -type f -exec sed -i "s#insert-your-huggingface-token-here#${HFTOKEN}#g" {} \;
# replace the mount dir "Volume: *" with "Volume: $CHART_MOUNT"
Expand Down
29 changes: 12 additions & 17 deletions .github/workflows/manual-freeze-tag.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,24 +6,19 @@ name: Freeze helm release tag in helm charts on manual event
on:
workflow_dispatch:
inputs:
oldappversion:
default: "v0.8"
description: "Old appVersion to be replaced"
required: true
type: string
newappversion:
default: "v0.9"
description: "New appVersion to replace"
required: true
type: string
oldversion:
default: "0.8.0"
description: "Old version to be replaced"
default: "0.9.0"
description: "Old helm version to be replaced"
required: true
type: string
newversion:
default: "0.9.0"
description: "New version to replace"
default: "1.0.0"
description: "New helm version to replace"
required: true
type: string
imageversion:
default: "v1.0"
description: "New image version to replace"
required: true
type: string

Expand All @@ -46,11 +41,11 @@ jobs:
- name: Run script
env:
NEWTAG: ${{ inputs.newappversion }}
NEWTAG: ${{ inputs.imageversion }}
run: |
find helm-charts/ -name 'Chart.yaml' -type f -exec sed -i "s#appVersion: \"${{ inputs.oldappversion }}\"#appVersion: \"${{ inputs.newappversion }}\"#g" {} \;
find helm-charts/ -name '*values.yaml' -type f -exec sed -i "s#tag: \"latest\"#tag: \"${imageversion}\"#g" {} \;
find helm-charts/ -name 'Chart.yaml' -type f -exec sed -i "s#version: ${{ inputs.oldversion }}#version: ${{ inputs.newversion }}#g" {} \;
find microservices-connector/helm/ -name 'Chart.yaml' -type f -exec sed -i "s#appVersion: \"${{ inputs.oldappversion }}\"#appVersion: \"${{ inputs.newappversion }}\"#g" {} \;
find microservices-connector/helm/ -name '*values.yaml' -type f -exec sed -i "s#tag: \"latest\"#tag: \"${imageversion}\"#g" {} \;
find microservices-connector/helm/ -name 'Chart.yaml' -type f -exec sed -i "s#version: ${{ inputs.oldversion }}#version: ${{ inputs.newversion }}#g" {} \;
sed -i "s|opea/gmcrouter:latest|opea/gmcrouter:$NEWTAG|g" microservices-connector/config/gmcrouter/gmc-router.yaml
sed -i "s|opea/gmcmanager:latest|opea/gmcmanager:$NEWTAG|g" microservices-connector/config/manager/gmc-manager.yaml
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/push-image-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,16 @@
name: Upgrade GMC system on push event

on:
# push:
# branches: ["main"]
# paths:
# - microservices-connector/**
# - "!microservices-connector/helm/**"
# - "!**.md"
# - "!**.txt"
# - "!**.png"
# - "!.**"
# - .github/workflows/gmc-on-push.yaml
push:
branches: ["main"]
paths:
- microservices-connector/**
- "!microservices-connector/helm/**"
- "!**.md"
- "!**.txt"
- "!**.png"
- "!.**"
- .github/workflows/gmc-on-push.yaml
workflow_dispatch:

concurrency:
Expand Down
13 changes: 9 additions & 4 deletions .github/workflows/scripts/e2e/gmc_xeon_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ MODIFY_STEP_NAMESPACE="${APP_NAMESPACE}-modstep"
WEBHOOK_NAMESPACE="${APP_NAMESPACE}-webhook"

function validate_gmc() {
mkdir -p ${LOG_PATH}
echo "validate audio-qna"
validate_audioqa

Expand Down Expand Up @@ -152,7 +153,7 @@ function validate_audioqa() {
accessUrl=$(kubectl get gmc -n $AUDIOQA_NAMESPACE -o jsonpath="{.items[?(@.metadata.name=='audioqa')].status.accessUrl}")
byte_str=$(kubectl exec "$CLIENT_POD" -n $AUDIOQA_NAMESPACE -- curl $accessUrl -s -X POST -d '{"byte_str": "UklGRigAAABXQVZFZm10IBIAAAABAAEARKwAAIhYAQACABAAAABkYXRhAgAAAAEA", "parameters":{"max_new_tokens":64, "do_sample": true, "streaming":false}}' -H 'Content-Type: application/json' | jq .byte_str)
if [ -z "$byte_str" ]; then
echo "audioqa failed, please check the the!"
echo "audioqa failed!"
exit 1
fi
echo "Audioqa response check succeed!"
Expand Down Expand Up @@ -452,10 +453,14 @@ function validate_modify_config() {
#change the model id of the step named "Tgi" in the codegen_xeon_mod.yaml
yq -i '(.spec.nodes.root.steps[] | select ( .name == "Tgi")).internalService.config.MODEL_ID = "HuggingFaceH4/mistral-7b-grok"' $(pwd)/config/samples/CodeGen/codegen_xeon_mod.yaml
kubectl apply -f $(pwd)/config/samples/CodeGen/codegen_xeon_mod.yaml
#you are supposed to see an error, it's a known issue, but it does not affect the tests
#https://github.com/opea-project/GenAIInfra/issues/314

pods_count=$(kubectl get pods -n $MODIFY_STEP_NAMESPACE -o jsonpath='{.items[*].metadata.name}' | wc -w)
# Wait until all pods are ready
wait_until_all_pod_ready $MODIFY_STEP_NAMESPACE 300s
if [ $? -ne 0 ]; then
echo "Error Some pods are not ready!"
exit 1
fi

check_gmc_status $MODIFY_STEP_NAMESPACE 'codegen' $pods_count 0 3
if [ $? -ne 0 ]; then
echo "GMC status is not as expected"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/scripts/e2e/utils.sh
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function wait_until_all_pod_ready() {
timeout=$2

echo "Wait for all pods in NS $namespace to be ready..."
pods=$(kubectl get pods -n $namespace --no-headers -o custom-columns=":metadata.name")
pods=$(kubectl get pods -n $namespace --no-headers | grep -v "Terminating" | awk '{print $1}')
# Loop through each pod
echo "$pods" | while read -r line; do
pod_name=$line
Expand Down
22 changes: 11 additions & 11 deletions helm-charts/chatqna/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,31 +7,31 @@ description: The Helm chart to deploy ChatQnA
type: application
dependencies:
- name: tgi
version: 0.9.0
version: 1.0.0
repository: "file://../common/tgi"
- name: llm-uservice
version: 0.9.0
version: 1.0.0
repository: "file://../common/llm-uservice"
- name: tei
version: 0.9.0
version: 1.0.0
repository: "file://../common/tei"
- name: embedding-usvc
version: 0.9.0
version: 1.0.0
repository: "file://../common/embedding-usvc"
- name: teirerank
version: 0.9.0
version: 1.0.0
repository: "file://../common/teirerank"
- name: reranking-usvc
version: 0.9.0
version: 1.0.0
repository: "file://../common/reranking-usvc"
- name: redis-vector-db
version: 0.9.0
version: 1.0.0
repository: "file://../common/redis-vector-db"
- name: retriever-usvc
version: 0.9.0
version: 1.0.0
repository: "file://../common/retriever-usvc"
- name: data-prep
version: 0.9.0
version: 1.0.0
repository: "file://../common/data-prep"
version: 0.9.0
appVersion: "v0.9"
version: 1.0.0
appVersion: "v1.0"
2 changes: 1 addition & 1 deletion helm-charts/chatqna/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ image:
repository: opea/chatqna
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
tag: "latest"

port: 8888
service:
Expand Down
8 changes: 4 additions & 4 deletions helm-charts/codegen/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ description: The Helm chart to deploy CodeGen
type: application
dependencies:
- name: tgi
version: 0.9.0
version: 1.0.0
repository: "file://../common/tgi"
- name: llm-uservice
version: 0.9.0
version: 1.0.0
repository: "file://../common/llm-uservice"
version: 0.9.0
appVersion: "v0.9"
version: 1.0.0
appVersion: "v1.0"
2 changes: 1 addition & 1 deletion helm-charts/codegen/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ image:
repository: opea/codegen
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
tag: "latest"

port: 7778
service:
Expand Down
8 changes: 4 additions & 4 deletions helm-charts/codetrans/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@ description: The Helm chart to deploy CodeTrans
type: application
dependencies:
- name: tgi
version: 0.9.0
version: 1.0.0
repository: "file://../common/tgi"
- name: llm-uservice
version: 0.9.0
version: 1.0.0
repository: "file://../common/llm-uservice"
version: 0.9.0
appVersion: "v0.9"
version: 1.0.0
appVersion: "v1.0"
2 changes: 1 addition & 1 deletion helm-charts/codetrans/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ image:
repository: opea/codetrans
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
tag: "latest"

port: 7777
service:
Expand Down
6 changes: 3 additions & 3 deletions helm-charts/common/asr/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ apiVersion: v2
name: asr
description: The Helm chart for deploying asr as microservice
type: application
version: 0.9.0
version: 1.0.0
# The asr microservice server version
appVersion: "v0.9"
appVersion: "v1.0"
dependencies:
- name: whisper
version: 0.9.0
version: 1.0.0
repository: file://../whisper
condition: autodependency.enabled
2 changes: 1 addition & 1 deletion helm-charts/common/asr/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ image:
repository: opea/asr
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
tag: "latest"

imagePullSecrets: []
nameOverride: ""
Expand Down
4 changes: 2 additions & 2 deletions helm-charts/common/chatqna-ui/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ apiVersion: v2
name: chatqna-ui
description: A Helm chart to the UI for chatQnA workload
type: application
version: 0.9.0
appVersion: "v0.9"
version: 1.0.0
appVersion: "v1.0"
2 changes: 1 addition & 1 deletion helm-charts/common/chatqna-ui/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ image:
repository: opea/chatqna-conversation-ui
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
tag: "latest"

imagePullSecrets: []
nameOverride: ""
Expand Down
8 changes: 4 additions & 4 deletions helm-charts/common/data-prep/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ apiVersion: v2
name: data-prep
description: The Helm chart for deploying data prep as microservice
type: application
version: 0.9.0
version: 1.0.0
# The data prep microservice server version
appVersion: "v0.9"
appVersion: "v1.0"
dependencies:
- name: tei
version: 0.9.0
version: 1.0.0
repository: file://../tei
condition: autodependency.enabled
- name: redis-vector-db
version: 0.9.0
version: 1.0.0
repository: file://../redis-vector-db
condition: autodependency.enabled
2 changes: 2 additions & 0 deletions helm-charts/common/data-prep/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ data:
REDIS_URL: "redis://{{ .Release.Name }}-redis-vector-db:6379"
{{- end }}
INDEX_NAME: {{ .Values.INDEX_NAME | quote }}
KEY_INDEX_NAME: {{ .Values.KEY_INDEX_NAME | quote }}
SEARCH_BATCH_SIZE: {{ .Values.SEARCH_BATCH_SIZE | quote }}
HUGGINGFACEHUB_API_TOKEN: {{ .Values.global.HUGGINGFACEHUB_API_TOKEN | quote}}
HF_HOME: "/tmp/.cache/huggingface"
{{- if .Values.global.HF_ENDPOINT }}
Expand Down
4 changes: 3 additions & 1 deletion helm-charts/common/data-prep/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ image:
repository: opea/dataprep-redis
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
tag: "latest"

imagePullSecrets: []
nameOverride: ""
Expand Down Expand Up @@ -88,6 +88,8 @@ EMBED_MODEL: ""
# redis DB service URL, e.g. redis://<service-name>:<port>
REDIS_URL: ""
INDEX_NAME: "rag-redis"
KEY_INDEX_NAME: "file-keys"
SEARCH_BATCH_SIZE: 10

global:
http_proxy: ""
Expand Down
6 changes: 3 additions & 3 deletions helm-charts/common/embedding-usvc/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ apiVersion: v2
name: embedding-usvc
description: The Helm chart for deploying embedding as microservice
type: application
version: 0.9.0
version: 1.0.0
# The embedding microservice server version
appVersion: "v0.9"
appVersion: "v1.0"
dependencies:
- name: tei
version: 0.9.0
version: 1.0.0
repository: file://../tei
condition: autodependency.enabled
2 changes: 1 addition & 1 deletion helm-charts/common/embedding-usvc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ image:
repository: opea/embedding-tei
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
tag: "latest"

imagePullSecrets: []
nameOverride: ""
Expand Down
6 changes: 3 additions & 3 deletions helm-charts/common/llm-uservice/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ apiVersion: v2
name: llm-uservice
description: The Helm chart for deploying llm as microservice
type: application
version: 0.9.0
version: 1.0.0
# The llm microservice server version
appVersion: "v0.9"
appVersion: "v1.0"
dependencies:
- name: tgi
version: 0.9.0
version: 1.0.0
repository: file://../tgi
condition: autodependency.enabled
2 changes: 1 addition & 1 deletion helm-charts/common/llm-uservice/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ image:
repository: opea/llm-tgi
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
tag: "latest"

imagePullSecrets: []
nameOverride: ""
Expand Down
2 changes: 1 addition & 1 deletion helm-charts/common/redis-vector-db/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ apiVersion: v2
name: redis-vector-db
description: The Helm chart for Redis Vector DB
type: application
version: 0.9.0
version: 1.0.0
appVersion: "7.2.0-v9"
6 changes: 3 additions & 3 deletions helm-charts/common/reranking-usvc/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ apiVersion: v2
name: reranking-usvc
description: The Helm chart for deploying reranking as microservice
type: application
version: 0.9.0
version: 1.0.0
# The reranking microservice server version
appVersion: "v0.9"
appVersion: "v1.0"
dependencies:
- name: teirerank
version: 0.9.0
version: 1.0.0
repository: file://../teirerank
condition: autodependency.enabled
2 changes: 1 addition & 1 deletion helm-charts/common/reranking-usvc/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ image:
repository: opea/reranking-tei
pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion.
tag: ""
tag: "latest"

imagePullSecrets: []
nameOverride: ""
Expand Down
Loading

0 comments on commit 5c7a4c9

Please sign in to comment.