Skip to content

WIP What if Praefect was a Ruby class?

Jacob Vosmaer requested to merge jv-alt-ha into master

This is not meant to be merged; it is a proof of concept.

This branch is turning a thought experiment into a code experiment: what if Praefect, the new GitLab component that we are developing to make Gitaly HA deployments possible, was a Ruby class instead of a stand-alone component?

To see this in action:

  • in GDK/gitlab, run bundle exec rake gitlab:backup:create
  • in GDK, check out branch jv-alt-ha
  • in GDK/gitaly, check out branch jv-alt-ha
  • in GDK/gitlab, check out branch jv-alt-ha
  • in GDK, run:
rm gitlab/config/gitlab.yml Procfile
make gitlab/config/gitlab.yml gitaly-setup Procfile
gdk restart

Then go to localhost:3000, Admin area, Settings, Repository, Repository storages and choose virtual-1 as (sole) storage for new repos.

Now when you create a repository it should go to internal node gitaly-ha-1 and changes should get replicated to gitaly-ha-2 and gitaly-ha-3.

To go back to regular Gitlab/Gitaly/GDK, checkout the branches you were on before, run the rm / make snippet above, and restore the backup you made with bundle exec rake gitlab:backup:restore.

Edited by Jacob Vosmaer

Merge request reports