Before/After restart hooks

Open
#178 0 comments 0 reactions 1 assignee View on GitHub

@ess is already working on this.

Since Sep 29, 2018.

Assessment

This issue has not been assessed yet.

Description

backlog feature

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.
Dominant language
Ruby
Stars
62
Forks
31
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from engineyard/engineyard-serverside

All issues in engineyard/engineyard-serverside

Similar issues

More Ruby issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.