onyx icon indicating copy to clipboard operation
onyx copied to clipboard

Feature: Support danswer releases through helm charts

Open JayGhiya opened this issue 1 year ago • 23 comments

JayGhiya avatar Jan 20 '24 06:01 JayGhiya

There seems to have been an attempt to do this in https://github.com/danswer-ai/danswer/issues/870 and https://github.com/danswer-ai/danswer/pull/871. But both Issue and PR where closed without merging for some reason

sebracs avatar Jan 22 '24 16:01 sebracs

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

JayGhiya avatar Jan 30 '24 13:01 JayGhiya

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 avatar Feb 01 '24 12:02 JayGhiya

@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 avatar Feb 06 '24 08:02 JayGhiya

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.

JayGhiya avatar Feb 06 '24 08:02 JayGhiya

@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.

sebracs avatar Feb 06 '24 09:02 sebracs

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 avatar Feb 06 '24 10:02 JayGhiya

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

JayGhiya avatar Feb 06 '24 15:02 JayGhiya

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

yuhongsun96 avatar Feb 19 '24 22:02 yuhongsun96

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

oldsj avatar Feb 28 '24 23:02 oldsj

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

sebracs avatar Feb 29 '24 14:02 sebracs

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

JayGhiya avatar Mar 02 '24 07:03 JayGhiya

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

JayGhiya avatar Mar 02 '24 12:03 JayGhiya

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 avatar Mar 04 '24 05:03 JayGhiya

https://github.com/danswer-ai/danswer/pull/1186 . Here is where we are working towards helm chart.

JayGhiya avatar Mar 07 '24 12:03 JayGhiya

@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!

clayrosenthal avatar May 20 '24 20:05 clayrosenthal

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?

logan-hcg avatar May 21 '24 01:05 logan-hcg

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?

JayGhiya avatar May 22 '24 13:05 JayGhiya

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!

yuhongsun96 avatar May 23 '24 04:05 yuhongsun96

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

rajivml avatar May 23 '24 07:05 rajivml

Use 2 weeks one

JayGhiya avatar May 24 '24 10:05 JayGhiya

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 [email protected]:danswer-ai/danswer.git
cd danswer/deployment/kubernetes/charts/danswer-release
helm install danswer .

clayrosenthal avatar May 24 '24 23:05 clayrosenthal

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 [email protected]: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

JayGhiya avatar May 25 '24 04:05 JayGhiya

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

sebracs avatar May 27 '24 08:05 sebracs