2013-04-30 03:29:30 -04:00
|
|
|
# From 4.0 to 4.1
|
|
|
|
|
|
|
|
## Important changes
|
|
|
|
|
2014-04-24 18:48:22 -04:00
|
|
|
- Resque replaced with Sidekiq
|
|
|
|
- New options for configuration file added
|
|
|
|
- Init.d script should be updated
|
|
|
|
- **requires ruby1.9.3-p327**
|
2013-04-30 03:29:30 -04:00
|
|
|
|
2014-04-24 18:48:22 -04:00
|
|
|
## 1. Stop GitLab & Resque
|
2013-04-30 03:29:30 -04:00
|
|
|
|
|
|
|
sudo service gitlab stop
|
|
|
|
|
2014-04-24 18:48:22 -04:00
|
|
|
## 2. Update GitLab
|
2013-04-30 03:29:30 -04:00
|
|
|
|
|
|
|
```bash
|
2013-05-06 22:12:02 -04:00
|
|
|
# Set the working directory
|
|
|
|
cd /home/gitlab/gitlab/
|
2013-04-30 03:29:30 -04:00
|
|
|
|
|
|
|
# Get latest code
|
|
|
|
sudo -u gitlab -H git fetch
|
|
|
|
sudo -u gitlab -H git checkout 4-1-stable
|
|
|
|
|
|
|
|
# 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
|
|
|
|
|
|
|
|
```
|
|
|
|
|
2014-04-24 18:48:22 -04:00
|
|
|
## 3. Replace init.d script with a new one
|
2013-04-30 03:29:30 -04:00
|
|
|
|
|
|
|
```
|
|
|
|
# backup old one
|
|
|
|
sudo mv /etc/init.d/gitlab /etc/init.d/gitlab.old
|
|
|
|
|
2013-07-29 06:46:00 -04:00
|
|
|
# get new one using sidekiq
|
2014-08-12 01:01:37 -04:00
|
|
|
sudo curl -L --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/4-1-stable/init.d/gitlab
|
2013-04-30 03:29:30 -04:00
|
|
|
sudo chmod +x /etc/init.d/gitlab
|
|
|
|
|
|
|
|
```
|
|
|
|
|
2014-04-24 18:48:22 -04:00
|
|
|
## 4. Check GitLab's status
|
2013-04-30 03:29:30 -04:00
|
|
|
|
|
|
|
sudo -u gitlab -H bundle exec rake gitlab:check RAILS_ENV=production
|
|
|
|
|
|
|
|
|
2014-04-24 18:48:22 -04:00
|
|
|
## 5. Start GitLab & Sidekiq
|
2013-04-30 03:29:30 -04:00
|
|
|
|
|
|
|
sudo service gitlab start
|
|
|
|
|
2014-04-24 18:48:22 -04:00
|
|
|
## 6. Remove old init.d script
|
2013-04-30 03:29:30 -04:00
|
|
|
|
|
|
|
sudo rm /etc/init.d/gitlab.old
|