forked from rundeck-plugins/docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
plugin.yaml
589 lines (589 loc) · 19.1 KB
/
plugin.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
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
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
name: docker-container-node-executor
rundeckPluginVersion: 1.2
author: "@author@"
date: "@date@"
version: "@version@"
url: "@url@"
providers:
- name: docker-container-execute-command
service: WorkflowNodeStep
title: docker / container / execute
description: 'Execute the command in an existing container'
plugin-type: script
script-interpreter: python -u
script-file: node-execute
script-args: ${config.container} ${config.user}
config:
- type: String
name: container
title: 'container'
description: 'The container to dispatch the command'
required: true
- type: String
name: command
title: 'command'
description: 'The command string to execute in the container'
required: true
- type: String
name: user
title: 'User'
description: 'User to execute command as.'
default: root
required: false
- type: Boolean
name: debug
title: Debug?
description: 'Write debug messages to stderr'
- type: String
name: docker-cert-path
title: 'docker-cert-path'
description: 'The certificate path'
renderingOptions:
grouping: secondary
groupName: 'API Connection'
- type: String
name: docker-host
title: 'docker-host'
description: 'The docker host'
renderingOptions:
grouping: secondary
groupName: 'API Connection'
- type: Select
name: docker-tls-verify
title: 'docker-tls-verify'
description: 'Verify TLS'
values: true,false
renderingOptions:
grouping: secondary
groupName: 'API Connection'
- name: docker-container-node-executor
service: NodeExecutor
title: docker-container-node-executor
description: 'Dispatch the command to an existing container'
plugin-type: script
script-interpreter: python -u
script-file: node-execute
script-args: ${node.docker:Id} ${node.username}
config:
- type: Select
name: shell
title: Shell
description: Remote shell used to execute the command. In order to use Inline Scripts steps, this attribute is needed.This value can be overwrited on node level using docker-shell attribute
values:
- bash
- sh
scope: Instance
renderingOptions:
instance-scope-node-attribute: "docker-shell"
- type: String
name: docker-cert-path
title: 'docker-cert-path'
description: 'The certificate path'
renderingOptions:
grouping: secondary
groupName: 'API Connection'
- type: String
name: docker-host
title: 'docker-host'
description: 'The docker host'
renderingOptions:
grouping: secondary
groupName: 'API Connection'
- type: Select
name: docker-tls-verify
title: 'docker-tls-verify'
description: 'Verify TLS'
values: true,false
renderingOptions:
grouping: secondary
groupName: 'API Connection'
- type: String
name: container
title: 'container'
description: 'The container to dispatch.'
- type: Boolean
name: debug
title: Debug?
description: 'Write debug messages to stderr'
- name: docker-container-file-copier
service: FileCopier
title: docker-container-file-copier
description: 'Dispatch script to an existing container'
plugin-type: script
script-interpreter: python -u
script-file: file-copier
script-args: ${node.docker:Id} ${file-copy.file} ${file-copy.destination}
config:
- type: String
name: docker-cert-path
title: 'docker-cert-path'
description: 'The certificate path'
renderingOptions:
grouping: secondary
groupName: 'API Connection'
- type: String
name: docker-host
title: 'docker-host'
description: 'The docker host'
renderingOptions:
grouping: secondary
groupName: 'API Connection'
- type: Select
name: docker-tls-verify
title: 'docker-tls-verify'
description: 'Verify TLS'
values: true,false
renderingOptions:
grouping: secondary
groupName: 'API Connection'
- type: Boolean
name: debug
title: Debug?
description: 'Write debug messages to stderr'
- name: docker-container-model-source
service: ResourceModelSource
resource-format: resourcejson
title: docker / container / model
description: 'Read docker containers as nodes'
plugin-type: script
script-interpreter: python -u
script-file: model-source
script-args: ${config.attributes}
config:
- type: String
name: docker-cert-path
title: 'docker-cert-path'
description: 'The certificate path'
renderingOptions:
grouping: secondary
groupName: 'API Connection'
- type: String
name: docker-host
title: 'docker-host'
description: 'The docker host'
renderingOptions:
grouping: secondary
groupName: 'API Connection'
- type: Select
name: docker-tls-verify
title: 'docker-tls-verify'
description: 'Verify TLS'
values: true,false
renderingOptions:
grouping: secondary
groupName: 'API Connection'
- type: String
name: attributes
title: 'Default attributes'
description: 'List of key=value pairs (space separated). For example: "username=root osFamily=linux"'
- type: String
name: mapping
title: 'Custom Mapping'
description: 'Custom mapping (new line separated or comma separated), eg: nodename.selector=docker:Name,hostname.selector=docker:IPAddress. You can also add default values depending of an attribute of the docker container, for example: "docker-shell.<image:tag>.default=sh" or just "docker-shell.default=bash to apply it to all nodes"'
renderingOptions:
displayType: MULTI_LINE
- type: String
name: tags
title: Tags
description: 'List of tags (space separated or comma separated). You can add custom, eg: tag.selector=docker:Config.Image'
- type: String
name: filter
title: Filter
description: 'Filter the list of containers (docker ps --filter syntax), eg: name=rundeck*,status=running. Further information here: https://docs.docker.com/engine/reference/commandline/ps/'
- type: Boolean
name: all-containers
title: 'All containers'
description: 'Include all containers. If unchecked only running containers will be loaded.'
- type: Boolean
name: debug
title: Debug?
description: 'Write debug messages to stderr'
- name: docker-container-inspect-workflow-step
service: WorkflowNodeStep
title: docker / container / inspect
description: 'inspect the state of the container'
plugin-type: script
script-interpreter: python -u
script-file: container-inspect
script-args: ${config.container}
config:
- type: String
name: container
description: 'The container ID'
- type: Boolean
name: debug
title: Debug?
description: 'Write debug messages to stderr'
- name: docker-container-pause-step
service: WorkflowNodeStep
title: docker / container / pause
description: 'pause all processes within the container'
plugin-type: script
script-interpreter: python -u
script-file: container-pause
script-args: ${config.container}
config:
- type: String
name: container
description: 'The container ID'
- type: Boolean
name: debug
title: Debug?
description: 'Write debug messages to stderr'
- name: docker-container-unpause-step
service: WorkflowNodeStep
title: docker / container / unpause
description: 'unpause all processes within the container'
plugin-type: script
script-interpreter: python -u
script-file: container-unpause
script-args: ${config.container}
config:
- type: String
name: container
description: 'The container ID'
- type: Boolean
name: debug
title: Debug?
description: 'Write debug messages to stderr'
- name: docker-container-kill-step
service: WorkflowNodeStep
title: docker / container / kill
description: 'kill the running container'
plugin-type: script
script-interpreter: python -u
script-file: container-kill
script-args: ${config.container} ${container.signal}
config:
- type: String
name: container
description: 'The container ID'
- type: String
name: signal
description: 'Signal to send to the container'
default: KILL
- type: Boolean
name: debug
title: Debug?
description: 'Write debug messages to stderr'
- name: docker-container-stats-step
service: WorkflowNodeStep
title: docker / container / stats
description: 'Display container resource usage statistics (no-stream)'
plugin-type: script
script-interpreter: python -u
script-file: container-stats
script-args: ${config.container} ${config.format}
config:
- type: String
name: container
description: 'The container ID'
- type: String
name: format
description: 'Pretty-print images using a Go template'
default: 'table {{.Container}}\t{{.CPUPerc}}\t{{.MemUsage}}\t{{.NetIO}}\t{{.BlockIO}}'
- type: Boolean
name: debug
title: Debug?
description: 'Write debug messages to stderr'
- name: docker-run-workflow-step
service: WorkflowNodeStep
title: docker / image / run
description: 'Run the image and execute command'
plugin-type: script
script-interpreter: python -u
script-file: run-image
script-args: ${config.image} ${config.command}
config:
- type: String
name: name
title: 'name'
description: 'The identifying name'
renderingOptions:
groupName: 'Container'
- type: String
name: image
title: 'image'
description: 'The container image identifier'
required: true
renderingOptions:
groupName: 'Container'
- type: String
name: env
title: 'environment variables'
description: 'Set of environment variables.'
renderingOptions:
groupName: 'Container'
- type: String
name: env-file
title: 'file with environment variables'
description: 'Set path of file with environment variables (in the filesystem where Rundeck runs).'
renderingOptions:
groupName: 'Container'
- type: String
name: volume
title: 'volume'
description: 'Bind mount a volume (from the filesystem where Docker engine runs)'
renderingOptions:
groupName: 'Container'
- type: String
name: volumes-from
title: 'volumes-from'
description: 'Mount volumes from the specified container(s)'
renderingOptions:
groupName: 'Container'
- type: String
name: publish
title: 'publish'
description: 'Publish a container port (eg xxxx:yyyy)'
renderingOptions:
groupName: 'Container'
- type: FreeSelect
name: pull
title: 'pull'
description: 'Pull image before running ("always"|"missing"|"never")'
values: always,missing,never
renderingOptions:
groupName: 'Container'
- type: String
name: cidfile
title: 'cidfile'
description: 'Write the container ID to the file'
renderingOptions:
groupName: 'Running'
- type: String
name: command
title: 'command'
description: 'Run this command at start up'
renderingOptions:
groupName: 'Running'
- type: Select
name: detach
title: 'detach'
description: 'Run container in background and print container ID'
values: true,false
renderingOptions:
groupName: 'Running'
- type: Select
name: tty
title: 'tty'
description: 'Allocate a pseudo-TTY'
values: true,false
renderingOptions:
groupName: 'Running'
- type: Select
name: interactive
title: 'interactive'
description: 'Keep STDIN open even if not attached'
values: true,false
renderingOptions:
groupName: 'Running'
- type: String
name: add-host
title: 'add-host'
description: 'Add a line to /etc/hosts (host:IP)'
renderingOptions:
groupName: 'OS Config'
- type: Integer
name: blkio-weight
title: 'blkio-weight'
description: 'Block IO weight (relative weight) accepts a weight value between 10 and 1000.'
renderingOptions:
groupName: 'OS Config'
- type: String
name: cap-add
title: 'cap-add'
description: 'Add Linux capabilities'
renderingOptions:
groupName: 'OS Config'
- type: String
name: cap-drop
title: 'cap-drop'
description: 'Drop Linux capabilities'
renderingOptions:
groupName: 'OS Config'
- type: Integer
name: cpu-period
title: 'cpu-period'
description: 'Limit the CPU CFS (Completely Fair Scheduler) period'
renderingOptions:
groupName: 'Resources'
- type: Integer
name: cpu-quota
title: 'cpu-quota'
description: 'Limit the CPU CFS (Completely Fair Scheduler) quota'
renderingOptions:
groupName: 'Resources'
- type: Integer
name: cpu-shares
title: 'cpu-shares'
description: 'CPU shares (relative weight)'
renderingOptions:
groupName: 'Resources'
- type: String
name: cpuset-cpus
title: 'cpuset-cpus'
description: 'CPUs in which to allow execution (0-3, 0,1)'
renderingOptions:
groupName: 'Resources'
- type: String
name: cpuset-mems
title: 'cpuset-mems'
description: 'Memory nodes (MEMs) in which to allow execution (0-3, 0,1)'
renderingOptions:
groupName: 'Resources'
- type: String
name: device
title: 'device'
description: 'Allows you to run devices inside the container without the --privileged flag'
renderingOptions:
groupName: 'Running'
- type: String
name: dns
title: 'dns'
description: 'Set custom dns servers for the container'
renderingOptions:
groupName: 'Network'
- type: FreeSelect
name: ipc
title: 'ipc'
description: 'Set the IPC mode for the container'
values: host,container:<name|id>
renderingOptions:
groupName: 'Container'
- type: Select
name: log-driver
title: 'log-driver'
description: 'Logging driver for container'
values: none,json-file,syslog,journald
renderingOptions:
groupName: 'Running'
- type: String
name: log-opt
title: 'log-opt'
description: 'Log driver options'
renderingOptions:
groupName: 'Running'
- type: String
name: lxc-conf
title: 'lxc-conf'
description: 'Add custom lxc options'
renderingOptions:
groupName: 'Running'
- type: String
name: memory
title: 'memory'
description: 'Memory limit (format: <number><optional unit>, where unit = b, k, m or g)'
renderingOptions:
groupName: 'Resources'
- type: String
name: memory-swap
title: 'memory-swap'
description: 'Total memory limit (memory + swap, format: <number><optional unit>, where unit = b, k, m or g)'
renderingOptions:
groupName: 'Resources'
- type: FreeSelect
name: net
title: 'net'
description: 'Set the Network mode for the container'
values: bridge,none,host,container:<name|id>
renderingOptions:
groupName: 'Network'
- type: Select
name: oom-kill-disable
title: 'oom-kill-disable'
description: 'Whether to disable OOM Killer for the container or not.'
values: true,false
renderingOptions:
groupName: 'Running'
- type: Select
name: privileged
title: 'privileged'
description: 'Give extended privileges to this container'
values: true,false
renderingOptions:
groupName: 'Running'
- type: FreeSelect
name: restart
title: 'restart'
description: 'Restart policy to apply when a container exits'
values: no,always,on-failure[:max-retries]
renderingOptions:
groupName: 'Running'
- type: Select
name: rm
title: 'rm'
description: 'Automatically remove the container when it exits'
values: true,false
renderingOptions:
groupName: 'Running'
- type: String
name: security-opt
title: 'security-opt'
description: 'Security Options'
renderingOptions:
groupName: 'Container'
- type: String
name: read-only
title: 'read-only'
description: 'Mount the containers root filesystem as read only'
renderingOptions:
groupName: 'OS Config'
- type: String
name: ulimit
title: 'ulimit'
description: 'Ulimit options'
renderingOptions:
groupName: 'OS Config'
- type: String
name: uts
title: 'uts'
description: 'UTS namespace to use'
renderingOptions:
groupName: 'OS Config'
- type: String
name: label
title: 'label'
description: 'Set meta data on a container'
renderingOptions:
groupName: 'Container'
- type: String
name: workdir
title: 'working-directory'
description: 'Working directory inside the container'
renderingOptions:
groupName: 'Container'
- type: String
name: user
title: 'user'
description: 'Username or UID (format: <name|uid>[:<group|gid>])'
renderingOptions:
groupName: 'Container'
- type: Boolean
name: debug
title: Debug?
description: 'Write debug messages to stderr'
renderingOptions:
groupName: 'Step Options'
- type: String
name: docker-cert-path
title: 'docker-cert-path'
description: 'The certificate path'
renderingOptions:
grouping: secondary
groupName: 'API Connection'
- type: String
name: docker-host
title: 'docker-host'
description: 'The docker host'
renderingOptions:
grouping: secondary
groupName: 'API Connection'
- type: Select
name: docker-tls-verify
title: 'docker-tls-verify'
description: 'verify TLS'
values: true,false
renderingOptions:
grouping: secondary
groupName: 'API Connection'