-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathprefect-jobtemplate-prod.json
187 lines (187 loc) · 8.07 KB
/
prefect-jobtemplate-prod.json
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
{
"variables": {
"type": "object",
"properties": {
"env": {
"type": "object",
"title": "Environment Variables",
"default": {
"PREFECT_API_URL": "http://prefect-server:4200/api"
},
"description": "Environment variables to set when starting a flow run.",
"additionalProperties": {
"type": "string"
}
},
"name": {
"type": "string",
"title": "Name",
"description": "Name given to infrastructure created by the worker using this job configuration."
},
"image": {
"type": "string",
"title": "Image",
"default": "ghcr.io/swissopenem/scopemarchiver-openem-runtime:main",
"example": "docker.io/prefecthq/prefect:2-latest",
"description": "The image reference of a container image to use for created jobs. If not set, the latest Prefect image will be used."
},
"labels": {
"type": "object",
"title": "Labels",
"description": "Labels applied to infrastructure created by the worker using this job configuration.",
"additionalProperties": {
"type": "string"
}
},
"command": {
"type": "string",
"title": "Command",
"description": "The command to use when starting a flow run. In most cases, this should be left blank and the command will be automatically generated by the worker."
},
"volumes": {
"type": "array",
"items": {
"type": "string"
},
"title": "Volumes",
"default": [
"scopemarchiver_nfs-lts-share:/tmp/LTS"
],
"example": [
"/my/local/path:/path/in/container"
],
"description": "A list of volume to mount into created containers."
},
"networks": {
"type": "array",
"items": {
"type": "string"
},
"title": "Networks",
"default": [
"scopemarchiver_network"
],
"description": "Docker networks that created containers should be connected to."
},
"mem_limit": {
"type": "string",
"title": "Memory Limit",
"description": "Memory limit of created containers. Accepts a value with a unit identifier (e.g. 100000b, 1000k, 128m, 1g.) If a value is given without a unit, bytes are assumed."
},
"privileged": {
"type": "boolean",
"title": "Privileged",
"default": false,
"description": "Give extended privileges to created container."
},
"auto_remove": {
"type": "boolean",
"title": "Auto Remove",
"default": true,
"description": "If set, containers will be deleted on completion."
},
"network_mode": {
"type": "string",
"title": "Network Mode",
"description": "The network mode for the created containers (e.g. host, bridge). If 'networks' is set, this cannot be set."
},
"memswap_limit": {
"type": "string",
"title": "Memory Swap Limit",
"description": "Total memory (memory + swap), -1 to disable swap. Should only be set if `mem_limit` is also set. If `mem_limit` is set, this defaults toallowing the container to use as much swap as memory. For example, if `mem_limit` is 300m and `memswap_limit` is not set, containers can use 600m in total of memory and swap."
},
"stream_output": {
"type": "boolean",
"title": "Stream Output",
"default": true,
"description": "If set, the output from created containers will be streamed to local standard output."
},
"image_pull_policy": {
"enum": [
"IfNotPresent",
"Always",
"Never"
],
"type": "string",
"title": "Image Pull Policy",
"default": "Never",
"description": "The image pull policy to use when pulling images."
},
"registry_credentials": {
"allOf": [
{
"$ref": "#/definitions/DockerRegistryCredentials"
}
],
"title": "Registry Credentials",
"default": {
"password": "",
"username": "phwissmann",
"registry_url": "ghcr.io"
},
"description": "Credentials for logging into a Docker registry to pull images from."
}
},
"definitions": {
"DockerRegistryCredentials": {
"type": "object",
"title": "DockerRegistryCredentials",
"required": [
"username",
"password",
"registry_url"
],
"properties": {
"reauth": {
"type": "boolean",
"title": "Reauth",
"default": true,
"description": "Whether or not to reauthenticate on each interaction."
},
"password": {
"type": "string",
"title": "Password",
"format": "password",
"writeOnly": true,
"description": "The password to log into the registry with."
},
"username": {
"type": "string",
"title": "Username",
"description": "The username to log into the registry with."
},
"registry_url": {
"type": "string",
"title": "Registry Url",
"example": "index.docker.io",
"description": "The URL to the registry. Generally, \"http\" or \"https\" can be omitted."
}
},
"description": "Store credentials for interacting with a Docker Registry.",
"secret_fields": [
"password"
],
"block_type_slug": "docker-registry-credentials",
"block_schema_references": {}
}
},
"description": "Configuration class used by the Docker worker.\n\nAn instance of this class is passed to the Docker worker's `run` method\nfor each flow run. It contains all the information necessary to execute the\nflow run as a Docker container.\n\nAttributes:\n name: The name to give to created Docker containers.\n command: The command executed in created Docker containers to kick off\n flow run execution.\n env: The environment variables to set in created Docker containers.\n labels: The labels to set on created Docker containers.\n image: The image reference of a container image to use for created jobs.\n If not set, the latest Prefect image will be used.\n image_pull_policy: The image pull policy to use when pulling images.\n networks: Docker networks that created containers should be connected to.\n network_mode: The network mode for the created containers (e.g. host, bridge).\n If 'networks' is set, this cannot be set.\n auto_remove: If set, containers will be deleted on completion.\n volumes: Docker volumes that should be mounted in created containers.\n stream_output: If set, the output from created containers will be streamed\n to local standard output.\n mem_limit: Memory limit of created containers. Accepts a value\n with a unit identifier (e.g. 100000b, 1000k, 128m, 1g.) If a value is\n given without a unit, bytes are assumed.\n memswap_limit: Total memory (memory + swap), -1 to disable swap. Should only be\n set if `mem_limit` is also set. If `mem_limit` is set, this defaults to\n allowing the container to use as much swap as memory. For example, if\n `mem_limit` is 300m and `memswap_limit` is not set, containers can use\n 600m in total of memory and swap.\n privileged: Give extended privileges to created containers."
},
"job_configuration": {
"env": "{{ env }}",
"name": "{{ name }}",
"image": "{{ image }}",
"labels": "{{ labels }}",
"command": "{{ command }}",
"volumes": "{{ volumes }}",
"networks": "{{ networks }}",
"mem_limit": "{{ mem_limit }}",
"privileged": "{{ privileged }}",
"auto_remove": "{{ auto_remove }}",
"network_mode": "{{ network_mode }}",
"memswap_limit": "{{ memswap_limit }}",
"stream_output": "{{ stream_output }}",
"image_pull_policy": "{{ image_pull_policy }}",
"registry_credentials": "{{ registry_credentials }}"
}
}