Nome do modelo
O ACS-ECS-RunPacker permite executar modelos do Packer.
Descrição do modelo
Executa um modelo do Packer nas instâncias ECS especificadas.
Tipo de modelo
Automatizado
Proprietário
Alibaba Cloud
Parâmetros de entrada
|
Parâmetro |
Descrição |
Tipo |
Obrigatório |
Valor padrão |
Limite |
|
targets |
Instâncias ECS de destino. |
String |
Sim |
||
|
sourceType |
Tipo de serviço que armazena o arquivo. |
String |
Sim |
||
|
sourcePath |
URL do local de armazenamento do arquivo. |
String |
Sim |
||
|
templateFile |
Nome do modelo do Packer a ser executado. |
String |
Sim |
||
|
regionId |
ID da região. |
String |
Não |
{{ ACS::RegionId }} |
|
|
tokenInfo |
Token usado para baixar o arquivo. |
String |
Não |
||
|
mode |
Modo de execução do modelo. |
String |
Não |
build |
|
|
OOSAssumeRole |
Função do Resource Access Management (RAM) assumida pelo CloudOps Orchestration Service (OOS). |
String |
Não |
"" |
Parâmetros de saída
|
Parâmetro |
Descrição |
Tipo |
|
result |
String |
Política de permissões necessária para executar o modelo
{
"Version": "1",
"Statement": [
{
"Action": [
"ecs:DescribeInstances",
"ecs:DescribeInvocationResults",
"ecs:DescribeInvocations",
"ecs:RunCommand"
],
"Resource": "*",
"Effect": "Allow"
},
{
"Action": [
"oos:GetApplicationGroup"
],
"Resource": "*",
"Effect": "Allow"
}
]
}
Detalhes
Para mais detalhes, consulte ACS-ECS-RunPacker.
Conteúdo do modelo
FormatVersion: OOS-2019-06-01
Description:
en: Run packer template
zh-cn: Run Packer template
name-en: ACS-ECS-RunPacker
name-zh-cn: Run Packer template
categories:
- image_manage
Parameters:
regionId:
Label:
en: RegionId
zh-cn: Region ID
Type: String
AssociationProperty: RegionId
Default: '{{ ACS::RegionId }}'
targets:
Type: String
Label:
en: TargetInstance
zh-cn: Target Instance
AssociationProperty: Targets
AssociationPropertyMetadata:
ResourceType: 'ALIYUN::ECS::Instance'
RegionId: regionId
sourceType:
Type: String
Label:
en: SourceType
zh-cn: Type of file storage
AllowedValues:
- oss
- https
- github
sourcePath:
Type: String
Label:
en: SourcePath
zh-cn: The URL of the file to be stored.
tokenInfo:
Type: String
Description:
en: It is only required when downloading file from GitHub
zh-cn: This parameter is required only when you download a file from GitHub.
Label:
en: TokenInfo
zh-cn: The token used to download the file.
Default: ' '
templateFile:
Label:
en: TemplateFile
zh-cn: The name of the Packer template to be executed.
Type: String
mode:
Type: String
Label:
en: Mode
zh-cn: The mode in which to use the template.
AllowedValues:
- validate
- fix
- build
Default: build
OOSAssumeRole:
Label:
en: OOSAssumeRole
zh-cn: The RAM role to be assumed by OOS.
Type: String
Default: ''
RamRole: '{{ OOSAssumeRole }}'
Tasks:
- Name: getInstance
Description:
en: Views the ECS instances
zh-cn: Retrieves ECS instances.
Action: ACS::SelectTargets
Properties:
ResourceType: ALIYUN::ECS::Instance
RegionId: '{{ regionId }}'
Filters:
- '{{ targets }}'
Outputs:
instanceId:
Type: String
ValueSelector: Instances.Instance[].InstanceId
- Name: runPacker
Action: 'ACS::ECS::RunPacker'
Description:
en: Run packer template
zh-cn: Runs the Packer template.
Properties:
regionId: '{{ regionId }}'
instanceId: '{{ getInstance.instanceId }}'
sourceType: '{{ sourceType }}'
sourcePath: '{{ sourcePath }}'
tokenInfo: '{{ tokenInfo }}'
templateFile: '{{ templateFile }}'
mode: '{{ mode }}'
Outputs:
commandOutput:
Type: String
ValueSelector: commandOutput
Outputs:
result:
Type: String
Value: '{{ runPacker.commandOutput }}'
Metadata:
ALIYUN::OOS::Interface:
ParameterGroups:
- Parameters:
- sourceType
- sourcePath
- tokenInfo
- templateFile
- mode
Label:
default:
zh-cn: Parameter Settings
en: Parameters Options
- Parameters:
- regionId
- targets
Label:
default:
zh-cn: Select Instance
en: Select ECS Instance
- Parameters:
- OOSAssumeRole
Label:
default:
zh-cn: Advanced Options
en: Control Options
Instruções
Leia o conteúdo em inglês para compreender O QUE precisa ser comunicado
Escreva o texto em português do Brasil DO ZERO — esqueça a estrutura das frases em inglês
Preserve toda a formatação markdown, blocos de código, links e imagens exatamente como estão
Tags xref (
<a data-tag="xref" ...>texto</a>) — preserve a tag INTEIRA com todos os atributos na ordem e caixa originais, traduza APENAS o texto visível entre > eAplique todas as regras específicas do idioma rigorosamente
Aplique as regras de stopwords com tolerância zero
Use o modo imperativo em passos numerados e listas de procedimentos
Garanta a consistência terminológica — o mesmo termo deve ter a mesma tradução em todo o documento
Varie os inícios de frase em listas e tabelas — nenhum início deve se repetir mais de 3 vezes
Retorne APENAS o documento markdown em português do Brasil, sem explicações