Canary Deployments for AWS ECS
Problem to solve
As a developer deploying to AWS ECS, I want to deploy to gradually to a targeted subset of users. After implementing #226994 we will be able to control the weight of the target group that gets each instance.
Intended users
User experience goal
The user should be able to configure (and modify at any time) the weights of the target groups that will get the blue/green deployments. It should be visible at all times the percent of the distribution to each instance.
The user can scale up/down the target groups.
Proposal
The user should be able to configure the weights of the target groups (sum needs to be 100) through the gitlab-ci.yml
file (similar to existing canary)
rollout 50%:
<<: *manual_rollout_template
variables:
ROLLOUT_PERCENTAGE: 50
The user should be able to configure through the UI the percentage, similar to:
The is a AWS listener rule - forward to needs to be updated by the user defined parameters.
It should be visible at all times the percent of the distribution to each instance. (similar to deploy boards)
Further details
For example:In the AWS Command Line Interface (CLI) to 80:20 like this:
aws elbv2 modify-listener
--listener-arn ""
--default-actions
'[{
"Type": "forward",
"Order": 1,
"ForwardConfig": {
"TargetGroups": [
{ "TargetGroupArn": "<target group 1 arn>",
"Weight": 80 },
{ "TargetGroupArn": "<target group 2 arn>",
"Weight": 20 }
]
}
}]'
Note: Some browsers might cache the page and not reflect the weight that was defined.
modify-rule
Description Replaces the specified properties of the specified rule. Any properties that you do not specify are unchanged.
To add an item to a list, remove an item from a list, or update an item in a list, you must provide the entire list. For example, to add an action, specify a list with the current actions plus the new action.
modify-rule
--rule-arn <value>
[--conditions <value>]
[--actions <value>]
[--cli-input-json <value>]
[--generate-cli-skeleton <value>]
Permissions and Security
Only users who have permission to deploy to production can switch environments
Documentation
Availability & Testing
What does success look like, and how can we measure that?
What is the type of buyer?
Is this a cross-stage feature?
Links / references
- https://aws.amazon.com/blogs/aws/new-application-load-balancer-simplifies-deployment-with-weighted-target-groups/
- https://docs.aws.amazon.com/cli/latest/reference/elbv2/modify-rule.html
This page may contain information related to upcoming products, features and functionality. It is important to note that the information presented is for informational purposes only, so please do not rely on the information for purchasing or planning purposes. Just like with all projects, the items mentioned on the page are subject to change or delay, and the development, release, and timing of any products, features, or functionality remain at the sole discretion of GitLab Inc.