Skip to content

Commit

Permalink
Github actions auto update oos templates
Browse files Browse the repository at this point in the history
  • Loading branch information
ceshihao committed Jul 21, 2024
1 parent 7ecf826 commit 9b2e63a
Show file tree
Hide file tree
Showing 5 changed files with 443 additions and 21 deletions.
33 changes: 27 additions & 6 deletions list-templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -4563,7 +4563,7 @@
"CreatedDate": "2023-11-06T11:13:49Z",
"Description": "{\"en\": \"Use this template to install oos package on ecs\", \"zh-cn\": \"安装/卸载扩展程序\", \"name-en\": \"ACS-ECS-BulkyConfigureOOSPackageWithTemporaryURL\", \"name-zh-cn\": \"安装/卸载扩展程序\", \"categories\": [\"run_command\", \"application_manage\"]}",
"HasTrigger": false,
"Hash": "5a148a97b37bf5c0fcc81efa51cf30e5f5e07831a808dba1deef846afb682102",
"Hash": "e61653a22b2ab48a8285c2a334d45f4b03fb2f4674600d8a3560773ae0a01383",
"IsFavorite": false,
"Popularity": 5,
"ResourceGroupId": "",
Expand All @@ -4573,10 +4573,10 @@
"TemplateId": "t-dbec4cab2eda4e90a40c",
"TemplateName": "ACS-ECS-BulkyConfigureOOSPackageWithTemporaryURL",
"TemplateType": "Automation",
"TemplateVersion": "v25",
"TemplateVersion": "v26",
"TotalExecutionCount": -1,
"UpdatedBy": "ACS",
"UpdatedDate": "2024-06-04T03:33:56Z"
"UpdatedDate": "2024-07-15T08:16:49Z"
},
{
"Category": "Other",
Expand Down Expand Up @@ -5208,6 +5208,27 @@
"UpdatedBy": "ACS",
"UpdatedDate": "2024-07-04T02:36:49Z"
},
{
"Category": "Other",
"CreatedBy": "ACS",
"CreatedDate": "2024-07-19T09:29:33Z",
"Description": "{\"en\": \"Solutions to Repair Windows System Blue Screen Issues\", \"zh-cn\": \"修复Windows系统蓝屏问题解决方案\", \"name-en\": \"ACS-ECS-RepairWindowsBlueScreenIssue\", \"name-zh-cn\": \"修复Windows系统蓝屏问题\"}",
"HasTrigger": false,
"Hash": "6571e2595de41047b416efe6c45644f87120b65971e17b398a50b3a18e31887b",
"IsFavorite": false,
"Popularity": 5,
"ResourceGroupId": "",
"ShareType": "Public",
"Tags": {},
"TemplateFormat": "YAML",
"TemplateId": "t-adebcc11c33849b39727",
"TemplateName": "ACS-ECS-RepairWindowsBlueScreenIssue",
"TemplateType": "Automation",
"TemplateVersion": "v4",
"TotalExecutionCount": -1,
"UpdatedBy": "ACS",
"UpdatedDate": "2024-07-19T13:22:50Z"
},
{
"Category": "Other",
"CreatedBy": "ACS",
Expand Down Expand Up @@ -5781,7 +5802,7 @@
"CreatedDate": "2023-12-18T09:47:55Z",
"Description": "{\"en\": \"Use this template to install multiple oos packages on ecs\", \"zh-cn\": \"批量安装/卸载多个扩展程序\", \"name-en\": \"ACS-ECS-BulkyConfigureMultipleOOSPackagesWithTemporaryURL\", \"name-zh-cn\": \"批量安装/卸载多个扩展程序\", \"categories\": [\"run_command\"]}",
"HasTrigger": false,
"Hash": "433f280252544e321cab9c037b3837dab1409bdd697dd46e70a05f94a936dc38",
"Hash": "6ccfc52c2b21550e4e605047fc901333f41ac5c8e19cdd55f12f00c434782fdc",
"IsFavorite": false,
"Popularity": 0,
"ResourceGroupId": "",
Expand All @@ -5791,10 +5812,10 @@
"TemplateId": "t-cc058c4ee95b45b39460",
"TemplateName": "ACS-ECS-BulkyConfigureMultipleOOSPackagesWithTemporaryURL",
"TemplateType": "Automation",
"TemplateVersion": "v9",
"TemplateVersion": "v10",
"TotalExecutionCount": -1,
"UpdatedBy": "ACS",
"UpdatedDate": "2024-06-24T08:05:12Z"
"UpdatedDate": "2024-07-15T08:16:49Z"
},
{
"Category": "Other",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ Parameters:
AllowedValues:
- install
- uninstall
- update
Default: install
AssociationPropertyMetadata:
LocaleKey: SoftwareOperationType
Expand Down Expand Up @@ -74,14 +75,14 @@ Parameters:
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: sleepForEcsReady
Action: 'ACS::Sleep'
Action: ACS::Sleep
Properties:
Duration: 3s
- Name: getInstanceFromOrderId
Action: 'ACS::WaitFor'
Action: ACS::WaitFor
Retries: 57
When:
'Fn::Not':
Fn::Not:
'Fn::Equals':
- '{{ orderId }}'
- ''
Expand All @@ -98,11 +99,11 @@ Tasks:
- Paid
StopRetryValues:
- Cancelled
PropertySelector: 'Data.OrderList.Order[].PaymentStatus'
PropertySelector: Data.OrderList.Order[].PaymentStatus
Outputs:
instanceIds:
Type: List
ValueSelector: 'Data.OrderList.Order[].InstanceIDs | fromjson | .[]'
ValueSelector: Data.OrderList.Order[].InstanceIDs | fromjson | .[]
- Name: getInstanceFromTargets
When:
'Fn::Equals':
Expand All @@ -125,7 +126,7 @@ Tasks:
Description:
en: Configure Package
zh-cn: 配置软件包
Action: 'ACS::ECS::ConfigureMultipleOOSPackagesWithTemporaryURL'
Action: ACS::ECS::ConfigureMultipleOOSPackagesWithTemporaryURL
Properties:
regionId: '{{ regionId }}'
action: '{{ action }}'
Expand All @@ -134,7 +135,7 @@ Tasks:
packageInfo: '{{ packageInfo }}'
Loop:
Items:
'Fn::If':
Fn::If:
- 'Fn::Equals':
- '{{ orderId }}'
- ''
Expand All @@ -151,14 +152,10 @@ Tasks:
Outputs:
commandOutput:
Type: Json
ValueSelector: >-
.|{"InstanceId": "{{ ACS::TaskLoopItem }}", "InstanceResult":
.commandOutput}
ValueSelector: '.|{"InstanceId": "{{ ACS::TaskLoopItem }}", "InstanceResult": .commandOutput}'
configurationOutput:
Type: Json
ValueSelector: >-
.|{"InstanceId": "{{ ACS::TaskLoopItem }}", "InstanceResult":
.configurationOutput}
ValueSelector: '.|{"InstanceId": "{{ ACS::TaskLoopItem }}", "InstanceResult": .configurationOutput}'
Outputs:
commandOutput:
Type: List
Expand All @@ -167,7 +164,7 @@ Outputs:
Type: List
Value: '{{ configurePackage.configurationOutputs }}'
Metadata:
'ALIYUN::OOS::Interface':
ALIYUN::OOS::Interface:
ParameterGroups:
- Parameters:
- packageInfo
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ Parameters:
AllowedValues:
- install
- uninstall
- update
Default: install
AssociationPropertyMetadata:
LocaleKey: SoftwareOperationType
Expand Down Expand Up @@ -141,7 +142,7 @@ Tasks:
Description:
en: Configure Package
zh-cn: 配置软件包
Action: ACS::ECS::ConfigureOOSPackageWithTemporaryURL
Action: ACS::ECS::ConfigureOOSPackageWithTemporaryURLFullActions
Properties:
regionId: '{{ regionId }}'
instanceId: '{{ ACS::TaskLoopItem }}'
Expand Down
102 changes: 102 additions & 0 deletions templates/ACS-ECS-BulkyModifyDiskSpec.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
FormatVersion: OOS-2019-06-01
Description:
en: Bulky modify disk spec
zh-cn: 批量修改云盘规格
name-en: ACS-ECS-BulkyModifyDiskSpec
name-zh-cn: 批量修改云盘规格
categories:
- instance_manage
- computenest
Parameters:
regionId:
Type: String
Label:
en: RegionId
zh-cn: 地域ID
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
diskIds:
Label:
en: DiskIds
zh-cn: 云盘ID
AssociationProperty: ALIYUN::ECS::Disk::DiskId
AssociationPropertyMetadata:
RegionId: regionId
Type: List
performanceLevel:
Label:
en: PerformanceLevel
zh-cn: 云盘的性能级别
Type: String
AllowedValues:
- PL0
- PL1
- PL2
- PL3
Default: PL1
diskCategory:
Label:
en: DiskCategory
zh-cn: 云盘的类型
Type: String
AllowedValues:
- cloud_essd
- cloud_auto
- cloud_ssd
- cloud_efficiency
- ''
Default: ''
rateControl:
Label:
en: RateControl
zh-cn: 任务执行的并发比率
Type: Json
AssociationProperty: RateControl
Default:
Mode: Concurrency
MaxErrors: 0
Concurrency: 10
OOSAssumeRole:
Label:
en: OOSAssumeRole
zh-cn: OOS扮演的RAM角色
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: modifyDiskSpec
Action: ACS::ExecuteApi
Description:
en: Modify disk spec
zh-cn: 修改磁盘规格
Properties:
Service: ECS
API: ModifyDiskSpec
Parameters:
RegionId: '{{ regionId }}'
DiskId: '{{ ACS::TaskLoopItem }}'
PerformanceLevel: '{{ performanceLevel }}'
DiskCategory: '{{ diskCategory }}'
Loop:
RateControl: '{{ rateControl }}'
Items: '{{ diskIds }}'
Metadata:
ALIYUN::OOS::Interface:
ParameterGroups:
- Parameters:
- regionId
- diskIds
- performanceLevel
- diskCategory
Label:
default:
zh-cn: 参数设置
en: Configure Parameters
- Parameters:
- rateControl
- OOSAssumeRole
Label:
default:
zh-cn: 高级选项
en: Control Options

Loading

0 comments on commit 9b2e63a

Please sign in to comment.