• Patrick Steinhardt's avatar
    spec: Convert Gitaly setup to use bundled Git binaries · 7eff4841
    Patrick Steinhardt authored
    Up to now, Gitaly has been using an external Git distribution to serve
    all Git requests. This has somewhat changed with the introduction of the
    `make git` target, which moved responsibility of providing a compatible
    Git distribution into Gitaly. While this was a step into the right
    direction, it still didn't give Gitaly full control over which Git
    binaries exist and where these are located. This is proving to be
    problematic in some contexts: we cannot switch between multiple Git
    versions via feature flags, rollouts of new Git versions will overwrite
    the old installation while Gitaly may still be running, and in general
    we have no specific knowledge about which Git version we're currently
    running with except for the version string.
    
    To fix this, Gitaly has introduced a new distribution mode: instead of
    pointing Gitaly's configuration at a specific Git distribution, Gitaly
    can now run with in "bundled" mode. Like this, Gitaly only requires two
    binaries gitaly-git and gitaly-git-remote-http which are installed into
    the typicaly binary directory where all the other Gitaly-specific
    binaries are installed into. Gitaly will then bootstrap a full Git
    execution environment from these two binaries which is sufficient to
    serve all Git requests in Gitaly.
    
    With this in place, Gitaly has much tighter control over which Git
    version is installed into what place. As a result, we can eventually
    build on top of this and easily install multiple Git versions, use
    feature flags and avoid issues like overwrites of the Git distribution
    while an old Gitaly version is still running.
    
    While the old configuration of pointing Gitaly at a specific Git
    installation will not go away, the recommended default will at some
    point become to always use the bundled Git mode. As a first test
    balloon, this commit switches over the Gitaly setup helper for our Ruby
    specs to use this bundled Git mode.
    7eff4841
gitaly_setup.rb 9.23 KB