You are a Devops Engineer and are designing an Opswork stack in AWS.
The company has some custom recipes that are part of their on-premise Chef configuration.
These same recipes need to be run whenever an instance is launched in Opsworks.
Which of the following steps need to be carried out to 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 - A and C.
The AWS Documentation mentions the below.
Each layer has a set of built-in recipes assigned to each lifecycle event, although some layers lack Undeploy recipes.
When a lifecycle event occurs on an instance, AWS OpsWorks Stacks runs the appropriate set of recipes for the associated layer.
The below diagram shows a snapshot in the stack settings where you can enable custom cookbooks.
For more information on automating recipe's , please visit the below URL:
http://docs.aws.amazon.com/opsworks/latest/userguide/workingcookbook-assigningcustom.htmlAs a DevOps Engineer, you need to ensure that the custom recipes are executed whenever an instance is launched in the Opsworks stack. To achieve this, you should follow the below steps:
Ensure the custom cookbooks option is set in Opswork stack: Custom cookbooks provide the ability to add extra functionality to OpsWorks, beyond the built-in cookbooks. You need to make sure that the custom cookbooks option is set in the Opsworks stack so that it can access the custom recipes from your on-premise Chef configuration. This can be done by adding the required cookbooks in a separate directory and uploading them to the AWS OpsWorks server.
Ensure the recipe is placed as part of the Setup Lifecycle event as part of the Layer setting: Lifecycle events in Opsworks provide hooks into the various stages of an instance's lifecycle. By setting up the custom recipe in the Setup Lifecycle event, it will be executed when the instance is launched. You can do this by specifying the custom recipe in the Setup Lifecycle event as part of the Layer setting. This ensures that the custom recipe is executed every time a new instance is launched.
Therefore, the correct answers are A and C. You need to ensure that the custom cookbooks option is set in the Opsworks stack and the recipe is placed as part of the Setup Lifecycle event as part of the Layer setting.