added opencpu stack
This commit is contained in:
parent
16f2701fd2
commit
bed36a7dd2
21
molgenis-opencpu/.helmignore
Normal file
21
molgenis-opencpu/.helmignore
Normal 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
molgenis-opencpu/Chart.yaml
Normal file
8
molgenis-opencpu/Chart.yaml
Normal 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
molgenis-opencpu/README.md
Normal file
38
molgenis-opencpu/README.md
Normal 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.
|
||||
|
||||
|
1
molgenis-opencpu/catalog-molgenis-opencpu.svg
Normal file
1
molgenis-opencpu/catalog-molgenis-opencpu.svg
Normal file
File diff suppressed because one or more lines are too long
After Width: | Height: | Size: 245 KiB |
21
molgenis-opencpu/questions.yml
Normal file
21
molgenis-opencpu/questions.yml
Normal file
@ -0,0 +1,21 @@
|
||||
|
||||
categories:
|
||||
- MOLGENIS
|
||||
questions:
|
||||
- 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
molgenis-opencpu/templates/_helpers.tpl
Normal file
32
molgenis-opencpu/templates/_helpers.tpl
Normal 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 -}}
|
35
molgenis-opencpu/templates/deployment.yaml
Normal file
35
molgenis-opencpu/templates/deployment.yaml
Normal file
@ -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
molgenis-opencpu/templates/ingress.yaml
Normal file
36
molgenis-opencpu/templates/ingress.yaml
Normal 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
molgenis-opencpu/templates/service.yaml
Normal file
20
molgenis-opencpu/templates/service.yaml
Normal 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
molgenis-opencpu/values.yaml
Normal file
41
molgenis-opencpu/values.yaml
Normal 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: true
|
||||
annotations: {
|
||||
kubernetes.io/ingress.class: "nginx",
|
||||
nginx.ingress.kubernetes.io/proxy-body-size: "0"
|
||||
}
|
||||
path: /
|
||||
hosts:
|
||||
- name: opencpu.molgenis.org
|
||||
tls: []
|
||||
|
||||
nodeSelector: {}
|
||||
|
||||
tolerations: []
|
||||
|
||||
affinity: {}
|
Loading…
Reference in New Issue
Block a user