Commit 43fc0557 authored by Marin Jankovski's avatar Marin Jankovski

Merge branch 'docs/refactor-update-guides' into 'master'

Refactor the upgrading from source docs

Closes gitlab-org/release/framework#190

See merge request gitlab-org/gitlab-ce!25003
parents 36854b97 f812c962
...@@ -64,8 +64,9 @@ narrower set of rules, you can restrict it to URLs ending with `/terminal.ws` ...@@ -64,8 +64,9 @@ narrower set of rules, you can restrict it to URLs ending with `/terminal.ws`
(although this may still have a few false positives). (although this may still have a few false positives).
If you installed from source, or have made any configuration changes to your If you installed from source, or have made any configuration changes to your
Omnibus installation before upgrading to 8.15, you may need to make some Omnibus installation before upgrading to 8.15, you may need to make some changes
changes to your configuration. See the [8.14 to 8.15 upgrade](../../update/8.14-to-8.15.md#nginx-configuration) to your configuration. See the [Upgrading Community Edition and Enterprise
Edition from source](../../update/upgrading_from_source.md#nginx-configuration)
document for more details. document for more details.
If you'd like to disable web terminal support in GitLab, just stop passing If you'd like to disable web terminal support in GitLab, just stop passing
......
...@@ -89,6 +89,11 @@ request is as follows: ...@@ -89,6 +89,11 @@ request is as follows:
1. If your merge request introduces changes that require additional steps when 1. If your merge request introduces changes that require additional steps when
installing GitLab from source, add them to `doc/install/installation.md` in installing GitLab from source, add them to `doc/install/installation.md` in
the same merge request. the same merge request.
1. If your merge request introduces changes that require additional steps when
upgrading GitLab from source, add them to
`doc/update/upgrading_from_source.md` in the same merge request. If these
instructions are specific to a version, add them to the "Version specific
upgrading instructions" section.
Please keep the change in a single MR **as small as possible**. If you want to Please keep the change in a single MR **as small as possible**. If you want to
contribute a large feature think very hard what the minimum viable change is. contribute a large feature think very hard what the minimum viable change is.
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
--- ---
comments: false redirect_to: upgrading_from_source.md
--- ---
# From 2.6 to 3.0 This document was moved to [another location](upgrading_from_source.md).
*Make sure you view this [upgrade guide from the `master` branch](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/update/2.6-to-3.0.md) for the most up to date instructions.*
## 1. Stop server & resque
sudo service gitlab stop
## 2. Update code & db
```bash
# Get latest code
git fetch origin
git checkout v3.0.3
# The Modernizr gem was yanked from RubyGems. It is required for GitLab >= 2.8.0
# Edit `Gemfile` and change `gem "modernizr", "2.5.3"` to
# `gem "modernizr-rails", "2.7.1"``
sudo -u gitlab -H vim Gemfile
# Install libs
sudo -u gitlab bundle install --without development test postgres
# update db
sudo -u gitlab bundle exec rake db:migrate RAILS_ENV=production
# !!! Config should be replaced with a new one. Check it after replace
cp config/gitlab.yml.example config/gitlab.yml
# update Gitolite hooks
# Gitolite v2:
sudo cp ./lib/hooks/post-receive /home/git/share/gitolite/hooks/common/post-receive
sudo chown git:git /home/git/share/gitolite/hooks/common/post-receive
# Gitolite v3:
sudo cp ./lib/hooks/post-receive /home/git/.gitolite/hooks/common/post-receive
sudo chown git:git /home/git/.gitolite/hooks/common/post-receive
# set valid path to hooks in gitlab.yml in git_host section
# like this
git_host:
# Gitolite 2
hooks_path: /home/git/share/gitolite/hooks
# Gitolite 3
hooks_path: /home/git/.gitolite/hooks/
# Make some changes to Gitolite config
# For more information visit https://github.com/gitlabhq/gitlabhq/pull/1719
# Gitolite v2
sudo -u git -H sed -i 's/\(GL_GITCONFIG_KEYS\s*=>*\s*\).\{2\}/\\1"\.\*"/g' /home/git/.gitolite.rc
# gitlite v3
sudo -u git -H sed -i "s/\(GIT_CONFIG_KEYS\s*=>*\s*\).\{2\}/\\1'\.\*'/g" /home/git/.gitolite.rc
# Check app status
sudo -u gitlab bundle exec rake gitlab:app:status RAILS_ENV=production
```
## 3. Start all
sudo service gitlab start
--- ---
comments: false redirect_to: upgrading_from_source.md
--- ---
# From 2.9 to 3.0 This document was moved to [another location](upgrading_from_source.md).
*Make sure you view this [upgrade guide from the `master` branch](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/update/2.9-to-3.0.md) for the most up to date instructions.*
## 1. Stop server & resque
sudo service gitlab stop
## 2. Follow instructions
```bash
# Get latest code
sudo -u gitlab -H git fetch origin
sudo -u gitlab -H git checkout v3.0.3
# The Modernizr gem was yanked from RubyGems. It is required for GitLab >= 2.8.0
# Edit `Gemfile` and change `gem "modernizr", "2.5.3"` to
# `gem "modernizr-rails", "2.7.1"``
sudo -u gitlab -H vim Gemfile
# Install gems
sudo -u gitlab -H bundle install --without development test postgres
# Migrate db
sudo -u gitlab -H bundle exec rake db:migrate RAILS_ENV=production
# Make some changes to gitolite v3 config
# For more information visit https://github.com/gitlabhq/gitlabhq/pull/1719
# Gitolite version 3
sudo -u git -H sed -i "s/\(GIT_CONFIG_KEYS\s*=>*\s*\).\{2\}/\\1'\.\*'/g" /home/git/.gitolite.rc
# If you still use gitolite v2
sudo -u git -H sed -i 's/\(GL_GITCONFIG_KEYS\s*=>*\s*\).\{2\}/\\1"\.\*"/g' /home/git/.gitolite.rc
# Check APP Status
sudo -u gitlab -H bundle exec rake gitlab:app:status RAILS_ENV=production
```
## 3. Start all
sudo service gitlab start
This diff is collapsed.
This diff is collapsed.
--- ---
comments: false redirect_to: upgrading_from_source.md
--- ---
# From 4.0 to 4.1 This document was moved to [another location](upgrading_from_source.md).
*Make sure you view this [upgrade guide from the `master` branch](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/update/4.0-to-4.1.md) for the most up to date instructions.*
## Important changes
- Resque replaced with Sidekiq
- New options for configuration file added
- Init.d script should be updated
- **requires ruby1.9.3-p327**
## 1. Stop GitLab & Resque
sudo service gitlab stop
## 2. Update GitLab
```bash
# Set the working directory
cd /home/gitlab/gitlab/
# Get latest code
sudo -u gitlab -H git fetch
sudo -u gitlab -H git checkout 4-1-stable
# The Modernizr gem was yanked from RubyGems. It is required for GitLab >= 2.8.0
# Edit `Gemfile` and change `gem "modernizr", "2.5.3"` to
# `gem "modernizr-rails", "2.7.1"``
sudo -u gitlab -H vim Gemfile
# Install gems for MySQL
sudo -u gitlab -H bundle install --without development test postgres
# Migrate db
sudo -u gitlab -H bundle exec rake db:migrate RAILS_ENV=production
```
## 3. Replace init.d script with a new one
```
# backup old one
sudo mv /etc/init.d/gitlab /etc/init.d/gitlab.old
# get new one using sidekiq
sudo curl --location --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/4-1-stable/init.d/gitlab
sudo chmod +x /etc/init.d/gitlab
```
## 4. Check GitLab's status
sudo -u gitlab -H bundle exec rake gitlab:check RAILS_ENV=production
## 5. Start GitLab & Sidekiq
sudo service gitlab start
## 6. Remove old init.d script
sudo rm /etc/init.d/gitlab.old
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment