Implantar uma configuração - AWS AppConfig

As traduções são geradas por tradução automática. Em caso de conflito entre o conteúdo da tradução e da versão original em inglês, a versão em inglês prevalecerá.

Implantar uma configuração

Depois de criar os artefatos necessários para trabalhar com sinalizadores de recursos e dados de configuração de formato livre, você pode criar uma nova implantação usando o AWS Management Console, o ou o AWS CLI SDK. Iniciar uma implantação em AWS AppConfig chama a operação StartDeploymentda API. Essa chamada inclui os IDs do aplicativo do AWS AppConfig , do ambiente, do perfil de configuração e (opcionalmente) a versão de dados de configuração a ser implantada. A chamada também inclui o ID da estratégia de implantação a ser usada, que determina como os dados de configuração são implantados.

Se você implantar segredos armazenados em AWS Secrets Manager objetos do Amazon Simple Storage Service (Amazon S3) criptografados com uma chave gerenciada pelo cliente ou parâmetros de cadeia de caracteres seguros armazenados AWS Systems Manager no Parameter Store criptografados com uma chave gerenciada pelo cliente, você deverá especificar um valor para o parâmetro. KmsKeyIdentifier Se sua configuração não estiver criptografada ou estiver criptografada com um Chave gerenciada pela AWS, não é necessário especificar um valor para o KmsKeyIdentifier parâmetro.

nota

O valor especificado para KmsKeyIdentifier deve ser uma chave gerenciada pelo cliente. Não precisa ser a mesma chave que você usou para criptografar sua configuração.

Quando você inicia uma implantação com umKmsKeyIdentifier, a política de permissão anexada ao seu diretor AWS Identity and Access Management (IAM) deve permitir a kms:GenerateDataKey operação.

AWS AppConfig monitora a distribuição para todos os hosts e relata o status. Se uma distribuição falhar, AWS AppConfig reverte a configuração.

nota

Você só pode implantar uma única configuração por vez em determinado ambiente. No entanto, pode implantar uma única configuração em ambientes diferentes ao mesmo tempo.

Implantar uma configuração (console)

Use o procedimento a seguir para implantar uma AWS AppConfig configuração usando o AWS Systems Manager console.

Como implantar uma configuração usando o console
  1. Abra o AWS Systems Manager console em https://console.aws.amazon.com/systems-manager/appconfig/.

  2. No painel de navegação, escolha Aplicativos e escolha um aplicativo no Como criar um namespace para seu aplicativo no AWS AppConfig qual você criou.

  3. Na guia Ambientes, preencha o botão de rádio de um ambiente e escolha Exibir detalhes.

  4. Selecione Iniciar implantação.

  5. Em Configuration (Configuração), escolha uma configuração na lista.

  6. Dependendo da origem da sua configuração, use a lista de versões para escolher a versão que você deseja implantar.

  7. Em Deployment strategy (Estratégia de implantação), escolha uma estratégia da lista.

  8. (Opcional) Em Descrição da implantação, insira uma descrição.

  9. Para opções adicionais de criptografia, escolha uma AWS Key Management Service chave na lista.

  10. (Opcional) Na seção Tags, escolha Adicionar nova tag e insira uma chave e um valor opcional. Você pode especificar um máximo de 50 tags para um recurso.

  11. Selecione Iniciar implantação.

Implantar uma configuração (linha de comando)

O procedimento a seguir descreve como usar o AWS CLI (no Linux ou no Windows) ou AWS Tools for PowerShell implantar uma AWS AppConfig configuração.

