From 6320dfbcce8fd0f4747b223e6eb68daca9db290b Mon Sep 17 00:00:00 2001 From: Patricio Cano Date: Sun, 15 Nov 2015 19:31:01 -0500 Subject: [PATCH 1/2] Added documentation on how to downgrade from EE to CE --- doc/README.md | 1 + doc/downgrade_ee_to_ce/README.md | 73 ++++++++++++++++++++++++++++++++ doc/update/README.md | 5 +++ 3 files changed, 79 insertions(+) create mode 100644 doc/downgrade_ee_to_ce/README.md diff --git a/doc/README.md b/doc/README.md index 128ea0d3ba..75a6026f11 100644 --- a/doc/README.md +++ b/doc/README.md @@ -55,6 +55,7 @@ - [Migrate GitLab CI to CE/EE](migrate_ci_to_ce/README.md) Follow this guide to migrate your existing GitLab CI data to GitLab CE/EE. - [User permissions](permissions/permissions.md) - [API](api/README.md) +- [Downgrade back to CE](downgrade_ee_to_ce/README.md) Follow this guide if you need to downgrade from EE to CE. ## Contributor documentation diff --git a/doc/downgrade_ee_to_ce/README.md b/doc/downgrade_ee_to_ce/README.md new file mode 100644 index 0000000000..6740382b5d --- /dev/null +++ b/doc/downgrade_ee_to_ce/README.md @@ -0,0 +1,73 @@ +# Downgrading from EE to CE + +If you ever decide to downgrade your Enterprise Edition back to the Community Edition, there are a few +steps you need take before installing the CE package on top of the current EE package, or, if you are +in an installation from source, before you change remotes and fetch the latest CE code. + +## Disable Enterprise only features + +First thing to do is to disable the following features. + +### Authentication mechanisms + +Kerberos and Atlassian Crowd are only available on the Enterprise Edition, so you should disable these mechanisms before +downgrading and you should provide alternative authentication methods to your users. + +### Git Annex + +Git Annex is also only available on the Enterprise Edition. This means that if you have repositories that use Git Annex +to store large files, these files will no longer be easily available via Git. You should consider migrating these repositories +to use Git LFS before downgrading to the Community Edition. + +### Remove Jenkins CI Service entries from the database + +The `JenkinsService` class is only available on the Enterprise Edition codebase, so if you downgrade to +the Community Edition, you'll come across the following error: + +``` +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.) +``` + +All services are created automatically for every project you have, so in order to avoid getting this error, you need to +remove all instances of the `JenkinsService` from your database: + +**Omnibus Installation** + +``` +$ sudo gitlab-rails runner "Service.where(type: 'JenkinsService').delete_all" +``` + +**Source Installation** + +``` +$ bundle exec rails runner "Service.where(type: 'JenkinsService').delete_all" production +``` + +## Downgrade to CE + +After performing the above mentioned steps, you are now ready to downgrade your GitLab installation to the Community +Edition. + +**Omnibus Installation** + +To downgrade an Omnibus installation, it is sufficient to install the Community Edition package on top of the currently +installed one. You can do this manually, by directly [downloading the package](https://packages.gitlab.com/gitlab/gitlab-ce) +you need, or by adding our CE package repository and following the [CE installation instructions.](https://about.gitlab.com/downloads/) + +**Source Installation** + +To downgrade a source installation, you need to replace the current remote of your GitLab installation with the Community +Edition's remote, fetch the latest changes, and checkout the latest stable branch: + +``` +$ git remote set-url origin git@gitlab.com:gitlab-org/gitlab-ce.git +$ git fetch --all +$ git checkout 8-x-stable +``` + +Remember to follow the correct [update guides](../update/README.md) to make sure all dependencies are up to date. \ No newline at end of file diff --git a/doc/update/README.md b/doc/update/README.md index 941e3581f6..59d66b8d56 100644 --- a/doc/update/README.md +++ b/doc/update/README.md @@ -4,6 +4,11 @@ Depending on the installation method and your GitLab version, there are multiple - [The CE to EE update guides](https://gitlab.com/gitlab-org/gitlab-ee/tree/master/doc/update) the steps are very similar to a version upgrade: stop the server, get the code, update config files for the new functionality, install libs and do migrations, update the init script, start the application and check the application status. +## EE to CE + +- If you need to downgrade your EE installation back to CE, you can follow [this guide](../downgrade_ee_to_ce/README.md) to make +the process as smooth as possible. + ## Omnibus Packages - [Omnibus update guide](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/update.md) contains the steps needed to update a GitLab [package](https://about.gitlab.com/downloads/). From 2803bef0d2b6fa0d953bab8a823f3abf42f5270c Mon Sep 17 00:00:00 2001 From: Achilleas Pipinellis Date: Tue, 17 Nov 2015 18:36:55 +0200 Subject: [PATCH 2/2] Split lines to 80 characters [ci skip] --- doc/downgrade_ee_to_ce/README.md | 51 +++++++++++++++++++------------- 1 file changed, 30 insertions(+), 21 deletions(-) diff --git a/doc/downgrade_ee_to_ce/README.md b/doc/downgrade_ee_to_ce/README.md index 6740382b5d..3625c4191b 100644 --- a/doc/downgrade_ee_to_ce/README.md +++ b/doc/downgrade_ee_to_ce/README.md @@ -1,28 +1,32 @@ # Downgrading from EE to CE -If you ever decide to downgrade your Enterprise Edition back to the Community Edition, there are a few -steps you need take before installing the CE package on top of the current EE package, or, if you are -in an installation from source, before you change remotes and fetch the latest CE code. +If you ever decide to downgrade your Enterprise Edition back to the Community +Edition, there are a few steps you need take before installing the CE package +on top of the current EE package, or, if you are in an installation from source, +before you change remotes and fetch the latest CE code. -## Disable Enterprise only features +## Disable Enterprise-only features First thing to do is to disable the following features. ### Authentication mechanisms -Kerberos and Atlassian Crowd are only available on the Enterprise Edition, so you should disable these mechanisms before -downgrading and you should provide alternative authentication methods to your users. +Kerberos and Atlassian Crowd are only available on the Enterprise Edition, so +you should disable these mechanisms before downgrading and you should provide +alternative authentication methods to your users. ### Git Annex -Git Annex is also only available on the Enterprise Edition. This means that if you have repositories that use Git Annex -to store large files, these files will no longer be easily available via Git. You should consider migrating these repositories -to use Git LFS before downgrading to the Community Edition. +Git Annex is also only available on the Enterprise Edition. This means that if +you have repositories that use Git Annex to store large files, these files will +no longer be easily available via Git. You should consider migrating these +repositories to use Git LFS before downgrading to the Community Edition. ### Remove Jenkins CI Service entries from the database -The `JenkinsService` class is only available on the Enterprise Edition codebase, so if you downgrade to -the Community Edition, you'll come across the following error: +The `JenkinsService` class is only available on the Enterprise Edition codebase, +so if you downgrade to the Community Edition, you'll come across the following +error: ``` Completed 500 Internal Server Error in 497ms (ActiveRecord: 32.2ms) @@ -33,8 +37,9 @@ column if you didn't intend it to be used for storing the inheritance class or o use another column for that information.) ``` -All services are created automatically for every project you have, so in order to avoid getting this error, you need to -remove all instances of the `JenkinsService` from your database: +All services are created automatically for every project you have, so in order +to avoid getting this error, you need to remove all instances of the +`JenkinsService` from your database: **Omnibus Installation** @@ -50,19 +55,22 @@ $ bundle exec rails runner "Service.where(type: 'JenkinsService').delete_all" pr ## Downgrade to CE -After performing the above mentioned steps, you are now ready to downgrade your GitLab installation to the Community -Edition. +After performing the above mentioned steps, you are now ready to downgrade your +GitLab installation to the Community Edition. **Omnibus Installation** -To downgrade an Omnibus installation, it is sufficient to install the Community Edition package on top of the currently -installed one. You can do this manually, by directly [downloading the package](https://packages.gitlab.com/gitlab/gitlab-ce) -you need, or by adding our CE package repository and following the [CE installation instructions.](https://about.gitlab.com/downloads/) +To downgrade an Omnibus installation, it is sufficient to install the Community +Edition package on top of the currently installed one. You can do this manually, +by directly [downloading the package](https://packages.gitlab.com/gitlab/gitlab-ce) +you need, or by adding our CE package repository and following the +[CE installation instructions](https://about.gitlab.com/downloads/). **Source Installation** -To downgrade a source installation, you need to replace the current remote of your GitLab installation with the Community -Edition's remote, fetch the latest changes, and checkout the latest stable branch: +To downgrade a source installation, you need to replace the current remote of +your GitLab installation with the Community Edition's remote, fetch the latest +changes, and checkout the latest stable branch: ``` $ git remote set-url origin git@gitlab.com:gitlab-org/gitlab-ce.git @@ -70,4 +78,5 @@ $ git fetch --all $ git checkout 8-x-stable ``` -Remember to follow the correct [update guides](../update/README.md) to make sure all dependencies are up to date. \ No newline at end of file +Remember to follow the correct [update guides](../update/README.md) to make +sure all dependencies are up to date.