CDK Constructs for performing ECS Deployments with CodeDeploy
Project description
CDK ECS CodeDeploy
This project contains CDK constructs to create CodeDeploy ECS deployments.
Installation
TypeScript
yarn add @cdklabs/cdk-ecs-codedeploy
Getting Started
You can browse the documentation at https://constructs.dev/packages/cdk-ecs-codedeploy/
CodeDeploy for ECS can manage the deployment of new task definitions to ECS services. Only 1 deployment construct can be defined for a given EcsDeploymentGroup.
declare const deploymentGroup: codeDeploy.IEcsDeploymentGroup;
declare const taskDefinition: ecs.ITaskDefinition;
new EcsDeployment({
deploymentGroup,
appspec: new codedeploy.EcsAppSpec({
taskDefinition,
containerName: 'mycontainer',
containerPort: 80,
}),
});
The deployment will use the AutoRollbackConfig for the EcsDeploymentGroup unless it is overridden in the deployment:
new EcsDeployment({
deploymentGroup,
appspec: new codedeploy.EcsAppSpec({
taskDefinition,
containerName: 'mycontainer',
containerPort: 80,
}),
autoRollback: {
failedDeployment: true,
deploymentInAlarm: true,
stoppedDeployment: false,
},
});
By default, the deployment will timeout after 30 minutes. The timeout value can be overridden:
new EcsDeployment({
deploymentGroup,
appspec: new codedeploy.EcsAppSpec({
taskDefinition,
containerName: 'mycontainer',
containerPort: 80,
}),
timeout: Duration.minutes(60),
});
Local Development
yarn install
yarn build
yarn test
To run an integration test and update the snapshot, run:
yarn integ:deployment:deploy
To recreate snapshots for integration tests, run:
yarn integ:snapshot-all
Security
See CONTRIBUTING for more information.
License
This project is licensed under the Apache-2.0 License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for cdklabs.ecs-codedeploy-0.0.3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9a75f19bf5480ac463ceb39e93328a0c55e5f97680a178e89eb91a93774964af |
|
MD5 | 8ea844c05ed6be3d65b50f9c94b31e50 |
|
BLAKE2b-256 | 74e9737e53d9a4d616bc543394b2023d97f85729c9f4b10aefa3a1a3d2d86add |
Hashes for cdklabs.ecs_codedeploy-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 466d003f6d311994281c57f076407998af07532bba407a844ac8889bab1e5029 |
|
MD5 | 3c6275de76699d81a0462ad9f5cf70c7 |
|
BLAKE2b-256 | 95bdfbdbc5c24fd8bb084497d3303f6b0d8fa3558c8a381064949f868c6aaa08 |