Skip to content

Commit 0e5f6aa

Browse files
committed
docs: update readme
1 parent 34e92cd commit 0e5f6aa

File tree

1 file changed

+18
-11
lines changed
  • packages/cdk-blue-green-container-deployment

1 file changed

+18
-11
lines changed

packages/cdk-blue-green-container-deployment/README.md

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,21 @@ export class BlueGreenContainerDeploymentStack extends Stack {
125125
ecsService.connections.allowFrom(loadBalancer, Port.tcp(80));
126126
ecsService.connections.allowFrom(loadBalancer, Port.tcp(8080));
127127

128+
const ecsDeploymentConfiguration = new EcsDeploymentConfiguration(
129+
this,
130+
'DeploymentConfig',
131+
{
132+
deploymentConfigName: 'Canary20Percent5Minute',
133+
trafficRoutingConfig: {
134+
type: 'TimeBasedCanary',
135+
timeBasedCanary: {
136+
canaryInterval: 5,
137+
canaryPercentage: 20,
138+
},
139+
},
140+
}
141+
);
142+
128143
const deploymentGroup = new EcsDeploymentGroup(this, 'DeploymentGroup', {
129144
applicationName: 'blue-green-application',
130145
deploymentGroupName: 'blue-green-deployment-group',
@@ -136,19 +151,11 @@ export class BlueGreenContainerDeploymentStack extends Stack {
136151
prodTrafficListener: prodListener,
137152
testTrafficListener: testListener,
138153
terminationWaitTimeInMinutes: 100,
139-
createDeploymentConfigInput: {
140-
computePlatform: "ECS",
141-
deploymentConfigName: "Canary20Percent5Minute",
142-
trafficRoutingConfig: {
143-
type: "TimeBasedCanary",
144-
timeBasedCanary: {
145-
canaryInterval: 5,
146-
canaryPercentage: 20,
147-
},
148-
},
149-
},
154+
deploymentConfig: ecsDeploymentConfiguration.deploymentConfig,
150155
});
151156

157+
deploymentGroup.node.addDependency(ecsDeploymentConfiguration);
158+
152159
// @see https://github.com/cloudcomponents/cdk-constructs/tree/master/examples/blue-green-container-deployment-example/blue-green-repository
153160
const repository = new Repository(this, 'CodeRepository', {
154161
repositoryName: 'blue-green-repository',

0 commit comments

Comments
 (0)