Compare commits
15 Commits
d4e5a328f1
...
7dbb679282
Author | SHA1 | Date | |
---|---|---|---|
|
7dbb679282 | ||
|
e5b8625757 | ||
|
e3d48562bb | ||
|
399abaf4f9 | ||
|
ef4462a7c3 | ||
|
e410aad24d | ||
|
0c0f5fb61e | ||
|
5d4b633828 | ||
|
ed6c9613e0 | ||
|
eaf9219f76 | ||
|
98c030e937 | ||
|
3ba4162a59 | ||
|
3fe04e53a7 | ||
|
0948b44573 | ||
|
d7ee74647f |
14
README.md
14
README.md
@ -1,8 +1,14 @@
|
|||||||
# MOLGENIS Helm templates
|
# MOLGENIS Helm templates
|
||||||
|
|
||||||
|
These are the Helm templates that we will use for MOLGENIS operations. There are some prerequisites you need.
|
||||||
|
|
||||||
|
- docker
|
||||||
|
- minikube
|
||||||
|
|
||||||
## Useful commands for Kubernetes
|
## Useful commands for Kubernetes
|
||||||
|
|
||||||
|
Commands that can be used to get information from a kubernetes cluster
|
||||||
|
|
||||||
- kubectl get pods
|
- kubectl get pods
|
||||||
Gets alls running instances of containers from a certain deployment
|
Gets alls running instances of containers from a certain deployment
|
||||||
- kubectl get services
|
- kubectl get services
|
||||||
@ -14,6 +20,14 @@
|
|||||||
- kubectl get deployments
|
- kubectl get deployments
|
||||||
Gets all deployments (comparable with docker-compose)
|
Gets all deployments (comparable with docker-compose)
|
||||||
|
|
||||||
|
When you want to see what is running on the clusters at the CIT you have to make a context switch.
|
||||||
|
You can access the cluster with kubeconfig-files. You can obtain these by downloading them from the
|
||||||
|
MOLGENIS kubernetes cluster.
|
||||||
|
|
||||||
|
- Goto https://rancher.molgenis.org:7443
|
||||||
|
- Goto
|
||||||
|
|
||||||
|
|
||||||
## Useful commands for Helm
|
## Useful commands for Helm
|
||||||
|
|
||||||
- helm install .
|
- helm install .
|
||||||
|
@ -91,60 +91,67 @@ data:
|
|||||||
{{- end }}
|
{{- end }}
|
||||||
<nodeProperties/>
|
<nodeProperties/>
|
||||||
</org.csanchez.jenkins.plugins.kubernetes.PodTemplate>
|
</org.csanchez.jenkins.plugins.kubernetes.PodTemplate>
|
||||||
|
{{- end -}}
|
||||||
|
{{- if .Values.Pod.Enabled }}
|
||||||
<org.csanchez.jenkins.plugins.kubernetes.PodTemplate>
|
<org.csanchez.jenkins.plugins.kubernetes.PodTemplate>
|
||||||
<inheritFrom></inheritFrom>
|
<inheritFrom></inheritFrom>
|
||||||
<name></name>
|
<name>{{ .Values.Pod.Label }}</name>
|
||||||
<namespace></namespace>
|
|
||||||
<privileged>false</privileged>
|
|
||||||
<capOnlyOnAlivePods>false</capOnlyOnAlivePods>
|
|
||||||
<alwaysPullImage>false</alwaysPullImage>
|
|
||||||
<instanceCap>2147483647</instanceCap>
|
<instanceCap>2147483647</instanceCap>
|
||||||
<slaveConnectTimeout>100</slaveConnectTimeout>
|
|
||||||
<idleMinutes>0</idleMinutes>
|
<idleMinutes>0</idleMinutes>
|
||||||
<activeDeadlineSeconds>0</activeDeadlineSeconds>
|
<label>{{ .Values.Pod.Label }}</label>
|
||||||
<label>molgenis-maven</label>
|
<nodeSelector>
|
||||||
<nodeSelector></nodeSelector>
|
{{- $local := dict "first" true }}
|
||||||
<nodeUsageMode>EXCLUSIVE</nodeUsageMode>
|
{{- range $key, $value := .Values.Pod.NodeSelector }}
|
||||||
<customWorkspaceVolumeEnabled>false</customWorkspaceVolumeEnabled>
|
{{- if not $local.first }},{{- end }}
|
||||||
<workspaceVolume class="org.csanchez.jenkins.plugins.kubernetes.volumes.workspace.EmptyDirWorkspaceVolume">
|
{{- $key }}={{ $value }}
|
||||||
<memory>false</memory>
|
{{- $_ := set $local "first" false }}
|
||||||
</workspaceVolume>
|
{{- end }}</nodeSelector>
|
||||||
|
<nodeUsageMode>NORMAL</nodeUsageMode>
|
||||||
<volumes>
|
<volumes>
|
||||||
<org.csanchez.jenkins.plugins.kubernetes.volumes.HostPathVolume>
|
{{- range $index, $volume := .Values.Pod.volumes }}
|
||||||
<mountPath>/var/run/docker.sock</mountPath>
|
<org.csanchez.jenkins.plugins.kubernetes.volumes.{{ $volume.type }}Volume>
|
||||||
<hostPath>/var/run/docker.sock</hostPath>
|
{{- range $key, $value := $volume }}{{- if not (eq $key "type") }}
|
||||||
</org.csanchez.jenkins.plugins.kubernetes.volumes.HostPathVolume>
|
<{{ $key }}>{{ $value }}</{{ $key }}>
|
||||||
|
{{- end }}{{- end }}
|
||||||
|
</org.csanchez.jenkins.plugins.kubernetes.volumes.{{ $volume.type }}Volume>
|
||||||
|
{{- end }}
|
||||||
</volumes>
|
</volumes>
|
||||||
<containers>
|
<containers>
|
||||||
<org.csanchez.jenkins.plugins.kubernetes.ContainerTemplate>
|
<org.csanchez.jenkins.plugins.kubernetes.ContainerTemplate>
|
||||||
<name>maven</name>
|
<name>{{ .Values.Pod.Label }}</name>
|
||||||
<image>webhost12.service.rug.nl/molgenis/molgenis-maven:latest</image>
|
<image>{{ .Values.Pod.Image }}:{{ .Values.Pod.ImageTag }}</image>
|
||||||
|
{{- if .Values.Pod.Privileged }}
|
||||||
|
<privileged>true</privileged>
|
||||||
|
{{- else }}
|
||||||
<privileged>false</privileged>
|
<privileged>false</privileged>
|
||||||
<alwaysPullImage>true</alwaysPullImage>
|
{{- end }}
|
||||||
|
<alwaysPullImage>{{ .Values.Pod.AlwaysPullImage }}</alwaysPullImage>
|
||||||
<workingDir>/home/jenkins</workingDir>
|
<workingDir>/home/jenkins</workingDir>
|
||||||
<command>/bin/sh -c</command>
|
<command>{{ .Values.Pod.Command }}</command>
|
||||||
<args>cat</args>
|
<args>{{ .Values.Pod.Args }}</args>
|
||||||
|
{{- if .Values.Pod.TTY }}
|
||||||
<ttyEnabled>true</ttyEnabled>
|
<ttyEnabled>true</ttyEnabled>
|
||||||
<resourceRequestCpu></resourceRequestCpu>
|
{{- else }}
|
||||||
<resourceRequestMemory></resourceRequestMemory>
|
<ttyEnabled>false</ttyEnabled>
|
||||||
<resourceLimitCpu></resourceLimitCpu>
|
{{- end }}
|
||||||
<resourceLimitMemory></resourceLimitMemory>
|
<resourceRequestCpu>{{.Values.Pod.Cpu}}</resourceRequestCpu>
|
||||||
<envVars/>
|
<resourceRequestMemory>{{.Values.Pod.Memory}}</resourceRequestMemory>
|
||||||
<ports/>
|
<resourceLimitCpu>{{.Values.Pod.Cpu}}</resourceLimitCpu>
|
||||||
<livenessProbe>
|
<resourceLimitMemory>{{.Values.Pod.Memory}}</resourceLimitMemory>
|
||||||
<execArgs></execArgs>
|
|
||||||
<timeoutSeconds>0</timeoutSeconds>
|
|
||||||
<initialDelaySeconds>0</initialDelaySeconds>
|
|
||||||
<failureThreshold>0</failureThreshold>
|
|
||||||
<periodSeconds>0</periodSeconds>
|
|
||||||
<successThreshold>0</successThreshold>
|
|
||||||
</livenessProbe>
|
|
||||||
</org.csanchez.jenkins.plugins.kubernetes.ContainerTemplate>
|
</org.csanchez.jenkins.plugins.kubernetes.ContainerTemplate>
|
||||||
</containers>
|
</containers>
|
||||||
<envVars/>
|
<envVars/>
|
||||||
<annotations/>
|
<annotations/>
|
||||||
|
{{- if .Values.Pod.ImagePullSecret }}
|
||||||
|
<imagePullSecrets>
|
||||||
|
<org.csanchez.jenkins.plugins.kubernetes.PodImagePullSecret>
|
||||||
|
<name>{{ .Values.Pod.ImagePullSecret }}</name>
|
||||||
|
</org.csanchez.jenkins.plugins.kubernetes.PodImagePullSecret>
|
||||||
|
</imagePullSecrets>
|
||||||
|
{{- else }}
|
||||||
<imagePullSecrets/>
|
<imagePullSecrets/>
|
||||||
<yaml></yaml>
|
{{- end }}
|
||||||
|
<nodeProperties/>
|
||||||
</org.csanchez.jenkins.plugins.kubernetes.PodTemplate>
|
</org.csanchez.jenkins.plugins.kubernetes.PodTemplate>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</templates>
|
</templates>
|
||||||
|
@ -69,4 +69,33 @@ jenkins:
|
|||||||
# SecretsFilesSecret: jenkins-secrets
|
# SecretsFilesSecret: jenkins-secrets
|
||||||
CustomConfigMap: true
|
CustomConfigMap: true
|
||||||
rbac:
|
rbac:
|
||||||
install: true
|
install: true
|
||||||
|
# A second agent to configure a second pod template
|
||||||
|
Pod:
|
||||||
|
Enabled: true
|
||||||
|
Image: "webhost12.service.rug.nl/molgenis/molgenis-maven"
|
||||||
|
ImageTag: latest
|
||||||
|
# ImagePullSecret: jenkins
|
||||||
|
Label: "molgenis-maven"
|
||||||
|
Privileged: false
|
||||||
|
Cpu: "200m"
|
||||||
|
Memory: "256Mi"
|
||||||
|
# You may want to change this to true while testing a new image
|
||||||
|
AlwaysPullImage: true
|
||||||
|
Command: "/bin/sh -c"
|
||||||
|
Args: "cat"
|
||||||
|
TTY: true
|
||||||
|
# You can define the volumes that you want to mount for this container
|
||||||
|
# Allowed types are: ConfigMap, EmptyDir, HostPath, Nfs, Pod, Secret
|
||||||
|
# Configure the attributes as they appear in the corresponding Java class for that type
|
||||||
|
# https://github.com/jenkinsci/kubernetes-plugin/tree/master/src/main/java/org/csanchez/jenkins/plugins/kubernetes/volumes
|
||||||
|
volumes:
|
||||||
|
- type: "HostPath"
|
||||||
|
mountPath: "/var/run/docker.sock"
|
||||||
|
hostPath: "/var/run/docker.sock"
|
||||||
|
# - type: Secret
|
||||||
|
# secretName: mysecret
|
||||||
|
# mountPath: /var/myapp/mysecret
|
||||||
|
NodeSelector: {}
|
||||||
|
# Key Value selectors. Ex:
|
||||||
|
# jenkins-agent: v1
|
||||||
|
@ -24,6 +24,13 @@ spec:
|
|||||||
persistentVolumeClaim:
|
persistentVolumeClaim:
|
||||||
claimName: molgenis-nexus-data
|
claimName: molgenis-nexus-data
|
||||||
restartPolicy: {{ .Values.nexus.restartPolicy }}
|
restartPolicy: {{ .Values.nexus.restartPolicy }}
|
||||||
|
initContainers:
|
||||||
|
- name: volume-mount-nexus
|
||||||
|
image: busybox
|
||||||
|
command: ["sh", "-c", "chown -R 200:200 /gcc/molgenis/nexus"]
|
||||||
|
volumeMounts:
|
||||||
|
- name: molgenis-nexus-data
|
||||||
|
mountPath: "/nexus-data"
|
||||||
containers:
|
containers:
|
||||||
- name: {{ .Values.nexus.name }}
|
- name: {{ .Values.nexus.name }}
|
||||||
image: "{{ .Values.nexus.image.repository }}:{{ .Values.nexus.image.tag }}"
|
image: "{{ .Values.nexus.image.repository }}:{{ .Values.nexus.image.tag }}"
|
||||||
|
@ -13,4 +13,4 @@ spec:
|
|||||||
persistentVolumeReclaimPolicy: Retain
|
persistentVolumeReclaimPolicy: Retain
|
||||||
nfs:
|
nfs:
|
||||||
server: 192.168.64.12
|
server: 192.168.64.12
|
||||||
path: /gcc/molgenis/nexus-data
|
path: /gcc/molgenis/nexus
|
||||||
|
Loading…
Reference in New Issue
Block a user