Skip to content

Latest commit

 

History

History
112 lines (76 loc) · 2.85 KB

8.11-to-8.12-freebsd.md

File metadata and controls

112 lines (76 loc) · 2.85 KB

From 8.11 to 8.12

Make sure you view this update guide from the tag (version) of GitLab you would like to install. In most cases this should be the highest numbered production tag (without rc in it). You can select the tag in the version dropdown at the top left corner of GitLab (below the menu bar).

If the highest number stable branch is unclear please check the GitLab Blog for installation guide links by version.

1. Stop server

# do this as root user
service gitlab stop

2. Backup

# do this as root user
cd /usr/local/www/gitlab
rake gitlab:backup:create RAILS_ENV=production

3. Update GitLab

# do this as root user
pkg upgrade www/gitlab

Any updates of gitlab-shell, gitlab-workhorse or dependending software is detected and done automatically.

4. Updates for PostgreSQL Users

Starting with 8.6 users using GitLab in combination with PostgreSQL are required to have the pg_trgm extension enabled for all GitLab databases. To enable this extension run the following SQL command as a PostgreSQL super user for every GitLab database:

CREATE EXTENSION IF NOT EXISTS pg_trgm;

Certain operating systems might require the installation of extra packages for this extension to be available. If not already installed, please execute:

# the version-number depends on the used PostgreSQL-version and should be changed accordingly
pkg install postgresql93-contrib
service postgresql restart

5. Install libs, migrations, etc.

# do this as root user
cd /usr/local/www/gitlab

# remove the old Gemfile.lock to avoid problems with new gems
rm Gemfile.lock
  
# Run database migrations
rake db:migrate RAILS_ENV=production

# Clean up assets and cache
rake assets:clean assets:precompile cache:clear RAILS_ENV=production

Git configuration

Configure Git to generate packfile bitmaps (introduced in Git 2.0) on the GitLab server during git gc.

# do this as root user
git config --global repack.writeBitmaps true

SMTP configuration

If you're installing from source and use SMTP to deliver mail, you will need to add the following line to config/initializers/smtp_settings.rb:

ActionMailer::Base.delivery_method = :smtp

See smtp_settings.rb.sample as an example.

6. Start application

# do this as root user
service gitlab start
service nginx restart

7. Check application status

Check if GitLab and its environment are configured correctly:

rake gitlab:env:info RAILS_ENV=production

To make sure you didn't miss anything run a more thorough check:

rake gitlab:check RAILS_ENV=production

If all items are green, then congratulations, the upgrade is complete!