Men-deploy konfigurasi - AWS AppConfig

Terjemahan disediakan oleh mesin penerjemah. Jika konten terjemahan yang diberikan bertentangan dengan versi bahasa Inggris aslinya, utamakan versi bahasa Inggris.

Men-deploy konfigurasi

Setelah Anda membuat artefak yang diperlukan untuk bekerja dengan flag fitur dan data konfigurasi bentuk bebas, Anda dapat membuat penerapan baru dengan menggunakan, file AWS Management Console, atau file. AWS CLI SDK Memulai penyebaran dalam AWS AppConfig panggilan StartDeploymentAPIoperasi. Panggilan ini mencakup AWS AppConfig aplikasi, lingkungan, profil konfigurasi, dan (opsional) versi data konfigurasi yang akan digunakan. IDs Panggilan juga mencakup ID dari strategi deployment yang digunakan, yang menentukan cara data konfigurasi di-deploy.

Jika Anda menerapkan rahasia yang disimpan dalam AWS Secrets Manager, objek Amazon Simple Storage Service (Amazon S3) Simple Storage Service (Amazon S3) yang dienkripsi dengan kunci yang dikelola pelanggan, atau parameter string aman yang disimpan di AWS Systems Manager Parameter Store yang dienkripsi dengan kunci yang dikelola pelanggan, Anda harus menentukan nilai untuk parameter tersebut. KmsKeyIdentifier Jika konfigurasi Anda tidak dienkripsi atau dienkripsi dengan Kunci yang dikelola AWS, menentukan nilai untuk parameter tidak diperlukan. KmsKeyIdentifier

catatan

Nilai yang Anda tentukan KmsKeyIdentifier harus berupa kunci yang dikelola pelanggan. Ini tidak harus menjadi kunci yang sama yang Anda gunakan untuk mengenkripsi konfigurasi Anda.

Saat Anda memulai penerapan dengan aKmsKeyIdentifier, kebijakan izin yang dilampirkan pada prinsipal AWS Identity and Access Management (IAM) Anda harus mengizinkan kms:GenerateDataKey operasi.

AWS AppConfig memantau distribusi ke semua host dan melaporkan status. Jika distribusi gagal, maka AWS AppConfig putar kembali konfigurasi.

catatan

Anda hanya dapat menerapkan satu konfigurasi pada satu waktu ke lingkungan. Namun, Anda dapat menerapkan satu konfigurasi masing-masing ke lingkungan yang berbeda secara bersamaan.

Menerapkan konfigurasi (konsol)

Gunakan prosedur berikut untuk menerapkan AWS AppConfig konfigurasi menggunakan AWS Systems Manager konsol.

Untuk menerapkan konfigurasi dengan menggunakan konsol
  1. Buka AWS Systems Manager konsol di https://console.aws.amazon.com/systems-manager/appconfig/.

  2. Di panel navigasi, pilih Aplikasi, lalu pilih aplikasi yang Anda buat. Membuat namespace untuk aplikasi Anda di AWS AppConfig

  3. Pada tab Lingkungan, isi tombol radio untuk lingkungan, lalu pilih Lihat detail.

  4. Pilih Mulai penerapan.

  5. Untuk Konfigurasi, pilih konfigurasi dari daftar.

  6. Bergantung pada sumber konfigurasi Anda, gunakan daftar versi untuk memilih versi yang ingin Anda gunakan.

  7. Untuk strategi Deployment, pilih strategi dari daftar.

  8. (Opsional) Untuk deskripsi Deployment, masukkan deskripsi.

  9. Untuk opsi enkripsi tambahan, pilih AWS Key Management Service kunci dari daftar.

  10. (Opsional) Di bagian Tag, pilih Tambahkan tag baru dan masukkan kunci dan nilai opsional. Anda dapat menentukan maksimum 50 tag untuk sumber daya.

  11. Pilih Mulai penerapan.

Menyebarkan konfigurasi (baris perintah)

Prosedur berikut menjelaskan cara menggunakan AWS CLI (di Linux atau Windows) atau AWS Tools for PowerShell untuk menyebarkan AWS AppConfig konfigurasi.

Untuk menerapkan konfigurasi langkah demi langkah
  1. Buka AWS CLI.

  2. Jalankan perintah berikut untuk menyebarkan konfigurasi.

    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

    Sistem mengembalikan informasi seperti berikut ini.

    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