Para implantar uma configuração passo a passo
  1. Abra AWS CLI o.

  2. Execute o comando a seguir para implantar uma configuração.

    Linux
    aws appconfig start-deployment \ --application-id The_application_ID \ --environment-id The_environment_ID \ --deployment-strategy-id The_deployment_strategy_ID \ --configuration-profile-id The_configuration_profile_ID \ --configuration-version The_configuration_version_to_deploy \ --description A_description_of_the_deployment \ --tags User_defined_key_value_pair_metadata_of_the_deployment
    Windows
    aws appconfig start-deployment ^ --application-id The_application_ID ^ --environment-id The_environment_ID ^ --deployment-strategy-id The_deployment_strategy_ID ^ --configuration-profile-id The_configuration_profile_ID ^ --configuration-version The_configuration_version_to_deploy ^ --description A_description_of_the_deployment ^ --tags User_defined_key_value_pair_metadata_of_the_deployment
    PowerShell
    Start-APPCDeployment ` -ApplicationId The_application_ID ` -ConfigurationProfileId The_configuration_profile_ID ` -ConfigurationVersion The_configuration_version_to_deploy ` -DeploymentStrategyId The_deployment_strategy_ID ` -Description A_description_of_the_deployment ` -EnvironmentId The_environment_ID ` -Tag Hashtable_type_user_defined_key_value_pair_metadata_of_the_deployment

    O sistema retorna informações como estas.

    Linux
    {   
       "ApplicationId": "The ID of the application that was deployed",
       "EnvironmentId" : "The ID of the environment",
       "DeploymentStrategyId": "The ID of the deployment strategy that was deployed",
       "ConfigurationProfileId": "The ID of the configuration profile that was deployed",
       "DeploymentNumber": The sequence number of the deployment,
       "ConfigurationName": "The name of the configuration",
       "ConfigurationLocationUri": "Information about the source location of the configuration",
       "ConfigurationVersion": "The configuration version that was deployed",
       "Description": "The description of the deployment",
       "DeploymentDurationInMinutes": Total amount of time the deployment lasted,
       "GrowthType": "The linear or exponential algorithm used to define how percentage grew over time",
       "GrowthFactor": The percentage of targets to receive a deployed configuration during each interval,
       "FinalBakeTimeInMinutes": Time AWS AppConfig monitored for alarms before considering the deployment to be complete,
       "State": "The state of the deployment",  
    
       "EventLog": [ 
          { 
             "Description": "A description of the deployment event",
             "EventType": "The type of deployment event",
             "OccurredAt": The date and time the event occurred,
             "TriggeredBy": "The entity that triggered the deployment event"
          }
       ],
    
       "PercentageComplete": The percentage of targets for which the deployment is available,
       "StartedAt": The time the deployment started,
       "CompletedAt": The time the deployment completed   
    }
    Windows
    {
       "ApplicationId": "The ID of the application that was deployed",
       "EnvironmentId" : "The ID of the environment",
       "DeploymentStrategyId": "The ID of the deployment strategy that was deployed",
       "ConfigurationProfileId": "The ID of the configuration profile that was deployed",
       "DeploymentNumber": The sequence number of the deployment,
       "ConfigurationName": "The name of the configuration",
       "ConfigurationLocationUri": "Information about the source location of the configuration",
       "ConfigurationVersion": "The configuration version that was deployed",
       "Description": "The description of the deployment",
       "DeploymentDurationInMinutes": Total amount of time the deployment lasted,
       "GrowthType": "The linear or exponential algorithm used to define how percentage grew over time",
       "GrowthFactor": The percentage of targets to receive a deployed configuration during each interval,
       "FinalBakeTimeInMinutes": Time AWS AppConfig monitored for alarms before considering the deployment to be complete,
       "State": "The state of the deployment",  
    
       "EventLog": [ 
          { 
             "Description": "A description of the deployment event",
             "EventType": "The type of deployment event",
             "OccurredAt": The date and time the event occurred,
             "TriggeredBy": "The entity that triggered the deployment event"
          }
       ],
    
       "PercentageComplete": The percentage of targets for which the deployment is available,
       "StartedAt": The time the deployment started,
       "CompletedAt": The time the deployment completed 
    }
    PowerShell
    ApplicationId               : The ID of the application that was deployed
    CompletedAt                 : The time the deployment completed
    ConfigurationLocationUri    : Information about the source location of the configuration
    ConfigurationName           : The name of the configuration
    ConfigurationProfileId      : The ID of the configuration profile that was deployed
    ConfigurationVersion        : The configuration version that was deployed
    ContentLength               : Runtime of the deployment 
    DeploymentDurationInMinutes : Total amount of time the deployment lasted
    DeploymentNumber            : The sequence number of the deployment
    DeploymentStrategyId        : The ID of the deployment strategy that was deployed
    Description                 : The description of the deployment
    EnvironmentId               : The ID of the environment that was deployed
    EventLog                    : {Description : A description of the deployment event, EventType : The type of deployment event, OccurredAt : The date and time the event occurred,
             TriggeredBy : The entity that triggered the deployment event}
    FinalBakeTimeInMinutes      : Time AWS AppConfig monitored for alarms before considering the deployment to be complete
    GrowthFactor                : The percentage of targets to receive a deployed configuration during each interval
    GrowthType                  : The linear or exponential algorithm used to define how percentage grew over time
    HttpStatusCode              : HTTP Status of the runtime
    PercentageComplete          : The percentage of targets for which the deployment is available
    ResponseMetadata            : Runtime Metadata
    StartedAt                   : The time the deployment started
    State                       : The state of the deployment