-
Notifications
You must be signed in to change notification settings - Fork 17
/
ACS-RDC-RunCommandByDevops.yml
69 lines (69 loc) · 1.75 KB
/
ACS-RDC-RunCommandByDevops.yml
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
FormatVersion: OOS-2019-06-01
Description:
en: Bulky run command on ECS instances
zh-cn: 批量在多台实例上运行命令
name-en: ACS-RDC-RunCommandByDevops
name-zh-cn: 云效批量运行命令
Parameters:
instanceInfos:
Description: The infos list of the ECS instance
Type: List
batchNumber:
Description: The number of times of wholesale distribution
Type: Number
MinValue: 1
MaxValue: 10
Default: 5
Executor:
Type: String
Default: aliyun_057966
DeployId:
Type: String
Default: '1'
RdcRegionId:
Type: String
Default: '1'
CorpIdentifier:
Type: String
Default: 53082708-5ec4-4734-9299-dc986cb1845f
OOSAssumeRole:
Description: The RAM role to be assumed by OOS
Type: String
Default: ''
RamRole: '{{OOSAssumeRole}}'
Tasks:
- Name: loopRunCommand
Description: Bulky run cloud assistant command
Action: 'ACS::RDC::RunCommandByDevops'
Properties:
ServiceTags:
'Fn::Select':
- instanceId
- '{{ ACS::TaskLoopItem }}'
CommandContent:
'Fn::Select':
- commandContent
- '{{ ACS::TaskLoopItem }}'
RdcRegionId: '{{RdcRegionId}}'
CorpIdentifier: '{{CorpIdentifier}}'
Executor: '{{Executor}}'
DeployId: '{{DeployId}}'
Loop:
Items: '{{ instanceInfos }}'
MaxErrors: 0
Concurrency:
'Fn::CalculateBatch':
- '{{ batchNumber }}'
- '{{ instanceInfos }}'
Outputs:
commandOutputs:
AggregateType: 'Fn::ListJoin'
AggregateField: commandOutput
Outputs:
commandOutput:
Type: String
ValueSelector: InvocationOutput
Outputs:
commandOutputs:
Type: List
Value: '{{ loopRunCommand.commandOutputs }}'