New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(cdk-blue-green-container-deployment): support DeploymentConfig creation #114
Conversation
DeploymentConfig is directly supported by Cloudformation. Let's build our own construct from this (-> Wrapper over CfnDeploymentConfig) and pass it to the DeploymentGroup Construct? This is cleaner than a createDeploymentConfigInput parameter. import { EcsDeploymentGroup, EcsDeploymentConfiguration, /**...**/ } from '@cloudcomponents/cdk-blue-green-container-deployment';
const deploymentConfigurattion =new EcsDeploymentConfiguration(this, 'DeploymentConfiguration', {
deploymentConfigName: 'blue-green-config',
trafficRoutingConfig: {
type: "TimeBasedCanary",
timeBasedCanary: {
canaryInterval: 5,
canaryPercentage: 20,
},
},
}
const deploymentGroup = new EcsDeploymentGroup(this, 'DeploymentGroup', {
applicationName: 'blue-green-application',
deploymentGroupName: 'blue-green-deployment-group',
deploymentConfiguration,
//...
}); How do you find that? |
Although DeploymentConfig is directly supported by Cloudformation, but in the Construct EcsDeploymentGroup class which leverage CustomResource to create DeploymentGroup by AWS SDK in Lambda. For consistency purposes, the PR use AWS SDK to create DeploymentConfig as well. The createDeploymentConfigInput props refer to AWS SDK naming which document is in here. The content of createDeploymentConfigInput props is equal to content of CfnDeploymentConfigProps. Perhaps the createDeploymentConfigInput naming is not good enough. Do you prefer deploymentConfiguration props naming to createDeploymentConfigInput ? @hupe1980 |
I only implemented the DeploymentGroup with a custom resource because the ecs bluegreeen usecase is not directly supported by Cloudformation. As far as I know, this does not apply to the DeploymentConfiguration. The DeploymentConfiguration is also an independent object. So why not as a separate construct? |
…IEcsDeploymentConfig
After chewing on independent object for DeploymentConfiguration, it's better way to decouple dependency. Thank you for your suggestions. I have pushed some commitments. Please review it, thanks. @hupe1980 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thx
Reference issue #115
fix #115