NREL / openstudio-server-helm

Helm charts for Kubernetes deployment of OpenStudio Server.
Other
10 stars 11 forks source link

Ability to deploy helm chart on other providers #57

Open GFlechas opened 1 week ago

GFlechas commented 1 week ago

I'd like to deploy OpenStudio Server on a custom Kubernetes cluster. While attempting to set that up using the repo here, I realized the way the current app is written, it has logic throughout checking the provider.

The error I'm encountering is related to the creation of the storageclass, but I suspect there are probably other areas where a similar issue would arise were I to fix that one. The storageclass.yaml appears to check for the provider to configure the storage class, but since my cluster's name doesn't match for google, aws, or azure I get an error.

I'm setting up the cluster using Rancher, so I'm not sure how generalizable this issue is outside this approach. I had OpenStudio Server running in Docker Swarm which works fine, but it looks like a Kubernetes Cluster would provide more robustness even if it's a bit more complicated to get running.

I'm not sure if this is a full feature request, or if it's just a matter of altering a few of the helm's configuration files. Working with Kubernetes is pretty new to me, but I'm happy to make a fork to try setting up these changes myself, with some advice on what files would need updates.

Thanks for any help and guidance.

brianlball commented 1 week ago

Thanks for your interest and starting the conversation. This repo is really designed around setting up k8s deployments on AWS, Google and Azure. In practice, however, we really only use AWS and so those are the charts that we have been updating. We would love a PR that helps create more detailed charts for the other providers. Those platforms have changed so much since this repo was started and many things are not following best practices, out of date, etc.

For non-cloud deployments, we (I) use docker swarm as well. We have done this on Ubuntu / Mac and on Windows using Docker Desktop. It works really well for us and there are custom examples of docker-compose.yml and other ENV settings to improve performance, etc.

That being said, I think it should be possible to setup a local k8s deployment, but I haven't had a chance to do so yet. In the meantime, for more robustness, is there a specific feature you are looking for?

GFlechas commented 1 week ago

I'm pulling together a compute cluster from some unused desktops in our research group. The docker swarm scripts were a great starting point for getting OpenStudio server running on one desktop, however, it doesn't look like swarm is getting much support these days when it comes to multi-node clusters. So I began learning how to set up a Kubernetes cluster, since that appears to be where the space is moving. I think it's more complicated than it needs to be, however using Rancher to manage a multi-node Kubernetes cluster looks easier to manage than a swarm given that it ships with a nice web interface.

So in my mind for robustness, the autoscaling features and way I can add additional nodes to the cluster looks like it's handled better with Kubernetes than with Swarm, but that could be a misunderstanding on my part. I've learned enough to get things running, but am still a novice when it comes to distributed computing.

(I also made an edit to my original post, outlining the storageclass template as the current source of my error trying to spin this up on a custom cluster.)

brianlball commented 1 week ago

I think you can have swarm using multiple nodes. we used to do this on AWS before the k8s deployment. It used to not be available on windows thru docker desktop/engine, but in ubuntu it used to work https://docs.docker.com/engine/swarm/swarm-tutorial/

it would still be valuable to figure out a local equivalent k8s deployment. that would help debug/develop larger AWS, etc k8s deployment functionality.