Overview
Deploy hooks in Engine Yard are Ruby scripts that are executed during the deployment process. While the development of these scripts is considered to fall on each customer, it is important to be aware of how the platform leverages this same tool for its own custom Recipes.
Note: A detailed guide on how to create and use hooks exists under Use Ruby Deploy Hooks.
Default deploy hooks in Engine Yard
Since custom Recipes can alter the way the Engine Yard platform behaves, it is possible that a certain Recipe may require that the deployment process be modified to, for example, restart a certain service.
For the custom Recipes offered by Engine Yard by default, the process to update the deploy hooks differs by stack version:
Engine Yard stack v5 and earlier
In Engine Yard versions 5 and earlier, when a Recipe requires a deploy hook to be added, it will be noted in the readme for the specific recipe. The customer will need to add the deploy hook manually as specified.
Since these hooks are added by the customer, they are located in the regular hook folder, /data/<app_name>/current/hooks/
.
Engine Yard stack v6 and later
From version 6 onwards, automatically installed system deploy hooks were introduced to eliminate the need to manually add deploy hooks for the supplied custom recipes.
These hooks are installed by the Chef Recipes that require them and are instead located under /data/<app_name>/shared/hooks/
.
Summary
This article provides an understanding of Ruby deploy hooks in Engine Yard and how to use them. It also highlights the changes in the usage of deploy hooks by custom Recipes made from version 5 to version 6 and later.
Comments
Article is closed for comments.