AWS OpsWorks Stack: Publishing Linux Instance Updates

Publishing Linux Instance Updates

Prev Question Next Question

Question

You have an Opswork stack setup in AWS.

You want to install some updates to the Linux instances in the stack.

Which of the following can be used to publish those updates? Choose 2 answers from the options given below.

Answers

Explanations

Click on the arrows to vote for the correct answer

A. B. C. D.

Answer - A and C.

As per AWS documentation,

By default, AWS OpsWorks Stacks automatically installs the latest updates during setup, after an instance finishes booting.

AWS OpsWorks Stacks does not automatically install updates after an instance is online, to avoid interruptions such as restarting application servers.

Instead, you manage updates to your online instances yourself.

So you can minimize any disruptions.

We recommend that you use one of the following to update your online instances.

Create and start new instances to replace your current online instances.

Then delete the current instances.

The new instances will have the latest set of security patches installed during setup.

On Linux-based instances in Chef 11.10 or older stacks, run the Update Dependencies stack command, which installs the current set of security patches and other updates on the specified instances.

More information is available at:

https://docs.aws.amazon.com/opsworks/latest/userguide/workingsecurity-updates.html

OpsWorks is a configuration management service that provides managed instances of Amazon Elastic Compute Cloud (EC2) instances. It allows you to automate operational tasks such as software configuration, package installation, service deployment, and code deployment.

When it comes to updating Linux instances in an OpsWorks stack, there are several options available. However, it is important to note that the best approach would depend on several factors such as the size of the stack, the number of instances, the level of automation in the stack, and the type of updates required.

Answer A: Create and start new instances programmatically to replace your current online instances. Then delete the current instances.

This approach involves creating new instances that have the updated packages and configurations and then terminating the old instances. This can be done programmatically using AWS APIs or CLI tools. While this approach can be effective, it may cause service disruption and data loss if not done correctly.

Answer B: Use Auto-scaling to launch new instances and then delete the older instances.

This approach involves using AWS Auto Scaling to create new instances with the updated packages and configurations, then terminating the old instances. Auto Scaling ensures that the desired number of instances is maintained while the updates are being applied. This approach can help minimize service disruptions and data loss.

Answer C: On Linux-based instances in Chef 11.10 or older stacks, run the Update Dependencies stack command.

This approach is specific to Chef 11.10 or older stacks and involves running the Update Dependencies stack command on the Linux-based instances to update the dependencies. While this approach is simple, it may not work for newer stacks or more complex updates.

Answer D: Delete the stack and create a new stack with the instances and their relevant updates.

This approach involves deleting the entire stack and creating a new one with the updated packages and configurations. While this approach ensures that all instances have the latest updates, it can be time-consuming and can result in service disruptions and data loss.

In conclusion, the two best options for publishing updates to Linux instances in an OpsWorks stack are using Auto Scaling to launch new instances and then deleting the older instances, or creating and starting new instances programmatically to replace the current online instances, and then deleting the current instances.