Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Before/After restart hooks #178

Open
ess opened this issue Sep 29, 2018 · 0 comments
Open

Before/After restart hooks #178

ess opened this issue Sep 29, 2018 · 0 comments

Comments

@ess
Copy link
Contributor

ess commented Sep 29, 2018

We can use existing platform mechanisms to perform a restart for app instances (including master), but that's not actually the case for utility instances, because the services configured for utility instances are not known to serverside.

To that end, we should provide a mechanism for restart hooks, much like the legacy deploy workflow does.

To make this as simple to implement as we possibly can, the design is something like this:

  • HOOK_PATH=$RELEASE_PATH/.ogun/hooks
  • Hooks have bare names. (before_restart, after_restart)
  • Hooks can be implemented however the customer desires. (ruby, bash, whatever, so long as it's chmod +x)
  • We pass all pertinent information via CLI arguments. For example, $HOOK_PATH/after_restart $RELEASE_NAME $SERVER_ROLE $SERVER_NAME
  • Hook results matter. A hook that exits 0 is considered good. Otherwise, it causes a deploy failure.
@ess ess added this to the Portable Release Packaging milestone Sep 29, 2018
@ess ess self-assigned this Sep 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant