Menu

Code Deploy

Follow

Comments

1 comment

  • Avatar
    Srujan Akumarthi

    "After we apply the same set of settings on the temporary deployment group we have a matching revision with the original group of instances and we delete the temporary deployment group after removing the instances from the temporary group and assigning them to the original group."

    While this works pretty well for blue-green deployments, it fails for in-place deployments.  When we trigger a new revision on "Original group" with in-place as configuration, CodeDeploy looks at the instance as if it's a fresh instance. So, application lifecycle skips "Stop" which leads to failure of "Start"  (Process already running) or "Install" (in case of file copy operations).
    It happens as the temporary deployment group is different from original.

    Alternative approach:
    Whenever an instance launches with appropriate tags, it automatically gets added to the deployment group. 
    In case of AutoScaling group, code deploy owners should modify their deployment group to allow both ASG and Tags.

    Once the instance is added to the deployment group, we can trigger a deployment on same group with 
    option `--update-outdated-instances-only`.
    It'd ensure whenever spot instances are launched, deployment is triggered only on newer instances. Further deployments (in-place) shall also be smooth as the deployment group is same for all scenarios.

Please sign in to leave a comment.