User-friendly way to move projects between repository storages
Problem to solve
Currently, the best documented method of moving a Git repositories backing storage (Gitaly node) is done via a cURL request, per our production team's Runbooks.
This is a fully functional EE API call (added in https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/533), so there should not be an excessive amount of work to expose this to an admin via the UI, when looking at an individual project's settings. The API doesn't offer a user-friendly interface to perform the moves. This is OK for GitLab infrastructure or occasional bulk moves, but it's not the best experience for our customers, e.g.: https://gitlab.zendesk.com/agent/tickets/48746
Intended users
Admins
Further details
An instance admin is required to:
- Create a personal access token, with high levels of access
- Look up a project's project ID
- Look up the names of Gitaly nodes' storage paths
- Hand craft a HTTP
PUTrequest with cURL command line - Verify success or failure by checking the underlying Gitaly servers
- Manually remove old repo folder
Proposal
- Expose this functionality to change repository store through an Admin only accessible section of the project settings UI. If you run API today you need to run
gitlab:cleanup:movedto cleanup but we should do the move more cleanly via UI.
Even better:
- Enhance the bulk project update worker so admins can move multiple projects at a time
Permissions and Security
Documentation
Document it, the cleanup rake task, and the API fallback too, here: http://docs.gitlab.com/ce/administration/repository_storages.html
Testing
What does success look like, and how can we measure that?
A GitLab instance administrator can relocate a project's repositories through the UI, in a fashion that is intuitive and concise. At the moment, there is no functionality for this.
Links / references
Production's Runbook for howoto/sharding
Existing documentation about moving repositories