Edit: it seems like my explanation turned out to be too confusing. In simple terms, my topology would look something like this:

I would have a reverse proxy hosted in front of multiple instances of git servers (let’s take 5 for now). When a client performs an action, like pulling a repo/pushing to a repo, it would go through the reverse proxy and to one of the 5 instances. The changes would then be synced from that instance to the rest, achieving a highly available architecture.

Basically, I want a highly available git server. Is this possible?


I have been reading GitHub’s blog on Spokes, their distributed system for Git. It’s a great idea except I can’t find where I can pull and self-host it from.

Any ideas on how I can run a distributed cluster of Git servers? I’d like to run it in 3+ VMs + a VPS in the cloud so if something dies I still have a git server running somewhere to pull from.

Thanks

  • Zwuzelmaus@feddit.org
    link
    fedilink
    English
    arrow-up
    3
    ·
    3 days ago

    chicken and egg situation, since I plan to store my Kubernetes manifests in my git repo

    Not really.

    K8s would use a “checked-out” visible representation, not the repo database itself.

      • Zwuzelmaus@feddit.org
        link
        fedilink
        English
        arrow-up
        3
        ·
        2 days ago

        You do not let your k8s control instance look “live” at your git server during the start (or reformation) of the whole cluster. It needs the (repo and) files checked out somewhere locally, and this local “somewhere” must exist at start time.

        Later, when your git is alive, you do a regular git pull for keeping it up to date.

        • marauding_gibberish142@lemmy.dbzer0.comOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          2 days ago

          Oh I get it. Auto-pull the repos to the master nodes’ local storage for if something bad happens, and when that does, use the automatically pulled (and hopefully current) code to fix what broke.

          Good idea