Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ibis server, misses new variables, some fixes #423

Merged
merged 15 commits into from
Jun 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 15 additions & 7 deletions deployment/kustomizations/base/cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@ data:
WREN_ENGINE_PORT: "8080"
# Wren AI Service Port
WREN_AI_SERVICE_PORT: "5555"
WREN_AI_SERVICE_ENABLE_TIMER: "1"

WREN_UI_ENDPOINT: http://wren-ui-svc:3000

#Release version used by wren ui https://github.com/Canner/WrenAI/blob/main/docker/docker-compose.yaml#L85-L88
WREN_PRODUCT_VERSION: "0.3.6"
WREN_ENGINE_VERSION: "0.4.7"
WREN_AI_SERVICE_VERSION: "0.5.0"
WREN_UI_VERSION: "0.6.0"
WREN_PRODUCT_VERSION: "0.4.3"
WREN_ENGINE_VERSION: "0.5.0"
WREN_AI_SERVICE_VERSION: "0.5.6"
WREN_UI_VERSION: "0.7.2"

# OpenAI
OPENAI_GENERATION_MODEL: "gpt-3.5-turbo"
Expand All @@ -29,11 +32,16 @@ data:
AI_SERVICE_WORKERS: "1"

# "sqlite", or "pg" for postgres as UI application database
DB_TYPE: pg
WREN_UI_DB_TYPE: pg

### if DB_TYPE = "sqlite" also make sure to uncomment the "wren-sqlite" in the SQLITE_FILE, volumeMounts & PVC sections of the deployment/kustomizations/base/deploy-wren-ui.yaml
#SQLITE_FILE: /app/data/db.sqlite3
#For bootstrap
DATA_PATH: "/app/data"
WREN_ENGINE_DATA_PATH: "/app/data"

### if DB_TYPE = "postgres" you must provide PG_URL string in the *Secret* manifest file (deployment/kustomizations/examples/secret-wren_example.yaml) to connect to postgres

#DEBUG, INFO
LOGGING_LEVEL: INFO

### if DB_TYPE = "postgres" you must provide PG_URL string in the *Secret* manifest file (deployment/kustomizations/examples/secret-wren_example.yaml) to connect to postgres
IBIS_SERVER_ENDPOINT: http://wren-ibis-server-svc:8000
20 changes: 20 additions & 0 deletions deployment/kustomizations/base/deploy-wren-ai-service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ spec:
secretKeyRef:
name: wrenai-secrets
key: LLM_PROVIDER
- name: OPENAI_API_BASE
valueFrom:
configMapKeyRef:
name: wren-config
key: OPENAI_API_BASE
- name: OPENAI_GENERATION_MODEL
valueFrom:
configMapKeyRef:
Expand All @@ -56,6 +61,21 @@ spec:
configMapKeyRef:
name: wren-config
key: WREN_ENGINE_ENDPOINT
- name: LOGGING_LEVEL
valueFrom:
configMapKeyRef:
name: wren-config
key: LOGGING_LEVEL
- name: WREN_UI_ENDPOINT
valueFrom:
configMapKeyRef:
name: wren-config
key: WREN_UI_ENDPOINT
- name: ENABLE_TIMER
valueFrom:
configMapKeyRef:
name: wren-config
key: WREN_AI_SERVICE_ENABLE_TIMER
- name: PYTHONUNBUFFERED
value: "1"
ports:
Expand Down
2 changes: 1 addition & 1 deletion deployment/kustomizations/base/deploy-wren-engine.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ spec:
valueFrom:
configMapKeyRef:
name: wren-config
key: DATA_PATH
key: WREN_ENGINE_DATA_PATH
- name: PG_PASSWORD
valueFrom:
secretKeyRef:
Expand Down
30 changes: 30 additions & 0 deletions deployment/kustomizations/base/deploy-wren-ibis-server.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: wren-ibis-server
spec:
replicas: 1
selector:
matchLabels:
app: wren-ibis
template:
metadata:
labels:
app: wren-ibis
spec:
containers:
- name: wren-ibis
image: ghcr.io/canner/wren-engine-ibis:0.5.0
env:
- name: WREN_ENGINE_ENDPOINT
valueFrom:
configMapKeyRef:
name: wren-config
key: WREN_ENGINE_ENDPOINT
- name: LOGGING_LEVEL
valueFrom:
configMapKeyRef:
name: wren-config
key: LOGGING_LEVEL
ports:
- containerPort: 8000
7 changes: 6 additions & 1 deletion deployment/kustomizations/base/deploy-wren-ui.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ spec:
valueFrom:
configMapKeyRef:
name: wren-config
key: DB_TYPE
key: WREN_UI_DB_TYPE
# Uncomment if you are intending to use sqlite:
# - name: SQLITE_FILE
# valueFrom:
Expand Down Expand Up @@ -122,6 +122,11 @@ spec:
configMapKeyRef:
name: wren-config
key: WREN_PRODUCT_VERSION
- name: IBIS_SERVER_ENDPOINT
valueFrom:
configMapKeyRef:
name: wren-config
key: IBIS_SERVER_ENDPOINT
ports:
- containerPort: 3000
#if you are using sqlite, then volume is required, please uncomment next and the persistentVolumeClaim sections
Expand Down
15 changes: 14 additions & 1 deletion deployment/kustomizations/base/svc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,4 +50,17 @@ spec:
- protocol: TCP
port: 5555
targetPort: 5555
name: wren-ai-service
name: wren-ai-service
---
apiVersion: v1
kind: Service
metadata:
name: wren-ibis-server-svc
spec:
selector:
app: wren-ibis
ports:
- protocol: TCP
port: 8000
targetPort: 8000
name: wren-ibis
10 changes: 10 additions & 0 deletions deployment/kustomizations/examples/secret-wren_example.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,19 @@ type: Opaque
data:
# OPENAI_API_KEY is REQUIRED: without a valid key the wren-ai-service-deployment pod will not start
OPENAI_API_KEY: UkVRVUlSRUQ6IHNrLXByb2otYWxsLWFjY2Vzcy1wbGFjZWhvbGRlci00LXdyZW4tYWktc2VydmljZS1kZXBsb3ltZW50
OPENAI_API_BASE: aHR0cHM6Ly9hcGkub3BlbmFpLmNvbS92MQ==
LLM_PROVIDER: b3BlbmFp
PG_USERNAME: cG9zdGdyZXM=

