[Infrastructure][RFC][Task]: Migrate GitLab (git.rockyliunx.org) to Forgejo #82
Labels
No Label
bug
component/ansible
component/git
component/idm
component/mattermost
component/mirrors
duplicate
effort
high
effort
low
effort
medium
enhancement
gain
high
gain
low
gain
medium
help wanted
invalid
issue
needinfo
permissions
priority
high
priority
low
priority
medium
task
wontfix
No Milestone
2 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: infrastructure/meta#82
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The Rocky Enterprise Software Foundation and its projects have two git services that it hosts and works with today. One is hosted running GitLab (Rocky Linux Git Service) and the other for now is hosting a Gitea-like instance (RESF Git Service). Currently, users are freely able to get access to and utilize The RESF Git Service at any time. However, users who wish to contribute to Special Interest Groups face a barrier of entry to the Rocky Linux Git Service, where the barrier is simply GitLab licensing.
The Release Engineering and Infrastructure team members would like to migrate the GitLab repositories to Forgejo to not only make git service software consistent, but also lower the barrier of entry for contributions to the Rocky Linux project.
General Details
This section goes over the general premise of choosing the current products and the motivation for choosing another product for the git service.
Motivation
The motivation is to increase user contributions and activity by completely moving away from a seating license model git service. It is currently difficult to justify giving users a seat due to the limited number of alloted. This forces Release Engineering and Infrastructure to "pick and choose" who can access the service, which can run counter for some open source projects such as Rocky Linux.
It is also difficult to justify paying for and/or re-applying for a GitLab license when majority of the features of GitLab aren't used except for (confusingly) paywalled features such as LDAP or allowing more than five (5) users permission on a group. There are no other features being used for Rocky Linux within GitLab, so the majority of the EE version cannot be justified.
Why was GitLab originally chosen?
GitLab EE was chosen for a few reasons:
What are the issues with GitLab as of today?
Lack of GitLab license seating - This restricts users who can contribute to patches or to SIG's
Difficulty in license renewals
The self-hosted version is a real resource hog
Configuration is unintuitive
Majority of the "ultimate features" are not used at all
Not customizable and freely rebuildable
What does going to Forgejo offer?
What do we lose going to Forgejo?
The primary thing we lose as a project is the subgroups. However, after evaluation of how GitLab is currently used, subgroups aren't needed for organization or development of Rocky Linux. A lot of the work between the base distribution and special interest groups can be simplified into single repositories with a tailored branching strategy similar to that of CentOS SIG's and the usage of branch protection rules to lock down what branches can be pushed and by whom.
Gitea vs Forgejo
The RESF Git Service uses Gitea presently and there are discussions of moving to forgejo.
As of today, Gitea and Forgejo work functionally the same. Their setup instructions are similar, their configuration files are compatible, and forgejo (at the time of this writing) still uses specific Gitea versions as baselines. There is a proposal for forgejo to have Gitea 1.23 be the last version that a migration from Gitea would be supported, meaning it will diverge harder into hard fork territory.
With that said, Forgejo is being suggested due in three parts:
Gitea project going in a direction that may be concerning - There is motive and opportunity to become open core like gitlab
Forgejo is under a non-profit known as Codeberg e.V. (See imprint)
The Fedora Project has decided to move to Forgejo over GitLab in replacing their pagure instances
The Fedora Project moving to forgejo would allow anyone to take advantage of features they request/add in upstream. It would also allow our foundation and projects to do the same to benefit the Fedora Project and others.
Migration Overview
This section goes over the general action plan of migrating to Forgejo. As majority of the repositories are packaging related, migrations can be performed using a combination of
git
and the API.Organization Setup
Subject to change, the current idea of organizations are below.
Branch Strategy
The branch strategy will be largely unchanged from what it is now, however Special Interest Groups will ultimately have their repositories merged into
rpms
into designated branches.rX
rX-beta
rXs
rX-sig-NAME
SIG Changes
The branch strategy to merge the Special Interest Group imports and src's will require changes to the SIG guide and how SIG's may currently operate. Peridot projects will also need changes to accomodate the new branch names.
Permission Strategy
Forgejo organizations utilizes "teams". The teams can be configured to do any of the following:
Required Changes in Peridot
Projects will need specific values changed of where imports are occuring and branch names. The srpmproc utility should be able to handle the changes.
Required Changes to Distrobuild
Legacy build system orchestrator will need python code changes to handle the flattened hierarchy. The srpmproc utility, without any modifications, should be able to handle the changes as distrobuild is only for Rocky Linux 8.
Future Changes Required for srpmproc and peridot
Add support for backwards compatible "import branch suffix" to create isolation from branch suffix (to be pushed to feature branch)
Peridot will need to be adjusted to support dest branch suffix
This is to ensure that SIG's can choose to either import from
src
in their designated branches or fromrpms
orsrc-rpms
if applicable to them.General Steps for Migration
--mirror
--mirror
to the correct organizationScripts for Migration of Repositories
The below script takes care of the base distributon and configurations. It does not address Special Interest Group repositories which will need to be addressed manually, including group permissions and branch protections.
When to Perform the Migration
The migration should be ideally performed during a downtime in which no work is being done with Rocky Linux. An example would be during a weekend where there is enough time for the entire migration to take place and complete in a sufficient amount of time.
Edits
Clarified srpmproc information.
First, thank you for the detailed write-up, Louis. It's a comprehensive overview and aligns well with our discussions from the RISC-V Summit this fall.
I'm in full support of transitioning to Forgejo, particularly to break Peridot's dependency on GitLab to enhance its utility. There's an exciting opportunity to integrate the SRPM processing improvements from Mothership into the refactoring of srpmproc, peridot, and distrobuild.
Key considerations:
Timeline and Notification: Given the upcoming timelines for EL10 and 9.6, it's crucial to manage this transition carefully. The long-standing GitLab instance has many users and community members relying on it, so broad communication is essential. Consider using a frontend load balancer for 301 redirects to ease the transition.
Testing Plan: A thorough testing strategy is vital. Deploying a Forgejo staging instance connected to the staging Peridot cluster will facilitate integration testing and ensure smooth implementation.
Community Engagement: While we hope for proactive feedback, robust documentation will be essential. Engaging the community team to disseminate information and address potential hurdles effectively aligns with our goal of expanding our contributor base.
Resource Allocation: This migration will require dedicated resources, both human and technical. The infrastructure needs are manageable, but we encourage interested community members to comment and engage in shaping this critical service for Rocky Linux.
Tool Integration and Management: Building on the work with buzon, we should consider extending empanadas for managing permissions within Forgejo. Developing a unified plan for SIG management across all services on accounts.rockylinux.org is a priority.
Social Login for Contributors: To facilitate casual contributions, consider implementing OpenID endpoints for services like GitHub, Fedora, CentOS, Alma, SUSE, etc. Federated authentication could further ease collaboration, making it seamless for contributors.
Collaboration with Fedora: With Fedora exploring Forgejo, sharing tools like buzon could benefit both projects. Packaging and releasing such tools in Fedora will foster collaborative maintenance and shared learning.
Overall, I support this RFC. While specifics need finalization, the foundation is solid, well-considered, and promising for our community's growth and collaboration.