Implementar una configuración
Tras crear los artefactos necesarios para trabajar con marcas de características y datos de configuración de formato libre, puede crear una nueva implementación mediante la Consola de administración de AWS, la AWS CLI o el SDK. Al iniciar una implementación en AWS AppConfig se llama a la acción de la API StartDeployment. Esta llamada incluye los ID de una aplicación de AWS AppConfig, entorno, perfil de configuración y (opcionalmente) la versión de datos de la configuración que se va a implementar. La llamada también incluye el ID de la estrategia de implementación que se va a utilizar, que determina cómo se implementan los datos de configuración.
Si implementan secretos almacenados en AWS Secrets Manager, objetos de Amazon Simple Storage Service (Amazon S3) cifrados con una clave administrada por el cliente o parámetros de cadena segura almacenados en el AWS Systems Manager almacén de parámetros cifrados con una clave administrada por el cliente, debe especificar un valor para el parámetro KmsKeyIdentifier. Si la configuración no está cifrada o lo está con una Clave administrada de AWS, no es necesario especificar un valor para el parámetro KmsKeyIdentifier.
El valor que se especifica para KmsKeyIdentifier debe ser una clave administrada por el cliente. No tiene que ser la misma clave que utilizó para cifrar la configuración.
Al iniciar una implementación con una KmsKeyIdentifier, la política de permisos adjunta a su entidad principal de AWS Identity and Access Management (IAM) debe permitir la operación kms:GenerateDataKey.
AWS AppConfig supervisa la distribución a todos los hosts y notifica el estado. Si se produce un error en una distribución, AWS AppConfig revierte la configuración.
Solo puede implementar una única configuración a la vez en un entorno. Sin embargo, puede implementar una configuración por entorno en diferentes entornos al mismo tiempo.
Implementación de una configuración (consola)
Use el siguiente procedimiento para implementar una configuración de AWS AppConfig mediante la consola de AWS Systems Manager.
Para implementar una configuración mediante la consola
Abra la consola de AWS Systems Manager en https://console.aws.amazon.com/systems-manager/appconfig/.
-
En el panel de navegación, elija Aplicaciones, y, a continuación, seleccione una aplicación que haya creado en Creación de un espacio de nombres para su aplicación en AWS AppConfig.
-
En la pestaña Entornos, rellene el botón de opción de un entorno y, a continuación, elija Ver detalles.
-
Elija Iniciar la implementación.
-
En Configuration (Configuración), seleccione una configuración de la lista.
-
Dependiendo del origen de la configuración, utilice la lista de versiones para elegir la versión que desea implementar.
-
En Deployment strategy (Estrategia de implementación), elija una estrategia de la lista.
-
(Opcional) Para Descripción de implementación, ingrese una descripción.
-
Para ver Opciones de cifrado adicionales, elija una clave de AWS Key Management Service de la lista.
-
(Opcional) En la sección Etiquetas, seleccione Agregar nueva etiqueta e introduzca una clave y un valor opcional. Puede especificar un máximo de 50 etiquetas para un recurso.
-
Elija Iniciar la implementación.
Implementación de una configuración (línea de comandos)
En el siguiente procedimiento se describe cómo utilizar la AWS CLI (en Linux o Windows) o Herramientas de AWS para PowerShell para desplegar una configuración de AWS AppConfig.
Para implementar una configuración paso a paso
-
Abra la AWS CLI.
-
Ejecute el siguiente comando para desplegar una configuración.
- 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
El sistema devuelve información similar a la siguiente.
- 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