Merge branch 'add-opencpu-chart' of p281392/molgenis-ops-docker-helm into master

This commit is contained in:
Fleur Kelpin authored and Gogs committed 2018-09-26 10:34:48 +02:00
commit 95dc0acabd
10 files changed
+260

No files matched your search

+21
View File
@@ -0,0 +1,21 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*~
# Various IDEs
.project
.idea/
*.tmproj
+8
View File
@@ -0,0 +1,8 @@
apiVersion: v1
appVersion: "1.0"
description: Opencpu stack for MOLGENIS
name: molgenis-opencpu
version: 0.1.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-opencpu/catalogIcon-molgenis-opencpu.svg
+38
View File
@@ -0,0 +1,38 @@
# MOLGENIS - OpenCPU Helm Chart
NEXUS repository for kubernetes to deploy on a kubernetes cluster with NFS-share
## Containers
This chart will deploy the following containers:
- OpenCPU
- MOLGENIS-httpd (to proxy the registry and docker to one domain)
## Provisioning
You can choose for the OpenCPU image from which repository you want to pull. Experimental builds are pushed to registry.molgenis.org and the stable builds to hub.docker.com.
You need to fill out 2 properties to determine which repository you are going to use.
- ```opencpu.image.repository```
- ```opencpu.image.tag```
You can do this in the questions in Rancher or in the ```values.yaml```.
## Development
You can test in install the chart by executing:
```helm lint .```
To test if your helm chart-syntax is right and:
```helm install . --dry-run --debug```
To test if your hem chart works and:
```helm install .```
To deploy it on the cluster.
@@ -0,0 +1 @@
<svg id="svg" version="1.1" width="400" height="211.2" viewBox="0 0 400 211.2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" ><g id="svgg"><path id="path0" d="M146.487 22.310 C 145.632 22.523,145.088 22.783,144.947 23.047 C 144.827 23.271,144.534 23.455,144.295 23.455 C 143.805 23.455,141.997 25.207,141.997 25.682 C 141.997 25.852,141.807 26.181,141.574 26.413 C 141.342 26.646,141.152 27.073,141.152 27.362 C 141.152 27.660,140.968 28.003,140.729 28.153 C 140.181 28.495,140.059 35.922,140.601 35.922 C 140.951 35.922,141.152 36.375,141.152 37.164 C 141.152 37.538,141.407 37.993,141.884 38.468 C 142.288 38.869,142.620 39.283,142.624 39.387 C 142.633 39.636,144.518 41.416,144.773 41.416 C 144.880 41.416,145.022 41.556,145.088 41.727 C 145.153 41.898,145.555 42.099,145.979 42.173 C 146.404 42.248,146.962 42.440,147.219 42.602 C 147.924 43.043,154.517 43.023,154.886 42.578 C 155.031 42.404,155.408 42.261,155.725 42.261 C 156.041 42.261,156.472 42.071,156.683 41.838 C 156.893 41.606,157.162 41.416,157.280 41.416 C 157.398 41.416,157.905 40.988,158.406 40.465 C 158.907 39.942,159.413 39.514,159.532 39.514 C 159.650 39.514,159.746 39.370,159.746 39.195 C 159.746 39.020,159.937 38.713,160.169 38.514 C 160.401 38.315,160.592 37.996,160.592 37.805 C 160.592 37.614,160.782 37.216,161.014 36.921 C 161.247 36.625,161.437 36.168,161.437 35.905 C 161.437 35.642,161.592 35.256,161.781 35.047 C 162.303 34.470,162.323 30.318,161.807 29.588 C 161.603 29.301,161.437 28.769,161.437 28.406 C 161.437 28.015,161.265 27.591,161.014 27.364 C 160.782 27.154,160.592 26.808,160.592 26.597 C 160.592 26.192,157.426 22.847,156.658 22.440 C 155.872 22.022,148.043 21.923,146.487 22.310 M308.399 43.013 C 307.702 43.170,306.704 43.305,306.181 43.313 C 305.658 43.321,304.848 43.500,304.382 43.712 C 303.916 43.923,303.156 44.167,302.692 44.253 C 301.885 44.403,299.535 45.069,297.517 45.720 C 296.518 46.042,295.426 46.540,293.514 47.545 C 292.882 47.877,292.216 48.203,292.035 48.269 C 290.977 48.653,285.499 52.278,284.000 53.587 C 282.400 54.984,278.352 59.082,277.941 59.722 C 277.726 60.055,277.265 60.644,276.916 61.030 C 276.567 61.416,275.831 62.414,275.280 63.249 C 274.730 64.083,274.183 64.880,274.065 65.020 C 273.947 65.161,273.851 65.341,273.851 65.421 C 273.851 65.501,273.533 66.052,273.144 66.645 C 272.397 67.784,271.699 69.225,270.880 71.315 C 270.607 72.013,270.288 72.712,270.172 72.869 C 270.056 73.026,269.814 73.594,269.634 74.132 C 269.230 75.343,268.375 75.960,266.837 76.152 C 264.656 76.424,259.843 77.698,258.659 78.316 C 258.356 78.474,257.949 78.603,257.754 78.604 C 257.559 78.605,257.270 78.735,257.111 78.894 C 256.797 79.208,254.829 80.296,254.575 80.296 C 254.438 80.296,253.118 81.167,250.363 83.075 C 246.291 85.895,241.602 91.295,239.291 95.827 C 238.699 96.989,237.986 98.368,237.707 98.891 C 237.429 99.414,237.086 100.269,236.946 100.792 C 236.805 101.315,236.448 102.606,236.152 103.660 C 235.856 104.714,235.474 106.426,235.304 107.464 C 235.134 108.501,234.898 109.778,234.781 110.301 C 234.505 111.528,234.503 116.885,234.779 118.119 C 234.896 118.642,235.172 120.116,235.392 121.395 C 235.756 123.507,235.993 124.478,236.938 127.735 C 237.107 128.317,237.554 129.363,237.932 130.059 C 238.311 130.756,238.805 131.706,239.031 132.171 C 239.257 132.636,239.531 133.159,239.640 133.333 C 239.750 133.508,239.956 133.888,240.100 134.179 C 240.372 134.729,241.113 135.897,241.306 136.080 C 241.368 136.138,241.982 136.947,242.671 137.876 C 244.784 140.729,250.013 145.672,251.757 146.467 C 252.054 146.602,252.298 146.793,252.298 146.891 C 252.298 146.988,252.405 147.068,252.536 147.068 C 252.759 147.068,254.385 147.978,255.649 148.809 C 255.956 149.011,256.350 149.239,256.524 149.316 C 257.674 149.822,259.390 150.455,260.750 150.875 C 261.622 151.145,262.522 151.492,262.752 151.647 C 262.981 151.802,263.403 151.928,263.689 151.928 C 263.975 151.928,264.929 152.142,265.808 152.404 L 267.406 152.879 319.282 152.879 L 371.157 152.879 372.669 152.404 C 373.500 152.142,374.374 151.928,374.611 151.928 C 374.848 151.928,375.095 151.841,375.161 151.735 C 375.226 151.628,375.969 151.284,376.811 150.970 C 378.861 150.205,381.135 148.982,382.465 147.930 C 383.065 147.456,383.645 147.068,383.753 147.068 C 384.001 147.068,388.801 142.220,388.801 141.970 C 388.801 141.868,388.953 141.619,389.138 141.416 C 390.675 139.731,392.990 134.936,393.449 132.488 C 393.548 131.965,393.778 131.184,393.961 130.752 C 394.514 129.450,394.446 119.908,393.872 118.276 C 393.640 117.615,393.450 116.906,393.450 116.702 C 393.450 116.498,393.256 115.832,393.019 115.221 C 392.782 114.611,392.378 113.563,392.121 112.893 C 391.864 112.223,391.378 111.247,391.040 110.724 C 388.225 106.360,386.980 104.931,383.835 102.457 C 382.673 101.543,381.622 100.712,381.499 100.612 C 381.116 100.299,375.868 97.834,375.585 97.834 C 375.509 97.834,375.147 97.696,374.781 97.527 C 373.179 96.789,369.453 96.326,365.525 96.375 C 363.449 96.401,361.699 96.371,361Line truncated

