Skip to content

Commit 0061775

Browse files
authored
docs(ecs): remove L1 Construct native blue/green deployment example from README (#35197)
L2 support for Blue Green is already implemented in #35179. Therefore, I think we should remove the L1 Construct example as there is no reason to keep it. ### Checklist - [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md) ---- *By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
1 parent 4d2f463 commit 0061775

File tree

1 file changed

+0
-82
lines changed

1 file changed

+0
-82
lines changed

packages/aws-cdk-lib/aws-ecs/README.md

Lines changed: 0 additions & 82 deletions
Original file line numberDiff line numberDiff line change
@@ -2076,8 +2076,6 @@ Amazon ECS supports native blue/green deployments that allow you to deploy new v
20762076

20772077
[Amazon ECS blue/green deployments](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/deployment-type-blue-green.html)
20782078

2079-
### Using Fargate L2 constructs for Blue/Green Feature
2080-
20812079
```ts
20822080
import * as lambda from 'aws-cdk-lib/aws-lambda';
20832081

@@ -2111,86 +2109,6 @@ const target = service.loadBalancerTarget({
21112109
target.attachToApplicationTargetGroup(blueTargetGroup);
21122110
```
21132111

2114-
### Using Escape Hatches for Blue/Green Features
2115-
2116-
The new blue/green deployment features are added to CloudFormation but not yet available in the CDK L2 constructs, you can use escape hatches to access them through the L1 (CfnService) construct.
2117-
2118-
#### Load Balancer Advanced Configuration
2119-
2120-
Configure advanced load balancer settings for blue/green deployments with alternate target groups and listener rules:
2121-
2122-
```ts
2123-
declare const service: ecs.FargateService;
2124-
2125-
const cfnService = service.node.defaultChild as ecs.CfnService;
2126-
cfnService.loadBalancers = [{
2127-
containerName: 'web',
2128-
containerPort: 80,
2129-
targetGroupArn: 'arn:aws:elasticloadbalancing:region:account:targetgroup/production',
2130-
advancedConfiguration: {
2131-
alternateTargetGroupArn: 'arn:aws:elasticloadbalancing:region:account:targetgroup/test',
2132-
productionListenerRule: 'arn:aws:elasticloadbalancing:region:account:listener-rule/production-rule',
2133-
testListenerRule: 'arn:aws:elasticloadbalancing:region:account:listener-rule/test-rule',
2134-
roleArn: 'arn:aws:iam::account:role/ecs-blue-green-role'
2135-
}
2136-
}];
2137-
```
2138-
2139-
#### Blue/Green Deployment Configuration
2140-
2141-
Configure deployment strategy with bake time and lifecycle hooks:
2142-
2143-
```ts
2144-
declare const service: ecs.FargateService;
2145-
2146-
const cfnService = service.node.defaultChild as ecs.CfnService;
2147-
cfnService.deploymentConfiguration = {
2148-
maximumPercent: 200,
2149-
minimumHealthyPercent: 100,
2150-
strategy: 'BLUE_GREEN',
2151-
bakeTimeInMinutes: 15,
2152-
lifecycleHooks: [{
2153-
hookTargetArn: 'arn:aws:lambda:region:account:function:pre-deployment-hook',
2154-
roleArn: 'arn:aws:iam::account:role/deployment-hook-role',
2155-
lifecycleStages: ['PRE_STOP', 'POST_START']
2156-
}]
2157-
};
2158-
```
2159-
2160-
#### Service Connect Test Traffic Rules
2161-
2162-
Configure test traffic routing for Service Connect during blue/green deployments:
2163-
2164-
```ts
2165-
declare const cluster: ecs.Cluster;
2166-
declare const taskDefinition: ecs.TaskDefinition;
2167-
2168-
const service = new ecs.FargateService(this, 'Service', {
2169-
cluster,
2170-
taskDefinition,
2171-
});
2172-
2173-
const cfnService = service.node.defaultChild as ecs.CfnService;
2174-
cfnService.serviceConnectConfiguration = {
2175-
enabled: true,
2176-
services: [{
2177-
portName: 'api',
2178-
clientAliases: [{
2179-
port: 80,
2180-
dnsName: 'my-service',
2181-
testTrafficRules: {
2182-
header: {
2183-
name: 'x-canary-test',
2184-
value: {
2185-
exact: 'beta-version'
2186-
}
2187-
}
2188-
}
2189-
}]
2190-
}]
2191-
};
2192-
```
2193-
21942112
## Daemon Scheduling Strategy
21952113
You can specify whether service use Daemon scheduling strategy by specifying `daemon` option in Service constructs. See [differences between Daemon and Replica scheduling strategy](https://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs_services.html)
21962114

0 commit comments

Comments
 (0)