Commit Graph

2664 Commits

Author SHA1 Message Date
Rutger Wessels 4b58cb8c6f Override default timeout when running decomposition migration
The default timeout is 5 minutes. But the migration can take
a lot of time. So we set it to 1 day.

Changelog: fixed
2024-05-17 17:59:19 +00:00
Balasankar 'Balu' C c8d2602e5f Add dedicated Redis sentinel master settings for GitLab Rails
- Ensure legacy redis sentinel master configuration for rails
  gets parsed and loaded into resque with the new redis helper.

Closes https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/8540

Signed-off-by: Balasankar 'Balu' C <balasankar@gitlab.com>
2024-05-16 18:38:30 +00:00
Balasankar 'Balu' C 82bcde6d90 Migrate Gitlab Rails to NewRedisHelper logic
- Moves the Gitlab Rails library to use the new
  redis helper logic code path.

Signed-off-by: Balasankar 'Balu' C <balasankar@gitlab.com>
2024-05-15 19:08:58 +00:00
Robert Marshall 74817b6f57 Merge branch 'skip-storage-uniqueness-if-gitaly-not-running' into 'master'
Skip Gitaly storages uniqueness check if Gitaly is not enabled

See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7600

Merged-by: Robert Marshall <rmarshall@gitlab.com>
Approved-by: Igor <iwiedler@gitlab.com>
Approved-by: Toon Claes <toon@gitlab.com>
Approved-by: Alessio Caiazza <acaiazza@gitlab.com>
Approved-by: Robert Marshall <rmarshall@gitlab.com>
Co-authored-by: Balasankar 'Balu' C <balasankar@gitlab.com>
2024-05-10 14:51:38 +00:00
Balasankar 'Balu' C 474076cb89 Skip Gitaly storages uniqueness check if Gitaly is not enabled
- If a node has legacy `git-data` storages configured but no
  longer runs the gitaly service, skip the unique storage path
  validation check.

Signed-off-by: Balasankar 'Balu' C <balasankar@gitlab.com>
2024-05-10 14:51:37 +00:00
Balasankar 'Balu' C 28ac725403 Merge branch 'sh-fix-unix-redis-with-password' into 'master'
redis: Fix password auth with UNIX domain sockets

See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7573

Merged-by: Balasankar 'Balu' C <balasankar@gitlab.com>
Approved-by: Ian Baum <ibaum@gitlab.com>
Approved-by: Balasankar 'Balu' C <balasankar@gitlab.com>
Reviewed-by: Gabriel Mazetto <gabriel@gitlab.com>
Reviewed-by: Ian Baum <ibaum@gitlab.com>
Co-authored-by: Stan Hu <stanhu@gmail.com>
2024-05-10 10:16:49 +00:00
Will Chandler 57396c7aba Prevent Gitaly storages from using the same path
Gitaly is making a breaking change with v17.0 to prevent multiple
storages from sharing the same local path. This is being done as part of
the work to add a write-ahead log to Gitaly, see
https://gitlab.com/gitlab-org/gitaly/-/issues/5598 for further details.

Validate that Gitaly's config does not have more than one storage using
the same path, dereferencing any symlinks.

Changelog: changed
2024-05-09 22:39:29 +00:00
Balasankar 'Balu' C 82b342458b Merge branch '8341-remove-pg-13' into 'master'
Remove PostgreSQL 13

Closes #8341

See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7546

Merged-by: Balasankar 'Balu' C <balasankar@gitlab.com>
Approved-by: Ryan Egesdahl <regesdahl@gitlab.com>
Approved-by: Balasankar 'Balu' C <balasankar@gitlab.com>
Reviewed-by: Balasankar 'Balu' C <balasankar@gitlab.com>
Reviewed-by: Ryan Egesdahl <regesdahl@gitlab.com>
Co-authored-by: Clemens Beck <cbeck@gitlab.com>
2024-05-07 05:24:29 +00:00
Clemens Beck 92f7cf5b6c Remove PostgreSQL 13
* Remove PostgreSQL 13 builds.
* Remove unused PostgreSQL 12 build definition.
* Move PostgreSQL 14 from 'new' to 'default' build definition.
* Update minimum PostgreSQL version notice.

Closes https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/8341

Changelog: removed
2024-05-07 05:24:28 +00:00
Gregorius Marco cfa756435e Remove deprecated min_concurrency and max_concurrency for Sidekiq
- Eliminates code related to `min_concurrency` and
  `max_concurrency` options in sidekiq.

