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.4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5d998800ef6c521ea5e5da87273f0d626118e441f71a34bf72c8b626c9d24146 |
|
MD5 | c8df2a583ff135c22950c3d8c6dc2f52 |
|
BLAKE2b-256 | b8ce77702c160603e49f3e162e3335ae143177de61db732e62c1a9332b9d2d41 |
Hashes for cdklabs.ecs_codedeploy-0.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 015443521bda82434ebe943f3c4cc8abb584f874cc4bd68cf24e1d35308f173e |
|
MD5 | b3bb515ba8383c224e6d35be9b73f6ca |
|
BLAKE2b-256 | 2a37f9058d13921f859ee33238dfdf9c9091a9c0975fed94a6606e76ab72f6af |