Skip to content

Before/After restart hooks #178

@ess

Description

@ess

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions