Enterprise Edition(EE)からCommunity Edition(CE)への変更
GitLab Enterprise Edition(EE)インスタンスをCE(Community Edition)にダウングレードできますが、その前に次のことを行う必要があります:
- EE専用の認証メカニズムを無効にします。
- データベースからEE専用のインテグレーションを削除します。
- スコープ環境を使用する設定を調整します。
EE専用の認証メカニズムをオフにします
KerberosはEEインスタンスでのみ利用可能です。これを行うには、次の手順に従います:
- ロールバックする前に、これらのメカニズムをオフにします。
- 別の認証方法をユーザーに提供します。
データベースからEE専用のインテグレーションを削除します
これらのインテグレーションは、EEのコードベースでのみ利用可能です:
CEにダウングレードすると、次のようなエラーが発生する可能性があります:
Completed 500 Internal Server Error in 497ms (ActiveRecord: 32.2ms)
ActionView::Template::Error (The single-table inheritance mechanism failed to locate the subclass: 'Integrations::Github'. This
error is raised because the column 'type_new' is reserved for storing the class in case of inheritance. Please rename this
column if you didn't intend it to be used for storing the inheritance class or overwrite Integration.inheritance_column to
use another column for that information.)エラーメッセージのsubclassは、以下のいずれかになります:
Integrations::GithubIntegrations::GitGuardianIntegrations::GoogleCloudPlatform::ArtifactRegistryIntegrations::GoogleCloudPlatform::WorkloadIdentityFederation
すべてのインテグレーションは、すべてのプロジェクトに対して自動的に作成されます。このエラーが発生しないようにするには、データベースからEE専用のインテグレーションレコードをすべて削除する必要があります。
sudo gitlab-rails runner "Integration.where(type_new: ['Integrations::Github']).delete_all"
sudo gitlab-rails runner "Integration.where(type_new: ['Integrations::GitGuardian']).delete_all"
sudo gitlab-rails runner "Integration.where(type_new: ['Integrations::GoogleCloudPlatform::ArtifactRegistry']).delete_all"
sudo gitlab-rails runner "Integration.where(type_new: ['Integrations::GoogleCloudPlatform::WorkloadIdentityFederation']).delete_all"bundle exec rails runner "Integration.where(type_new: ['Integrations::Github']).delete_all" production
bundle exec rails runner "Integration.where(type_new: ['Integrations::GitGuardian']).delete_all" production
bundle exec rails runner "Integration.where(type_new: ['Integrations::GoogleCloudPlatform::ArtifactRegistry']).delete_all" production
bundle exec rails runner "Integration.where(type_new: ['Integrations::GoogleCloudPlatform::WorkloadIdentityFederation']).delete_all" productionスコープ環境を使用する設定を調整します
環境スコープを使用している場合は、設定、特に設定変数が同じキーを共有しているが、スコープが異なる場合は、調整が必要になることがあります。環境スコープはCEでは完全に無視されます。
キーは共有しているがスコープが異なる設定変数を使用すると、特定の環境で予期しない変数が誤って取得される可能性があります。この場合は、正しい変数があることを確認してください。
データは移行時に完全に保持されるため、EEに戻して動作を復元できます。
CEにロールバック
必要な手順を実行したら、GitLabインスタンスをCEにロールバックできます。
すべての依存関係が最新の状態になっていることを確認するには、正しい更新ガイドに従ってください。
ディストリビューションのインストール手順に従って、Community Editionパッケージをインストールします。
GitLabインストールの現在のGitリモートを、CE Gitリモートに置き換えます。
最新の変更をフェッチし、最新の安定したブランチをチェックアウトします。次に例を示します:
git remote set-url origin git@gitlab.com:gitlab-org/gitlab-foss.git git fetch --all git checkout 17-8-stable