正式なドキュメントは英語版であり、この日本語訳はAI支援翻訳により作成された参考用のものです。日本語訳の一部の内容は人間によるレビューがまだ行われていないため、翻訳のタイミングにより英語版との間に差異が生じることがあります。最新かつ正確な情報については、英語版をご参照ください。

Enterprise Edition(EE)からCommunity Edition(CE)への変更

GitLab Enterprise Edition(EE)インスタンスをCE(Community Edition)にダウングレードできますが、その前に次のことを行う必要があります:

  1. EE専用の認証メカニズムを無効にします。
  2. データベースからEE専用のインテグレーションを削除します。
  3. スコープ環境を使用する設定を調整します。

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::Github
  • Integrations::GitGuardian
  • Integrations::GoogleCloudPlatform::ArtifactRegistry
  • Integrations::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パッケージをインストールします。

  1. GitLabインストールの現在のGitリモートを、CE Gitリモートに置き換えます。

  2. 最新の変更をフェッチし、最新の安定したブランチをチェックアウトします。次に例を示します:

    git remote set-url origin git@gitlab.com:gitlab-org/gitlab-foss.git
    git fetch --all
    git checkout 17-8-stable