How to properly deploy new code to AWS EC2 AutoScaling GroupEC2 Autoscaling AMI and auto attaching new EBD...
How dangerous is XSS?
What does “the session was packed” mean in this context?
How to Recreate this in LaTeX? (Unsure What the Notation is Called)
Is there an expression that means doing something right before you will need it rather than doing it in case you might need it?
A category-like structure without composition?
Is there a hemisphere-neutral way of specifying a season?
Is "remove commented out code" correct English?
GFCI outlets - can they be repaired? Are they really needed at the end of a circuit?
Why is consensus so controversial in Britain?
What do you call someone who asks many questions?
How seriously should I take size and weight limits of hand luggage?
Avoiding the "not like other girls" trope?
All in one piece, we mend holes in your socks
How do I handle a potential work/personal life conflict as the manager of one of my friends?
Can I run a new neutral wire to repair a broken circuit?
Alternative to sending password over mail?
How to compactly explain secondary and tertiary characters without resorting to stereotypes?
What killed these X2 caps?
Plagiarism or not?
How could indestructible materials be used in power generation?
Is it logically or scientifically possible to artificially send energy to the body?
Should I cover my bicycle overnight while bikepacking?
What mechanic is there to disable a threat instead of killing it?
Extract rows of a table, that include less than x NULLs
How to properly deploy new code to AWS EC2 AutoScaling Group
EC2 Autoscaling AMI and auto attaching new EBD from snapshotHow can I automatically cycle a new image in an AWS Auto Scaling Group?AWS autoscaling. Launch Config/Auto Scaling Group and VPC instance with two ifacesAWS Autoscaling/EC2 billing increments?EC2: Copied launch configuration causes instances not to startAutoscaling in AWS for a Web ServerHow to automatically update AMI in Amazon EC2 Auto Scaling Launch ConfigurationAuto Scaling default Termination PolicyAWS Ec2 - Launch template spanning multiple subnets / availability zonesAWS Autoscaling Group: Invalid fleet configuration Error
Scenario:
Currently, we have a single production server running on an EC2 instance.
Since we are getting a lot of traffic, we would like to use the Autoscaling feature, but we are kind of new to this.
Following is my understanding:
- We create a custom AMI from our existing production server
- Create a launch configuration from this AMI
- Create an AutoScaling group with this launch configuration
- Set conditions, if CPU usage is greater than 60%, add an instance, if less than 40% terminate 1 instance.
- Add a load balancer to this autoscaling group
- Now as far as I understood, to deploy new code to the auto scaling group, we have to create a new AMI with our updated application version and change the AMI used in the autoscaling group to this new one. Then terminate all the previous instances and create new ones from the updated AMI.
Questions:
1. To create the updated AMI, do I have to keep our previous EC2 instance that is not part of the auto scaling group?
Deploy the new code there and create an AMI from that instance?
2. Or instead of creating new AMIs, we could just ssh into every server and pull new code from there? but the new instance that would spawn would be using the previous code.
3. Also, after adding the new AMI, how do we properly terminate all the previous instances?
4. Finally, How do we properly automate this?
amazon-web-services amazon-ec2 amazon-ami autoscaling
New contributor
add a comment |
Scenario:
Currently, we have a single production server running on an EC2 instance.
Since we are getting a lot of traffic, we would like to use the Autoscaling feature, but we are kind of new to this.
Following is my understanding:
- We create a custom AMI from our existing production server
- Create a launch configuration from this AMI
- Create an AutoScaling group with this launch configuration
- Set conditions, if CPU usage is greater than 60%, add an instance, if less than 40% terminate 1 instance.
- Add a load balancer to this autoscaling group
- Now as far as I understood, to deploy new code to the auto scaling group, we have to create a new AMI with our updated application version and change the AMI used in the autoscaling group to this new one. Then terminate all the previous instances and create new ones from the updated AMI.
Questions:
1. To create the updated AMI, do I have to keep our previous EC2 instance that is not part of the auto scaling group?
Deploy the new code there and create an AMI from that instance?
2. Or instead of creating new AMIs, we could just ssh into every server and pull new code from there? but the new instance that would spawn would be using the previous code.
3. Also, after adding the new AMI, how do we properly terminate all the previous instances?
4. Finally, How do we properly automate this?
amazon-web-services amazon-ec2 amazon-ami autoscaling
New contributor
add a comment |
Scenario:
Currently, we have a single production server running on an EC2 instance.
Since we are getting a lot of traffic, we would like to use the Autoscaling feature, but we are kind of new to this.
Following is my understanding:
- We create a custom AMI from our existing production server
- Create a launch configuration from this AMI
- Create an AutoScaling group with this launch configuration
- Set conditions, if CPU usage is greater than 60%, add an instance, if less than 40% terminate 1 instance.
- Add a load balancer to this autoscaling group
- Now as far as I understood, to deploy new code to the auto scaling group, we have to create a new AMI with our updated application version and change the AMI used in the autoscaling group to this new one. Then terminate all the previous instances and create new ones from the updated AMI.
Questions:
1. To create the updated AMI, do I have to keep our previous EC2 instance that is not part of the auto scaling group?
Deploy the new code there and create an AMI from that instance?
2. Or instead of creating new AMIs, we could just ssh into every server and pull new code from there? but the new instance that would spawn would be using the previous code.
3. Also, after adding the new AMI, how do we properly terminate all the previous instances?
4. Finally, How do we properly automate this?
amazon-web-services amazon-ec2 amazon-ami autoscaling
New contributor
Scenario:
Currently, we have a single production server running on an EC2 instance.
Since we are getting a lot of traffic, we would like to use the Autoscaling feature, but we are kind of new to this.
Following is my understanding:
- We create a custom AMI from our existing production server
- Create a launch configuration from this AMI
- Create an AutoScaling group with this launch configuration
- Set conditions, if CPU usage is greater than 60%, add an instance, if less than 40% terminate 1 instance.
- Add a load balancer to this autoscaling group
- Now as far as I understood, to deploy new code to the auto scaling group, we have to create a new AMI with our updated application version and change the AMI used in the autoscaling group to this new one. Then terminate all the previous instances and create new ones from the updated AMI.
Questions:
1. To create the updated AMI, do I have to keep our previous EC2 instance that is not part of the auto scaling group?
Deploy the new code there and create an AMI from that instance?
2. Or instead of creating new AMIs, we could just ssh into every server and pull new code from there? but the new instance that would spawn would be using the previous code.
3. Also, after adding the new AMI, how do we properly terminate all the previous instances?
4. Finally, How do we properly automate this?
amazon-web-services amazon-ec2 amazon-ami autoscaling
amazon-web-services amazon-ec2 amazon-ami autoscaling
New contributor
New contributor
New contributor
asked 3 mins ago
Pratish ShresthaPratish Shrestha
101
101
New contributor
New contributor
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "2"
};
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
});
}
});
Pratish Shrestha is a new contributor. Be nice, and check out our Code of Conduct.
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%2fserverfault.com%2fquestions%2f961420%2fhow-to-properly-deploy-new-code-to-aws-ec2-autoscaling-group%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Pratish Shrestha is a new contributor. Be nice, and check out our Code of Conduct.
Pratish Shrestha is a new contributor. Be nice, and check out our Code of Conduct.
Pratish Shrestha is a new contributor. Be nice, and check out our Code of Conduct.
Pratish Shrestha is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Server Fault!
- 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%2fserverfault.com%2fquestions%2f961420%2fhow-to-properly-deploy-new-code-to-aws-ec2-autoscaling-group%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