added elasticsearch persistence
This commit is contained in:
parent
34c8f048b9
commit
d17c137dd5
|
@ -80,13 +80,27 @@ Specify memory usage for Java JVM:
|
|||
Select the resources you need dependant on the customer you need to serve.
|
||||
|
||||
## Persistence
|
||||
You can define your own volume by enabling persistence on your MOLGENIS instance. You can also choose to retain the volume of the NFS and specify the size of the volume.
|
||||
The following properties will setup the persistence for you.
|
||||
You can enable persistence on your MOLGENIS stack by specifying the following property.
|
||||
|
||||
- ```molgenis.persistence.enabled```
|
||||
- ```molgenis.persistence.retain```
|
||||
- ```persistence.enabled```
|
||||
|
||||
You can also choose to retain the volume of the NFS.
|
||||
- ```persistence.retain```
|
||||
|
||||
The size and claim name can be specified per service. There are now two services that can be persist.
|
||||
|
||||
- MOLGENIS
|
||||
- ElasticSearch
|
||||
|
||||
MOLGENIS persistent properties.
|
||||
- ```molgenis.persistence.claim```
|
||||
- ```molgenis.persistence.size```
|
||||
|
||||
ElasticSearch persistent properties.
|
||||
- ```elasticsearch.persistence.claim```
|
||||
- ```elasticsearch.persistence.size```
|
||||
|
||||
|
||||
### Resolve you persistent volume
|
||||
You do not know which volume is attached to your MOLGENIS instance. You can resolve this by executing:
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ questions:
|
|||
- "1g"
|
||||
- "2g"
|
||||
group: "Resources"
|
||||
- variable: molgenis.persistence.enabled
|
||||
- variable: persistence.enabled
|
||||
default: false
|
||||
description: "Do you want to use persistence"
|
||||
type: boolean
|
||||
|
@ -106,18 +106,26 @@ questions:
|
|||
label: Persistence
|
||||
show_subquestion_if: true
|
||||
subquestions:
|
||||
- variable: persistence.retain
|
||||
default: false
|
||||
description: "Do you want to retain the persistent volume"
|
||||
type: boolean
|
||||
label: Retain volume
|
||||
- variable: molgenis.persistence.size
|
||||
default: "30Gi"
|
||||
description: "Size of MOLGENIS filestore"
|
||||
type: enum
|
||||
options:
|
||||
- "30Gi"
|
||||
- "50Gi"
|
||||
- "100Gi"
|
||||
label: Size filestore
|
||||
- variable: elasticsearch.persistence.size
|
||||
default: "50Gi"
|
||||
description: "Size of MOLGENIS filestore (not the database size)"
|
||||
description: "Size of ElasticSearch data"
|
||||
type: enum
|
||||
options:
|
||||
- "50Gi"
|
||||
- "100Gi"
|
||||
- "200Gi"
|
||||
- "300Gi"
|
||||
label: Size filestore
|
||||
- variable: molgenis.persistence.retain
|
||||
default: false
|
||||
description: "Do you want to retain the persistence volume"
|
||||
type: boolean
|
||||
label: Retain volume
|
||||
label: Size for ElasticSearch data
|
|
@ -49,7 +49,7 @@ spec:
|
|||
value: "-Xmx{{ .javaOpts.maxHeapSpace }} -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled"
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
{{- if .persistence.enabled }}
|
||||
{{- if $.Values.persistence.enabled }}
|
||||
volumeMounts:
|
||||
- name: molgenis-nfs
|
||||
mountPath: /home/molgenis
|
||||
|
@ -92,15 +92,25 @@ spec:
|
|||
ports:
|
||||
- containerPort: 9200
|
||||
- containerPort: 9300
|
||||
{{- if $.Values.persistence.enabled }}
|
||||
volumeMounts:
|
||||
- name: elastic-nfs
|
||||
mountPath: /usr/share/elasticsearch/data
|
||||
{{- end }}
|
||||
|
||||
resources:
|
||||
{{ toYaml .resources | indent 12 }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.molgenis.persistence.enabled }}
|
||||
{{- if .Values.persistence.enabled }}
|
||||
volumes:
|
||||
- name: molgenis-nfs
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.molgenis.persistence.name }}
|
||||
claimName: {{ .Values.molgenis.persistence.claim }}
|
||||
volumes:
|
||||
- name: elasticsearch-nfs
|
||||
persistentVolumeClaim:
|
||||
claimName: {{ .Values.elasticsearch.persistence.claim }}
|
||||
{{- end }}
|
||||
|
||||
{{- with .Values.nodeSelector }}
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
{{- if .Values.persistence.enabled -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ .Values.elasticsearch.persistence.claim }}
|
||||
annotations:
|
||||
{{- if .Values.persistence.retain }}
|
||||
volume.beta.kubernetes.io/storage-class: "nfs-provisioner-retain"
|
||||
{{- else }}
|
||||
volume.beta.kubernetes.io/storage-class: "nfs-provisioner"
|
||||
{{- end }}
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .Values.elasticsearch.persistence.size }}
|
||||
{{- end }}
|
||||
{{- end }}
|
|
@ -1,12 +1,11 @@
|
|||
{{- with .Values.molgenis.persistence }}
|
||||
{{- if .enabled -}}
|
||||
{{- if .Values.persistence.enabled -}}
|
||||
apiVersion: extensions/v1beta1
|
||||
kind: PersistentVolumeClaim
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: {{ .name }}
|
||||
name: {{ .Values.molgenis.persistence.claim }}
|
||||
annotations:
|
||||
{{- if .retain }}
|
||||
{{- if .Values.persistence.retain }}
|
||||
volume.beta.kubernetes.io/storage-class: "nfs-provisioner-retain"
|
||||
{{- else }}
|
||||
volume.beta.kubernetes.io/storage-class: "nfs-provisioner"
|
||||
|
@ -16,6 +15,6 @@ spec:
|
|||
- ReadWriteMany
|
||||
resources:
|
||||
requests:
|
||||
storage: {{ .size }}
|
||||
storage: {{ .Values.molgenis.persistence.size }}
|
||||
{{- end }}
|
||||
{{- end }}
|
|
@ -32,10 +32,8 @@ molgenis:
|
|||
cpu: 200m
|
||||
memory: 1250Mi
|
||||
persistence:
|
||||
enabled: false
|
||||
retain: false
|
||||
name: molgenis-nfs-claim
|
||||
size: 50Gi
|
||||
claim: molgenis-nfs-claim
|
||||
size: 30Gi
|
||||
services:
|
||||
opencpu:
|
||||
host: localhost
|
||||
|
@ -62,6 +60,13 @@ elasticsearch:
|
|||
requests:
|
||||
cpu: 100m
|
||||
memory: 1Gi
|
||||
persistence:
|
||||
claim: elasticsearch-nfs-claim
|
||||
size: 50Gi
|
||||
|
||||
persistence:
|
||||
enabled: false
|
||||
retain: false
|
||||
|
||||
nodeSelector: {
|
||||
deployPod: "true"
|
||||
|
|
Loading…
Reference in New Issue