AWS ECS scheduled scaling with terraform
We are using terraform to schedule more containers to ECS cluster
The problem is that a new deployment (terraform apply) will make the scheduled containers to be terminated
i.e if we schedule more containers to 15 PM and scale down to 20 PM, if we run terraform apply at 16 PM - the containers launched at 15 PM will be terminated
any suggestions?
amazon-web-services terraform amazon-ecs
add a comment |
We are using terraform to schedule more containers to ECS cluster
The problem is that a new deployment (terraform apply) will make the scheduled containers to be terminated
i.e if we schedule more containers to 15 PM and scale down to 20 PM, if we run terraform apply at 16 PM - the containers launched at 15 PM will be terminated
any suggestions?
amazon-web-services terraform amazon-ecs
I am not sure how it works for ECS, but I think it's quite similar to ASG. In ASG when terraform recreate it, there is no way to preserve the latest ASG scale out. We need to do it manually right after the terraform apply
– shakhawat
Nov 21 '18 at 16:15
add a comment |
We are using terraform to schedule more containers to ECS cluster
The problem is that a new deployment (terraform apply) will make the scheduled containers to be terminated
i.e if we schedule more containers to 15 PM and scale down to 20 PM, if we run terraform apply at 16 PM - the containers launched at 15 PM will be terminated
any suggestions?
amazon-web-services terraform amazon-ecs
We are using terraform to schedule more containers to ECS cluster
The problem is that a new deployment (terraform apply) will make the scheduled containers to be terminated
i.e if we schedule more containers to 15 PM and scale down to 20 PM, if we run terraform apply at 16 PM - the containers launched at 15 PM will be terminated
any suggestions?
amazon-web-services terraform amazon-ecs
amazon-web-services terraform amazon-ecs
asked Nov 21 '18 at 14:46
gCohgCoh
625624
625624
I am not sure how it works for ECS, but I think it's quite similar to ASG. In ASG when terraform recreate it, there is no way to preserve the latest ASG scale out. We need to do it manually right after the terraform apply
– shakhawat
Nov 21 '18 at 16:15
add a comment |
I am not sure how it works for ECS, but I think it's quite similar to ASG. In ASG when terraform recreate it, there is no way to preserve the latest ASG scale out. We need to do it manually right after the terraform apply
– shakhawat
Nov 21 '18 at 16:15
I am not sure how it works for ECS, but I think it's quite similar to ASG. In ASG when terraform recreate it, there is no way to preserve the latest ASG scale out. We need to do it manually right after the terraform apply
– shakhawat
Nov 21 '18 at 16:15
I am not sure how it works for ECS, but I think it's quite similar to ASG. In ASG when terraform recreate it, there is no way to preserve the latest ASG scale out. We need to do it manually right after the terraform apply
– shakhawat
Nov 21 '18 at 16:15
add a comment |
1 Answer
1
active
oldest
votes
We ended up scheduling the scale up action for every minute during that time
This means that if a new deployment is launched - it will be validated that the number of desired containers is right
Why is terraform used for the deployment as well? It makes sense to scale up using Terraform, but deploying through ECS can be done using just the aws cli which will leave your EC2 instances alone, using e.g. ecs-deploy (boto3) or ecs-deploy (shell)
– Tiemen
Dec 3 '18 at 16:14
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53414578%2faws-ecs-scheduled-scaling-with-terraform%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
We ended up scheduling the scale up action for every minute during that time
This means that if a new deployment is launched - it will be validated that the number of desired containers is right
Why is terraform used for the deployment as well? It makes sense to scale up using Terraform, but deploying through ECS can be done using just the aws cli which will leave your EC2 instances alone, using e.g. ecs-deploy (boto3) or ecs-deploy (shell)
– Tiemen
Dec 3 '18 at 16:14
add a comment |
We ended up scheduling the scale up action for every minute during that time
This means that if a new deployment is launched - it will be validated that the number of desired containers is right
Why is terraform used for the deployment as well? It makes sense to scale up using Terraform, but deploying through ECS can be done using just the aws cli which will leave your EC2 instances alone, using e.g. ecs-deploy (boto3) or ecs-deploy (shell)
– Tiemen
Dec 3 '18 at 16:14
add a comment |
We ended up scheduling the scale up action for every minute during that time
This means that if a new deployment is launched - it will be validated that the number of desired containers is right
We ended up scheduling the scale up action for every minute during that time
This means that if a new deployment is launched - it will be validated that the number of desired containers is right
answered Nov 21 '18 at 16:11
gCohgCoh
625624
625624
Why is terraform used for the deployment as well? It makes sense to scale up using Terraform, but deploying through ECS can be done using just the aws cli which will leave your EC2 instances alone, using e.g. ecs-deploy (boto3) or ecs-deploy (shell)
– Tiemen
Dec 3 '18 at 16:14
add a comment |
Why is terraform used for the deployment as well? It makes sense to scale up using Terraform, but deploying through ECS can be done using just the aws cli which will leave your EC2 instances alone, using e.g. ecs-deploy (boto3) or ecs-deploy (shell)
– Tiemen
Dec 3 '18 at 16:14
Why is terraform used for the deployment as well? It makes sense to scale up using Terraform, but deploying through ECS can be done using just the aws cli which will leave your EC2 instances alone, using e.g. ecs-deploy (boto3) or ecs-deploy (shell)
– Tiemen
Dec 3 '18 at 16:14
Why is terraform used for the deployment as well? It makes sense to scale up using Terraform, but deploying through ECS can be done using just the aws cli which will leave your EC2 instances alone, using e.g. ecs-deploy (boto3) or ecs-deploy (shell)
– Tiemen
Dec 3 '18 at 16:14
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53414578%2faws-ecs-scheduled-scaling-with-terraform%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
I am not sure how it works for ECS, but I think it's quite similar to ASG. In ASG when terraform recreate it, there is no way to preserve the latest ASG scale out. We need to do it manually right after the terraform apply
– shakhawat
Nov 21 '18 at 16:15