From 5eea95cfbc66e49348a41b118d8d650ac8f91e1d Mon Sep 17 00:00:00 2001 From: sido Date: Mon, 10 Sep 2018 13:51:09 +0200 Subject: [PATCH] added elasticsearch --- molgenis/README.md | 17 +++++++++++++---- molgenis/questions.yml | 14 -------------- molgenis/templates/deployment.yaml | 22 ++++++++++++++++++++++ molgenis/values.yaml | 15 +++++++++++++++ 4 files changed, 50 insertions(+), 18 deletions(-) diff --git a/molgenis/README.md b/molgenis/README.md index a06ef9b..369a68d 100644 --- a/molgenis/README.md +++ b/molgenis/README.md @@ -47,10 +47,22 @@ You can specify credentials for the database scheme by specifying the following - ```molgenis.services.postgres.user: molgenis``` - ```molgenis.services.postgres.password: molgenis``` +To test you can use the **PostgreSQL**-helm chart of Kubernetes and specify these answers: + +```bash +# answers for postgresql chart +postgresUser=molgenis +postgresPassword=molgenis +postgresDatabase=molgenis +persistence.enabled=false +``` + ### OpenCPU You can specify the location of the OpenCPU cluster by specifying this property: - ```molgenis.services.opencpu.host: localhost``` +You can test OpenCPU settings using the **OpenCPU**-helm chart of MOLGENIS. + ## Resources You can specify resources by resource type. There are 3 resource types. - cpu's @@ -66,10 +78,7 @@ Specify memory usage of container: Specify memory usage for Java JVM: - ```molgenis.javaOpts``` - - - - +Select the resources you need dependant on the customer you need to serve. ## Firewall Is defined at cluster level. This chart does not facilitate firewall configuration. diff --git a/molgenis/questions.yml b/molgenis/questions.yml index 0ce20e1..985c1b3 100644 --- a/molgenis/questions.yml +++ b/molgenis/questions.yml @@ -33,20 +33,6 @@ questions: required: true group: "Services" label: OpenCPU cluster -- variable: molgenis.services.elasticsearch.clusterName - default: "molgenis" - description: "Set the index name of MOLGENIS" - type: string - required: true - group: "Services" - label: Elasticsearch clustername -- variable: molgenis.services.elasticsearch.transportAddress - default: "localhost:9300" - description: "Set the transport address for the elasticsearch node communication port and low-level api (which we use)" - type: string - required: true - group: "Services" - label: Elasticsearch transport address - variable: molgenis.services.postgres.host default: "localhost" description: "Set the location of the postgres cluster" diff --git a/molgenis/templates/deployment.yaml b/molgenis/templates/deployment.yaml index 4e740d2..edfc25a 100644 --- a/molgenis/templates/deployment.yaml +++ b/molgenis/templates/deployment.yaml @@ -61,6 +61,28 @@ spec: {{ toYaml .resources | indent 12 }} {{- end }} + - name: elasticsearch + {{- with .Values.elasticsearch }} + image: "{{ .image.repository }}:{{ .image.tag }}" + imagePullPolicy: {{ .image.pullPolicy }} + env: + - name: cluster.name + value: {{ .clusterName }} + - name: bootstrap.memory_lock + value: "true" + - name: ES_JAVA_OPTS + value: "{{ .javaOpts }}" + - name: xpack.security.enabled + value: "false" + - name: discovery.type + value: single-node + ports: + - containerPort: 9200 + - containerPort: 9300 + resources: +{{ toYaml .resources | indent 12 }} + {{- end }} + {{- with .Values.nodeSelector }} nodeSelector: diff --git a/molgenis/values.yaml b/molgenis/values.yaml index e656986..873ef8b 100644 --- a/molgenis/values.yaml +++ b/molgenis/values.yaml @@ -42,6 +42,21 @@ molgenis: user: molgenis password: molgenis +elasticsearch: + image: + repository: docker.elastic.co/elasticsearch/elasticsearch + tag: 5.5.3 + pullPolicy: IfNotPresent + javaOpts: "-Xms512m -Xmx512m" + clusterName: molgenis + resources: + limits: + cpu: 1 + memory: 1500Mi + requests: + cpu: 100m + memory: 1Gi + nodeSelector: {} tolerations: []