From 89b1639449edfc459a41e46755813c425b2e49ff Mon Sep 17 00:00:00 2001 From: sido Date: Fri, 7 Sep 2018 09:50:03 +0200 Subject: [PATCH 01/18] added molgenis production chart --- molgenis-preview/README.md | 7 +- molgenis-preview/test.yaml | 120 ---- molgenis/Chart.yaml | 8 + molgenis/README.md | 12 + molgenis/catalogIcon-molgenis.svg | 1024 ++++++++++++++++++++++++++++ molgenis/questions.yml | 66 ++ molgenis/templates/NOTES.txt | 19 + molgenis/templates/_helpers.tpl | 32 + molgenis/templates/deployment.yaml | 76 +++ molgenis/templates/ingress.yaml | 38 ++ molgenis/templates/service.yaml | 17 + molgenis/values.yaml | 38 ++ 12 files changed, 1336 insertions(+), 121 deletions(-) delete mode 100644 molgenis-preview/test.yaml create mode 100644 molgenis/Chart.yaml create mode 100644 molgenis/README.md create mode 100644 molgenis/catalogIcon-molgenis.svg create mode 100644 molgenis/questions.yml create mode 100644 molgenis/templates/NOTES.txt create mode 100644 molgenis/templates/_helpers.tpl create mode 100644 molgenis/templates/deployment.yaml create mode 100644 molgenis/templates/ingress.yaml create mode 100644 molgenis/templates/service.yaml create mode 100644 molgenis/values.yaml diff --git a/molgenis-preview/README.md b/molgenis-preview/README.md index 25dad2f..1a047bc 100644 --- a/molgenis-preview/README.md +++ b/molgenis-preview/README.md @@ -1,5 +1,5 @@ # MOLGENIS preview -Is used for integration testing purposes. +This chart is used for testing purposes. It can be used by data managers or developers to test MOLGENIS (e.g. integration testing). ## Containers This chart spins up a complete stack to run MOLGENIS. The created containers are: @@ -9,3 +9,8 @@ This chart spins up a complete stack to run MOLGENIS. The created containers are - Elasticsearch - OpenCPU +## Rancher +You can spin up a test instance by navigating to https://rancher.molgenis.org:7777 and login with your LDAP-account. + +Go to the test-environment and click on "Launch". Search for MOLGENIS. + diff --git a/molgenis-preview/test.yaml b/molgenis-preview/test.yaml deleted file mode 100644 index ed0e0fe..0000000 --- a/molgenis-preview/test.yaml +++ /dev/null @@ -1,120 +0,0 @@ -# Source: molgenis/templates/deployment.yaml -apiVersion: apps/v1beta2 -kind: Deployment -metadata: - name: lanky-ragdoll-molgenis - labels: - app: molgenis - chart: molgenis-0.1.0 - release: lanky-ragdoll - heritage: Tiller -spec: - replicas: 1 - selector: - matchLabels: - app: molgenis - release: lanky-ragdoll - template: - metadata: - labels: - app: molgenis - release: lanky-ragdoll - spec: - containers: - - name: molgenis - image: "registry.molgenis.org/molgenis/molgenis-app:latest" - imagePullPolicy: Always - env: - - name: molgenis.home - value: /home/molgenis - - name: opencpu.uri.host - value: opencpu - - name: elasticsearch.transport.addresses - value: elasticsearch:9300 - - name: elasticsearch.cluster.name - value: molgenis - - name: db_uri - value: "jdbc:postgresql://postgres/molgenis" - - name: db_user - value: molgenis - - name: db_password - value: molgenis - - name: admin.password - value: admin - - name: CATALINA_OPTS - value: "-Xmx1g -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled" - ports: - - containerPort: 8080 - livenessProbe: - httpGet: - path: / - port: http - readinessProbe: - httpGet: - path: /api/v2/version - port: http - resources: - limits: - cpu: 1 - memory: 1250Mi - requests: - cpu: 200m - memory: 1Gi - - - - name: elasticsearch - image: "docker.elastic.co/elasticsearch/elasticsearch:5.5.3" - imagePullPolicy: IfNotPresent - env: - - name: cluster.name - value: molgenis - - name: bootstrap.memory_lock - value: true - - name: ES_JAVA_OPTS - value: "-Xms512m -Xmx512m" - - name: xpack.security.enabled - value: false - - name: discovery.type - value: single-node - ports: - - containerPort: 9200 - - containerPort: 9300 - limits: - cpu: 1 - memory: 1500Mi - requests: - cpu: 100m - memory: 1Gi - - - - name: postgres - image: "postgres:9.6-alpine" - imagePullPolicy: IfNotPresent - env: - - name: POSTGRES_USER - value: molgenis - - name: POSTGRES_PASSWORD - value: molgenis - - name: POSTGRES_DB - value: molgenis - ports: - - containerPort: 5432 - limits: - cpu: 1 - memory: 250Mi - requests: - cpu: 100m - memory: 250Mi - - - - name: opencpu - image: "molgenis/opencpu:latest" - imagePullPolicy: Always - ports: - - containerPort: 8004 - limits: - cpu: 1 - memory: 512Mi - requests: - cpu: 100m - memory: 256Mi \ No newline at end of file diff --git a/molgenis/Chart.yaml b/molgenis/Chart.yaml new file mode 100644 index 0000000..8b2e040 --- /dev/null +++ b/molgenis/Chart.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +appVersion: "1.0" +description: A Helm chart for Kubernetes +name: molgenis +version: 0.2.0 +sources: +- https://git.webhosting.rug.nl/molgenis/molgenis-ops-docker-helm.git +icon: https://git.webhosting.rug.nl/molgenis/molgenis-ops-docker-helm/raw/master/molgenis-preview/catalogIcon-molgenis.svg \ No newline at end of file diff --git a/molgenis/README.md b/molgenis/README.md new file mode 100644 index 0000000..f2109c1 --- /dev/null +++ b/molgenis/README.md @@ -0,0 +1,12 @@ +# MOLGENIS +This chart is used for acceptance and production use cases. + +## Containers +This chart spins up a MOLGENIS instance with HTTPD. The created containers are: + +- HTTPD +- MOLGENIS + +## MOLGENIS + +## HTTPD diff --git a/molgenis/catalogIcon-molgenis.svg b/molgenis/catalogIcon-molgenis.svg new file mode 100644 index 0000000..f5e6b5d --- /dev/null +++ b/molgenis/catalogIcon-molgenis.svg @@ -0,0 +1,1024 @@ + + + + diff --git a/molgenis/questions.yml b/molgenis/questions.yml new file mode 100644 index 0000000..f200b2d --- /dev/null +++ b/molgenis/questions.yml @@ -0,0 +1,66 @@ + +categories: +- MOLGENIS +questions: +- variable: ingress.hosts[0].name + default: "test.molgenis.org" + description: "Hostname for your stack" + type: hostname + required: true + group: "Services and Load Balancing" + label: Hostname +- variable: molgenis.image.repository + default: "registry.hub.docker.com" + description: "Select a registry to pull from" + type: enum + options: + - "registry.hub.docker.com" + - "registry.molgenis.org" + required: true + group: "MOLGENIS - Version" + label: Registry +- variable: molgenis.image.tag + default: "stable" + description: "Select a MOLGENIS version" + type: enum + options: + - "latest" + - "stable" + - "7.1-stable" + - "7.0-stable" + required: true + group: "MOLGENIS - Version" + label: Version +- variable: molgenis.resources.limits.cpu + default: 1 + description: "CPU limit for this MOLGENIS instance" + type: enum + options: + - "1" + - "2" + - "3" + - "4" + required: true + group: "MOLGENIS - Resource limits" + label: CPU limit +- variable: molgenis.resources.limits.memory + default: 1250Mi + description: "Memory limit for this MOLGENIS instance" + type: enum + options: + - "1250Mi" + - "1500Mi" + - "2000Mi" + - "2500Mi" + required: true + group: "MOLGENIS - Resource limits" + label: Memory limit +- variable: molgenis.javaOpts + default: "-Xmx1g -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled" + description: "Java runtime options for the MOLGENIS instance" + type: enum + options: + - "-Xmx1g -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled" + - "-Xmx2g -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled" + group: "MOLGENIS - Resource limits" + label: Java memory options diff --git a/molgenis/templates/NOTES.txt b/molgenis/templates/NOTES.txt new file mode 100644 index 0000000..b5a4d24 --- /dev/null +++ b/molgenis/templates/NOTES.txt @@ -0,0 +1,19 @@ +1. Get the application URL by running these commands: +{{- if .Values.ingress.enabled }} +{{- range .Values.ingress.hosts }} + http{{ if $.Values.ingress.tls }}s{{ end }}://{{ . }}{{ $.Values.ingress.path }} +{{- end }} +{{- else if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ template "molgenis.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get svc -w {{ template "molgenis.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ template "molgenis.fullname" . }} -o jsonpath='{.status.loadBalancer.ingress[0].ip}') + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app={{ template "molgenis.name" . }},release={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl port-forward $POD_NAME 8080:80 +{{- end }} diff --git a/molgenis/templates/_helpers.tpl b/molgenis/templates/_helpers.tpl new file mode 100644 index 0000000..e7cf3ea --- /dev/null +++ b/molgenis/templates/_helpers.tpl @@ -0,0 +1,32 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "molgenis.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "molgenis.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "molgenis.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} diff --git a/molgenis/templates/deployment.yaml b/molgenis/templates/deployment.yaml new file mode 100644 index 0000000..1052171 --- /dev/null +++ b/molgenis/templates/deployment.yaml @@ -0,0 +1,76 @@ +apiVersion: apps/v1beta2 +kind: Deployment +metadata: + {{- with .Values.ingress.annotations }} + annotations: +{{ toYaml . | indent 4 }} + {{- end }} + name: {{ template "molgenis.fullname" . }} + labels: + app: {{ template "molgenis.name" . }} + chart: {{ template "molgenis.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + app: {{ template "molgenis.name" . }} + release: {{ .Release.Name }} + template: + metadata: + labels: + app: {{ template "molgenis.name" . }} + release: {{ .Release.Name }} + spec: + containers: + - name: molgenis + {{- with .Values.molgenis }} + image: "{{ .image.repository }}/{{ .image.name }}:{{ .image.tag }}" + imagePullPolicy: {{ .image.pullPolicy }} + env: + - name: molgenis.home + value: /home/molgenis + - name: opencpu.uri.host + value: localhost + - name: elasticsearch.transport.addresses + value: localhost:9300 + - name: elasticsearch.cluster.name + value: {{ $.Values.elasticsearch.clusterName }} + - name: db_uri + value: "jdbc:postgresql://localhost/{{ $.Values.postgres.db }}" + - name: db_user + value: {{ $.Values.postgres.user }} + - name: db_password + value: {{ $.Values.postgres.password }} + - name: admin.password + value: {{ .adminPassword }} + - name: CATALINA_OPTS + value: "{{ .javaOpts }}" + ports: + - containerPort: 8080 +# livenessProbe: +# httpGet: +# path: / +# port: 8080 +# readinessProbe: +# httpGet: +# path: /api/v2/version +# port: 8080 + resources: +{{ toYaml .resources | indent 12 }} + {{- end }} + + + {{- with .Values.nodeSelector }} + nodeSelector: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: +{{ toYaml . | indent 8 }} + {{- end }} + {{- with .Values.tolerations }} + tolerations: +{{ toYaml . | indent 8 }} + {{- end }} diff --git a/molgenis/templates/ingress.yaml b/molgenis/templates/ingress.yaml new file mode 100644 index 0000000..26c3c76 --- /dev/null +++ b/molgenis/templates/ingress.yaml @@ -0,0 +1,38 @@ +{{- if .Values.ingress.enabled -}} +{{- $fullName := include "molgenis.fullname" . -}} +{{- $ingressPath := .Values.ingress.path -}} +apiVersion: extensions/v1beta1 +kind: Ingress +metadata: + name: {{ $fullName }} + labels: + app: {{ template "molgenis.name" . }} + chart: {{ template "molgenis.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +{{- with .Values.ingress.annotations }} + annotations: +{{ toYaml . | indent 4 }} +{{- end }} +spec: +{{- if .Values.ingress.tls }} + tls: + {{- range .Values.ingress.tls }} + - hosts: + {{- range .hosts }} + - {{ . }} + {{- end }} + secretName: {{ .secretName }} + {{- end }} +{{- end }} + rules: + {{- range .Values.ingress.hosts }} + - host: {{ .name }} + http: + paths: + - path: {{ $ingressPath }} + backend: + serviceName: {{ $fullName }} + servicePort: 8080 + {{- end }} +{{- end }} diff --git a/molgenis/templates/service.yaml b/molgenis/templates/service.yaml new file mode 100644 index 0000000..26d1322 --- /dev/null +++ b/molgenis/templates/service.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ template "molgenis.fullname" . }} + labels: + app: {{ template "molgenis.name" . }} + chart: {{ template "molgenis.chart" . }} + release: {{ .Release.Name }} + heritage: {{ .Release.Service }} +spec: + type: {{ .Values.service.type }} + ports: + - name: molgenis + port: {{ .Values.service.port }} + selector: + app: {{ template "molgenis.name" . }} + release: {{ .Release.Name }} diff --git a/molgenis/values.yaml b/molgenis/values.yaml new file mode 100644 index 0000000..c165c5c --- /dev/null +++ b/molgenis/values.yaml @@ -0,0 +1,38 @@ +# Default values for molgenis. + +replicaCount: 1 + +service: + type: LoadBalancer + port: 8080 + +ingress: + enabled: true + annotations: + nginx.ingress.kubernetes.io/proxy-body-size: "0" + path: / + hosts: + - name: test.molgenis.org + tls: [] + +molgenis: + image: + repository: registry.molgenis.org + name: molgenis/molgenis-app + tag: 7.0.0-SNAPSHOT + pullPolicy: Always + adminPassword: admin + javaOpts: "-Xmx1g -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled" + resources: + limits: + cpu: 1 + memory: 1250Mi + requests: + cpu: 200m + memory: 1Gi + +nodeSelector: {} + +tolerations: [] + +affinity: {} From 3d93546b47ae7c829524360b2e6cfc1d38c81178 Mon Sep 17 00:00:00 2001 From: sido Date: Fri, 7 Sep 2018 16:51:41 +0200 Subject: [PATCH 02/18] updated production chart --- molgenis-preview/Chart.yaml | 4 +- molgenis/Chart.yaml | 6 +-- molgenis/README.md | 5 ++- molgenis/questions.yml | 62 +++++++++++++++++++++++++----- molgenis/templates/deployment.yaml | 16 ++++---- molgenis/values.yaml | 13 ++++++- 6 files changed, 81 insertions(+), 25 deletions(-) diff --git a/molgenis-preview/Chart.yaml b/molgenis-preview/Chart.yaml index 8b2e040..4b35807 100644 --- a/molgenis-preview/Chart.yaml +++ b/molgenis-preview/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 appVersion: "1.0" -description: A Helm chart for Kubernetes -name: molgenis +description: MOLGENIS - helm stack for testing purposes +name: molgenis-preview version: 0.2.0 sources: - https://git.webhosting.rug.nl/molgenis/molgenis-ops-docker-helm.git diff --git a/molgenis/Chart.yaml b/molgenis/Chart.yaml index 8b2e040..cfd1ebb 100644 --- a/molgenis/Chart.yaml +++ b/molgenis/Chart.yaml @@ -1,8 +1,8 @@ apiVersion: v1 appVersion: "1.0" -description: A Helm chart for Kubernetes +description: MOLGENIS - helm stack name: molgenis -version: 0.2.0 +version: 0.0.1 sources: - https://git.webhosting.rug.nl/molgenis/molgenis-ops-docker-helm.git -icon: https://git.webhosting.rug.nl/molgenis/molgenis-ops-docker-helm/raw/master/molgenis-preview/catalogIcon-molgenis.svg \ No newline at end of file +icon: https://git.webhosting.rug.nl/molgenis/molgenis-ops-docker-helm/raw/master/molgenis/catalogIcon-molgenis.svg \ No newline at end of file diff --git a/molgenis/README.md b/molgenis/README.md index f2109c1..4cedc28 100644 --- a/molgenis/README.md +++ b/molgenis/README.md @@ -4,9 +4,10 @@ This chart is used for acceptance and production use cases. ## Containers This chart spins up a MOLGENIS instance with HTTPD. The created containers are: -- HTTPD - MOLGENIS ## MOLGENIS -## HTTPD + +## Firewall +Is defined \ No newline at end of file diff --git a/molgenis/questions.yml b/molgenis/questions.yml index f200b2d..107adb8 100644 --- a/molgenis/questions.yml +++ b/molgenis/questions.yml @@ -17,20 +17,64 @@ questions: - "registry.hub.docker.com" - "registry.molgenis.org" required: true - group: "MOLGENIS - Version" + group: "MOLGENIS" label: Registry - variable: molgenis.image.tag default: "stable" - description: "Select a MOLGENIS version" - type: enum - options: - - "latest" - - "stable" - - "7.1-stable" - - "7.0-stable" + description: "Select a MOLGENIS version (check the registry.molgenis.org or hub.docker.com for other tags)" + type: string required: true - group: "MOLGENIS - Version" + group: "MOLGENIS" label: Version +- variable: molgenis.services.opencpu.uriHost + default: "" + description: "Specify the OpenCPU cluster" + type: string + required: true + group: "MOLGENIS" + label: OpenCPU cluster +- variable: molgenis.services.elasticsearch.clusterName + default: "molgenis" + description: "Set the index name of MOLGENIS" + type: string + required: true + group: "MOLGENIS" + 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: "MOLGENIS" + label: Elasticsearch transport address +- variable: molgenis.services.postgres.host + default: "localhost" + description: "Set the location of the postgres cluster" + type: string + required: true + group: "MOLGENIS" + label: Postgres cluster location +- variable: molgenis.services.postgres.scheme + default: "molgenis" + description: "Set the database scheme" + type: string + required: true + group: "MOLGENIS" + label: Database scheme +- variable: molgenis.services.postgres.user + default: "molgenis" + description: "Set user of the database scheme" + type: string + required: true + group: "MOLGENIS" + label: Database username +- variable: molgenis.services.postgres.password + default: "molgenis" + description: "Set the password of the database scheme" + type: string + required: true + group: "MOLGENIS" + label: Database password - variable: molgenis.resources.limits.cpu default: 1 description: "CPU limit for this MOLGENIS instance" diff --git a/molgenis/templates/deployment.yaml b/molgenis/templates/deployment.yaml index 1052171..c58e765 100644 --- a/molgenis/templates/deployment.yaml +++ b/molgenis/templates/deployment.yaml @@ -26,27 +26,27 @@ spec: containers: - name: molgenis {{- with .Values.molgenis }} - image: "{{ .image.repository }}/{{ .image.name }}:{{ .image.tag }}" + image: {{ .image.repository }}/{{ .image.name }}:{{ .image.tag }} imagePullPolicy: {{ .image.pullPolicy }} env: - name: molgenis.home value: /home/molgenis - name: opencpu.uri.host - value: localhost + value: {{ .services.opencpu.uriHost }} - name: elasticsearch.transport.addresses - value: localhost:9300 + value: {{ .services.elasticsearch.transportAddresses }} - name: elasticsearch.cluster.name - value: {{ $.Values.elasticsearch.clusterName }} + value: {{ .services.elasticsearch.clusterName }} - name: db_uri - value: "jdbc:postgresql://localhost/{{ $.Values.postgres.db }}" + value: jdbc:postgresql://{{ .services.postgres.host }}/{{ .services.postgres.scheme }} - name: db_user - value: {{ $.Values.postgres.user }} + value: {{ .services.postgres.user }} - name: db_password - value: {{ $.Values.postgres.password }} + value: {{ .services.postgres.password }} - name: admin.password value: {{ .adminPassword }} - name: CATALINA_OPTS - value: "{{ .javaOpts }}" + value: {{ .javaOpts }} ports: - containerPort: 8080 # livenessProbe: diff --git a/molgenis/values.yaml b/molgenis/values.yaml index c165c5c..0b6ec88 100644 --- a/molgenis/values.yaml +++ b/molgenis/values.yaml @@ -19,7 +19,7 @@ molgenis: image: repository: registry.molgenis.org name: molgenis/molgenis-app - tag: 7.0.0-SNAPSHOT + tag: stable pullPolicy: Always adminPassword: admin javaOpts: "-Xmx1g -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled" @@ -30,6 +30,17 @@ molgenis: requests: cpu: 200m memory: 1Gi + services: + opencpu: + uriHost: localhost + elasticsearch: + transportAddresses: localhost:9300 + clusterName: molgenis + postgres: + host: localhost + scheme: molgenis + user: molgenis + password: molgenis nodeSelector: {} From 793cf80820c2d8bba1dff209dc0ad625d1874926 Mon Sep 17 00:00:00 2001 From: sido Date: Mon, 10 Sep 2018 11:32:14 +0200 Subject: [PATCH 03/18] updated README and questions.yml --- molgenis/README.md | 66 +++++++++++++++++++++++++++++- molgenis/questions.yml | 28 ++++++------- molgenis/templates/deployment.yaml | 2 +- molgenis/values.yaml | 2 +- 4 files changed, 80 insertions(+), 18 deletions(-) diff --git a/molgenis/README.md b/molgenis/README.md index 4cedc28..a06ef9b 100644 --- a/molgenis/README.md +++ b/molgenis/README.md @@ -6,8 +6,70 @@ This chart spins up a MOLGENIS instance with HTTPD. The created containers are: - MOLGENIS -## MOLGENIS +## Versions +You can choose from which registry you want to pull from. There are 2: +- https://registry.molgenis.org +- https://hub.docker.com + +The registry.molgenis.org contains the bleeding edge versions (PR's and master merges). The hub.docker.com contains the released artifacts (MOLGENIS releases and release candidates). + +The three properties you need to specify are: +- ```molgenis.image.repository``` +- ```molgenis.image.name``` +- ```molgenis.image.tag``` + +## Services +When you start MOLGENIS you need: +- an elasticsearch instance (5.5.6) +- an postgres instance (9.6) + +You can attach additional services like: +- an opencpu instance + +### Elasticsearch +You can configure elasticsearch by giving in the cluster location. + +To configure the transport address you can address the node communication channel but also the native JAVA API. Which MOLGENIS uses to communicate with Elasticsearch. +From Elasticsearch version 6 and further the JAVA API is not supported anymore. At this moment you can only use Elastic instance till major version 5. +- ```molgenis.services.elasticsearch.transportAddresses: localhost:9300``` + +To configure the index on a Elasticsearch cluster you can specify the clusterName property. +- ```molgenis.services.elasticsearch.clusterName: molgenis``` + +### Postgres +You can specify the location of the postgres instance by specify the following property: +- ```molgenis.services.postgres.host: localhost``` + +You can specify the schema by filling out this property: +- ```molgenis.services.postgres.scheme: molgenis``` + +You can specify credentials for the database scheme by specifying the following properties: +- ```molgenis.services.postgres.user: molgenis``` +- ```molgenis.services.postgres.password: molgenis``` + +### OpenCPU +You can specify the location of the OpenCPU cluster by specifying this property: +- ```molgenis.services.opencpu.host: localhost``` + +## Resources +You can specify resources by resource type. There are 3 resource types. +- cpu's +- memory of container +- memory of JVM + +Specify number of cpu's: +- ```molgenis.resources.limits.cpu``` + +Specify memory usage of container: +- ```molgenis.resources.limits.memory``` + +Specify memory usage for Java JVM: +- ```molgenis.javaOpts``` + + + + ## Firewall -Is defined \ No newline at end of file +Is defined at cluster level. This chart does not facilitate firewall configuration. diff --git a/molgenis/questions.yml b/molgenis/questions.yml index 107adb8..bb54ba9 100644 --- a/molgenis/questions.yml +++ b/molgenis/questions.yml @@ -7,7 +7,7 @@ questions: description: "Hostname for your stack" type: hostname required: true - group: "Services and Load Balancing" + group: "Load Balancing" label: Hostname - variable: molgenis.image.repository default: "registry.hub.docker.com" @@ -17,63 +17,63 @@ questions: - "registry.hub.docker.com" - "registry.molgenis.org" required: true - group: "MOLGENIS" + group: "Version" label: Registry - variable: molgenis.image.tag default: "stable" description: "Select a MOLGENIS version (check the registry.molgenis.org or hub.docker.com for other tags)" type: string required: true - group: "MOLGENIS" + group: "Version" label: Version -- variable: molgenis.services.opencpu.uriHost +- variable: molgenis.services.opencpu.host default: "" description: "Specify the OpenCPU cluster" type: string required: true - group: "MOLGENIS" + group: "Services" label: OpenCPU cluster - variable: molgenis.services.elasticsearch.clusterName default: "molgenis" description: "Set the index name of MOLGENIS" type: string required: true - group: "MOLGENIS" + 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: "MOLGENIS" + group: "Services" label: Elasticsearch transport address - variable: molgenis.services.postgres.host default: "localhost" description: "Set the location of the postgres cluster" type: string required: true - group: "MOLGENIS" + group: "Services" label: Postgres cluster location - variable: molgenis.services.postgres.scheme default: "molgenis" description: "Set the database scheme" type: string required: true - group: "MOLGENIS" + group: "Services" label: Database scheme - variable: molgenis.services.postgres.user default: "molgenis" description: "Set user of the database scheme" type: string required: true - group: "MOLGENIS" + group: "Services" label: Database username - variable: molgenis.services.postgres.password default: "molgenis" description: "Set the password of the database scheme" type: string required: true - group: "MOLGENIS" + group: "Services" label: Database password - variable: molgenis.resources.limits.cpu default: 1 @@ -85,7 +85,7 @@ questions: - "3" - "4" required: true - group: "MOLGENIS - Resource limits" + group: "Resources" label: CPU limit - variable: molgenis.resources.limits.memory default: 1250Mi @@ -97,7 +97,7 @@ questions: - "2000Mi" - "2500Mi" required: true - group: "MOLGENIS - Resource limits" + group: "Resources" label: Memory limit - variable: molgenis.javaOpts default: "-Xmx1g -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled" @@ -106,5 +106,5 @@ questions: options: - "-Xmx1g -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled" - "-Xmx2g -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled" - group: "MOLGENIS - Resource limits" + group: "Resources" label: Java memory options diff --git a/molgenis/templates/deployment.yaml b/molgenis/templates/deployment.yaml index c58e765..4e740d2 100644 --- a/molgenis/templates/deployment.yaml +++ b/molgenis/templates/deployment.yaml @@ -32,7 +32,7 @@ spec: - name: molgenis.home value: /home/molgenis - name: opencpu.uri.host - value: {{ .services.opencpu.uriHost }} + value: {{ .services.opencpu.host }} - name: elasticsearch.transport.addresses value: {{ .services.elasticsearch.transportAddresses }} - name: elasticsearch.cluster.name diff --git a/molgenis/values.yaml b/molgenis/values.yaml index 0b6ec88..e656986 100644 --- a/molgenis/values.yaml +++ b/molgenis/values.yaml @@ -32,7 +32,7 @@ molgenis: memory: 1Gi services: opencpu: - uriHost: localhost + host: localhost elasticsearch: transportAddresses: localhost:9300 clusterName: molgenis From d4307ab3b2c5774df80d6dd797073a3e0f5946c3 Mon Sep 17 00:00:00 2001 From: sido Date: Mon, 10 Sep 2018 11:34:51 +0200 Subject: [PATCH 04/18] updated version to BETA status --- molgenis/Chart.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/molgenis/Chart.yaml b/molgenis/Chart.yaml index cfd1ebb..6119ca8 100644 --- a/molgenis/Chart.yaml +++ b/molgenis/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v1 appVersion: "1.0" -description: MOLGENIS - helm stack -name: molgenis +description: MOLGENIS - helm stack (in BETA) +name: molgenis-beta version: 0.0.1 sources: - https://git.webhosting.rug.nl/molgenis/molgenis-ops-docker-helm.git From b383cc451777a2318cf0cf3a998b1e8fdf19760a Mon Sep 17 00:00:00 2001 From: sido Date: Mon, 10 Sep 2018 11:38:51 +0200 Subject: [PATCH 05/18] added default value for opencpu cluster --- molgenis/questions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/molgenis/questions.yml b/molgenis/questions.yml index bb54ba9..0ce20e1 100644 --- a/molgenis/questions.yml +++ b/molgenis/questions.yml @@ -27,7 +27,7 @@ questions: group: "Version" label: Version - variable: molgenis.services.opencpu.host - default: "" + default: "localhost" description: "Specify the OpenCPU cluster" type: string required: true From 5eea95cfbc66e49348a41b118d8d650ac8f91e1d Mon Sep 17 00:00:00 2001 From: sido Date: Mon, 10 Sep 2018 13:51:09 +0200 Subject: [PATCH 06/18] 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: [] From 4de20d9bd6ceaca08869b2602178cd81c47220b9 Mon Sep 17 00:00:00 2001 From: sido Date: Mon, 10 Sep 2018 15:21:10 +0200 Subject: [PATCH 07/18] add liveness probes --- molgenis/templates/deployment.yaml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/molgenis/templates/deployment.yaml b/molgenis/templates/deployment.yaml index edfc25a..f809088 100644 --- a/molgenis/templates/deployment.yaml +++ b/molgenis/templates/deployment.yaml @@ -49,14 +49,14 @@ spec: value: {{ .javaOpts }} ports: - containerPort: 8080 -# livenessProbe: -# httpGet: -# path: / -# port: 8080 -# readinessProbe: -# httpGet: -# path: /api/v2/version -# port: 8080 + livenessProbe: + httpGet: + path: / + port: 8080 + readinessProbe: + httpGet: + path: /api/v2/version + port: 8080 resources: {{ toYaml .resources | indent 12 }} {{- end }} From e0f5d400841cade5212b40c347cc05dc42f6ed55 Mon Sep 17 00:00:00 2001 From: sido Date: Mon, 10 Sep 2018 15:23:12 +0200 Subject: [PATCH 08/18] added postgrescluster to chart --- molgenis/questions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/molgenis/questions.yml b/molgenis/questions.yml index 985c1b3..475c8bd 100644 --- a/molgenis/questions.yml +++ b/molgenis/questions.yml @@ -34,7 +34,7 @@ questions: group: "Services" label: OpenCPU cluster - variable: molgenis.services.postgres.host - default: "localhost" + default: "postgresql.molgenis-postgresql.svc" description: "Set the location of the postgres cluster" type: string required: true From 38f89721e7ab1b3205278734a44deb0a8c01d476 Mon Sep 17 00:00:00 2001 From: sido Date: Mon, 10 Sep 2018 16:46:13 +0200 Subject: [PATCH 09/18] preview rbac config deleted --- rbac-config.yml | 18 ------------------ 1 file changed, 18 deletions(-) delete mode 100644 rbac-config.yml diff --git a/rbac-config.yml b/rbac-config.yml deleted file mode 100644 index c5ae63a..0000000 --- a/rbac-config.yml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -kind: ServiceAccount -metadata: - name: tiller - namespace: kube-system ---- -apiVersion: rbac.authorization.k8s.io/v1beta1 -kind: ClusterRoleBinding -metadata: - name: tiller -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: cluster-admin -subjects: - - kind: ServiceAccount - name: tiller - namespace: kube-system From 9d807d28fc00c7d973d8d36d5e1c6b02fc2e1054 Mon Sep 17 00:00:00 2001 From: sido Date: Mon, 10 Sep 2018 17:38:50 +0200 Subject: [PATCH 10/18] updated start times of liveness probe --- molgenis/templates/deployment.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/molgenis/templates/deployment.yaml b/molgenis/templates/deployment.yaml index f809088..a718bba 100644 --- a/molgenis/templates/deployment.yaml +++ b/molgenis/templates/deployment.yaml @@ -53,10 +53,14 @@ spec: httpGet: path: / port: 8080 + initialDelaySeconds: 180 + periodSeconds: 5 readinessProbe: httpGet: path: /api/v2/version port: 8080 + initialDelaySeconds: 180 + periodSeconds: 5 resources: {{ toYaml .resources | indent 12 }} {{- end }} From fc7c564e44715c34982ccecb4d0c360f34ce9fd0 Mon Sep 17 00:00:00 2001 From: sido Date: Tue, 11 Sep 2018 12:25:28 +0200 Subject: [PATCH 11/18] optimized memory limits and removed cpu limit --- molgenis/questions.yml | 34 +++++++++--------------------- molgenis/templates/deployment.yaml | 2 +- molgenis/values.yaml | 11 +++++----- 3 files changed, 17 insertions(+), 30 deletions(-) diff --git a/molgenis/questions.yml b/molgenis/questions.yml index 475c8bd..9712fae 100644 --- a/molgenis/questions.yml +++ b/molgenis/questions.yml @@ -20,8 +20,8 @@ questions: group: "Version" label: Registry - variable: molgenis.image.tag - default: "stable" - description: "Select a MOLGENIS version (check the registry.molgenis.org or hub.docker.com for other tags)" + default: "" + description: "Select a MOLGENIS version (check the registry.molgenis.org or hub.docker.com for released tags)" type: string required: true group: "Version" @@ -61,36 +61,22 @@ questions: required: true group: "Services" label: Database password -- variable: molgenis.resources.limits.cpu - default: 1 - description: "CPU limit for this MOLGENIS instance" - type: enum - options: - - "1" - - "2" - - "3" - - "4" - required: true - group: "Resources" - label: CPU limit - variable: molgenis.resources.limits.memory default: 1250Mi - description: "Memory limit for this MOLGENIS instance" + description: "Memory limit for this MOLGENIS container" type: enum options: - "1250Mi" - - "1500Mi" - - "2000Mi" - "2500Mi" required: true group: "Resources" - label: Memory limit -- variable: molgenis.javaOpts - default: "-Xmx1g -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled" - description: "Java runtime options for the MOLGENIS instance" + label: Container memory limit +- variable: molgenis.javaOpts.maxHeapSpace + default: "1g" + description: "Maximum heap space MOLGENIS container JVM. Please not this should fit in your container memory limit" type: enum options: - - "-Xmx1g -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled" - - "-Xmx2g -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled" + - "1g" + - "2g" group: "Resources" - label: Java memory options + label: Maximum heap space diff --git a/molgenis/templates/deployment.yaml b/molgenis/templates/deployment.yaml index a718bba..2290ad8 100644 --- a/molgenis/templates/deployment.yaml +++ b/molgenis/templates/deployment.yaml @@ -46,7 +46,7 @@ spec: - name: admin.password value: {{ .adminPassword }} - name: CATALINA_OPTS - value: {{ .javaOpts }} + value: "-Xmx{{ .javaOpts.maxHeapSpace }} -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled" ports: - containerPort: 8080 livenessProbe: diff --git a/molgenis/values.yaml b/molgenis/values.yaml index 873ef8b..844547e 100644 --- a/molgenis/values.yaml +++ b/molgenis/values.yaml @@ -17,12 +17,13 @@ ingress: molgenis: image: - repository: registry.molgenis.org + repository: registry.hub.docker.com name: molgenis/molgenis-app tag: stable pullPolicy: Always adminPassword: admin - javaOpts: "-Xmx1g -XX:+UseConcMarkSweepGC -XX:+CMSClassUnloadingEnabled" + javaOpts: + maxHeapSpace: "1g" resources: limits: cpu: 1 @@ -47,12 +48,12 @@ elasticsearch: repository: docker.elastic.co/elasticsearch/elasticsearch tag: 5.5.3 pullPolicy: IfNotPresent - javaOpts: "-Xms512m -Xmx512m" + javaOpts: "-Xms1024m -Xmx1024m" clusterName: molgenis resources: limits: - cpu: 1 - memory: 1500Mi + cpu: 2 + memory: 3Gi requests: cpu: 100m memory: 1Gi From 36f6a242c69fc69c68165286eb92419595349509 Mon Sep 17 00:00:00 2001 From: sido Date: Tue, 11 Sep 2018 12:36:57 +0200 Subject: [PATCH 12/18] updated memory reservation of MOLGENIS container and updated notation of memory elastic --- molgenis/README.md | 10 +++------- molgenis/questions.yml | 14 ++++++++++++-- molgenis/values.yaml | 4 ++-- 3 files changed, 17 insertions(+), 11 deletions(-) diff --git a/molgenis/README.md b/molgenis/README.md index 369a68d..c189ebc 100644 --- a/molgenis/README.md +++ b/molgenis/README.md @@ -64,19 +64,15 @@ You can specify the location of the OpenCPU cluster by specifying this property: 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 +You can specify resources by resource type. There are 2 resource types. - memory of container -- memory of JVM - -Specify number of cpu's: -- ```molgenis.resources.limits.cpu``` +- maximum heap space JVM Specify memory usage of container: - ```molgenis.resources.limits.memory``` Specify memory usage for Java JVM: -- ```molgenis.javaOpts``` +- ```molgenis.javaOpts.maxHeapSpace``` Select the resources you need dependant on the customer you need to serve. diff --git a/molgenis/questions.yml b/molgenis/questions.yml index 9712fae..445b12a 100644 --- a/molgenis/questions.yml +++ b/molgenis/questions.yml @@ -70,7 +70,17 @@ questions: - "2500Mi" required: true group: "Resources" - label: Container memory limit + label: Container memory reservation +- variable: molgenis.resources.requests.memory + default: 1250Mi + description: "Memory reservation for this MOLGENIS container" + type: enum + options: + - "1250Mi" + - "2500Mi" + required: true + group: "Resources" + label: Container memory reservation - variable: molgenis.javaOpts.maxHeapSpace default: "1g" description: "Maximum heap space MOLGENIS container JVM. Please not this should fit in your container memory limit" @@ -79,4 +89,4 @@ questions: - "1g" - "2g" group: "Resources" - label: Maximum heap space + label: Maximum heap space (JVM) diff --git a/molgenis/values.yaml b/molgenis/values.yaml index 844547e..f1e2622 100644 --- a/molgenis/values.yaml +++ b/molgenis/values.yaml @@ -30,7 +30,7 @@ molgenis: memory: 1250Mi requests: cpu: 200m - memory: 1Gi + memory: 1250Mi services: opencpu: host: localhost @@ -48,7 +48,7 @@ elasticsearch: repository: docker.elastic.co/elasticsearch/elasticsearch tag: 5.5.3 pullPolicy: IfNotPresent - javaOpts: "-Xms1024m -Xmx1024m" + javaOpts: "-Xms1g -Xmx1g" clusterName: molgenis resources: limits: From 71e59f76391d818e3d2225dc8449165489634f52 Mon Sep 17 00:00:00 2001 From: sido Date: Tue, 11 Sep 2018 12:38:21 +0200 Subject: [PATCH 13/18] bumped version to 0.1.0 --- molgenis/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/molgenis/Chart.yaml b/molgenis/Chart.yaml index 6119ca8..e60f8cc 100644 --- a/molgenis/Chart.yaml +++ b/molgenis/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v1 appVersion: "1.0" description: MOLGENIS - helm stack (in BETA) name: molgenis-beta -version: 0.0.1 +version: 0.1.0 sources: - https://git.webhosting.rug.nl/molgenis/molgenis-ops-docker-helm.git icon: https://git.webhosting.rug.nl/molgenis/molgenis-ops-docker-helm/raw/master/molgenis/catalogIcon-molgenis.svg \ No newline at end of file From 6f4f98c09102c6c80fd9dbe1d47500b5596f5941 Mon Sep 17 00:00:00 2001 From: sido Date: Tue, 11 Sep 2018 12:41:56 +0200 Subject: [PATCH 14/18] updated questions --- molgenis/questions.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/molgenis/questions.yml b/molgenis/questions.yml index 445b12a..03bec0a 100644 --- a/molgenis/questions.yml +++ b/molgenis/questions.yml @@ -3,13 +3,14 @@ categories: - MOLGENIS questions: - variable: ingress.hosts[0].name + label: Hostname default: "test.molgenis.org" description: "Hostname for your stack" type: hostname required: true group: "Load Balancing" - label: Hostname - variable: molgenis.image.repository + label: Registry default: "registry.hub.docker.com" description: "Select a registry to pull from" type: enum @@ -18,50 +19,50 @@ questions: - "registry.molgenis.org" required: true group: "Version" - label: Registry - variable: molgenis.image.tag + label: Version default: "" description: "Select a MOLGENIS version (check the registry.molgenis.org or hub.docker.com for released tags)" type: string required: true group: "Version" - label: Version - variable: molgenis.services.opencpu.host + label: OpenCPU cluster default: "localhost" description: "Specify the OpenCPU cluster" type: string required: true group: "Services" - label: OpenCPU cluster - variable: molgenis.services.postgres.host + label: Postgres cluster location default: "postgresql.molgenis-postgresql.svc" description: "Set the location of the postgres cluster" type: string required: true group: "Services" - label: Postgres cluster location - variable: molgenis.services.postgres.scheme + label: Database scheme default: "molgenis" description: "Set the database scheme" type: string required: true group: "Services" - label: Database scheme - variable: molgenis.services.postgres.user + label: Database username default: "molgenis" description: "Set user of the database scheme" type: string required: true group: "Services" - label: Database username - variable: molgenis.services.postgres.password + label: Database password default: "molgenis" description: "Set the password of the database scheme" type: string required: true group: "Services" - label: Database password - variable: molgenis.resources.limits.memory + label: Container memory limit default: 1250Mi description: "Memory limit for this MOLGENIS container" type: enum @@ -70,8 +71,8 @@ questions: - "2500Mi" required: true group: "Resources" - label: Container memory reservation - variable: molgenis.resources.requests.memory + label: Container memory reservation default: 1250Mi description: "Memory reservation for this MOLGENIS container" type: enum @@ -80,13 +81,12 @@ questions: - "2500Mi" required: true group: "Resources" - label: Container memory reservation - variable: molgenis.javaOpts.maxHeapSpace + label: Maximum heap space (JVM) default: "1g" description: "Maximum heap space MOLGENIS container JVM. Please not this should fit in your container memory limit" type: enum options: - "1g" - "2g" - group: "Resources" - label: Maximum heap space (JVM) + group: "Resources" \ No newline at end of file From bf770cc05e4c36dc2a2017ee4a80d55365596214 Mon Sep 17 00:00:00 2001 From: sido Date: Tue, 11 Sep 2018 12:57:40 +0200 Subject: [PATCH 15/18] added thresholds to readiness and liveness probes --- molgenis/templates/deployment.yaml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/molgenis/templates/deployment.yaml b/molgenis/templates/deployment.yaml index 2290ad8..f7aa0f0 100644 --- a/molgenis/templates/deployment.yaml +++ b/molgenis/templates/deployment.yaml @@ -53,14 +53,18 @@ spec: httpGet: path: / port: 8080 - initialDelaySeconds: 180 + initialDelaySeconds: 60 periodSeconds: 5 + failureThreshold: 15 + successThreshold: 1 readinessProbe: httpGet: path: /api/v2/version port: 8080 - initialDelaySeconds: 180 - periodSeconds: 5 + initialDelaySeconds: 120 + periodSeconds: 30 + failureThreshold: 3 + successThreshold: 1 resources: {{ toYaml .resources | indent 12 }} {{- end }} From f1d4a6ee3b95b06aff96cb18a326b4c57826c5b6 Mon Sep 17 00:00:00 2001 From: sido Date: Tue, 11 Sep 2018 13:04:28 +0200 Subject: [PATCH 16/18] specify administrator password --- molgenis/README.md | 11 ++++++++--- molgenis/questions.yml | 11 +++++++++-- molgenis/values.yaml | 2 +- 3 files changed, 18 insertions(+), 6 deletions(-) diff --git a/molgenis/README.md b/molgenis/README.md index c189ebc..77fd852 100644 --- a/molgenis/README.md +++ b/molgenis/README.md @@ -6,8 +6,8 @@ This chart spins up a MOLGENIS instance with HTTPD. The created containers are: - MOLGENIS -## Versions -You can choose from which registry you want to pull from. There are 2: +## Provisioning +You can choose from which registry you want to pull. There are 2 registries: - https://registry.molgenis.org - https://hub.docker.com @@ -17,7 +17,12 @@ The three properties you need to specify are: - ```molgenis.image.repository``` - ```molgenis.image.name``` - ```molgenis.image.tag``` - + +Besides determining which image you want to pull, you also have to set an administrator password. You can do this by specifying the following property. +- ```molgenis.adminPassword``` + +If you do not specify a password. You can find a one time password in the MOLGENIS container logging. + ## Services When you start MOLGENIS you need: - an elasticsearch instance (5.5.6) diff --git a/molgenis/questions.yml b/molgenis/questions.yml index 03bec0a..7bfb071 100644 --- a/molgenis/questions.yml +++ b/molgenis/questions.yml @@ -18,14 +18,21 @@ questions: - "registry.hub.docker.com" - "registry.molgenis.org" required: true - group: "Version" + group: "Provisioning" - variable: molgenis.image.tag label: Version default: "" description: "Select a MOLGENIS version (check the registry.molgenis.org or hub.docker.com for released tags)" type: string required: true - group: "Version" + group: "Provisioning" +- variable: molgenis.adminPassword + label: Administrator password + default: "" + description: "Enter an administrator password" + type: password + required: false + group: "Provisioning" - variable: molgenis.services.opencpu.host label: OpenCPU cluster default: "localhost" diff --git a/molgenis/values.yaml b/molgenis/values.yaml index f1e2622..86d3cc1 100644 --- a/molgenis/values.yaml +++ b/molgenis/values.yaml @@ -21,7 +21,7 @@ molgenis: name: molgenis/molgenis-app tag: stable pullPolicy: Always - adminPassword: admin + adminPassword: javaOpts: maxHeapSpace: "1g" resources: From 69d3698efb1dd394605281031950f74a1ce9fd86 Mon Sep 17 00:00:00 2001 From: sido Date: Tue, 11 Sep 2018 13:05:45 +0200 Subject: [PATCH 17/18] set password required --- molgenis/README.md | 2 -- molgenis/questions.yml | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/molgenis/README.md b/molgenis/README.md index 77fd852..c85b200 100644 --- a/molgenis/README.md +++ b/molgenis/README.md @@ -21,8 +21,6 @@ The three properties you need to specify are: Besides determining which image you want to pull, you also have to set an administrator password. You can do this by specifying the following property. - ```molgenis.adminPassword``` -If you do not specify a password. You can find a one time password in the MOLGENIS container logging. - ## Services When you start MOLGENIS you need: - an elasticsearch instance (5.5.6) diff --git a/molgenis/questions.yml b/molgenis/questions.yml index 7bfb071..27dbee5 100644 --- a/molgenis/questions.yml +++ b/molgenis/questions.yml @@ -31,7 +31,7 @@ questions: default: "" description: "Enter an administrator password" type: password - required: false + required: true group: "Provisioning" - variable: molgenis.services.opencpu.host label: OpenCPU cluster From dc270c1f65f9f66cabfb40614e308dc0d151916c Mon Sep 17 00:00:00 2001 From: sido Date: Tue, 11 Sep 2018 13:30:43 +0200 Subject: [PATCH 18/18] updated threshold to 25 because instant rebooting --- molgenis/templates/deployment.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/molgenis/templates/deployment.yaml b/molgenis/templates/deployment.yaml index f7aa0f0..9d4b356 100644 --- a/molgenis/templates/deployment.yaml +++ b/molgenis/templates/deployment.yaml @@ -55,7 +55,7 @@ spec: port: 8080 initialDelaySeconds: 60 periodSeconds: 5 - failureThreshold: 15 + failureThreshold: 25 successThreshold: 1 readinessProbe: httpGet: