Skip to content

Commit

Permalink
[ENH] Helm chart (#1776)
Browse files Browse the repository at this point in the history
## Description of changes

*Summarize the changes made by this PR.*
 - New functionality
	 - Basic helm chart for distributed chroma

## Test plan
*How are these changes tested?*

- [ ] Tests pass locally with `pytest` for python, `yarn test` for js

## Documentation Changes
*Are all docstrings for user-facing APIs updated if required? Do we need
to make documentation changes in the [docs
repository](https://github.com/chroma-core/docs)?*
  • Loading branch information
beggers committed Feb 27, 2024
1 parent 1d6ceb6 commit 81ec2f4
Show file tree
Hide file tree
Showing 23 changed files with 338 additions and 641 deletions.
97 changes: 73 additions & 24 deletions Tiltfile
Original file line number Diff line number Diff line change
@@ -1,44 +1,93 @@
update_settings(max_parallel_updates=6)

docker_build('migration',
context='.',
dockerfile='./go/Dockerfile.migration'
docker_build(
'migration',
context='.',
dockerfile='./go/Dockerfile.migration'
)

docker_build('coordinator',
context='.',
dockerfile='./go/Dockerfile'
docker_build(
'coordinator',
context='.',
dockerfile='./go/Dockerfile'
)

docker_build('server',
context='.',
dockerfile='./Dockerfile',
docker_build(
'server',
context='.',
dockerfile='./Dockerfile',
)

docker_build('worker',
context='.',
dockerfile='./rust/worker/Dockerfile'
docker_build(
'worker',
context='.',
dockerfile='./rust/worker/Dockerfile'
)

k8s_yaml(
helm(
'k8s/distributed-chroma',
namespace='chroma',
values=[
'k8s/distributed-chroma/values.yaml'
]
)
)

k8s_yaml(['k8s/dev/setup.yaml'])
# Lots of things assume the cluster is in a basic state. Get it into a basic
# state before deploying anything else.
k8s_resource(
objects=['chroma:Namespace', 'memberlist-reader:ClusterRole', 'memberlist-reader:ClusterRoleBinding', 'pod-list-role:Role', 'pod-list-role-binding:RoleBinding', 'memberlists.chroma.cluster:CustomResourceDefinition','worker-memberlist:MemberList', 'test-memberlist:MemberList'],
objects=[
'chroma:Namespace',
'pod-watcher:Role',
'memberlists.chroma.cluster:CustomResourceDefinition',
'worker-memberlist:MemberList',

'coordinator-serviceaccount:serviceaccount',
'coordinator-serviceaccount-rolebinding:RoleBinding',
'coordinator-worker-memberlist-binding:clusterrolebinding',

'worker-serviceaccount:serviceaccount',
'worker-serviceaccount-rolebinding:RoleBinding',
'worker-memberlist-readerwriter:ClusterRole',
'worker-worker-memberlist-binding:clusterrolebinding',
'worker-memberlist-readerwriter-binding:clusterrolebinding',

'test-memberlist:MemberList',
'test-memberlist-reader:ClusterRole',
'test-memberlist-reader-binding:ClusterRoleBinding',
],
new_name='k8s_setup',
labels=["infrastructure"]
)
k8s_yaml(['k8s/dev/pulsar.yaml'])
k8s_resource('pulsar', resource_deps=['k8s_setup'], labels=["infrastructure"])
k8s_yaml(['k8s/dev/postgres.yaml'])

# Production Chroma
k8s_resource('postgres', resource_deps=['k8s_setup'], labels=["infrastructure"])
k8s_yaml(['k8s/dev/migration.yaml'])
k8s_resource('pulsar', resource_deps=['k8s_setup'], labels=["infrastructure"], port_forwards=['6650:6650', '8080:8080'])
k8s_resource('migration', resource_deps=['postgres'], labels=["chroma"])
k8s_yaml(['k8s/dev/logservice.yaml'])
k8s_resource('logservice', resource_deps=['migration'], labels=["chroma"])
k8s_resource('pulsar', resource_deps=['k8s_setup'], labels=["infrastructure"], port_forwards=['6650:6650', '8080:8080'])
k8s_yaml(['k8s/dev/server.yaml'])
k8s_resource('server', resource_deps=['pulsar'],labels=["chroma"], port_forwards=8000 )
k8s_yaml(['k8s/dev/coordinator.yaml'])
k8s_resource('frontend-server', resource_deps=['pulsar'],labels=["chroma"], port_forwards=8000 )
k8s_resource('coordinator', resource_deps=['pulsar'], labels=["chroma"], port_forwards=50051)
k8s_yaml(['k8s/dev/worker.yaml'])
k8s_resource('worker', resource_deps=['coordinator'],labels=["chroma"])

# Extra stuff to make debugging and testing easier
k8s_yaml([
'k8s/test/coordinator_service.yaml',
'k8s/test/minio.yaml',
'k8s/test/pulsar_service.yaml',
'k8s/test/worker_service.yaml',
'k8s/test/test_memberlist_cr.yaml',
])
k8s_resource(
objects=[
# I don't know why but Tilt denies the existence of 'coordinator:service' et al
# when you try to add them here.
'worker:service',
],
new_name='debug_setup',
resource_deps=['worker'],
labels=["debug"],
)

# Local S3
k8s_resource('minio-deployment', resource_deps=['k8s_setup'], labels=["debug"], port_forwards=9000)
13 changes: 0 additions & 13 deletions bin/reset.sh

This file was deleted.

48 changes: 0 additions & 48 deletions k8s/cr/worker_memberlist_cr.yaml

This file was deleted.

Loading

0 comments on commit 81ec2f4

Please sign in to comment.