Nom du modèle
ACS-CS-DedicatedMigration : met en veille le plan de contrôle d'un cluster ACK dédié et télécharge un snapshot etcd
Description
Ce modèle met en veille le plan de contrôle d'un cluster ACK dédié, crée un snapshot etcd et télécharge ce snapshot vers un compartiment Object Storage Service (OSS).
Type de modèle
Automatisation
Propriétaire
Alibaba Cloud
Paramètres d'entrée
|
Paramètre |
Description |
Type |
Obligatoire |
Valeur par défaut |
Contraintes |
|
targets |
Les instances cibles. |
Json |
Oui |
||
|
BucketName |
Nom du compartiment Object Storage Service (OSS) dans lequel stocker le snapshot etcd. |
String |
Oui |
||
|
OSSEndpoint |
Endpoint du compartiment OSS. |
String |
Oui |
||
|
ClusterID |
ID du cluster. |
String |
Oui |
||
|
regionId |
ID de la région. |
String |
Non |
{{ ACS::RegionId }} |
|
|
workingDir |
Répertoire de travail sur l'instance ECS où la commande s'exécute. |
String |
Non |
/root |
|
|
rateControl |
Paramètres d'exécution des tâches, tels que la concurrence et les seuils d'erreur. |
Json |
Non |
{'Mode': 'Concurrency', 'MaxErrors': 0, 'Concurrency': 5} |
|
|
action |
Action à effectuer. Valeurs valides : |
String |
Non |
rollback |
|
|
OOSAssumeRole |
Rôle RAM qu'OOS endosse pour exécuter la tâche. |
String |
Non |
"" |
Paramètres de sortie
|
Paramètre |
Description |
Type |
|
sleepOrWakeupControlPlaneOutputs |
List |
|
|
etcdCheckoutOutputs |
List |
|
|
findLeaderOutputs |
List |
|
|
readSignOutputs |
List |
Autorisations requises
{
"Version": "1",
"Statement": [
{
"Action": [
"ecs:DescribeInstances",
"ecs:DescribeInvocationResults",
"ecs:DescribeInvocations",
"ecs:RunCommand"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"oos:GetApplicationGroup"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
Détails
Contenu du modèle
FormatVersion: OOS-2019-06-01
Description:
en: Hibernates the control plane, creates an etcd snapshot, and uploads it to an OSS bucket.
zh-cn: ACK专属版master休眠&etcd备份上传
name-en: ACS-CS-DedicatedMigration
name-zh-cn: ACK专属版master休眠&etcd备份上传
categories:
- others
Parameters:
regionId:
Type: String
Label:
en: Region ID
zh-cn: 地域ID
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
workingDir:
Label:
en: Working Directory
zh-cn: ECS实例中运行命令的目录
Type: String
Default: /root
rateControl:
Label:
en: Rate Control
zh-cn: 任务执行的并发比率
Type: Json
AssociationProperty: RateControl
Default:
Mode: Concurrency
MaxErrors: 0
Concurrency: 5
targets:
Label:
en: Target Instance
zh-cn: 目标实例
Type: Json
AssociationProperty: Targets
AssociationPropertyMetadata:
ResourceType: 'ALIYUN::ECS::Instance'
RegionId: regionId
action:
Type: String
Label:
en: Action
zh-cn: 配置方式
Default: rollback
AllowedValues:
- migrate
- rollback
OOSAssumeRole:
Label:
en: OOS Assume Role
zh-cn: OOS扮演的RAM角色
Type: String
Default: ''
BucketName:
Label:
en: Bucket Name
zh-cn: 需要上传snapshot的OSS路径
Type: String
OSSEndpoint:
Label:
en: OSS Endpoint
zh-cn: 需要上传snapshot的OSS对应的endpoint
Type: String
ClusterID:
Label:
en: Cluster ID
zh-cn: 集群的ID
Type: String
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: getInstance
Description:
en: Selects the target 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
- Action: ACS::ECS::RunCommand
OnError: rollback
Description:
en: Hibernates or starts the control plane components on the master nodes.
zh-cn: 休眠或启动Master节点管控组件
Properties:
regionId: '{{ regionId }}'
commandContent: |-