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
These are the Helm templates that we will use for MOLGENIS operations. There are some prerequisites you need.
- docker
- minikube
## Useful commands for Kubernetes
Commands that can be used to get information from a kubernetes cluster
- kubectl get pods
Gets alls running instances of containers from a certain deployment
- kubectl get services
@ -14,6 +20,14 @@
- kubectl get deployments
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
- helm install .

View File

@ -91,60 +91,67 @@ data:
{{- end }}
<nodeProperties/>
</org.csanchez.jenkins.plugins.kubernetes.PodTemplate>
{{- end -}}
{{- if .Values.Pod.Enabled }}
<org.csanchez.jenkins.plugins.kubernetes.PodTemplate>
<inheritFrom></inheritFrom>
<name></name>
<namespace></namespace>
<privileged>false</privileged>
<capOnlyOnAlivePods>false</capOnlyOnAlivePods>
<alwaysPullImage>false</alwaysPullImage>
<name>{{ .Values.Pod.Label }}</name>
<instanceCap>2147483647</instanceCap>
<slaveConnectTimeout>100</slaveConnectTimeout>
<idleMinutes>0</idleMinutes>
<activeDeadlineSeconds>0</activeDeadlineSeconds>
<label>molgenis-maven</label>
<nodeSelector></nodeSelector>
<nodeUsageMode>EXCLUSIVE</nodeUsageMode>
<customWorkspaceVolumeEnabled>false</customWorkspaceVolumeEnabled>
<workspaceVolume class="org.csanchez.jenkins.plugins.kubernetes.volumes.workspace.EmptyDirWorkspaceVolume">
<memory>false</memory>
</workspaceVolume>
<label>{{ .Values.Pod.Label }}</label>
<nodeSelector>
{{- $local := dict "first" true }}
{{- range $key, $value := .Values.Pod.NodeSelector }}
{{- if not $local.first }},{{- end }}
{{- $key }}={{ $value }}
{{- $_ := set $local "first" false }}
{{- end }}</nodeSelector>
<nodeUsageMode>NORMAL</nodeUsageMode>
<volumes>
<org.csanchez.jenkins.plugins.kubernetes.volumes.HostPathVolume>
<mountPath>/var/run/docker.sock</mountPath>
<hostPath>/var/run/docker.sock</hostPath>
</org.csanchez.jenkins.plugins.kubernetes.volumes.HostPathVolume>
{{- range $index, $volume := .Values.Pod.volumes }}
<org.csanchez.jenkins.plugins.kubernetes.volumes.{{ $volume.type }}Volume>
{{- range $key, $value := $volume }}{{- if not (eq $key "type") }}
<{{ $key }}>{{ $value }}</{{ $key }}>
{{- end }}{{- end }}
</org.csanchez.jenkins.plugins.kubernetes.volumes.{{ $volume.type }}Volume>
{{- end }}
</volumes>
<containers>
<org.csanchez.jenkins.plugins.kubernetes.ContainerTemplate>
<name>maven</name>
<image>webhost12.service.rug.nl/molgenis/molgenis-maven:latest</image>
<name>{{ .Values.Pod.Label }}</name>
<image>{{ .Values.Pod.Image }}:{{ .Values.Pod.ImageTag }}</image>
{{- if .Values.Pod.Privileged }}
<privileged>true</privileged>
{{- else }}
<privileged>false</privileged>
<alwaysPullImage>true</alwaysPullImage>
{{- end }}
<alwaysPullImage>{{ .Values.Pod.AlwaysPullImage }}</alwaysPullImage>
<workingDir>/home/jenkins</workingDir>
<command>/bin/sh -c</command>
<args>cat</args>
<command>{{ .Values.Pod.Command }}</command>
<args>{{ .Values.Pod.Args }}</args>
{{- if .Values.Pod.TTY }}
<ttyEnabled>true</ttyEnabled>
<resourceRequestCpu></resourceRequestCpu>
<resourceRequestMemory></resourceRequestMemory>
<resourceLimitCpu></resourceLimitCpu>
<resourceLimitMemory></resourceLimitMemory>
<envVars/>
<ports/>
<livenessProbe>
<execArgs></execArgs>
<timeoutSeconds>0</timeoutSeconds>
<initialDelaySeconds>0</initialDelaySeconds>
<failureThreshold>0</failureThreshold>
<periodSeconds>0</periodSeconds>
<successThreshold>0</successThreshold>
</livenessProbe>
{{- else }}
<ttyEnabled>false</ttyEnabled>
{{- end }}
<resourceRequestCpu>{{.Values.Pod.Cpu}}</resourceRequestCpu>
<resourceRequestMemory>{{.Values.Pod.Memory}}</resourceRequestMemory>
<resourceLimitCpu>{{.Values.Pod.Cpu}}</resourceLimitCpu>
<resourceLimitMemory>{{.Values.Pod.Memory}}</resourceLimitMemory>
</org.csanchez.jenkins.plugins.kubernetes.ContainerTemplate>
</containers>
<envVars/>
<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/>
<yaml></yaml>
{{- end }}
<nodeProperties/>
</org.csanchez.jenkins.plugins.kubernetes.PodTemplate>
{{- end -}}
</templates>

View File

@ -70,3 +70,32 @@ jenkins:
CustomConfigMap: true
rbac:
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:
claimName: molgenis-nexus-data
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:
- name: {{ .Values.nexus.name }}
image: "{{ .Values.nexus.image.repository }}:{{ .Values.nexus.image.tag }}"

View File

@ -13,4 +13,4 @@ spec:
persistentVolumeReclaimPolicy: Retain
nfs:
server: 192.168.64.12
path: /gcc/molgenis/nexus-data
path: /gcc/molgenis/nexus