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

Feature: Support danswer releases through helm charts #971

Open
JayGhiya opened this issue Jan 20, 2024 · 24 comments
Open

Feature: Support danswer releases through helm charts #971

JayGhiya opened this issue Jan 20, 2024 · 24 comments

Comments

@JayGhiya
Copy link
Contributor

No description provided.

@sebracs
Copy link

sebracs commented Jan 22, 2024

There seems to have been an attempt to do this in #870 and #871. But both Issue and PR where closed without merging for some reason

@JayGhiya
Copy link
Contributor Author

@sebracs understood. let me give it a shot and first release a helm chart without disturbing current github actions.

@JayGhiya
Copy link
Contributor Author

JayGhiya commented Feb 1, 2024

Hey i tried a draft of helm charts. Some problems with vespa stateful set solved some. Some are pending. Right now at an Indian wedding which will last for 4-5 days post that shud be able to complete within 2-3 days. After that regarding github actions for helm chart will trigger it on any of existing github workflow based on docker run to update the image for corresponding modules for helm charts. Please provide feedback for the approach.

@JayGhiya
Copy link
Contributor Author

JayGhiya commented Feb 6, 2024

@sebracs so current issue is both the deployments - api-server-deployment and background-deployment are referring to same persistent volume. so and persistence type is readwriteonce which is causing race condition. the error is -

PreBind plugin "VolumeBinding": Operation cannot be fulfilled on persistentvolumeclaims "dynamic-pvc": the object has been modified; please apply your changes to the latest version and try again

So right now to enable we gotta have right storage class which supports readWriteMany. so doing that right now so that local experience does not break. most of kubernetes cloud providers should have storage class that supports read write many

@JayGhiya
Copy link
Contributor Author

JayGhiya commented Feb 6, 2024

right now it will only work if multiple Pods that mount the same volume are running on the same node. thats a limitation that we need to get rid of. leme know your thoughts.

@sebracs
Copy link

sebracs commented Feb 6, 2024

@JayGhiya Do they need to share storage? If not they could have their own PVCs.
Of course some storage providers do allow RWX (ReadWriteMany) even across multiple nodes, but it's not available everywhere.

@JayGhiya
Copy link
Contributor Author

JayGhiya commented Feb 6, 2024

Yea that is doable if they do not need sharing but right now I am unsure regarding roles and responsibilities of both the components. If I can get clarity on that we could make a decision.

@JayGhiya
Copy link
Contributor Author

JayGhiya commented Feb 6, 2024

@yuhongsun96 do api server deployment and background deployment need to share pvcs or they can use separate ones?

@yuhongsun96
Copy link
Contributor

Sorry for delay, ya unfortunately there are some communications that are done through the file system so currently they must have some shared volumes. This does limit the auto-scaling as it's much easier to run things in a single pod. A more complicated approach is needed to share the pvcs across different pods.

This is not a limitation in the design, only the implementation. We haven't gotten around to fixing it, but will do so hopefully soon

@oldsj
Copy link

oldsj commented Feb 28, 2024

I was able to get it to work following this guide to set up an NFS server and changing the PVCs to ReadWriteMany

  accessModes:
    - ReadWriteMany

@sebracs
Copy link

sebracs commented Feb 29, 2024

Yeah, if you can use ReadWriteMany, it's probably the easiest solution. But of course, it's only supported by specific network file systems and not block devices. At least all the large cloud providers should have it I think

@JayGhiya
Copy link
Contributor Author

JayGhiya commented Mar 2, 2024

yep. understood. apologies for delayed response. will release the charts today.

@JayGhiya
Copy link
Contributor Author

JayGhiya commented Mar 2, 2024

will be releasing through rook ceph storage mechanism so that it works locally and also on bare metal kubernetes clusters.

@JayGhiya
Copy link
Contributor Author

JayGhiya commented Mar 4, 2024

Rook ceph gave a lot of trouble regarding creation of ceph cluster locally on rancher desktop. So switched to openebs based nfs storage. It worked. Final tweaks and our charts Wil be ready to work on local as well as bare metal kubernetes plarforms.

@JayGhiya
Copy link
Contributor Author

JayGhiya commented Mar 7, 2024

#1186 . Here is where we are working towards helm chart.

@clayrosenthal
Copy link
Contributor

@JayGhiya I see you've merged #1186 and #1177 , is there a PR for the documentation on how to use these helm charts? Or are they still a work in progress?

Thanks for your work on this!

@logan-hcg
Copy link

Should the two separate helm charts (https://github.com/danswer-ai/danswer/tree/main/deployment/helm and https://github.com/danswer-ai/danswer/tree/main/deployment/helm) be folded into a single chart? Or is there a reason to keep them separate?

@JayGhiya
Copy link
Contributor Author

JayGhiya commented May 22, 2024

Need to have a pr for documentation. Yes if there are multiple charts they need to be merged into one. Cc: @yuhongsun96 need GitHub actions to host helm charts and then need to add documentation. Do you have some time to connect this week?

@yuhongsun96
Copy link
Contributor

I plan to do some cleaning and merging of the two version of the Charts. Will aim to do it this week hopefully! Thanks everyone for the contributions, insights, and interest!

@rajivml
Copy link

rajivml commented May 23, 2024

I am trying to deploy danswer on AKS and am confused about which helm chart we are supposed to use, one is 2 months old and the other is 2 weeks old .
Can you please suggest which folder we are supposed to use

https://github.com/danswer-ai/danswer/tree/main/deployment/helm
or
https://github.com/danswer-ai/danswer/tree/main/deployment/kubernetes

@JayGhiya
Copy link
Contributor Author

Use 2 weeks one

@clayrosenthal
Copy link
Contributor

So currently if we want to use them, we'd just clone locally them helm install from the local file path? There's no helm repo to add?

ie:

git clone git@github.com:danswer-ai/danswer.git
cd danswer/deployment/kubernetes/charts/danswer-release
helm install danswer .

@JayGhiya
Copy link
Contributor Author

So currently if we want to use them, we'd just clone locally them helm install from the local file path? There's no helm repo to add?

ie:


git clone git@github.com:danswer-ai/danswer.git

cd danswer/deployment/kubernetes/charts/danswer-release

helm install danswer .

Yea there is no helm repo as of now. Need to work on github actions for the same. CC: @yuhongsun9

@sebracs
Copy link

sebracs commented May 27, 2024

Something like this could work if the index.yaml file for the helm repo was added to the charts folder:

helm repo add danswer https://raw.githubusercontent.com/danswer-ai/danswer/main/deployment/kubernetes/charts/
helm repo update
helm install danswer/danswer-stack

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants