WIP What if Praefect was a Ruby class?
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?
- Gitaly counterpart: gitaly!1788 (closed) -> adds Gitaly middleware that notifies gitlab-rails via API calls when a repo has changed
- GDK counterpart: gitlab-development-kit!1048 (closed) -> shows a working example of the basic configuration needed to make this work
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 withbundle exec rake gitlab:backup:restore
.