Déploiement d'une configuration - AWS AppConfig

Les traductions sont fournies par des outils de traduction automatique. En cas de conflit entre le contenu d'une traduction et celui de la version originale en anglais, la version anglaise prévaudra.

Déploiement d'une configuration

Après avoir créé les artefacts nécessaires pour utiliser les indicateurs de fonctionnalités et les données de configuration en format libre, vous pouvez créer un nouveau déploiement à l'aide du SDK AWS Management Console AWS CLI, du ou du SDK. Le démarrage d'un déploiement dans AWS AppConfig appelle l'opération StartDeploymentAPI. Cet appel inclut les ID de l'application AWS AppConfig , l'environnement, le profil de configuration et (éventuellement) la version des données de configuration à déployer. L'appel inclut également l'ID de la stratégie de déploiement à utiliser, qui détermine le mode de déploiement des données de configuration.

Si vous déployez des secrets stockés dans AWS Secrets Manager des objets Amazon Simple Storage Service (Amazon S3) chiffrés avec une clé gérée par le client ou des paramètres de chaîne sécurisés stockés AWS Systems Manager dans Parameter Store chiffrés avec une clé gérée par le client, vous devez spécifier une valeur pour KmsKeyIdentifier le paramètre. Si votre configuration n'est pas chiffrée ou est chiffrée avec un Clé gérée par AWS, il n'est pas nécessaire de spécifier une valeur pour le KmsKeyIdentifier paramètre.

Note

La valeur que vous spécifiez KmsKeyIdentifier doit être une clé gérée par le client. Il n'est pas nécessaire que ce soit la même clé que celle que vous avez utilisée pour chiffrer votre configuration.

Lorsque vous démarrez un déploiement avec unKmsKeyIdentifier, la politique d'autorisation attachée à votre principal AWS Identity and Access Management (IAM) doit autoriser l'kms:GenerateDataKeyopération.

AWS AppConfig surveille la distribution à tous les hôtes et indique le statut. Si une distribution échoue AWS AppConfig , la configuration est annulée.

Note

Vous ne pouvez déployer qu'une seule configuration à la fois dans un environnement. Cependant, vous pouvez déployer une configuration dans chaque environnement en même temps.

Déployer une configuration (console)

Utilisez la procédure suivante pour déployer une AWS AppConfig configuration à l'aide de la AWS Systems Manager console.

Pour déployer une configuration à l'aide de la console
  1. Ouvrez la AWS Systems Manager console à l'adresse https://console.aws.amazon.com/systems-manager/appconfig/.

  2. Dans le volet de navigation, choisissez Applications, puis choisissez une application que vous avez créée dansCréation d'un espace de noms pour votre application dans AWS AppConfig.

  3. Dans l'onglet Environnements, cliquez sur le bouton radio correspondant à un environnement, puis choisissez Afficher les détails.

  4. Choisissez Démarrer le déploiement.

  5. Dans Configuration, choisissez une configuration dans la liste.

  6. Selon la source de votre configuration, utilisez la liste des versions pour choisir la version que vous souhaitez déployer.

  7. Pour Deployment strategy (Stratégie de déploiement), choisissez une stratégie dans la liste.

  8. (Facultatif) Pour la description du déploiement, entrez une description.

  9. Pour Options de chiffrement supplémentaires, choisissez une AWS Key Management Service clé dans la liste.

  10. (Facultatif) Dans la section Balises, choisissez Ajouter une nouvelle balise et entrez une clé et une valeur facultative. Vous pouvez spécifier un maximum de 50 balises par ressource.

  11. Choisissez Démarrer le déploiement.

Déployer une configuration (ligne de commande)

La procédure suivante décrit comment utiliser AWS CLI (sous Linux ou Windows) ou comment AWS Tools for PowerShell déployer une AWS AppConfig configuration.

Pour déployer une configuration étape par étape
  1. Ouvrez le AWS CLI.

  2. Exécutez la commande suivante pour déployer une configuration.

    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

    Le système retourne des informations telles que les suivantes.

    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