freedev / solrcloud-zookeeper-kubernetes

Run Solrcloud and Zookeeper in a Kubernetes environment
Apache License 2.0
57 stars 29 forks source link

Scaled Solr #5

Closed piratebriggs closed 5 years ago

piratebriggs commented 5 years ago

Hi,

These changes are a result of a need to host a scaled solr cluster in AKS (Azure K8s). Not all of the changes will be relevant to you repo (e.g. ingress & service account) but I had to make a few changes to move from the single solr instance to three instances which I thought might be useful to you and future peeps who find this repo.

First off, I've not looked at the existing ZooKeeper stuff as I chose to use the canonical version from https://kubernetes.io/docs/tutorials/stateful-application/zookeeper/. This was the inspiration for a lot of the changes I've made in this repo. This spins up an ensemble of three nodes.

I'll quickly go through the interesting changes in this PR:

solr-config.properties

service-solr.yml

statefulset-solr.yml

I've included a shell script for creating my setup on AKS - without the ingress stuff, this should be re-usable. Let me know if you're interested in a tidier version. Also, It'll not work on minikube due to being a single node. Assuming AWS has a default storageClass configured, the volume claim template should work OK but I've only been focused on Azure.

freedev commented 5 years ago

Hi @piratebriggs, thank again for your contribution. I'll appreciate your effort to move this configuration in a multi instances version (solr and zookeeper) I see that you changed solr-config.properties adding a zookeeper ensemble. This would break all existing configurations (minicube, Docker for Desktop, Google Cloud). I'll accept your contribution but I have to preserve existing configuration, we should find a way. What do you suggest?

freedev commented 5 years ago

@piratebriggs thanks for contribution. As said I have to preserve existing configuration for the others Kubernetes Deployment Models. I'll change just a little part of your contribution in order to let everything work.