Related https://gitlab.com/gitlab-com/gl-infra/scalability/-/issues/3422

Changelog: removed
2024-05-04 00:39:29 +00:00
Stan Hu 656fb39a8c
redis: Fix password auth with UNIX domain sockets
Previously if a Redis instance listened on a UNIX socket but a
password were set, GitLab Rails would not be able to authenticate.
This occurred because the UNIX URL doesn't contain a password.

Both Ruby and Go Redis clients support URLs in the form:

unix://<user>:<password>@</path/to/redis.sock>?db=<db_number>

Relates to work started in
https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/2194

Changelog: fixed
2024-04-27 09:45:46 -07:00
Stan Hu 1c579dae4d
Fix reconfigure failure if Redis node has Rails Sentinel config
https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7500
introduced a regression when a node with a managed Redis node has
Sentinels configured in `gitlab_rails` section. Previously the
`redis['default_host']` would only be set if
`gitlab_rails['redis_sentinels']` were empty.

Relates to
https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/8465#note_1879691545

Changelog: fixed
2024-04-24 20:53:36 -07:00
Ian Baum ba9ca699aa Merge branch 'ngala/namespace-in-path-auth-redirect-uri' into 'master'
Update default pages auth-redirect-uri when namespace-in-path is enabled

See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7548

Merged-by: Ian Baum <ibaum@gitlab.com>
Approved-by: Vladimir Shushlin <vshushlin@gitlab.com>
Approved-by: Mitchell Nielsen <mnielsen@gitlab.com>
Approved-by: Ian Baum <ibaum@gitlab.com>
Co-authored-by: ngala <ngala@gitlab.com>
2024-04-23 14:46:46 +00:00
Balasankar 'Balu' C ca02e0c220
Enable building arm64 images
Modify the Dockerfile and library code around Docker image builds to
support building multiarch images. The Dockerfile will download the
package for the correct architecture based on TARGETARCH variable.

Closes: https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/8470

Signed-off-by: Balasankar 'Balu' C <balasankar@gitlab.com>
2024-04-19 08:40:38 +05:30
Balasankar 'Balu' C f8c71c7a9c
Use docker buildx to build Docker images
Move away from docker-api gem which does not have support for `docker
buildx`. Add a wrapper to execute `docker buildx` commands in the shell
and use that for Docker operations.

Closes: https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/8469

Signed-off-by: Balasankar 'Balu' C <balasankar@gitlab.com>
2024-04-19 08:40:16 +05:30
Andrew Patterson 887df90300 Fix for missing branch_build_package_download_url
Use Build::Info::CI::package_download_url instead
of the no longer present
Build::Info::CI::branch_build_package_download_url
2024-04-18 08:04:04 -06:00
ngala 1f597136de Update default pages auth-redirect-uri when namespace-in-path is enabled
Related: https://gitlab.com/gitlab-org/gitlab/-/issues/452459+

Changelog: fixed
2024-04-16 14:52:14 +05:30
Robert Marshall 8ea9c2a973 Merge branch 'ngala/pages_namespace_in_path_custom_auth_redirect_uri' into 'master'
Support custom auth_redirect_uri when namespace_in_path is enabled

See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7516

Merged-by: Robert Marshall <rmarshall@gitlab.com>
Approved-by: Mitchell Nielsen <mnielsen@gitlab.com>
Approved-by: Robert Marshall <rmarshall@gitlab.com>
Co-authored-by: ngala <ngala@gitlab.com>
2024-04-15 23:29:41 +00:00
Naman Jagdish Gala 5bc1b0d5ad Support custom auth_redirect_uri when namespace_in_path is enabled
Related: https://gitlab.com/gitlab-org/gitlab/-/issues/452459

Changelog: fixed
2024-04-15 23:29:41 +00:00
Robert Marshall 9f89bce2e7 Merge branch 'enable-kas-in-fips-mode' into 'master'
Enable KAS in FIPS mode

Closes gitlab-org/build/CNG#1948

See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7528

Merged-by: Robert Marshall <rmarshall@gitlab.com>
Approved-by: Vishal Patel <vpatel@gitlab.com>
Approved-by: Andrew Patterson <apatterson@gitlab.com>
Approved-by: Robert Marshall <rmarshall@gitlab.com>
Co-authored-by: Taka Nishida <tnishida@gitlab.com>
2024-04-15 19:41:06 +00:00
Taka Nishida 10d69a4d34 Enable KAS in FIPS mode
- Removes code that blocked KAS service when GitLab is
  deployed in FIPS mode

