Skip to content

Set license mode via GitLab component only

George Koltsov requested to merge ml-dedupe-license-mode into master

What does this MR do and why?

Enable test license mode and CUSTOMER_PORTAL_URL when GITLAB_LICENSE_MODE is set to test, instead of having to set TEST_LICENSE_MODE or use --omnibus-config license_mode.

See https://gitlab.com/gitlab-org/quality/quality-engineering/team-tasks/-/issues/1630

If this is approved we'll need to coordinate suitable changes to https://gitlab.com/gitlab-org/customers-gitlab-com/ before merging and releasing these changes. Having the version pinned should help.

I've set GITLAB_LICENSE_MODE to test as a CI variable in this project. If this is merged we'll need to do the same in gitlab-org/gitlab. See https://gitlab.com/gitlab-com/gl-infra/reliability/-/issues/11393 and related issues for how GITLAB_LICENSE_MODE was created and is used.

How to set up and validate locally

> GITLAB_LICENSE_MODE=test bundle exec exe/gitlab-qa Test::Instance::Image EE
...
[Jan 31 2023 14:02:41 AEDT (Gitlab QA)] INFO  -- Shell command: `docker exec gitlab-ee-d7b2084d bash -c "echo \"# Generated by GitLab QA Omnibus Configurator at 2023-01-31 14:02:40
# Gitlab::QA::Runtime::OmnibusConfigurations::Default
gitlab_rails['gitlab_default_theme'] = 10 # Light Red Theme
gitlab_rails['gitlab_disable_animations'] = true # Disable animations
gitlab_rails['application_settings_cache_seconds'] = 0 # Settings cache expiry
gitlab_rails['initial_root_password'] = '5iveL!fe' # Initial root password
gitlab_rails['env'] = {'GITLAB_LICENSE_MODE'=>'test', 'CUSTOMER_PORTAL_URL'=>'https://customers.staging.gitlab.com', 'GITLAB_ALLOW_SEPARATE_CI_DATABASE'=>'false'}\" > /etc/gitlab/gitlab.rb;"`

And without GITLAB_LICENSE_MODE it looks like:

> bundle exec exe/gitlab-qa Test::Instance::Image EE
...
[Jan 31 2023 14:08:01 AEDT (Gitlab QA)] INFO  -- Shell command: `docker exec gitlab-ee-bcdaae77 bash -c "echo \"# Generated by GitLab QA Omnibus Configurator at 2023-01-31 14:07:59
# Gitlab::QA::Runtime::OmnibusConfigurations::Default
gitlab_rails['gitlab_default_theme'] = 10 # Light Red Theme
gitlab_rails['gitlab_disable_animations'] = true # Disable animations
gitlab_rails['application_settings_cache_seconds'] = 0 # Settings cache expiry
gitlab_rails['initial_root_password'] = '5iveL!fe' # Initial root password
gitlab_rails['env'] = {'GITLAB_ALLOW_SEPARATE_CI_DATABASE'=>'false'}\" > /etc/gitlab/gitlab.rb;"`

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by George Koltsov

Merge request reports

Loading