Using Custom Recipes in Opsworks
Create the follwoing DIR structure:
myCookbookRepo -> myCustomCookbook -> recipe -> myCustomRecipe.rb
The name “recipe” must not be changed, remaining we can give the names we like.
execute 'bundle install' do
ZIP the directory myCookbookRepo.zip and upload to S3 Bucket.
In Opsworks, Click “Stack” , Click “Stack Settings” , Click “Edit“
Paste the AWS S3 URL for myCookbookRepo.zip and AK , PK as well.
Now Click “Run Command” and Select “Execute Recipes” from the Command drop down list and mention the following in “Recipes to execute” box
cookbook::recipe (eg. myCustomCookbook::myCustomRecipe.rb)
Click “Execute Recipes“