includes a recipe with a statement
include_recipe anothercookbook::somerecipe
must include the following line
depends "anothercookbook"
AWS OpsWorks stores custom JSON in the following locations: You can declare custom JSON at the deployment, layer, and stack levels.
On Linux instances:
/var/chef/runs/run-ID/attribs.json
/var/chef/runs/run-ID/nodes/hostname.json
run-ID is a unique ID that AWS OpsWorks assigns to each Chef run on an instance, and hostname is the instance's hostname.
To access custom JSON from Chef recipes, use standard Chef node syntax.
{
"state": "visible"
}
syntax: node[:attribute][:child_attribute][...]
Ex: Chef::Log.info("********** The app's initial state is '#{node['state']}' **********")
stack name: node[:opsworks][:stack][:name].
Note
Custom JSON is limited to 80 KB.
To run custom recipe on opsworks stack layer.
Change to the Recipes tab, enter each custom recipe in the appropriate event field and click + to add it to the list.
Specify a recipe as follows: cookbook::somerecipe (omit the .rb extension)
To run a custom recipe manually, it must be in one of your custom cookbooks but does not have to be assigned to a lifecycle event.
When you run a recipe manually, AWS OpsWorks installs the same deploy attributes that it does for a Deploy event.
To manually run recipes on stack instances:
On the Stack page, click Run command. For Command, select Execute Recipes.
Enter the recipes to be run in the Recipes to execute box by using the standard cookbookname::recipename format
add a custom JSON object that defines custom attributes that will be merged into the stack configuration and deployment attributes that are installed on the instances
nder Instances, select the instances on which AWS OpsWorks should run the recipes.
AWS cloud : Chef
include_recipe anothercookbook::somerecipe
must include the following line
depends "anothercookbook"
AWS OpsWorks stores custom JSON in the following locations: You can declare custom JSON at the deployment, layer, and stack levels.
On Linux instances:
/var/chef/runs/run-ID/attribs.json
/var/chef/runs/run-ID/nodes/hostname.json
run-ID is a unique ID that AWS OpsWorks assigns to each Chef run on an instance, and hostname is the instance's hostname.
To access custom JSON from Chef recipes, use standard Chef node syntax.
{
"state": "visible"
}
syntax: node[:attribute][:child_attribute][...]
Ex: Chef::Log.info("********** The app's initial state is '#{node['state']}' **********")
stack name: node[:opsworks][:stack][:name].
Note
Custom JSON is limited to 80 KB.
To run custom recipe on opsworks stack layer.
Change to the Recipes tab, enter each custom recipe in the appropriate event field and click + to add it to the list.
Specify a recipe as follows: cookbook::somerecipe (omit the .rb extension)
To run a custom recipe manually, it must be in one of your custom cookbooks but does not have to be assigned to a lifecycle event.
When you run a recipe manually, AWS OpsWorks installs the same deploy attributes that it does for a Deploy event.
To manually run recipes on stack instances:
On the Stack page, click Run command. For Command, select Execute Recipes.
Enter the recipes to be run in the Recipes to execute box by using the standard cookbookname::recipename format
add a custom JSON object that defines custom attributes that will be merged into the stack configuration and deployment attributes that are installed on the instances
nder Instances, select the instances on which AWS OpsWorks should run the recipes.
0 comments:
Post a Comment