-
-
Notifications
You must be signed in to change notification settings - Fork 149
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
DeployBlueGreenAction class to handle CodeDeploy deployments #121
base: develop
Are you sure you want to change the base?
DeployBlueGreenAction class to handle CodeDeploy deployments #121
Conversation
…/ecs-deploy into feature/blue-green-deploy
|
||
message = 'Successfully changed task definition to: %s:%s\n' % ( | ||
task_definition.family, | ||
task_definition.revision | ||
) | ||
|
||
if type(deployment) == DeployBlueGreenAction: | ||
_cd_deploy_url = 'https://us-east-1.console.aws.amazon.com/codesuite/codedeploy/deployments/' |
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.
@joaoricardo000 Will it always be us-east-1
? Or should it be the same region as you are deploying to?
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.
I agree, this needs to be configurable, like the regions are in the deploy
, scale
, etc. commands.
In addition this should be configured and falling back to a default inside the Action, not in the CLI controller, please.
'Properties': { | ||
'TaskDefinition': task_definition.arn, | ||
'LoadBalancerInfo': { | ||
'ContainerName': self.service['loadBalancers'][0]['containerName'], |
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.
Does this imply, that a task definition does not have more than one containers?
return self._deployment_target_id | ||
|
||
def deploy(self, task_definition): | ||
response = self.client.codedeploy.create_deployment( |
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.
Actually this like makes the class to a "codedeploy-deploy" tool, rather then an "ecs-deploy" too.
I'm still thinking, if this use-case might be a bit out of the scope of the project.
|
||
message = 'Successfully changed task definition to: %s:%s\n' % ( | ||
task_definition.family, | ||
task_definition.revision | ||
) | ||
|
||
if type(deployment) == DeployBlueGreenAction: | ||
_cd_deploy_url = 'https://us-east-1.console.aws.amazon.com/codesuite/codedeploy/deployments/' |
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.
I agree, this needs to be configurable, like the regions are in the deploy
, scale
, etc. commands.
In addition this should be configured and falling back to a default inside the Action, not in the CLI controller, please.
Anything I can do to get this over the finish line? or, another option would be to have a flag to disable the deploy after updating the task def. |
ecs deploy
function.--cd-application-name AppECS-service-name
--cd-application-name
is given, aDeployBlueGreenAction
instance is created to handle the creation and monitoring of the CodeDeploy deployment process.Example call/output:
Related to #120