4.0-to-4.1.md 1.44 KB
Newer Older
1
# From 4.0 to 4.1
2
*Make sure you view this [upgrade guide from the `master` branch](../../../master/doc/update/4.0-to-4.1.md) for the most up to date instructions.*
3 4 5

## Important changes

6 7 8 9
- Resque replaced with Sidekiq
- New options for configuration file added
- Init.d script should be updated
- **requires ruby1.9.3-p327**
10

11
## 1. Stop GitLab & Resque
12 13 14

    sudo service gitlab stop

15
## 2. Update GitLab
16 17

```bash
18 19
# Set the working directory
cd /home/gitlab/gitlab/
20 21 22 23 24

# Get latest code
sudo -u gitlab -H git fetch
sudo -u gitlab -H git checkout 4-1-stable

25 26 27 28 29
# 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

30 31 32 33 34 35 36 37
# 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

```

38
## 3. Replace init.d script with a new one
39 40 41 42 43

```
# backup old one
sudo mv /etc/init.d/gitlab /etc/init.d/gitlab.old

Johannes's avatar
Johannes committed
44
# get new one using sidekiq
Ben Bodenmiller's avatar
Ben Bodenmiller committed
45
sudo curl -L --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/4-1-stable/init.d/gitlab
46 47 48 49
sudo chmod +x /etc/init.d/gitlab

```

50
## 4. Check GitLab's status
51 52 53 54

    sudo -u gitlab -H bundle exec rake gitlab:check RAILS_ENV=production


55
## 5. Start GitLab & Sidekiq
56 57 58

    sudo service gitlab start

59
## 6. Remove old init.d script
60 61

    sudo rm /etc/init.d/gitlab.old