* Add a basic Slurm config
[arvados-k8s.git] / charts / arvados / templates / slurm-compute-deployment.yaml
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: Apache-2.0
4
5 apiVersion: apps/v1
6 kind: StatefulSet
7 metadata:
8   name: "arvados-slurm-compute"
9   labels:
10     app: arvados-slurm-compute
11     chart: {{ template "arvados.chart" . }}
12     release: {{ .Release.Name }}
13     heritage: {{ .Release.Service }}
14 spec:
15   replicas: 4
16   serviceName: arvados-slurm-compute
17   selector:
18     matchLabels:
19       app: arvados-slurm-compute
20       release: {{ .Release.Name }}
21   template:
22     metadata:
23       labels:
24         app: arvados-slurm-compute
25         release: {{ .Release.Name }}
26     spec:
27       containers:
28         - name: {{ .Chart.Name }}
29           hostname: arvados-slurm-compute
30           image: "cure/arvados-slurm-runtime"
31           imagePullPolicy: {{ .Values.image.pullPolicy }}
32           command:
33             - "sh"
34             - "-c"
35             - "/usr/local/bin/bootstrap.sh python-arvados-python-client={{ .Values.arvados.versions.distribution.pythonArvadosPythonClient }} crunch-run={{ .Values.arvados.versions.distribution.crunchRun }} python-arvados-fuse={{ .Values.arvados.versions.distribution.pythonArvadosFuse }} && mkdir /munge && cp -p /etc/munge/munge.key /munge && chown munge:munge /munge/munge.key && mkdir /var/slurm && chmod 700 /var/slurm && sudo -u munge munged --key-file=/munge/munge.key && /etc/init.d/docker start && slurmd -D"
36           securityContext:
37             privileged: true
38           env:
39             - name : ARVADOS_API_HOST
40               value: "{{ .Values.externalIP }}:444"
41             - name : ARVADOS_API_HOST_INSECURE
42               value: "true"
43             - name : ARVADOS_API_TOKEN
44               value: "{{ .Values.superUserSecret }}"
45           volumeMounts:
46             - name: slurm-configmap
47               mountPath: /etc/slurm-llnl/slurm.conf
48               subPath: slurm.conf
49             - name: slurm-configmap
50               mountPath: /etc/munge/munge.key
51               subPath: munge.key
52             - name: docker-graph-storage
53               mountPath: /var/lib/docker
54
55       volumes:
56         - name: slurm-configmap
57           configMap:
58             name: slurm-configmap
59             defaultMode: 0400
60         - name: docker-graph-storage
61           emptyDir: {}
62
63 #            - "/usr/local/bin/bootstrap.sh crunch-dispatch-slurm={{ .Values.arvados.versions.distribution.crunchDispatchSlurm }} && chown munge /etc/munge/munge.key && chmod 0400 /etc/munge/munge.key && sudo -u munge munged && slurmctld -D && crunch-dispatch-slurm"
64 #            - "/usr/local/bin/bootstrap.sh crunch-dispatch-slurm={{ .Values.arvados.versions.distribution.crunchDispatchSlurm }} && sudo -u munge munged && slurmctld -D && crunch-dispatch-slurm"
65 #            - "/usr/local/bin/bootstrap.sh crunch-dispatch-slurm={{ .Values.arvados.versions.distribution.crunchDispatchSlurm }} && crunch-dispatch-slurm"
66
67 # for slurm client, compute node
68 #            - "/usr/local/bin/bootstrap.sh python-arvados-python-client={{ .Values.arvados.versions.distribution.pythonArvadosPythonClient }} crunch-run={{ .Values.arvados.versions.distribution.crunchRun }} python-arvados-fuse={{ .Values.arvados.versions.distribution.pythonArvadosFuse }} && chown munge /etc/munge/munge.key; chmod 0400 /etc/munge/munge.key; sudo -u munge munged && slurmd -D"