Related https://gitlab.com/gitlab-org/gitlab/-/issues/375327

Changelog: changed
2024-04-15 19:41:05 +00:00
Balasankar 'Balu' C afccdd4968 Merge branch 'sh-allow-redis-multiple-bind' into 'master'
Accept multiple bind addresses in Redis config

See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7500

Merged-by: Balasankar 'Balu' C <balasankar@gitlab.com>
Approved-by: Hossein Pursultani <hpursultani@gitlab.com>
Approved-by: Balasankar 'Balu' C <balasankar@gitlab.com>
Co-authored-by: Stan Hu <stanhu@gmail.com>
2024-04-15 05:28:38 +00:00
Robert Marshall 57d2bf8538 Merge branch 'add-grpc-level-config-for-kas' into 'master'
Support optional grpc log level config for KAS

See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7518

Merged-by: Robert Marshall <rmarshall@gitlab.com>
Approved-by: Gabriel Mazetto <gabriel@gitlab.com>
Approved-by: Robert Marshall <rmarshall@gitlab.com>
Co-authored-by: Taka Nishida <tnishida@gitlab.com>
2024-04-10 21:20:33 +00:00
Taka Nishida eacda21e30 Support optional grpc log level config for KAS
Adds the gitlab_kas['grpc_log_level'] config option.

Changelog: added
2024-04-10 21:20:33 +00:00
Balasankar 'Balu' C f8b5137101 Merge branch 'sc1-add-shard-to-routing-rule' into 'master'
Allow routing rules to contain shard information

See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7512

Merged-by: Balasankar 'Balu' C <balasankar@gitlab.com>
Approved-by: Mitchell Nielsen <mnielsen@gitlab.com>
Approved-by: Balasankar 'Balu' C <balasankar@gitlab.com>
Co-authored-by: Sylvester Chin <schin@gitlab.com>
2024-04-09 17:25:41 +00:00
Sylvester Chin f185f8373c Allow routing rules to contain shard information
Changelog: changed
2024-04-09 17:25:41 +00:00
Balasankar 'Balu' C ff55a2fedc Pass DEV_BUILDER_IMAGE_REGISTRY variable to downstream pipeline
- Adds DEV_BUILDER_IMAGE_REGISTRY when invoking triggers to
  allow build-package-on-all-os jobs to work with SLES from
  the GitLab Omnibus Builder repository.

Signed-off-by: Balasankar 'Balu' C <balasankar@gitlab.com>
2024-04-09 15:28:45 +00:00
Robert Marshall 611ed6b5ff Merge branch 'support-setting-env-var' into 'master'
Support TLS for kas->kas communication for KAS

See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7453

Merged-by: Robert Marshall <rmarshall@gitlab.com>
Approved-by: Timo Furrer <tfurrer@gitlab.com>
Approved-by: João Alexandre Cunha <j.a.cunha@gmail.com>
Approved-by: Robert Marshall <rmarshall@gitlab.com>
Co-authored-by: Taka Nishida <tnishida@gitlab.com>
2024-04-08 20:01:00 +00:00
Taka Nishida b55ca1fb9f Support TLS for kas->kas communication in Omnibus
Closes https://gitlab.com/gitlab-org/gitlab/-/issues/375327

Changelog: added
2024-04-08 20:01:00 +00:00
Balasankar 'Balu' C 22ae898b24 Add Rubocop cop to enforce default_version in software definitions
Prevent empty build caches caused by a lack of default version.

Closes https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/8476

Signed-off-by: Balasankar 'Balu' C <balasankar@gitlab.com>
2024-04-08 16:29:41 +00:00
Reuben Pereira 5719d82182 Revert "Merge branch 'revert-cache-changes' into 'master'"
This reverts merge request !7521
2024-04-04 04:09:05 +00:00
Robert Marshall aea984c929 Revert recently introduced cache changes
- Recent pipeline jobs failed with strange cache issues. After review of
  recent changes, it is possible that changes from trigger based jobs to
  normal pipeline jobs may have introduced hidden behavioral changes that
  polluted the build caches. This reverts those changes as an attempt
  to unblock auto deploy while the team continues to investigate.
- https://dev.gitlab.org/gitlab/omnibus-gitlab/-/jobs/19887684
- https://dev.gitlab.org/gitlab/omnibus-gitlab/-/jobs/19883123
- https://gitlab.com/gitlab-org/omnibus-gitlab/-/jobs/6535645918

