-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathACS::ECS::ConfigureNVMe.json
112 lines (112 loc) · 3.03 KB
/
ACS::ECS::ConfigureNVMe.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
{
"FormatVersion": "OOS-2019-06-01",
"Description": {
"name-en": "ACS::ECS::ConfigureNVMe",
"name-zh-cn": "执行命令安装NVMe",
"en": "Execute cloud assistant commands and modify instance parameters in ECS instances",
"zh-cn": "在ECS实例中执行云助手命令并修改实例参数"
},
"Parameters": {
"regionId": {
"Label": {
"en": "RegionId",
"zh-cn": "地域ID"
},
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::RegionId",
"Default": "{{ ACS::RegionId }}"
},
"instanceId": {
"Label": {
"en": "ECSInstanceId",
"zh-cn": "ECS实例ID"
},
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::Instance::InstanceId",
"AssociationPropertyMetadata": {
"RegionId": "regionId"
}
}
},
"Tasks": [
{
"Name": "configureNVMe",
"Action": "ACS::ECS::RunCommand",
"Description": {
"en": "Executes a cloud assistant command",
"zh-cn": "执行云助手命令"
},
"Properties": {
"regionId": "{{ regionId }}",
"commandContent": "#!/bin/bash\nacs-plugin-manager --exec --plugin ecs_nvme_config --params --fix",
"instanceId": "{{instanceId}}",
"commandType": "RunShellScript"
},
"Outputs": {
"invocationOutput": {
"Type": "String",
"ValueSelector": "invocationOutput"
}
}
},
{
"Name": "RebootInstance",
"Action": "ACS::ECS::RebootInstance",
"Description": {
"en": "Restarts the ECS instances",
"zh-cn": "重启实例"
},
"Properties": {
"regionId": "{{ regionId }}",
"instanceId": "{{ instanceId }}"
},
"Outputs": {}
},
{
"Name": "checkConfigureNVMe",
"Action": "ACS::ECS::RunCommand",
"Description": {
"en": "Executes a cloud assistant command",
"zh-cn": "重启后执行云助手命令"
},
"Properties": {
"regionId": "{{ regionId }}",
"commandContent": "#!/bin/bash\nacs-plugin-manager --exec --plugin ecs_nvme_config --params --check",
"instanceId": "{{instanceId}}",
"commandType": "RunShellScript"
},
"Outputs": {
"invocationOutput": {
"Type": "String",
"ValueSelector": "invocationOutput"
}
}
},
{
"Name": "modifyInstanceAttribute",
"Action": "ACS::ExecuteApi",
"Description": {
"en": "Modifies the information of an ECS instance",
"zh-cn": "修改ECS实例属性"
},
"Properties": {
"Service": "ECS",
"API": "ModifyInstanceAttribute",
"Parameters": {
"RegionId": "{{ regionId }}",
"InstanceId": "{{ instanceId }}",
"ImageOptions.CurrentOSNVMeSupported": true
}
},
"Outputs": {}
}
],
"Outputs": {
"invocationOutput": {
"Type": "String",
"Value": {
"Fn::Base64Decode": "{{ configureNVMe.invocationOutput }}"
}
}
}
}