

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

# Men-deploy konfigurasi
<a name="appconfig-deploying"></a>

Setelah Anda [membuat artefak yang diperlukan](https://docs.aws.amazon.com/appconfig/latest/userguide/creating-feature-flags-and-configuration-data.html) untuk bekerja dengan flag fitur dan data konfigurasi bentuk bebas, Anda dapat membuat penerapan baru dengan menggunakan Konsol Manajemen AWS, the AWS CLI, atau SDK. Memulai penerapan dalam AWS AppConfig panggilan operasi [StartDeployment](https://docs.aws.amazon.com/appconfig/2019-10-09/APIReference/API_StartDeployment.html)API. 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 a`KmsKeyIdentifier`, kebijakan izin yang dilampirkan pada prinsipal AWS Identity and Access Management (IAM) Anda harus mengizinkan operasi. `kms:GenerateDataKey`

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)
<a name="appconfig-deploying-console"></a>

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/](https://console.aws.amazon.com/systems-manager/appconfig/).

1. Di panel navigasi, pilih **Aplikasi**, lalu pilih aplikasi yang Anda buat. [Membuat namespace untuk aplikasi Anda di AWS AppConfig](appconfig-creating-namespace.md)

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

1. Pilih **Mulai penerapan**.

1. Untuk **Konfigurasi**, pilih konfigurasi dari daftar.

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

1. Untuk **strategi Deployment**, pilih strategi dari daftar.

1. (Opsional) Untuk **deskripsi Deployment**, masukkan deskripsi. 

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

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

1. Pilih **Mulai penerapan**.

## Menyebarkan konfigurasi (baris perintah)
<a name="appconfig-deploying-commandline"></a>

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

**Untuk menerapkan konfigurasi langkah demi langkah**

1. Buka AWS CLI.

1. 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
   ```

------