Generalize gitaly-wrapper to be used with praefect
We want gitaly-wrapper
to be able to wrap praefect's process so runit can support zero downtime for praefect.
We already have most of the plumbing in place. To make the invocation generalized and not gitaly specific, we just need to generalize the environment variables that control the bootstrap pid file (EnvPidFile
) and EnvUpgradesEnabled
and move it to the bootstrap
package. Further, instead of GITALY_PID_FILE
and GITALY_UPGRADES_ENABLED
we can just use PID_FILE
and UPGRADES_ENABLED
so it's not gitaly specific.
So then praefect be invoked as:
PID_FILE=prafect-pid-file gitaly/bin/wrapper gitaly/bin/praefect -config gitaly/praefect.config.toml
This MR maintains backwards compatibility and still supports GITALY_PID_FILE
and GITALY_UPGRADES_ENABLED
as well as the gitaly-wrapper
binary since we are renaming it to wrapper
to make it more generalized.