This Helm chart provides all necessary components for the secured RavenDB cluster. It's very easy to deploy & manage your own RavenDB cluster by using it. You only need a RavenDB license and the setup package.
If you have these, you can jump straight to Installation.
To run this Helm chart you need to acquire RavenDB on-premise license. You can obtain one on https://ravendb.net. Free or Developer license (not for production use) would do as well.
To create RavenDB Setup Package you can use RavenDB Setup Wizard or rvn
command line utility. The rvn utility generates proper Setup Package and values.yaml for you.
Alternatively you could get package via the Setup Wizard or prepare values.yaml yourself, but we highly recommend using the rvn
utility.
Run rvn to generate helm values.yaml and a setup package:
# Scaffold rvn's setup.json file (optional)
rvn init-setup-params -m=[setup-mode] -o ./setup.json
# Create RavenDB Setup Package
rvn create-setup-package -m=[setup-mode] -s="[path/to/create-setup-package-setup.json]" -o=[package output path] --generate-helm-values [yaml output path]
If in doubt try rvn [command] --help
.
You might want to customize generated values.yaml
, you can:
-
Define
storageSize
for each node. -
Provide custom
ingressClassName
(e.g. haproxy...) -
Select desired RavenDB image tag. It is
latest
by default, but we don't recommend using this tag on production (due to its floating nature), tags on DockerHub -
In some cases you might want to edit image pull policy.
-
If you need to put environment variables on your RavenDB container, you can define them in the
environment
map.
# customizable
storageSize: 5Gi
ravenImageTag: latest
imagePullPolicy: IfNotPresent
ingressClassName: nginx
# these values are generated by the script and shouldn't be changed
nodeTags:
- A
- B
- C
domain: "ravendb.poisson.net"
email: [email protected]
setupMode: LetsEncrypt
license: < license json >
# optional, for hackers
environment:
SOME_ENV_VALUE: 'foo'
SOME_OTHER_ENV_VALUE: 'bar'
It must be able to passthrough SSL like Nginx/HAProxy.
Use --enable-ssl-passthrough
option.
If you've deployed k8s nginx before, its dependencies are frequently stored in the 'ingress-nginx' namespace.
You can deploy nginx to k8s using the nginx-ingress-ravendb.yaml
file located in the misc folder, which is preconfigured for default nodes/tags/ports and secured connection.
It is not necessary, but running kubectl delete all --all -n ingress-nginx
should delete all nginx k8s depts before another deployment.
Run kubectl apply -f [path to 'nginx-ingress-ravendb' file]
to either update or install well configured nginx ingress controller locally.
If you want to configure it manually, make sure that...
- ... port 38888 (or your own ServerUrl_Tcp port) is exposed on the nginx controller pod
- ... --enable-ssl-passthrough is set (when working with secured cluster)
Change the ingressClassName
in the values.yaml
, enter your deployed ingress class name.
e.g. ingressClassName: haproxy
Remember to enable SSL passtrough on your ingress controller
https://doc.traefik.io/traefik/routing/routers/#passthrough
https://serversforhackers.com/c/using-ssl-certificates-with-haproxy
via artifacthub.io
helm repo add ravendb https://ravendb.github.io/helm-charts/charts
helm install [your-custom-name] ravendb/ravendb-cluster --set-file package=[setup/package/path] -f [values/yaml/path]
or by cloning the repo
git clone https://github.com/ravendb/helm-charts.git
helm install [name] [chart path] --set-file package=[setup/package/path] -f [values/yaml/path]
The chart is located under the charts/ravendb-cluster
directory.
You can perform rolling update using the rolling-update.sh
script located in the /scripts
directory. Provide desired RavenDB image tag from the DockerHub https://hub.docker.com/r/ravendb/ravendb/tags as the first arg and path to the Helm chart as the second.
./rolling-update.sh latest ~/ravendb-cluster
It'll execute rolling update strategy and update your pods image tags.