GitLab CI/CD instance configuration
- Tier: Free, Premium, Ultimate
- Offering: GitLab Self-Managed
GitLab administrators can manage the GitLab CI/CD configuration for their instance.
Disable GitLab CI/CD in new projects
GitLab CI/CD is enabled by default in all new projects on an instance. You can set CI/CD to be disabled by default in new projects by modifying the settings in:
gitlab.ymlfor self-compiled installations.gitlab.rbfor Linux package installations.
Existing projects that already had CI/CD enabled are unchanged. Also, this setting only changes the project default, so project owners can still enable CI/CD in the project settings.
For self-compiled installations:
Open
gitlab.ymlwith your editor and setbuildstofalse:## Default project features settings default_projects_features: issues: true merge_requests: true wiki: true snippets: false builds: falseSave the
gitlab.ymlfile.Restart GitLab:
sudo service gitlab restart
For Linux package installations:
Edit
/etc/gitlab/gitlab.rband add this line:gitlab_rails['gitlab_default_projects_features_builds'] = falseSave the
/etc/gitlab/gitlab.rbfile.Reconfigure GitLab:
sudo gitlab-ctl reconfigure
Disaster recovery
You can disable some important but computationally expensive parts of the application to relieve stress on the database during ongoing downtime.
Disable fair scheduling on instance runners
When clearing a large backlog of jobs, you can temporarily enable the ci_queueing_disaster_recovery_disable_fair_scheduling
feature flag. This flag disables fair scheduling
on instance runners, which reduces system resource usage on the jobs/request endpoint.
When enabled, jobs are processed in the order they were put in the system, instead of balanced across many projects.
Disable compute quota enforcement
To disable the enforcement of compute minutes quotas on instance runners, you can temporarily
enable the ci_queueing_disaster_recovery_disable_quota feature flag.
This flag reduces system resource usage on the jobs/request endpoint.
When enabled, jobs created in the last hour can run in projects which are out of quota.
Earlier jobs are already canceled by a periodic background worker (StuckCiJobsWorker).