This reverts commit 373d38dc4f.
This reverts commit b7cb856e12.

Signed-off-by: Robert Marshall <rmarshall@gitlab.com>
2024-04-03 13:25:00 -04:00
Javiera Tapia e19a65e32e Unified Backups: Add gitlab-backup-cli to Omnibus
- Adds wrapper around `gitlab-backup-cli` command
- Adds recipe and template for `gitlab-backup-cli` yaml configuration

Closes https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/8273

Changelog: added
2024-04-03 02:49:59 +00:00
Andrew Patterson 0550d3cce0 Merge branch 'deduplicate-package-build-jobs' into 'master'
Drop trigger build jobs in favor of normal branch build jobs

Closes #6333 and #7187

See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7497

Merged-by: Andrew Patterson <apatterson@gitlab.com>
Approved-by: Clemens Beck <cbeck@gitlab.com>
Approved-by: Andrew Patterson <apatterson@gitlab.com>
Reviewed-by: Balasankar 'Balu' C <balasankar@gitlab.com>
Reviewed-by: Clemens Beck <cbeck@gitlab.com>
Co-authored-by: Balasankar 'Balu' C <balasankar@gitlab.com>
2024-04-02 04:24:21 +00:00
Balasankar 'Balu' C b7cb856e12 Drop trigger build jobs in favor of normal branch build jobs
- Control cache policy by variable.
- Drop trigger build jobs in favor of normal branch build jobs.

Signed-off-by: Balasankar 'Balu' C <balasankar@gitlab.com>
2024-04-02 04:24:21 +00:00
Stan Hu faca982898
Accept multiple bind addresses in Redis config
As specified in https://redis.io/docs/management/config-file/, Redis
can bind to multiple addresses with a space-separated field. Previously
attempting to do this without setting `gitlab_rails['redis_host']`
would fail because a URI could not be built with a space in the
hostname.

This commit now splits the string with the space and picks the first
address as the default Redis host.

Relates to https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/8465

Changelog: added
2024-04-01 16:37:35 -07:00
Robert Marshall 64a47d3673 Merge branch 'copy-docker-image-instead-of-pull-push' into 'master'
Enable skopeo for container releases

See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7489

Merged-by: Robert Marshall <rmarshall@gitlab.com>
Approved-by: João Alexandre Cunha <j.a.cunha@gmail.com>
Approved-by: Robert Marshall <rmarshall@gitlab.com>
Co-authored-by: Balasankar 'Balu' C <balasankar@gitlab.com>
2024-04-01 19:34:05 +00:00
Balasankar 'Balu' C 7159395339 Enable skopeo for container releases
- Adds option that enables container copies with skopeo
  instead of pull the image, re-tag, and then push it
- Retains current pull/re-tag/push behavior as default

Related https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/5673

Signed-off-by: Balasankar 'Balu' C <balasankar@gitlab.com>
2024-04-01 19:34:04 +00:00
Robert Marshall 3f2b0e7618 Merge branch 'redis-version-information-new-redis-helper' into 'master'
Move Redis server information to NewRedisHelper

See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7465

Merged-by: Robert Marshall <rmarshall@gitlab.com>
Approved-by: Dustin Collins <714871-dustinmm80@users.noreply.gitlab.com>
Approved-by: Andrew Patterson <apatterson@gitlab.com>
Approved-by: Robert Marshall <rmarshall@gitlab.com>
Co-authored-by: Balasankar 'Balu' C <balasankar@gitlab.com>
2024-04-01 18:32:51 +00:00
Balasankar 'Balu' C be58ec87c6 Move Redis server information to NewRedisHelper
- Continue conversion to the new style redis helper with
  refactors against the redis server functionality methods

Signed-off-by: Balasankar 'Balu' C <balasankar@gitlab.com>
2024-04-01 18:32:51 +00:00
Balasankar 'Balu' C 4b8ab3c2cb Ensure nightly pipelines are correctly detected in Canonical
- Ensures package is built for both branch pipelines and
  the nightly job
- Fixes package download URL calculations

Closes https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/8451

Signed-off-by: Balasankar 'Balu' C <balasankar@gitlab.com>
2024-03-28 01:09:18 +00:00
Balasankar 'Balu' C aee82f523b Merge branch 'create-git-data-dirs-when-gitlab-rails-is-disabled' into 'master'
Create git_data_dirs even if gitlab_rails is disabled

See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7459

