You are a Devops Engineer for your company.
Your company is using Opswork stack to rollout a collection of web instances.
When the instances are launched , a configuration file need to be setup prior to the launching of the web application hosted on these instances.
Which of the following steps would you carry out to ensure this requirement gets fulfilled.
Choose 2 answers from the options given below.
Click on the arrows to vote for the correct answer
A. B. C. D.Answer - B and C.
This is mentioned in the AWS documentation.
Configure.
This event occurs on all of the stack's instances when one of the following occurs:
An instance enters or leaves the online state.
You associate an Elastic IP address with an instance or disassociate one from an instance.
You attach an Elastic Load Balancing load balancer to a layer, or detach one from a layer.
For example, suppose that your stack has instances A, B, and C, and you start a new instance,
D.
After D has finished running its setup recipes, AWS OpsWorks Stacks triggers the Configure event on A, B, C, and.
D.
If you subsequently stop A, AWS OpsWorks Stacks triggers the Configure event on B, C, and.
D.
AWS OpsWorks Stacks responds to the Configure event by running each layer's Configure recipes, which update the instances' configuration to reflect the current set of online instances.
The Configure event is therefore a good time to regenerate configuration files.
For example, the HAProxy Configure recipes reconfigure the load balancer to accommodate any changes in the set of online application server instances.
You can also manually trigger the Configure event by using the Configure stack command.
For more information on Opswork lifecycle events, please refer to the below URL:
http://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook-events.htmlAs a DevOps Engineer, you need to ensure that the required configuration file is set up before launching the web application on the Opswork stack. The Opswork stack is a service offered by AWS that helps automate the deployment and management of applications on the cloud.
To ensure that the requirement is fulfilled, you need to configure a recipe, which sets the configuration file and add it to the Configure LifeCycle Event or the Deploy LifeCycle Event of the specific web layer.
Option A is incorrect because changing the Opswork stack to use AWS specific cookbooks is not relevant to the requirement of setting up the configuration file.
Option B is incorrect because using custom cookbooks does not address the requirement of setting up the configuration file.
Option C is correct because the Configure LifeCycle Event is triggered when an instance is launched, and adding the recipe to this event will ensure that the configuration file is set up before the web application is deployed.
Option D is incorrect because the Deploy LifeCycle Event is triggered after the web application has been deployed, and setting up the configuration file at this stage may cause issues with the running application.
In summary, as a DevOps Engineer, you should configure a recipe that sets up the configuration file and add it to the Configure LifeCycle Event of the specific web layer to ensure that the configuration file is set up before the web application is deployed.