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

feat: added more workers, moved ingest to the workers template #2272

Merged
merged 3 commits into from
Sep 3, 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
6 changes: 6 additions & 0 deletions .github/workflows/ts-sdk-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@ name: Deploy TS-SDK docs to github pages

on:
push:
paths:
- 'clients/ts-sdk/**'
branches: ["main"]
pull_request:
paths:
- 'clients/ts-sdk/**'
branches: ["main"]

jobs:
Expand Down
10 changes: 8 additions & 2 deletions glasskube/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,15 @@ Open [dashboard.localtrieve.com](http://dashboard.localtrieve.com) in your brows

## Optional commands

Scale down all embedding servers:
#### Scale down all embedding servers:

```shell
kubectl scale deployment trieve-embedding-bgem3 trieve-embedding-jina trieve-embedding-reranker trieve-embedding-splade-doc trieve-embedding-splade-query --replicas 0

```
```

#### Deleting the cluster

```shell
minikube delete -p trieve
```
4 changes: 3 additions & 1 deletion glasskube/trieve/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ data:
SMTP_PASSWORD: "FROM SECRET"
SMTP_EMAIL_ADDRESS: "[email protected]"
OPENAI_API_KEY: "sk-************************************************"
ANTHROPIC_API_KEY: "sk-************************************************"
LLM_API_KEY: "sk-************************************************"
SECRET_KEY: "01234012340123401234012340123401234012340123401234012340123401234012340123401234" #generate
SALT: "" # OPTIOANL
Expand Down Expand Up @@ -47,7 +48,8 @@ data:
CLICKHOUSE_DB: "default"
CLICKHOUSE_USER: "default"
CLICKHOUSE_PASSWORD: "password"
CLICKHOUSE_DSN: "clickhouse://default:password@clickhouse-trieve-clickhouse:8123/default" # Used by Cronjobs
JINA_CODE_API_KEY: ""
RUST_LOG: "INFO"
BM25_ACTIVE: "true"
CREATE_QDRANT_COLLECTIONS: "true"
CREATE_QDRANT_COLLECTIONS: "true"
23 changes: 23 additions & 0 deletions glasskube/trieve/cronjobs/clickhouse-collapse.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: collapsing-queries-cronjob
spec:
schedule: "*/30 * * * *"
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
spec:
containers:
- name: collapsing-queries
image: trieve/clickhouse-collapse-query-script
imagePullPolicy: IfNotPresent
env:
- name: CLICKHOUSE_DSN
valueFrom:
configMapKeyRef:
name: trieve-server-config
key: CLICKHOUSE_DSN
restartPolicy: Never

27 changes: 27 additions & 0 deletions glasskube/trieve/cronjobs/cluster-queries.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: cluster-queries-cronjob
cdxker marked this conversation as resolved.
Show resolved Hide resolved
spec:
schedule: "1 * * * *"
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
spec:
containers:
- name: cluster-queries
image: trieve/clickhouse-clustering
imagePullPolicy: IfNotPresent
env:
- name: ANTHROPIC_API_KEY
valueFrom:
configMapKeyRef:
name: trieve-server-config
key: ANTHROPIC_API_KEY
- name: CLICKHOUSE_DSN
valueFrom:
configMapKeyRef:
name: trieve-server-config
key: CLICKHOUSE_DSN
restartPolicy: Never
4 changes: 4 additions & 0 deletions glasskube/trieve/cronjobs/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
resources:
- word-id-cronjob.yaml
- cluster-queries.yaml
- clickhouse-collapse.yaml
31 changes: 31 additions & 0 deletions glasskube/trieve/cronjobs/word-id-cronjob.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
apiVersion: batch/v1
kind: CronJob
metadata:
name: trieve-word-id-cronjob
spec:
schedule: "0 0 * * *"
concurrencyPolicy: Forbid
jobTemplate:
spec:
template:
spec:
restartPolicy: OnFailure
containers:
- name: word-id-cronjob
image: trieve/word-id-cronjob
ports:
- containerPort: 8090
env:
- name: DATABASE_URL
valueFrom:
secretKeyRef:
name: trieve-postgresql-server-app
key: uri
- name: QDRANT_API_KEY
valueFrom:
secretKeyRef:
name: trieve-qdrant-qdrant-apikey
key: api-key
envFrom:
- configMapRef:
name: trieve-server-config
29 changes: 0 additions & 29 deletions glasskube/trieve/ingest/deployment.yaml

This file was deleted.

4 changes: 0 additions & 4 deletions glasskube/trieve/ingest/kustomization.yaml

This file was deleted.

8 changes: 7 additions & 1 deletion glasskube/trieve/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ resources:
- server
- ui
- worker
- ingest
- embeddings
- cronjobs

images:
- name: ghcr.io/huggingface/text-embeddings-inference
Expand Down Expand Up @@ -39,3 +39,9 @@ images:
- name: trieve/group-worker
newName: trieve/group_worker
newTag: sha-d8b18ca
- name: trieve/word-id-cronjob
newTag: sha-d8b18ca
- name: trieve/clickhouse-collapse-query-script
newTag: sha-5cdcd38
- name: trieve/clickhouse-clustering
newTag: sha-e55860a
1 change: 1 addition & 0 deletions glasskube/trieve/ui/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ data:
VITE_DASHBOARD_URL: "http://dashboard.localtrieve.com"
VITE_CHAT_UI_URL: "http://chat.localtrieve.com"
VITE_ANALYTICS_UI_URL: "http://analytics.localtrieve.com"
VITE_BM25_ACTIVE: "true"
8 changes: 8 additions & 0 deletions glasskube/trieve/worker/bktree-worker/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
commonLabels:
app.kubernetes.io/component: worker-bktree
nameSuffix: -bktree
resources:
- ../base
images:
- name: worker
newName: trieve/bktree-worker
2 changes: 1 addition & 1 deletion glasskube/trieve/worker/group/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ resources:
- ../base
images:
- name: worker
newName: trieve/file-worker
newName: trieve/group-worker
8 changes: 8 additions & 0 deletions glasskube/trieve/worker/ingest/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
commonLabels:
app.kubernetes.io/component: worker-file
nameSuffix: -ingest
resources:
- ../base
images:
- name: worker
newName: trieve/ingest
5 changes: 5 additions & 0 deletions glasskube/trieve/worker/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
resources:
- bktree-worker
- delete
- file
- group
- ingest
- sync-qdrant
- reindexer
- queue-bm25
- word-worker
16 changes: 16 additions & 0 deletions glasskube/trieve/worker/queue-bm25/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
commonLabels:
app.kubernetes.io/component: worker-queuebm25
nameSuffix: -bm25
resources:
- ../base
images:
- name: worker
newName: trieve/queue-bm25-migration
patches:
- target:
kind: Deployment
name: trieve-worker
patch: |-
- op: add
path: /spec/replicas
value: 0 # this deployment functions more like a "Job"
8 changes: 8 additions & 0 deletions glasskube/trieve/worker/reindexer/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
commonLabels:
app.kubernetes.io/component: worker-reindexer
nameSuffix: -reindexer
resources:
- ../base
images:
- name: worker
newName: trieve/reindex-worker
8 changes: 8 additions & 0 deletions glasskube/trieve/worker/word-worker/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
commonLabels:
app.kubernetes.io/component: worker-words
nameSuffix: -word
resources:
- ../base
images:
- name: worker
newName: trieve/word-worker