After

Width:  |  Height:  |  Size: 245 KiB

+28
View File
@@ -0,0 +1,28 @@
categories:
- MOLGENIS
questions:
- variable: ingress.enabled
label: Enable ingress
default: false
description: "Enable ingress"
type: boolean
required: true
group: "Loadbalancing"
- variable: opencpu.image.repository
label: Registry
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: "Provisioning"
- variable: opencpu.image.tag
label: Version
default: ""
description: "Select a OpenCPU version (check the registry.molgenis.org or hub.docker.com for released tags)"
type: string
required: true
group: "Provisioning"
+32
View File
@@ -0,0 +1,32 @@
{{/* vim: set filetype=mustache: */}}
{{/*
Expand the name of the chart.
*/}}
{{- define "opencpu.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 "opencpu.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 "opencpu.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
{{- end -}}
@@ -0,0 +1,35 @@
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
{{- with .Values.ingress.annotations }}
annotations:
{{ toYaml . | indent 4 }}
{{- end }}
name: {{ template "opencpu.fullname" . }}
labels:
app: {{ template "opencpu.name" . }}
chart: {{ template "opencpu.chart" . }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: {{ .Values.replicaCount }}
selector:
matchLabels:
app: {{ template "opencpu.name" . }}
release: {{ .Release.Name }}
template:
metadata:
labels:
app: {{ template "opencpu.name" . }}
release: {{ .Release.Name }}
spec:
containers:
{{- with .Values.opencpu }}
- name: {{ .name }}
image: "{{ .image.repository }}/{{ .image.name }}:{{ .image.tag }}"
imagePullPolicy: {{ .image.pullPolicy }}
ports:
- containerPort: {{ .service.port }}
{{- end }}
+36
View File
@@ -0,0 +1,36 @@
{{- if .Values.ingress.enabled }}
{{- range .Values.ingress.hosts }}
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: "{{ $.Release.Name }}-ingress"
labels:
app: {{ $.Values.opencpu.name }}
chart: "{{ $.Chart.Name }}-{{ $.Chart.Version }}"
release: "{{ $.Release.Name }}"
heritage: "{{ $.Release.Service }}"
annotations:
{{- if .tls }}
ingress.kubernetes.io/secure-backends: "true"
{{- end }}
{{- range $key, $value := .annotations }}
{{ $key }}: {{ $value | quote }}
{{- end }}
spec:
rules:
- host: {{ .name }}
http:
paths:
- path: {{ default "/" .path }}
backend:
serviceName: {{ $.Values.opencpu.service.name }}
servicePort: {{ $.Values.opencpu.service.port }}
{{- if .tls }}
tls:
- hosts:
- {{ .name }}
secretName: {{ .tlsSecret }}
{{- end }}
---
{{- end }}
{{- end }}
+20
View File
@@ -0,0 +1,20 @@
apiVersion: v1
kind: Service
metadata:
name: {{ .Values.opencpu.service.name }}
labels:
app: {{ .Values.opencpu.service.name }}
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
type: {{ .Values.opencpu.service.type }}
loadBalancerSourceRanges:
{{- range $index, $rule := .Values.opencpu.service.firewall }}
- {{ $rule }}
{{- end }}
ports:
- name: {{ .Values.opencpu.service.name }}
port: {{ .Values.opencpu.service.port }}
selector:
app: {{ template "opencpu.name" . }}
release: {{ .Release.Name }}
+41
View File
@@ -0,0 +1,41 @@
# Default values for nexus.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
environment: production
opencpu:
name: opencpu
strategy:
type: Recreate
restartPolicy: Always
image:
repository: registry.hub.docker.com
name: molgenis/opencpu
tag: stable
pullPolicy: Always
service:
name: opencpu
type: LoadBalancer
port: 8004
firewall:
- 145.100.224.1/24
ingress:
enabled: false
annotations: {
kubernetes.io/ingress.class: "nginx",
nginx.ingress.kubernetes.io/proxy-body-size: "0"
}
path: /
hosts:
- name: opencpu.molgenis.org
tls: []
nodeSelector: {}
tolerations: []
affinity: {}