Merged-by: Balasankar 'Balu' C <balasankar@gitlab.com>
Approved-by: Jason Plum <jplum@gitlab.com>
Approved-by: Andrew Patterson <apatterson@gitlab.com>
Approved-by: Balasankar 'Balu' C <balasankar@gitlab.com>
Co-authored-by: Ahmad Sherif <ahmad@gitlab.com>
2024-03-25 09:00:17 +00:00
Robert Marshall 9ef2e18687 Enable easy SELinux context fixes
- Adds a command to re-apply SELinux file context rules based on the
  current GitLab provided SELinux policy.
- Documents the existence of this new command.
- Moves semanage tests into SELinuxHelper rspec and extends coverage for
  changes made to support the new command.

Related https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/7257

Closes https://gitlab.com/gitlab-org/omnibus-gitlab/-/issues/7452

Changelog: added
Signed-off-by: Robert Marshall <rmarshall@gitlab.com>
2024-03-19 04:50:52 +00:00
Ahmad Sherif 4beb352443 Create git_data_dirs even if gitlab_rails is disabled
Currently, `gitlab_rails` service needs to be enabled in order for
`gitaly` service to function properly. Specifically, `gitlab_rails`
creates `git_data_dirs` (e.g. `/var/opt/gitlab/git-data/repositories`)
which is needed for Gitaly to start-up. If only the `gitaly` service is
enabled, then Gitaly won't start due to config validation error (i.e.
storage directories have to be present).

This MR makes the creation of these directories the responsibility of
the `gitaly` cookbook. The `gitlab` cookbook still creates the
directories as backward-compatibility measure, as I'm not sure if these
directories are needed outside of Gitaly.

This is needed as part of
https://gitlab.com/gitlab-com/gl-infra/production-engineering/-/issues/24530.

Changelog: fixed
2024-03-18 13:45:33 +01:00
Ryan Egesdahl 062f88a7c6 Revert "Merge branch 'fix-nightly-in-canonical-rat' into 'master'"
This reverts merge request !7460 because the `Trigger:package` job
was not present.  Adding it would build the Ubuntu package twice, so
we chose to revert and determine if this can be done with the
package already built in the pipeline.
2024-03-09 02:55:55 +00:00
Andrew Patterson 25de7f59f1 Merge branch 'fix-nightly-in-canonical-rat' into 'master'
Ensure nightly pipelines are correctly detected in Canonical

See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7460

Merged-by: Andrew Patterson <apatterson@gitlab.com>
Approved-by: Jason Plum <jplum@gitlab.com>
Approved-by: Andrew Patterson <apatterson@gitlab.com>
Co-authored-by: Balasankar 'Balu' C <balasankar@gitlab.com>
2024-03-08 22:41:25 +00:00
Balasankar 'Balu' C 7b2b58ba99 Ensure nightly pipelines are correctly detected in Canonical
Signed-off-by: Balasankar 'Balu' C <balasankar@gitlab.com>
2024-03-08 22:41:25 +00:00
Ash McKenzie bed2944180 Increase net.core.somaxconn default to 2048
The default for Linux kernels 5.4+ is 4096.

Changelog: performance
2024-03-02 01:59:10 +00:00
Ian Baum 6d3dac0725 Merge branch 'feat/support-registry-gc-config' into 'master'
Add config support for container registry garbage collection

Closes #8438

See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7447

Merged-by: Ian Baum <ibaum@gitlab.com>
Approved-by: Mitchell Nielsen <mnielsen@gitlab.com>
Approved-by: Ian Baum <ibaum@gitlab.com>
Reviewed-by: Ian Baum <ibaum@gitlab.com>
Co-authored-by: Fabio Huser <fabio.huser@siemens.com>
2024-02-28 17:22:40 +00:00
Robert Marshall f08c0557f0 Merge branch 'allow-setting-gitaly-gitlab-values' into 'master'
Allow setting custom gitlab config for Gitaly

See merge request https://gitlab.com/gitlab-org/omnibus-gitlab/-/merge_requests/7430

Merged-by: Robert Marshall <rmarshall@gitlab.com>
Approved-by: Dustin Collins <714871-dustinmm80@users.noreply.gitlab.com>
Approved-by: Robert Marshall <rmarshall@gitlab.com>
Reviewed-by: Ahmad Sherif <ahmad@gitlab.com>
Co-authored-by: Ahmad Sherif <ahmad@gitlab.com>
2024-02-27 01:34:46 +00:00