1
0

Compare commits

..

15 Commits

Author SHA1 Message Date
Fleur Kelpin
7dbb679282 Add values to configure a second Agent. 2018-06-27 19:14:11 +02:00
Fleur Kelpin
e5b8625757 Merge branch 'master' of https://git.webhosting.rug.nl/molgenis/molgenis-ops-docker-helm 2018-06-27 17:09:34 +02:00
sido
e3d48562bb volumes permissions 2018-06-27 17:02:59 +02:00
sido
399abaf4f9 volumes permissions 2018-06-27 17:00:10 +02:00
Sido Haakma
ef4462a7c3 Merge branch 'master' of P129679/molgenis-ops-docker-helm into master 2018-06-27 16:51:39 +02:00
sido
e410aad24d mount the other work- directory 2018-06-27 16:37:32 +02:00
sido
0c0f5fb61e mount the other work- directory 2018-06-27 16:32:56 +02:00
sido
5d4b633828 mount the other work- directory 2018-06-27 16:27:41 +02:00
sido
ed6c9613e0 mount the other work- directory 2018-06-27 16:23:48 +02:00
sido
eaf9219f76 mount the other work- directory 2018-06-27 16:13:58 +02:00
sido
98c030e937 mount the other work- directory 2018-06-27 15:44:49 +02:00
sido
3ba4162a59 mount the other work- directory 2018-06-27 15:40:57 +02:00
sido
3fe04e53a7 mount the other work- directory 2018-06-27 15:36:42 +02:00
sido
0948b44573 Merge branch 'master' of https://git.webhosting.rug.nl/molgenis/molgenis-ops-docker-helm 2018-06-27 15:17:50 +02:00
sido
d7ee74647f mount the other work- directory 2018-06-27 15:17:32 +02:00
5 changed files with 97 additions and 40 deletions

View File

@ -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 .

View File

@ -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>

View File

@ -70,3 +70,32 @@ jenkins:
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

View File

@ -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 }}"

View File

@ -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