#Azure openai env
AZURE_CHAT_BASE: bi9h
AZURE_CHAT_KEY: bi9h
AZURE_CHAT_VERSION: bi9h

AZURE_EMBED_BASE: bi9h
AZURE_EMBED_KEY: bi9h
AZURE_EMBED_VERSION: bi9h

### if in ConfigMap DB_TYPE = "sqlite" you must comment out the PG_URL string here
### if in ConfigMap DB_TYPE = "postgres" you must provide PG_URL string in this Secret manifest file below to connect to postgres
### postgres:// This is the protocol. It tells the system that you’re connecting to a PostgreSQL database.
Expand Down
10 changes: 6 additions & 4 deletions deployment/kustomizations/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,15 @@ helmCharts:

images:
- name: ghcr.io/canner/wren-bootstrap
newTag: 0.1.4 # Update to new version
newTag: 0.1.4 # WREN_BOOTSTRAP_VERSION
- name: ghcr.io/canner/wren-engine
newTag: 0.4.7 # Update to new version
newTag: 0.5.0 # WREN_ENGINE_VERSION
- name: ghcr.io/canner/wren-ui
newTag: 0.6.0 # Update to new version. Mimumal version is 0.6.0 to use postgress for wren-ui, if you are using older version, you may use only sqlite, please adjust ConfigMap (deployment/kustomizations/base/cm.yaml), Secret (deployment/kustomizations/examples/secret-wren_example.yaml) and the deployment/kustomizations/base/deploy-wren-ui.yaml manifests.
newTag: 0.7.2 # WREN_UI_VERSION Mimumal version is 0.6.0 to use postgress for wren-ui, if you are using older version, you may use only sqlite, please adjust ConfigMap (deployment/kustomizations/base/cm.yaml), Secret (deployment/kustomizations/examples/secret-wren_example.yaml) and the deployment/kustomizations/base/deploy-wren-ui.yaml manifests.
- name: ghcr.io/canner/wren-ai-service
newTag: 0.5.0 # Update to new version
newTag: 0.5.6 # WREN_AI_SERVICE_VERSION
- name: ghcr.io/canner/wren-engine-ibis
newTag: 0.5.0 # IBIS_SERVER_VERSION

resources:
- base/cm.yaml
Expand Down
8 changes: 4 additions & 4 deletions deployment/kustomizations/patches/cm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@
WREN_AI_SERVICE_PORT: "5555"

#Release version used by wren ui https://github.com/Canner/WrenAI/blob/main/docker/docker-compose.yaml#L85-L88
WREN_PRODUCT_VERSION: "0.3.6"
WREN_PRODUCT_VERSION: "0.4.3"
#fix:
WREN_ENGINE_VERSION: "0.4.7"
WREN_AI_SERVICE_VERSION: "0.5.0"
WREN_ENGINE_VERSION: "0.5.0"
WREN_AI_SERVICE_VERSION: "0.5.6"
#fix:
WREN_UI_VERSION: "0.6.0"
WREN_UI_VERSION: "0.7.2"

# OpenAI
OPENAI_GENERATION_MODEL: "gpt-3.5-turbo"
Expand Down