Distribuzione di una configurazione - AWS AppConfig

Le traduzioni sono generate tramite traduzione automatica. In caso di conflitto tra il contenuto di una traduzione e la versione originale in Inglese, quest'ultima prevarrà.

Distribuzione di una configurazione

Dopo aver creato gli elementi necessari per lavorare con i flag di funzionalità e i dati di configurazione in formato libero, puoi creare una nuova distribuzione utilizzando l' AWS Management Console, l'o l'SDK AWS CLI. L'avvio di una distribuzione richiede l'operazione dell'API AWS AppConfig . StartDeployment Questa chiamata include gli ID dell'applicazione, dell'ambiente, del profilo di configurazione e (facoltativamente) della versione dei dati di configurazione AWS AppConfig da distribuire. La chiamata include anche l'ID della strategia di distribuzione da utilizzare, che determina la modalità di distribuzione dei dati di configurazione.

Se distribuisci segreti archiviati in AWS Secrets Manager oggetti Amazon Simple Storage Service (Amazon S3) crittografati con una chiave gestita dal cliente o parametri di stringa sicuri archiviati in AWS Systems Manager Parameter Store crittografati con una chiave gestita dal cliente, devi specificare un valore per il parametro. KmsKeyIdentifier Se la configurazione non è crittografata o è crittografata con un Chiave gestita da AWS, non è necessario specificare un valore per il KmsKeyIdentifier parametro.

Nota

Il valore specificato KmsKeyIdentifier deve essere una chiave gestita dal cliente. Non deve essere necessariamente la stessa chiave che hai usato per crittografare la configurazione.

Quando si avvia una distribuzione con unKmsKeyIdentifier, la politica di autorizzazione allegata al principale AWS Identity and Access Management (IAM) deve consentire l'kms:GenerateDataKeyoperazione.

AWS AppConfig monitora la distribuzione su tutti gli host e riporta lo stato. Se una distribuzione fallisce, AWS AppConfig ripristina la configurazione.

Nota

È possibile distribuire solo una configurazione alla volta in un ambiente. Tuttavia, è possibile implementare una configurazione ciascuna in ambienti diversi contemporaneamente.

Implementa una configurazione (console)

Utilizzare la procedura seguente per distribuire una AWS AppConfig configurazione utilizzando la AWS Systems Manager console.

Per distribuire una configurazione utilizzando la console
  1. Aprire la AWS Systems Manager console all'indirizzo https://console.aws.amazon.com/systems-manager/appconfig/.

  2. Nel riquadro di navigazione, scegli Applicazioni, quindi scegli un'applicazione in cui hai creatoCreazione di uno spazio dei nomi per l'applicazione in AWS AppConfig.

  3. Nella scheda Ambienti, compila il pulsante di opzione corrispondente a un ambiente, quindi scegli Visualizza dettagli.

  4. Selezionare Start deployment (Avvia distribuzione).

  5. Per Configuration (Configurazione), scegliere una configurazione dall'elenco.

  6. A seconda dell'origine della configurazione, utilizza l'elenco delle versioni per scegliere la versione che desideri distribuire.

  7. In Deployment strategy (Strategia di distribuzione), scegliere una strategia dall'elenco.

  8. (Facoltativo) Per la descrizione della distribuzione, inserisci una descrizione.

  9. Per opzioni di crittografia aggiuntive, scegli una AWS Key Management Service chiave dall'elenco.

  10. (Facoltativo) Nella sezione Tag, scegli Aggiungi nuovo tag e inserisci una chiave e un valore opzionale. È possibile specificare un massimo di 50 tag per una risorsa.

  11. Selezionare Start deployment (Avvia distribuzione).

Implementa una configurazione (riga di comando)

La procedura seguente descrive come utilizzare AWS CLI (su Linux o Windows) o AWS Tools for PowerShell distribuire una configurazione. AWS AppConfig

Per distribuire una configurazione passo dopo passo
  1. Aprire il. AWS CLI

  2. Esegui il comando seguente per distribuire una configurazione.

    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

    Il sistema restituisce informazioni simili alle seguenti.

    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