-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathjob-template.yaml
127 lines (127 loc) · 3.39 KB
/
job-template.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
apiVersion: batch/v1
kind: Job
metadata:
name: $jobname
namespace: $namespace
spec:
template:
spec:
terminationGracePeriodSeconds: 5
shareProcessNamespace: true
securityContext:
runAsUser: 0
runAsGroup: 0
initContainers:
- name: prepull
image: eu.gcr.io/it-atlas-cern/worker
command: [ "bash", "-c", "/getfile.sh" ]
env:
- name: CMS_INPUT_FILES
value: $eventfile
- name: GCS_ACCESS
value: $gs_access_key
- name: GCS_SECRET
value: $gs_secret_key
- name: GCS_HOST
value: $gs_host
- name: GCS_PROJECT_ID
value: $gs_project_id
- name: DOWNLOAD_MAX_KB
value: "$download_max_kb"
- name: UPLOAD_MAX_KB
value: "$upload_max_kb"
- name: DPATH
value: "$dpath"
resources:
requests:
cpu: 0.9
memory: 6Gi
limits:
cpu: 0.9
memory: 6Gi
volumeMounts:
- mountPath: /getfile.sh
subPath: getfile.sh
name: getfile
- mountPath: /inputs
name: inputs
containers:
- name: cmsrun
image: $image
command: [ "bash", "-c", "/runjob.sh" ]
env:
- name: CMS_LUMINOSITY_DATA
value: '$lumi_data'
- name: CMS_JSON
value: $jsonfile
- name: CMS_INPUT_FILES
value: $eventfile
- name: CMS_OUTPUT_FILE
value: $output_file
- name: CMS_OUTPUT_JSON_FILE
value: $output_json_file
- name: CMS_S3_BASEDIR
value: $s3_basedir
- name: CMS_OUTPUT_S3PATH
value: $s3_outputpath
- name: CMS_CONFIG
value: $config
- name: CMS_DATASET_NAME
value: $fullsetname
- name: MC_MULTIPART_THREADS
value: "$multipart_threads"
- name: S3_ACCESS
value: $s3_access_key
- name: S3_SECRET
value: $s3_secret_key
- name: S3_HOST
value: $s3_host
- name: GCS_ACCESS
value: $gs_access_key
- name: GCS_SECRET
value: $gs_secret_key
- name: GCS_HOST
value: $gs_host
- name: GCS_PROJECT_ID
value: $gs_project_id
- name: DOWNLOAD_MAX_KB
value: "$download_max_kb"
- name: UPLOAD_MAX_KB
value: "$upload_max_kb"
- name: REDIS_HOST
value: $redis_host
- name: DPATH
value: "$dpath"
resources:
requests:
cpu: 0.9
memory: 6Gi
limits:
cpu: 0.9
memory: 6Gi
volumeMounts:
- mountPath: /runjob.sh
subPath: runjob.sh
name: runjob
- mountPath: /inputs
name: inputs
restartPolicy: Never
volumes:
- name: runjob
configMap:
name: runjob
defaultMode: 0755
- name: getfile
configMap:
name: getfile
defaultMode: 0755
- name: inputs
emptyDir:
medium: Memory
#- name: inputs
# hostPath:
# path: "$dpath"
# type: $ftype
backoffLimit: $backoff_limit
completions: 1
parallelism: 1