Easiest Way to Deploy Changes to the Underlying Operating System | Manage Application and MongoDB with Web Server

Deploy Changes to the Underlying Operating System

Prev Question Next Question

Question

You are managing an application that acts as the front end and you use MongoDB for document management which is hosted on a relevant Web server.

You pre-bake AMI's with the latest version of the Web server, then used the User Data section to setup the application.

You now have a change to the underlying Operating system version and need to deploy that accordingly.

How can this be done in the easiest way possible ?

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - C.

The best way in this scenario is to continue the same deployment process which was being used and create a new AMI and then use the User Data section to deploy the application.

For more information on AWS AMI's please see the below link:

http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/AMIs.html

In this scenario, you have an application running on an EC2 instance with MongoDB hosted on the same instance. You currently pre-bake AMIs with the latest version of the web server and use the User Data section to set up the application. You now need to update the underlying operating system version and deploy the changes.

Option A - Create a new EBS Volume with the relevant OS patches and attach it to the EC2 Instance: This option involves creating a new EBS volume with the updated operating system patches, and then attaching it to the existing EC2 instance. However, this approach requires manual intervention to detach the existing volume and attach the new one, which may result in downtime. Additionally, this approach only updates the operating system and does not provide a way to update the pre-baked AMI.

Option B - Create a CloudFormation stack with the new AMI and then deploy the application accordingly: This option involves creating a CloudFormation stack with the new AMI and deploying the application. This approach provides an automated and repeatable way to deploy the updated operating system version and application. However, it involves more upfront work to create the CloudFormation stack, and it may not be suitable if you are managing a small number of instances.

Option C - Create a new pre-baked AMI with the new OS and use the User Data section to deploy the application: This option involves creating a new pre-baked AMI with the updated operating system version, and then using the User Data section to deploy the application. This approach provides a simpler way to update the operating system version and deploy the application. However, it requires more upfront work to create a new AMI and may result in longer deployment times.

Option D - Create an OpsWorks stack with the new AMI and then deploy the application accordingly: This option involves creating an OpsWorks stack with the new AMI and deploying the application. OpsWorks provides a managed service that automates the deployment of applications, making it easier to update the underlying operating system and deploy the application. However, OpsWorks can be more complex to set up and may not be suitable if you are managing a small number of instances.

Overall, the best option depends on your specific requirements and the size of your infrastructure. For smaller infrastructures, options A or C may be the easiest way to update the operating system version and deploy the application. For larger infrastructures, options B or D may provide a more scalable and automated approach.