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 Aug 11, 2024
1 parent 9d44790 commit b9c84cc
Show file tree
Hide file tree
Showing 9 changed files with 120 additions and 58 deletions.
105 changes: 63 additions & 42 deletions list-templates.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
"CreatedDate": "2019-06-21T02:32:39Z",
"Description": "{\"en\": \"Updates an existing ECS image via ECS Cloud Assistant then creates an ECS image\", \"zh-cn\": \"通过运行命令更新一个已存在的ECS镜像后创建一个新ECS镜像\", \"name-en\": \"Update Image\", \"name-zh-cn\": \"更新镜像\", \"categories\": [\"image_manage\", \"application_manage\"]}",
"HasTrigger": false,
"Hash": "47dd08c25fec91a41c2edee14fe2de5e4974b8a2f56e4b90e51f9032d52bee36",
"Hash": "a41784438655e4b680bd7c8bd2be1f12f29e4afb708e8f85ab92c61ff3e16282",
"IsFavorite": false,
"Popularity": 9.9,
"ResourceGroupId": "rg-acfmz4wrjukykdy",
Expand All @@ -58,10 +58,10 @@
"TemplateId": "t-1d2b574bd67a4c949677",
"TemplateName": "ACS-ECS-UpdateImage",
"TemplateType": "Automation",
"TemplateVersion": "v51",
"TemplateVersion": "v52",
"TotalExecutionCount": -1,
"UpdatedBy": "ACS",
"UpdatedDate": "2024-03-08T02:30:42Z"
"UpdatedDate": "2024-08-05T08:58:17Z"
},
{
"Category": "Other",
Expand Down Expand Up @@ -90,7 +90,7 @@
"CreatedDate": "2019-11-20T03:57:45Z",
"Description": "{\"name-en\": \"ACS-ECS-UpdateAndCopyImage\", \"name-zh-cn\": \"更新ECS镜像并同步到其它地域\", \"en\": \"Updates an existing ECS image via ECS Cloud Assistant then creates an ECS image and copy new image\", \"zh-cn\": \"通过运行命令更新一个已存在的ECS镜像后创建一个新ECS镜像并且克隆新镜像到其他地域\", \"categories\": [\"image_manage\"]}",
"HasTrigger": false,
"Hash": "132ee5a57ff991adb2ac9e50648b36e1a6b46a6c132942cd9e5ae338945d1f7a",
"Hash": "64cc79e2c23dbae7695668f0667263b6cad0dd484a235eb6e89d7e2ea78e6df5",
"IsFavorite": false,
"Popularity": 9.8,
"ResourceGroupId": "rg-acfmz4wrjukykdy",
Expand All @@ -100,10 +100,10 @@
"TemplateId": "t-364cd7c848214fd0a621",
"TemplateName": "ACS-ECS-UpdateAndCopyImage",
"TemplateType": "Automation",
"TemplateVersion": "v34",
"TemplateVersion": "v35",
"TotalExecutionCount": -1,
"UpdatedBy": "ACS",
"UpdatedDate": "2024-02-22T03:18:23Z"
"UpdatedDate": "2024-08-05T08:58:17Z"
},
{
"Category": "Other",
Expand Down Expand Up @@ -279,7 +279,7 @@
"CreatedDate": "2020-03-05T06:41:50Z",
"Description": "{\"name-en\": \"ACS-ECS-CreateAndCopyImage\", \"name-zh-cn\": \"创建ECS镜像并同步到其它地域\", \"en\": \"Creates an ECS image and copy new image\", \"zh-cn\": \"创建一个新ECS镜像并且克隆新镜像到其他地域\", \"categories\": [\"image_manage\"]}",
"HasTrigger": false,
"Hash": "a4810b2262ffebd64a8590b684521ceb97d07559dd022a0f0f1f40578147dfe5",
"Hash": "ce31d91c594cb5cab554c0ef822f89b6215c4df80dd2fa4d4a2571efc06f8137",
"IsFavorite": false,
"Popularity": 8.24,
"ResourceGroupId": "rg-acfmz4wrjukykdy",
Expand All @@ -289,10 +289,10 @@
"TemplateId": "t-de8b0d697efe4224a902",
"TemplateName": "ACS-ECS-CreateAndCopyImage",
"TemplateType": "Automation",
"TemplateVersion": "v24",
"TemplateVersion": "v25",
"TotalExecutionCount": -1,
"UpdatedBy": "ACS",
"UpdatedDate": "2024-02-22T03:18:19Z"
"UpdatedDate": "2024-08-05T08:58:15Z"
},
{
"Category": "Other",
Expand Down Expand Up @@ -1260,6 +1260,27 @@
"UpdatedBy": "ACS",
"UpdatedDate": "2024-02-22T03:18:09Z"
},
{
"Category": "EventTrigger",
"CreatedBy": "ACS",
"CreatedDate": "2019-12-04T12:56:43Z",
"Description": "{\"en\": \"Start ECS instance when instance enter stopped status with specified tag\", \"zh-cn\": \"当标签下实例关机时,自动启动该实例\", \"name-en\": \"ACS-ECS-AutoStartECSWhenStoppedByTags\", \"name-zh-cn\": \"指定标签下的实例关机时自动重启\", \"categories\": [\"event-trigger\"]}",
"HasTrigger": true,
"Hash": "81062b09cae2d3485f248f6e6ced4f5598cff94c51e8318a268b3328f77e7776",
"IsFavorite": false,
"Popularity": 5,
"ResourceGroupId": "rg-acfmz4wrjukykdy",
"ShareType": "Public",
"Tags": {},
"TemplateFormat": "YAML",
"TemplateId": "t-a78ae2c2d6954ea2afde",
"TemplateName": "ACS-ECS-AutoStartECSWhenStoppedByTags",
"TemplateType": "Automation",
"TemplateVersion": "v13",
"TotalExecutionCount": -1,
"UpdatedBy": "ACS",
"UpdatedDate": "2024-08-06T02:44:14Z"
},
{
"Category": "AlarmTrigger",
"CreatedBy": "ACS",
Expand Down Expand Up @@ -1537,9 +1558,9 @@
"Category": "Other",
"CreatedBy": "ACS",
"CreatedDate": "2020-04-01T03:47:15Z",
"Description": "{\"en\": \"When using ECS instances, some situations can lead to system disk corruption, such as instances being forced to stop or restart, or sudden downtime, failure to update /etc/fstab when the disk is unloaded, or even loss or corruption of /etc/fstab or initrd files. When the instance cannot be accessed, the state of the instance displayed in the ECS instance console may still be Running, but the application in the instance cannot be accessed, the network in the instance cannot be reached, and the connection cannot be established through workbench or SSH. If you can connect to an instance from the console with VNC, you will probably see a page that indicates a system startup failure. At this point, you can consider executing the template to cure the damaged instance. The cure process is that the system disk of the damaged instance will be mounted to the newly created temporary instance, then a cure script will be executed in the temporary instance, and finally the cured system disk will be mounted back to the original instance.\", \"zh-cn\": \"使用ECS实例时,有些情况可能导致系统盘损伤,比如实例被强制地停止或重启,抑或突然发生了宕机,以及数据盘被卸载后未更新/etc/fstab,甚至于/etc/fstab或initrd文件丢失或损坏。当无法访问实例时,该实例在ECS实例控制台显示的状态可能还是运行中,但实例内的应用不可访问,实例内的网络不可达,更无法通过workbench或者ssh建立连接。如果您在控制台通过vnc能连接上实例,看到的页面大概是系统启动失败的提示信息。此时您可考虑执行该模版对损伤实例进行救治,救治流程主要是损伤的实例的系统盘将被挂载到新创建的临时实例上,接着在临时实例中会执行一段救治脚本,最后救治过的系统盘将被挂载回原实例\", \"name-en\": \"ACS-ECS-RescueUnreachableInstance-Linux\", \"name-zh-cn\": \"自助救治损伤的ECS实例Linux系统盘\", \"categories\": [\"diagnose\"]}",
"Description": "{\"en\": \"When using ECS instances, some situations can lead to system disk corruption, such as instances being forced to stop or restart, or sudden downtime, failure to update /etc/fstab when the disk is unloaded, or even loss or corruption of /etc/fstab or initrd files. When the instance cannot be accessed, the state of the instance displayed in the ECS instance console may still be Running, but the application in the instance cannot be accessed, the network in the instance cannot be reached, and the connection cannot be established through workbench or SSH. If you can connect to an instance from the console with VNC, you will probably see a page that indicates a system startup failure. At this point, you can consider executing the template to cure the damaged instance. The cure process is that the system disk of the damaged instance will be mounted to the newly created temporary instance, then a cure script will be executed in the temporary instance, and finally the cured system disk will be mounted back to the original instance.\", \"zh-cn\": \"使用ECS实例时,有些情况可能导致系统盘损伤,比如实例被强制地停止或重启,抑或突然发生了宕机,以及数据盘被卸载后未更新/etc/fstab,甚至于/etc/fstab或initrd文件丢失或损坏。当无法访问实例时,该实例在ECS实例控制台显示的状态可能还是运行中,但实例内的应用不可访问,实例内的网络不可达,更无法通过workbench或者ssh建立连接。如果您在控制台通过vnc能连接上实例,看到的页面大概是系统启动失败的提示信息。此时您可考虑执行该模板对损伤实例进行救治,救治流程主要是损伤的实例的系统盘将被挂载到新创建的临时实例上,接着在临时实例中会执行一段救治脚本,最后救治过的系统盘将被挂载回原实例\", \"name-en\": \"ACS-ECS-RescueUnreachableInstance-Linux\", \"name-zh-cn\": \"自助救治损伤的ECS实例Linux系统盘\", \"categories\": [\"diagnose\"]}",
"HasTrigger": false,
"Hash": "4220d81ca6f07a525c5245c93a1e1625ba656011754a6ff9cbcc62b18d6a0022",
"Hash": "f63b23af6cd0b737ceeb4afd29ce2747ec7744c8998785f330e89af2624624d2",
"IsFavorite": false,
"Popularity": 5,
"ResourceGroupId": "rg-acfmz4wrjukykdy",
Expand All @@ -1549,10 +1570,10 @@
"TemplateId": "t-94baebe1d0764277b147",
"TemplateName": "ACS-ECS-RescueUnreachableInstance-Linux",
"TemplateType": "Automation",
"TemplateVersion": "v8",
"TemplateVersion": "v9",
"TotalExecutionCount": -1,
"UpdatedBy": "ACS",
"UpdatedDate": "2024-02-22T03:18:21Z"
"UpdatedDate": "2024-08-05T08:58:16Z"
},
{
"Category": "Other",
Expand Down Expand Up @@ -2356,9 +2377,9 @@
"Category": "Other",
"CreatedBy": "ACS",
"CreatedDate": "2021-01-27T08:57:50Z",
"Description": "{\"name-en\": \"ACS-ECS-CreateImageAndUpdateLaunchTemplates\", \"name-zh-cn\": \"创建ECS镜像并更新启动模版\", \"en\": \"Creates an ECS image and update launch template\", \"zh-cn\": \"创建ECS镜像并更新启动模版\", \"categories\": [\"image_manage\"]}",
"Description": "{\"name-en\": \"ACS-ECS-CreateImageAndUpdateLaunchTemplates\", \"name-zh-cn\": \"创建ECS镜像并更新启动模板\", \"en\": \"Creates an ECS image and update launch template\", \"zh-cn\": \"创建ECS镜像并更新启动模板\", \"categories\": [\"image_manage\"]}",
"HasTrigger": false,
"Hash": "0ef129be89c354ea45649f025d7d171c8baac60fbafa7bf68035fa666671743e",
"Hash": "2614cef53e9b6ae56beba45b00cd8bf2748d09471f39851d14b2c9161c36591f",
"IsFavorite": false,
"Popularity": 5,
"ResourceGroupId": "rg-acfmz4wrjukykdy",
Expand All @@ -2368,10 +2389,10 @@
"TemplateId": "t-aaa35aa635194e2c888d",
"TemplateName": "ACS-ECS-CreateImageAndUpdateLaunchTemplates",
"TemplateType": "Automation",
"TemplateVersion": "v12",
"TemplateVersion": "v13",
"TotalExecutionCount": -1,
"UpdatedBy": "ACS",
"UpdatedDate": "2024-02-22T03:18:19Z"
"UpdatedDate": "2024-08-05T08:58:15Z"
},
{
"Category": "Other",
Expand Down Expand Up @@ -3112,9 +3133,9 @@
"Category": "Other",
"CreatedBy": "ACS",
"CreatedDate": "2021-11-18T12:13:51Z",
"Description": "{\"en\": \"Modify protection module status\", \"zh-cn\": \"开启WAF防护功能模块模块\", \"name-en\": \"ACS-WAF-BulkyModifyProtectionModuleStatus\", \"name-zh-cn\": \"开启WAF防护功能模块\", \"categories\": [\"security\"]}",
"Description": "{\"en\": \"Modify protection module status\", \"zh-cn\": \"开启WAF防护功能模块\", \"name-en\": \"ACS-WAF-BulkyModifyProtectionModuleStatus\", \"name-zh-cn\": \"开启WAF防护功能模块\", \"categories\": [\"security\"]}",
"HasTrigger": false,
"Hash": "f27a0f0f2361dea919147abd797a8b91b27bc220c40a4d50c20b041f2964e632",
"Hash": "154fe88acdb1f48918c49a2e0362c3e2fdd649716f0f80525eb41eff8150bcce",
"IsFavorite": false,
"Popularity": 5,
"ResourceGroupId": "",
Expand All @@ -3124,10 +3145,10 @@
"TemplateId": "t-b182b31e910048cdad01",
"TemplateName": "ACS-WAF-BulkyModifyProtectionModuleStatus",
"TemplateType": "Automation",
"TemplateVersion": "v6",
"TemplateVersion": "v7",
"TotalExecutionCount": -1,
"UpdatedBy": "ACS",
"UpdatedDate": "2024-02-22T03:18:33Z"
"UpdatedDate": "2024-08-05T08:58:17Z"
},
{
"Category": "Other",
Expand Down Expand Up @@ -5334,6 +5355,27 @@
"UpdatedBy": "ACS",
"UpdatedDate": "2024-07-30T02:46:46Z"
},
{
"Category": "Other",
"CreatedBy": "ACS",
"CreatedDate": "2024-08-06T08:57:02Z",
"Description": "{\"en\": \"Bulky query ENS instance ID and instance information\", \"zh-cn\": \"批量查询ENS实例ID及实例信息\", \"name-en\": \"ACS-ENS-BulkyQueryInstancesAttributes\", \"name-zh-cn\": \"批量查询ENS实例ID及实例信息\"}",
"HasTrigger": false,
"Hash": "49dd84b197da304f82b0d06d2df2ba8262c2614b26441507b034a0b23177e35a",
"IsFavorite": false,
"Popularity": 5,
"ResourceGroupId": "",
"ShareType": "Public",
"Tags": {},
"TemplateFormat": "YAML",
"TemplateId": "t-782209317e394e59969f",
"TemplateName": "ACS-ENS-BulkyQueryInstancesAttributes",
"TemplateType": "Automation",
"TemplateVersion": "v1",
"TotalExecutionCount": -1,
"UpdatedBy": "ACS",
"UpdatedDate": "2024-08-06T08:57:02Z"
},
{
"Category": "Other",
"CreatedBy": "ACS",
Expand Down Expand Up @@ -5439,27 +5481,6 @@
"UpdatedBy": "ACS",
"UpdatedDate": "2024-02-22T03:18:20Z"
},
{
"Category": "EventTrigger",
"CreatedBy": "ACS",
"CreatedDate": "2019-12-04T12:56:43Z",
"Description": "{\"en\": \"Start ECS instance when instance enter stopped status with specified tag\", \"zh-cn\": \"当标签下实例关机时,自动启动该实例\", \"name-en\": \"ACS-ECS-AutoStartECSWhenStoppedByTags\", \"name-zh-cn\": \"指定标签下的实例关机时自动重启\", \"categories\": [\"event-trigger\"]}",
"HasTrigger": true,
"Hash": "f03fea0d23ee559566fe21242cf32d585c3130f996976fdd5f79a438fd33c1c1",
"IsFavorite": false,
"Popularity": 0,
"ResourceGroupId": "rg-acfmz4wrjukykdy",
"ShareType": "Public",
"Tags": {},
"TemplateFormat": "YAML",
"TemplateId": "t-a78ae2c2d6954ea2afde",
"TemplateName": "ACS-ECS-AutoStartECSWhenStoppedByTags",
"TemplateType": "Automation",
"TemplateVersion": "v12",
"TotalExecutionCount": -1,
"UpdatedBy": "ACS",
"UpdatedDate": "2024-02-22T03:18:07Z"
},
{
"Category": "Other",
"CreatedBy": "ACS",
Expand Down
4 changes: 2 additions & 2 deletions templates/ACS-ECS-AutoStartECSWhenStoppedByTags.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ Tasks:
instanceId:
ValueSelector: .content.resourceId
Type: String

- Name: startInstance
Action: 'ACS::ECS::StartInstance'
Description:
Expand All @@ -54,7 +53,7 @@ Outputs:
Value: '{{ eventTrigger.instanceId }}'
Type: String
Metadata:
ALIYUN::OOS::Interface:
'ALIYUN::OOS::Interface':
ParameterGroups:
- Parameters:
- tags
Expand All @@ -68,3 +67,4 @@ Metadata:
default:
zh-cn: 高级选项
en: Control Options

4 changes: 2 additions & 2 deletions templates/ACS-ECS-CreateAndCopyImage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ Parameters:
zh-cn: <font color='red'><b>必须要在所选的地域</b></font>
Label:
en: LaunchTemplateNames
zh-cn: 待更新的实例启动模版名称列表
zh-cn: 待更新的实例启动模板名称列表
Type: List
Default: []
tags:
Expand Down Expand Up @@ -290,7 +290,7 @@ Tasks:
Action: 'ACS::ECS::UpdateLaunchTemplate'
Description:
en: Update instance launch template
zh-cn: 更新实例启动模版
zh-cn: 更新实例启动模板
Properties:
regionId: '{{ regionId }}'
imageId: '{{ createImage.imageId }}'
Expand Down
10 changes: 5 additions & 5 deletions templates/ACS-ECS-CreateImageAndUpdateLaunchTemplates.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
FormatVersion: OOS-2019-06-01
Description:
name-en: ACS-ECS-CreateImageAndUpdateLaunchTemplates
name-zh-cn: 创建ECS镜像并更新启动模版
name-zh-cn: 创建ECS镜像并更新启动模板
en: Creates an ECS image and update launch template
zh-cn: 创建ECS镜像并更新启动模版
zh-cn: 创建ECS镜像并更新启动模板
categories:
- image_manage
Parameters:
Expand Down Expand Up @@ -37,7 +37,7 @@ Parameters:
zh-cn: <font color='red'><b>必须要在所选的地域</b></font>
Label:
en: LaunchTemplateNames
zh-cn: 待更新的实例启动模版名称列表
zh-cn: 待更新的实例启动模板名称列表
Type: List
Default: []
tags:
Expand All @@ -52,7 +52,7 @@ Parameters:
deleteSourceTemplateVersion:
Label:
en: DeleteSourceTemplateVersion
zh-cn: 删除启动模版的原版本
zh-cn: 删除启动模板的原版本
Type: Boolean
Default: true
rateControl:
Expand Down Expand Up @@ -112,7 +112,7 @@ Tasks:
Action: 'ACS::ECS::UpdateLaunchTemplate'
Description:
en: Update instance launch template
zh-cn: 更新实例启动模版
zh-cn: 更新实例启动模板
Properties:
regionId: '{{ regionId }}'
imageId: '{{ createImage.imageId }}'
Expand Down
Loading

0 comments on commit b9c84cc

Please sign in to comment.