doc/update/convert_to_ee/self_compiled.md
{{< details >}}
{{< /details >}}
You can convert an existing self-compiled instance from Community Edition (CE) to Enterprise Edition (EE).
These instructions assume you have a correctly configured and tested self-compiled installation of GitLab CE.
In the following instructions, replace:
EE_BRANCH with the EE branch for the version you are using. EE branch names use the format major-minor-stable-ee.
For example, 17-7-stable-ee.CE_BRANCH with the Community Edition branch. CE branch names use the format major-minor-stable.
For example, 17-7-stable.To back up GitLab:
cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
To stop the GitLab server:
sudo service gitlab stop
To get the EE code:
cd /home/git/gitlab
sudo -u git -H git remote add -f ee https://gitlab.com/gitlab-org/gitlab.git
sudo -u git -H git checkout EE_BRANCH
To install libraries and run migrations:
cd /home/git/gitlab
# If you haven't done so during installation or a previous upgrade already
sudo -u git -H bundle config set --local deployment 'true'
sudo -u git -H bundle config set --local without 'development test kerberos'
# Update gems
sudo -u git -H bundle install
# Optional: clean up old gems
sudo -u git -H bundle clean
# Run database migrations
sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
# Update node dependencies and recompile assets
sudo -u git -H bundle exec rake yarn:install gitlab:assets:clean gitlab:assets:compile RAILS_ENV=production NODE_ENV=production NODE_OPTIONS="--max_old_space_size=4096"
# Clean up cache
sudo -u git -H bundle exec rake cache:clear RAILS_ENV=production
gitlab-elasticsearch-indexer{{< details >}}
{{< /details >}}
To install gitlab-elasticsearch-indexer, follow the
install instruction.
To start the application:
sudo service gitlab start
sudo service nginx restart
Check if GitLab and its environment are configured correctly:
sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
To make sure you didn't miss anything, run a more thorough check:
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
If all items are green, then congratulations upgrade complete!
If you encounter problems converting to EE and want to revert back to CE:
Revert the code to the previous version:
cd /home/git/gitlab
sudo -u git -H git checkout CE_BRANCH
Restore from the backup:
cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production
For information on reverting an EE instance to CE, see how to revert from EE to CE).