EEからCEへの格下げ

Enterprise EditionをCommunity Editionにダウングレードする場合、現在のEEパッケージの上にCEパッケージをインストールする前に、またはソースからインストールする場合は、リモートを変更して最新のCEコードを取得する前に、必要な手順がいくつかあります。

エンタープライズ専用機能の無効化

最初にすべきことは、以下の機能を無効にすることです。

認証メカニズム

Kerberos と Atlassian Crowd は Enterprise Edition でのみ利用可能です。したがって、ダウングレードする前にこれらのメカニズムを無効にし、ユーザーに別の認証方法を提供する必要があります。

データベースからサービス インテグレーション エントリを削除します。

JenkinsServiceGithubService クラスはEnterprise Editionのコードベースでのみ利用可能です。そのため、Community Editionにダウングレードすると、次のようなエラーが発生します:

Completed 500 Internal Server Error in 497ms (ActiveRecord: 32.2ms)

ActionView::Template::Error (The single-table inheritance mechanism failed to locate the subclass: 'JenkinsService'. This
error is raised because the column 'type' 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 Service.inheritance_column to
use another column for that information.)

あるいは

Completed 500 Internal Server Error in 497ms (ActiveRecord: 32.2ms)

ActionView::Template::Error (The single-table inheritance mechanism failed to locate the subclass: 'GithubService'. This
error is raised because the column 'type' 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 Service.inheritance_column to
use another column for that information.)

すべてのサービスはプロジェクトごとに自動的に作成されるため、このエラーを回避するには、データベースからJenkinsServiceGithubService のインスタンスをすべて削除する必要があります:

オムニバス・インストール

sudo gitlab-rails runner "Service.where(type: ['JenkinsService', 'GithubService']).delete_all"

ソースインストール

bundle exec rails runner "Service.where(type: ['JenkinsService', 'GithubService']).delete_all" production
注:GitLab =< v13.0 を実行している場合は、JenkinsDeprecatedService のレコードも削除する必要があります。

変数環境スコープ

この機能を使用していて、プロジェクト内で同じキーを共有する変数があるにもかかわらず、それらの変数のスコープが異なっている場合は、それらの変数の環境スコープの設定を見直したほうがよいでしょう。

CEでは環境スコープは完全に無視されるため、特定の環境に対して想定していない変数を誤って取得してしまう可能性があります。 この場合、正しい変数があるかどうかを確認してください。

データは完全に保存されているので、放っておいてもいつでもEEにアップグレードして動作を復元できます。

CEへの格下げ

以上の手順が完了したら、GitLabをCommunity Editionにダウングレードする準備ができました。

オムニバス・インストール

Omnibusをダウングレードするには、現在インストールされているOmnibusの上にCommunity Editionパッケージをインストールすれば十分です。 手動で必要なパッケージを直接ダウンロードするか、CEパッケージリポジトリを追加してCEのインストール手順に従ってください。

ソースインストール

ソースのインストールをダウングレードするには、GitLab インストールの現在のリモートを Community Edition のリモートに置き換え、最新の変更点を取得し、最新の安定版ブランチをチェックアウトする必要があります:

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

すべての依存関係が最新であることを確認するために、正しいアップデートガイドに従うことを忘れないでください。