Bereitstellen einer Konfiguration - AWS AppConfig

Die vorliegende Übersetzung wurde maschinell erstellt. Im Falle eines Konflikts oder eines Widerspruchs zwischen dieser übersetzten Fassung und der englischen Fassung (einschließlich infolge von Verzögerungen bei der Übersetzung) ist die englische Fassung maßgeblich.

Bereitstellen einer Konfiguration

Nachdem Sie die erforderlichen Artefakte für die Arbeit mit Feature-Flags und Freiform-Konfigurationsdaten erstellt haben, können Sie mit dem AWS Management Console, dem oder dem SDK eine neue Bereitstellung erstellen. AWS CLI Beim Starten einer Bereitstellung in wird AWS AppConfig der StartDeploymentAPIVorgang aufgerufen. Dieser Aufruf beinhaltet die Angabe IDs der AWS AppConfig Anwendung, der Umgebung, des Konfigurationsprofils und (optional) der Version der Konfigurationsdaten, die bereitgestellt werden sollen. Der Aufruf enthält auch die ID der zu verwendenden Bereitstellungsstrategie, die bestimmt, wie die Konfigurationsdaten bereitgestellt werden.

Wenn Sie Geheimnisse einsetzen AWS Secrets Manager, die in Objekten von Amazon Simple Storage Service (Amazon S3) gespeichert sind, die mit einem vom Kunden verwalteten Schlüssel verschlüsselt sind, oder sichere Zeichenkettenparameter, die im AWS Systems Manager Parameter Store gespeichert sind und mit einem vom Kunden verwalteten Schlüssel verschlüsselt sind, müssen Sie einen Wert für den KmsKeyIdentifier Parameter angeben. Wenn Ihre Konfiguration nicht verschlüsselt oder mit einem verschlüsselt ist Von AWS verwalteter Schlüssel, ist die Angabe eines Werts für den KmsKeyIdentifier Parameter nicht erforderlich.

Anmerkung

Bei dem Wert, den Sie angeben, KmsKeyIdentifier muss es sich um einen vom Kunden verwalteten Schlüssel handeln. Dabei muss es sich nicht um denselben Schlüssel handeln, den Sie zum Verschlüsseln Ihrer Konfiguration verwendet haben.

Wenn Sie eine Bereitstellung mit einem startenKmsKeyIdentifier, muss die Ihrem Prinzipal AWS Identity and Access Management (IAM) zugeordnete Berechtigungsrichtlinie den kms:GenerateDataKey Vorgang zulassen.

AWS AppConfig überwacht die Verteilung an alle Hosts und meldet den Status. Wenn eine Verteilung fehlschlägt, wird AWS AppConfig die Konfiguration zurückgesetzt.

Anmerkung

Sie können jeweils nur eine Konfiguration in einer Umgebung bereitstellen. Sie können jedoch jeweils eine Konfiguration gleichzeitig in verschiedenen Umgebungen bereitstellen.

Stellen Sie eine Konfiguration bereit (Konsole)

Gehen Sie wie folgt vor, um eine AWS AppConfig Konfiguration mithilfe der AWS Systems Manager Konsole bereitzustellen.

So stellen Sie eine Konfiguration über die Konsole bereit
  1. Öffnen Sie die AWS Systems Manager Konsole unter https://console.aws.amazon.com/systems-manager/appconfig/.

  2. Wählen Sie im Navigationsbereich Anwendungen und dann eine Anwendung aus, in der Sie sie erstellt haben. Erstellen Sie einen Namespace für Ihre Anwendung in AWS AppConfig

  3. Füllen Sie auf der Registerkarte Umgebungen das Optionsfeld für eine Umgebung aus, und wählen Sie dann Details anzeigen aus.

  4. Klicken Sie auf Start deployment (Bereitstellung starten).

  5. Wählen Sie unter Configuration (Konfiguration) eine Konfiguration in der Liste aus.

  6. Verwenden Sie je nach Quelle Ihrer Konfiguration die Versionsliste, um die Version auszuwählen, die Sie bereitstellen möchten.

  7. Wählen Sie unter Deployment strategy (Bereitstellungsstrategie) eine Strategie in der Liste aus.

  8. (Optional) Geben Sie für die Beschreibung der Bereitstellung eine Beschreibung ein.

  9. Wählen Sie für zusätzliche Verschlüsselungsoptionen einen AWS Key Management Service Schlüssel aus der Liste aus.

  10. (Optional) Wählen Sie im Abschnitt Tags die Option Neues Tag hinzufügen aus und geben Sie einen Schlüssel und einen optionalen Wert ein. Sie können maximal 50 Tags für eine Ressource angeben.

  11. Klicken Sie auf Start deployment (Bereitstellung starten).

Stellen Sie eine Konfiguration bereit (Befehlszeile)

Das folgende Verfahren beschreibt, wie Sie die AWS CLI (unter Linux oder Windows) verwenden oder AWS Tools for PowerShell eine AWS AppConfig Konfiguration bereitstellen.

So stellen Sie eine Konfiguration Schritt für Schritt bereit
  1. Öffnen Sie das AWS CLI.

  2. Führen Sie den folgenden Befehl aus, um eine Konfiguration bereitzustellen.

    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

    Das System gibt unter anderem folgende Informationen zurück

    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