From d1e0c8da95ab8b32ba23a6f5bc21d9c0ef8472bd Mon Sep 17 00:00:00 2001 From: Zheng Dayu Date: Sun, 17 Nov 2024 01:16:25 +0000 Subject: [PATCH] Github actions auto update oos templates --- list-templates.json | 39 +- ...ACS-ALB-BulkyEnableDeletionProtection.yaml | 69 +++ templates/ACS-ECS-BulkyConfigureNVMe.yaml | 101 ++++ templates/ACS-ECS-UpdateImage.yaml | 9 + ...gUpdateByDownloadOSSFileAndRunCommand.yaml | 471 ------------------ templates/ACS-TAG-TagResources.yaml | 2 + ...S-TAG-TagResourcesIgnoreCaseSensitive.yaml | 2 + 7 files changed, 213 insertions(+), 480 deletions(-) create mode 100644 templates/ACS-ECS-BulkyConfigureNVMe.yaml diff --git a/list-templates.json b/list-templates.json index 9152f5c..6e3375b 100644 --- a/list-templates.json +++ b/list-templates.json @@ -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": "a58790802fa89e085cbed0f85166110341f5789edf1318d2b5028aa79aa630ea", + "Hash": "375fef455b2111298d4ab66a68f74ce199d8c8169d1111eda1819306bd795595", "IsFavorite": false, "Popularity": 9.9, "ResourceGroupId": "rg-acfmz4wrjukykdy", @@ -58,10 +58,10 @@ "TemplateId": "t-1d2b574bd67a4c949677", "TemplateName": "ACS-ECS-UpdateImage", "TemplateType": "Automation", - "TemplateVersion": "v53", + "TemplateVersion": "v54", "TotalExecutionCount": -1, "UpdatedBy": "ACS", - "UpdatedDate": "2024-11-07T02:42:53Z" + "UpdatedDate": "2024-11-11T06:23:26Z" }, { "Category": "Other", @@ -2253,7 +2253,7 @@ "CreatedDate": "2020-11-18T02:04:59Z", "Description": "{\"en\": \"Tag the resources it manages through resource management\", \"zh-cn\": \"通过资源管理给其管理的资源打标签\", \"name-en\": \"ACS-TAG-TagResources\", \"name-zh-cn\": \"通过资源管理给资源打标签\", \"categories\": [\"security\"]}", "HasTrigger": false, - "Hash": "2e1d5b8b1bef2f391fddbb1a9e685dbb0af961047cbcd011bd71705727e624ff", + "Hash": "b8e9e403c28ca339477ec6c07295609b15ab57980fb8a3dd70e6cff2f5220507", "IsFavorite": false, "Popularity": 5, "ResourceGroupId": "rg-acfmz4wrjukykdy", @@ -2263,10 +2263,10 @@ "TemplateId": "t-205569c046e64e7ab0d4", "TemplateName": "ACS-TAG-TagResources", "TemplateType": "Automation", - "TemplateVersion": "v27", + "TemplateVersion": "v28", "TotalExecutionCount": -1, "UpdatedBy": "ACS", - "UpdatedDate": "2024-07-09T02:42:46Z" + "UpdatedDate": "2024-11-12T08:22:54Z" }, { "Category": "Other", @@ -3660,7 +3660,7 @@ "CreatedDate": "2022-03-04T08:09:32Z", "Description": "{\"en\": \"Tag the resources it manages through resource management\", \"zh-cn\": \"通过资源管理批量给其管理的资源打多个标签\", \"name-en\": \"ACS-TAG-TagResourcesIgnoreCaseSensitive\", \"name-zh-cn\": \"通过资源管理给资源打标签(忽略标签大小写)\", \"categories\": [\"security\"]}", "HasTrigger": false, - "Hash": "fbea82a06418f1c36acb1c5259c54348a92fbef62ecbdb7bafd55a7e0b8f7b62", + "Hash": "0f7694a25e288f64f7cdc678b1dceda05658cf0678dbf1f17f2fd1ec311ddcdc", "IsFavorite": false, "Popularity": 5, "ResourceGroupId": "", @@ -3670,10 +3670,10 @@ "TemplateId": "t-b1649fe9c4e4494fa334", "TemplateName": "ACS-TAG-TagResourcesIgnoreCaseSensitive", "TemplateType": "Automation", - "TemplateVersion": "v18", + "TemplateVersion": "v19", "TotalExecutionCount": -1, "UpdatedBy": "ACS", - "UpdatedDate": "2024-07-09T02:42:46Z" + "UpdatedDate": "2024-11-12T08:22:55Z" }, { "Category": "Other", @@ -6152,6 +6152,27 @@ "TotalExecutionCount": -1, "UpdatedBy": "ACS", "UpdatedDate": "2024-11-06T06:31:59Z" + }, + { + "Category": "Other", + "CreatedBy": "ACS", + "CreatedDate": "2024-11-15T05:57:35Z", + "Description": "{\"en\": \"Batch automated installation of NVMe drivers and modification of instance NVMe properties to support\", \"zh-cn\": \"批量自动化安装NVMe驱动并将实例的NVMe属性修改为支持\", \"name-en\": \"ACS-ECS-BulkyConfigureNVMe\", \"name-zh-cn\": \"批量安装NVMe驱动\", \"categories\": [\"instance_manage\"]}", + "HasTrigger": false, + "Hash": "d9e32259e8b60483d28501ce1dae7326f2ac934ded7e3a291468eaf123d12370", + "IsFavorite": false, + "Popularity": 0, + "ResourceGroupId": "", + "ShareType": "Public", + "Tags": {}, + "TemplateFormat": "YAML", + "TemplateId": "t-05b5ed28c0534f708e55", + "TemplateName": "ACS-ECS-BulkyConfigureNVMe", + "TemplateType": "Automation", + "TemplateVersion": "v1", + "TotalExecutionCount": -1, + "UpdatedBy": "ACS", + "UpdatedDate": "2024-11-15T05:57:35Z" } ] } diff --git a/templates/ACS-ALB-BulkyEnableDeletionProtection.yaml b/templates/ACS-ALB-BulkyEnableDeletionProtection.yaml index e69de29..453851f 100644 --- a/templates/ACS-ALB-BulkyEnableDeletionProtection.yaml +++ b/templates/ACS-ALB-BulkyEnableDeletionProtection.yaml @@ -0,0 +1,69 @@ +FormatVersion: OOS-2019-06-01 +Description: + en: Bulky set loadbalancer deletion protection + zh-cn: 批量启用应用型负载均衡实例删除保护 + name-en: ACS-ALB-BulkyEnableDeletionProtection + name-zh-cn: 批量启用应用型负载均衡实例删除保护 + categories: + - security +Parameters: + regionId: + Type: String + Label: + en: RegionId + zh-cn: 地域ID + AssociationProperty: RegionId + Default: '{{ ACS::RegionId }}' + loadBalancerIds: + Label: + en: LoadBalancerIds + zh-cn: 应用型负载均衡实例ID列表 + Type: List + 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 +RamRole: '{{ OOSAssumeRole }}' +Tasks: + - Name: enableDeletionProtection + Action: ACS::ExecuteAPI + Description: + en: Set loadBalancer deletion protection + zh-cn: 应用负载均衡实例启用实例保护 + Properties: + Service: ALB + API: EnableDeletionProtection + Parameters: + RegionId: '{{ regionId }}' + ResourceId: '{{ ACS::TaskLoopItem }}' + Loop: + RateControl: '{{ rateControl }}' + Items: '{{ loadBalancerIds }}' +Metadata: + ALIYUN::OOS::Interface: + ParameterGroups: + - Parameters: + - regionId + - loadBalancerIds + Label: + default: + zh-cn: 选择实例 + en: Select Loadbalancer + - Parameters: + - rateControl + - OOSAssumeRole + Label: + default: + zh-cn: 高级选项 + en: Control Options diff --git a/templates/ACS-ECS-BulkyConfigureNVMe.yaml b/templates/ACS-ECS-BulkyConfigureNVMe.yaml new file mode 100644 index 0000000..9922a7f --- /dev/null +++ b/templates/ACS-ECS-BulkyConfigureNVMe.yaml @@ -0,0 +1,101 @@ +FormatVersion: OOS-2019-06-01 +Description: + en: Batch automated installation of NVMe drivers and modification of instance NVMe properties to support + zh-cn: 批量自动化安装NVMe驱动并将实例的NVMe属性修改为支持 + name-en: ACS-ECS-BulkyConfigureNVMe + name-zh-cn: 批量安装NVMe驱动 + categories: + - instance_manage +Parameters: + regionId: + Type: String + Label: + en: RegionId + zh-cn: 地域ID + AssociationProperty: RegionId + Default: '{{ ACS::RegionId }}' + targets: + Type: Json + Label: + en: TargetInstance + zh-cn: 目标实例 + AssociationProperty: Targets + AssociationPropertyMetadata: + ResourceType: 'ALIYUN::ECS::Instance' + RegionId: regionId + 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: getInstance + Description: + en: Views the ECS instances + zh-cn: 获取ECS实例 + Action: ACS::SelectTargets + Properties: + ResourceType: ALIYUN::ECS::Instance + RegionId: '{{ regionId }}' + Filters: + - '{{ targets }}' + Outputs: + instanceIds: + Type: List + ValueSelector: Instances.Instance[].InstanceId + instanceInfos: + Type: List + ValueSelector: .Instances.Instance[] | select(.OSType == "linux") | .InstanceId + - Name: configureNVMe + Action: 'ACS::ECS::ConfigureNVMe' + Description: + en: Configure NVMe + zh-cn: 配置NVMe + Properties: + instanceId: '{{ ACS::TaskLoopItem }}' + regionId: '{{ regionId }}' + Loop: + Items: '{{ getInstance.instanceIds }}' + RateControl: '{{ rateControl }}' + Outputs: + commandOutputs: + AggregateType: 'Fn::ListJoin' + AggregateField: commandOutput + Outputs: + commandOutput: + Type: String + ValueSelector: invocationOutput +Outputs: + commandOutput: + Type: String + Value: '{{ configureNVMe.invocationOutput }}' +Metadata: + ALIYUN::OOS::Interface: + ParameterGroups: + - Parameters: + - regionId + - targets + Label: + default: + zh-cn: 选择实例 + en: Select Ecs Instances + - Parameters: + - rateControl + - OOSAssumeRole + Label: + default: + zh-cn: 高级选项 + en: Control Options + diff --git a/templates/ACS-ECS-UpdateImage.yaml b/templates/ACS-ECS-UpdateImage.yaml index 22c5dc6..31f66ee 100644 --- a/templates/ACS-ECS-UpdateImage.yaml +++ b/templates/ACS-ECS-UpdateImage.yaml @@ -201,6 +201,12 @@ Parameters: - ${updateType} - RunCommand Default: 'echo hello' + contentEncoding: + Label: + en: ContentEncoding + zh-cn: 命令编码方式 + Type: String + Default: PlainText timeout: Label: en: Timeout @@ -448,6 +454,7 @@ Tasks: Properties: regionId: '{{ regionId }}' commandContent: '{{ commandContent }}' + contentEncoding: '{{ contentEncoding }}' commandType: '{{ commandType }}' instanceId: '{{ runInstances.instanceId }}' timeout: '{{ timeout }}' @@ -577,4 +584,6 @@ Metadata: default: zh-cn: 高级选项 en: Control Options + Hidden: + - contentEncoding diff --git a/templates/ACS-ESS-RollingUpdateByDownloadOSSFileAndRunCommand.yaml b/templates/ACS-ESS-RollingUpdateByDownloadOSSFileAndRunCommand.yaml index f489568..e69de29 100644 --- a/templates/ACS-ESS-RollingUpdateByDownloadOSSFileAndRunCommand.yaml +++ b/templates/ACS-ESS-RollingUpdateByDownloadOSSFileAndRunCommand.yaml @@ -1,471 +0,0 @@ -FormatVersion: OOS-2019-06-01 -Description: - en: Rolling update ECS instances that in scaling group by download OOS file and run command - zh-cn: 通过下载OSS文件并执行命令的方式滚动更新伸缩组内的ECS实例 - name-en: ACS-ESS-RollingUpdateByDownloadOSSFileAndRunCommand - name-zh-cn: 通过下载OSS文件并执行命令的方式滚动更新伸缩组内的ECS实例 - categories: - - elastic_manage -Parameters: - invokeType: - Label: - en: InvokeType - zh-cn: 操作类型 - Type: String - AllowedValues: - - invoke - - rollback - scalingGroupId: - Label: - en: ScalingGroupId - zh-cn: 伸缩组ID - Type: String - enterProcess: - Label: - en: EnterProcess - zh-cn: 执行开始要暂停的伸缩组流程 - Type: List - Default: - - ScaleIn - - ScaleOut - - HealthCheck - - AlarmNotification - - ScheduledAction - exitProcess: - Label: - en: ExitProcess - zh-cn: 执行结束要恢复的伸缩组流程 - Type: List - Default: - - ScaleIn - - ScaleOut - - HealthCheck - - AlarmNotification - - ScheduledAction - invokeBucketName: - Type: String - Label: - en: InvokeBucketName - zh-cn: 用于升级的Bucket名称 - invokeObjectName: - Label: - en: InvokeObjectName - zh-cn: 用于升级的Object名称 - Type: String - invokeDestinationDir: - Label: - en: InvokeDestinationDir - zh-cn: 用于升级的文件存储目录 - Type: String - invokeScript: - Label: - en: InvokeScript - zh-cn: 用于升级的脚本 - Type: String - AssociationProperty: Code - Default: '' - rollbackBucketName: - Type: String - Label: - en: RollbackBucketName - zh-cn: 用于回滚的Bucket名称 - rollbackObjectName: - Label: - en: RollbackObjectName - zh-cn: 用于回滚的Object名称 - Type: String - rollbackDestinationDir: - Label: - en: InvokeDestinationDir - zh-cn: 用于回滚的文件存储目录 - Type: String - rollbackScript: - Label: - en: RollbackScript - zh-cn: 用于回滚的脚本 - Type: String - AssociationProperty: Code - Default: '' - sourceExecutionId: - Label: - en: SourceExecutionId - zh-cn: 用于回滚的OOS执行ID - Type: String - Default: '' - whetherSaveToFile: - Label: - en: whetherSaveToFile - zh-cn: 是否将内容下载到特定文件 - Type: Boolean - Default: true - URLExpirationTime: - Label: - en: OOSFileDownloadURLExpirationTime - zh-cn: OSS文件下载链接的过期时间 - Type: Number - Default: 6000 - OSSRegion: - Label: - en: OSSRegion - zh-cn: OSS所在地域 - Description: - en: When the region where the OSS is located is different from the current region, the OSS file will be downloaded through the public network, and the ECS in the scaling group must be able to access the public network. - zh-cn: OSS所在地域和当前地域不同时会通过公网下载OSS文件,需要伸缩组内的ECS能访问公网。 - Type: String - AssociationProperty: RegionId - Default: '{{ ACS::RegionId }}' - batchPauseOption: - Label: - en: BatchPauseOption - zh-cn: 分批模式 - Type: String - AllowedValues: - - Automatic - - FirstBatchPause - - EveryBatchPause - Default: Automatic - batchNumber: - Label: - en: BatchNumber - zh-cn: 分批执行的批次 - Type: Number - MinValue: 1 - MaxValue: 100 - Default: 5 - OOSAssumeRole: - Label: - en: OOSAssumeRole - zh-cn: OOS扮演的RAM角色 - Type: String - Default: '' -RamRole: '{{ OOSAssumeRole }}' -Tasks: - - Name: getLifecycleHook - Action: ACS::ExecuteAPI - Description: - en: Get lifecycle hook - zh-cn: 获取生命周期挂钩 - Properties: - Service: ESS - API: DescribeLifecycleHooks - Parameters: - ScalingGroupId: '{{ scalingGroupId }}' - LifecycleHookName: ACS-ESS-LifeCycleDownloadOSSFileAndRunCommand - Outputs: - totalCount: - Type: String - ValueSelector: .TotalCount - - Name: choiceNextTask - Action: 'ACS::Choice' - Description: - en: Choose next task by invoke type - zh-cn: 根据升级类型选择任务 - Properties: - DefaultTask: getInstance - Choices: - - When: - 'Fn::Equals': - - rollback - - '{{ invokeType }}' - NextTask: getExecutionInstanceIds - - Name: getInstance - Description: - en: Views the ECS instances - zh-cn: 获取ECS实例 - Action: 'ACS::ExecuteApi' - Properties: - Service: ESS - API: DescribeScalingInstances - Parameters: - ScalingGroupId: '{{ scalingGroupId }}' - LifecycleState: InService - CreationTypes: - - AutoCreated - - Attached - Outputs: - instanceIds: - Type: List - ValueSelector: 'ScalingInstances.ScalingInstance[].InstanceId' - - Name: whetherTheScalingGroupInstanceIsEmpty - Action: 'ACS::Choice' - Description: - en: Check whether the instances in the services in the scaling group are empty - zh-cn: 检查伸缩组内服务中的实例是否为空 - Properties: - DefaultTask: whetherToSuspendProcess - Choices: - - When: - 'Fn::Equals': - - [ ] - - '{{ getInstance.instanceIds }}' - NextTask: 'ACS::END' - - Name: whetherToSuspendProcess - Action: 'ACS::Choice' - Description: - en: Choose next task by process - zh-cn: 根据流程值判断是否暂停流程 - Properties: - DefaultTask: suspendProcess - Choices: - - When: - 'Fn::Equals': - - [] - - '{{ enterProcess }}' - NextTask: invokeByDownloadOSSFileAndRunCommand - - Name: suspendProcess - Action: 'ACS::ExecuteAPI' - Description: - en: Suspend process - zh-cn: 暂停伸缩组流程 - Properties: - Service: ESS - API: SuspendProcesses - Parameters: - ScalingGroupId: '{{ scalingGroupId }}' - Process: '{{ enterProcess }}' - - Name: invokeByDownloadOSSFileAndRunCommand - Action: ACS::ECS::DownloadOSSFileAndRunCommand - Description: - en: Upgrade by downloading files to the instance and executing commands - zh-cn: 通过下载文件到实例并执行命令的方式进行升级 - Properties: - instanceId: '{{ ACS::TaskLoopItem }}' - bucketName: '{{ invokeBucketName }}' - objectName: '{{ invokeObjectName }}' - URLExpirationTime: '{{ URLExpirationTime }}' - OSSRegion: '{{ OSSRegion }}' - commandContent: '{{ invokeScript }}' - destinationDir: '{{ invokeDestinationDir }}' - whetherSaveToFile: '{{ whetherSaveToFile }}' - Loop: - Items: '{{ getInstance.instanceIds }}' - BatchPauseOption: '{{ batchPauseOption }}' - Concurrency: - 'Fn::CalculateBatch': - - '{{ batchNumber }}' - - '{{ getInstance.instanceIds }}' - Outputs: - commandOutputs: - AggregateType: 'Fn::ListJoin' - AggregateField: commandOutput - Outputs: - commandOutput: - Type: String - ValueSelector: runCommandOutput - - Name: tagInstance - Action: ACS::ExecuteApi - Description: - en: Creates and attaches tag to ECS instance - zh-cn: 创建并挂载标签到ECS实例 - Properties: - Service: ECS - API: TagResources - Parameters: - ResourceIds: - - '{{ ACS::TaskLoopItem }}' - ResourceType: Instance - Tags: - - Key: 'ess:rollingupdate' - Value: 'oos:{{ ACS::ExecutionId }}' - Loop: - Items: '{{ getInstance.instanceIds }}' - Mode: Concurrency - MaxErrors: 0 - Concurrency: 10 - - Name: createLifecycleHookOfUpgrade - When: - Fn::Equals: - - '{{ getLifecycleHook.totalCount }}' - - 0 - Action: ACS::ExecuteAPI - Description: - en: Create lifecycle hook of upgrade - zh-cn: 创建用于升级的生命周期挂钩 - Properties: - Service: ESS - API: CreateLifecycleHook - Parameters: - ScalingGroupId: '{{ scalingGroupId }}' - NotificationMetadata: '{"bucketName":"{{ invokeBucketName }}","objectName":"{{ invokeObjectName }}","URLExpirationTime":"{{ URLExpirationTime }}","OSSRegion":"{{ OSSRegion }}","destinationDir":"{{ invokeDestinationDir }}","OSSRegion":"{{ OSSRegion }}","commandContent":"{{ invokeScript }}","timeout":"600","regionId":"${regionId}","instanceIds":"${instanceIds}","lifecycleHookId":"${lifecycleHookId}","lifecycleActionToken":"${lifecycleActionToken}","rateControl":"{\"Mode\":\"Concurrency\",\"MaxErrors\":0,\"Concurrency\":10}","OOSAssumeRole":"OOSServiceRole"}' - LifecycleTransition: SCALE_OUT - LifecycleHookName: ACS-ESS-LifeCycleDownloadOSSFileAndRunCommand - NotificationArn: acs:oos:{{ ACS::RegionId }}:{{ACS::AccountId}}:template/ACS-ESS-LifeCycleDownloadOSSFileAndRunCommand - - Name: modifyLifecycleHookOfUpgrade - When: - Fn::Equals: - - '{{ getLifecycleHook.totalCount }}' - - 1 - Action: ACS::ExecuteAPI - Description: - en: Modify lifecycle hook of upgrade - zh-cn: 修改用于升级的生命周期挂钩 - Properties: - Service: ESS - API: ModifyLifecycleHook - Parameters: - ScalingGroupId: '{{ scalingGroupId }}' - NotificationMetadata: '{"bucketName":"{{ invokeBucketName }}","objectName":"{{ invokeObjectName }}","URLExpirationTime":"{{ URLExpirationTime }}","OSSRegion":"{{ OSSRegion }}","destinationDir":"{{ invokeDestinationDir }}","commandContent":"{{ invokeScript }}","timeout":"600","regionId":"${regionId}","instanceIds":"${instanceIds}","lifecycleHookId":"${lifecycleHookId}","lifecycleActionToken":"${lifecycleActionToken}","rateControl":"{\"Mode\":\"Concurrency\",\"MaxErrors\":0,\"Concurrency\":10}","OOSAssumeRole":"OOSServiceRole"}' - LifecycleTransition: SCALE_OUT - LifecycleHookName: ACS-ESS-LifeCycleDownloadOSSFileAndRunCommand - - Name: whetherToResumeProcesses - Action: 'ACS::Choice' - Description: - en: Choose next task by process - zh-cn: 根据流程值判断是否恢复流程 - Properties: - DefaultTask: resumeProcesses - Choices: - - When: - 'Fn::Equals': - - [] - - '{{ exitProcess }}' - NextTask: 'ACS::END' - - Name: resumeProcesses - Action: 'ACS::ExecuteAPI' - OnSuccess: 'ACS::END' - Description: - en: Resume process - zh-cn: 恢复伸缩组流程 - Properties: - Service: ESS - API: ResumeProcesses - Parameters: - ScalingGroupId: '{{ scalingGroupId }}' - Process: '{{ exitProcess }}' - - Name: getExecutionInstanceIds - Action: 'ACS::ExecuteAPI' - Description: - en: Get the instance that has been executed - zh-cn: 获取已经执行过执行脚本的实例 - Properties: - Service: OOS - API: ListExecutions - Parameters: - ParentExecutionId: '{{ sourceExecutionId }}' - Outputs: - instanceIds: - Type: List - ValueSelector: 'Executions[].Parameters.instanceId' - - Name: getExistInstanceIds - Description: - en: Views the ECS instances - zh-cn: 获取ECS实例 - Action: ACS::SelectTargets - Properties: - ResourceType: ALIYUN::ECS::Instance - Filters: - - Type: ResourceIds - ResourceIds: '{{ getExecutionInstanceIds.instanceIds }}' - Outputs: - instanceIds: - Type: List - ValueSelector: Instances.Instance[].InstanceId - - Name: getRollbackProcess - Action: 'ACS::ExecuteAPI' - Description: - en: Views resource parameters - zh-cn: 获取源执行的参数 - Properties: - Service: OOS - API: ListExecutions - Parameters: - ExecutionId: '{{ sourceExecutionId }}' - Outputs: - enterProcess: - Type: List - ValueSelector: 'Executions[].Parameters.enterProcess[]' - exitProcess: - Type: List - ValueSelector: 'Executions[].Parameters.exitProcess[]' - - Name: suspendProcessWithRollBack - Action: 'ACS::ExecuteAPI' - Description: - en: Suspend process - zh-cn: 暂停伸缩组流程 - Properties: - Service: ESS - API: SuspendProcesses - Parameters: - ScalingGroupId: '{{ scalingGroupId }}' - Process: '{{ getRollbackProcess.enterProcess }}' - - Name: rollbackByDownloadOSSFileAndRunCommand - Action: ACS::ECS::DownloadOSSFileAndRunCommand - Description: - en: Rollback by downloading files to the instance and executing commands - zh-cn: 通过下载文件到实例并执行命令的方式进行回滚 - Properties: - instanceId: '{{ ACS::TaskLoopItem }}' - bucketName: '{{ rollbackBucketName }}' - objectName: '{{ rollbackObjectName }}' - URLExpirationTime: '{{ URLExpirationTime }}' - OSSRegion: '{{ OSSRegion }}' - commandContent: '{{ rollbackScript }}' - destinationDir: '{{ rollbackDestinationDir }}' - whetherSaveToFile: '{{ whetherSaveToFile }}' - Loop: - Items: '{{ getExistInstanceIds.instanceIds }}' - BatchPauseOption: '{{ batchPauseOption }}' - Concurrency: - 'Fn::CalculateBatch': - - '{{ batchNumber }}' - - '{{ getExistInstanceIds.instanceIds }}' - Outputs: - commandOutputs: - AggregateType: 'Fn::ListJoin' - AggregateField: commandOutput - Outputs: - commandOutput: - Type: String - ValueSelector: runCommandOutput - - Name: modifyLifecycleHookOfRollback - When: - Fn::Equals: - - '{{ getLifecycleHook.totalCount }}' - - 1 - Action: ACS::ExecuteAPI - Description: - en: Modify lifecycle hook of rollback - zh-cn: 修改用于回滚的生命周期挂钩 - Properties: - Service: ESS - API: ModifyLifecycleHook - Parameters: - ScalingGroupId: '{{ scalingGroupId }}' - NotificationMetadata: '{"bucketName":"{{ rollbackBucketName }}","objectName":"{{ rollbackObjectName }}","URLExpirationTime":"{{ URLExpirationTime }}","OSSRegion":"{{ OSSRegion }}","destinationDir":"{{ rollbackDestinationDir }}","commandContent":"{{ rollbackScript }}","timeout":"600","regionId":"${regionId}","instanceIds":"${instanceIds}","lifecycleHookId":"${lifecycleHookId}","lifecycleActionToken":"${lifecycleActionToken}","rateControl":"{\"Mode\":\"Concurrency\",\"MaxErrors\":0,\"Concurrency\":10}","OOSAssumeRole":"OOSServiceRole"}' - LifecycleTransition: SCALE_OUT - LifecycleHookName: ACS-ESS-LifeCycleDownloadOSSFileAndRunCommand - - Name: whetherToResumeProcessesWithRollback - Action: 'ACS::Choice' - Description: - en: Choose next task by process - zh-cn: 根据流程值判断是否恢复流程 - Properties: - DefaultTask: resumeProcessesWithRollback - Choices: - - When: - 'Fn::Equals': - - [] - - '{{ getRollbackProcess.exitProcess }}' - NextTask: 'ACS::END' - - Name: resumeProcessesWithRollback - Action: 'ACS::ExecuteAPI' - Description: - en: Resume process - zh-cn: 恢复伸缩组流程 - Properties: - Service: ESS - API: ResumeProcesses - Parameters: - ScalingGroupId: '{{ scalingGroupId }}' - Process: '{{ getRollbackProcess.exitProcess }}' -Outputs: - commandOutputs: - Type: List - Value: - 'Fn::If': - - 'Fn::Equals': - - invoke - - '{{ invokeType }}' - - '{{ invokeByDownloadOSSFileAndRunCommand.commandOutputs }}' - - '{{ rollbackByDownloadOSSFileAndRunCommand.commandOutputs }}' - diff --git a/templates/ACS-TAG-TagResources.yaml b/templates/ACS-TAG-TagResources.yaml index 9754bd1..a166a65 100644 --- a/templates/ACS-TAG-TagResources.yaml +++ b/templates/ACS-TAG-TagResources.yaml @@ -80,6 +80,7 @@ Parameters: - ACS::Ga::BandwidthPackage - ACS::Ga::BasicAccelerator - ACS::Ga::EndpointGroup + - ACS::Live::Domain - ACS::HBase::Cluster - ACS::MongoDB::DBInstance - ACS::NAS::FileSystem @@ -104,6 +105,7 @@ Parameters: - ACS::Redis::DBInstance - ACS::ResourceManager::Account - ACS::ResourceManager::ResourceGroup + - ACS::RocketMQ::Instance - ACS::SLB::AccessControlList - ACS::SLB::CACertificate - ACS::SLB::LoadBalancer diff --git a/templates/ACS-TAG-TagResourcesIgnoreCaseSensitive.yaml b/templates/ACS-TAG-TagResourcesIgnoreCaseSensitive.yaml index a3d571a..b0615d2 100644 --- a/templates/ACS-TAG-TagResourcesIgnoreCaseSensitive.yaml +++ b/templates/ACS-TAG-TagResourcesIgnoreCaseSensitive.yaml @@ -80,6 +80,7 @@ Parameters: - ACS::Ga::BandwidthPackage - ACS::Ga::BasicAccelerator - ACS::Ga::EndpointGroup + - ACS::Live::Domain - ACS::HBase::Cluster - ACS::MongoDB::DBInstance - ACS::NAS::FileSystem @@ -104,6 +105,7 @@ Parameters: - ACS::Redis::DBInstance - ACS::ResourceManager::Account - ACS::ResourceManager::ResourceGroup + - ACS::RocketMQ::Instance - ACS::SLB::AccessControlList - ACS::SLB::CACertificate - ACS::SLB::LoadBalancer