2013-12-23 09:41:06 -05:00
|
|
|
# GitLab Upgrader
|
2013-12-23 07:15:22 -05:00
|
|
|
|
2014-01-27 07:51:01 -05:00
|
|
|
GitLab Upgrader - a ruby script that allows you easily upgrade GitLab to latest minor version.
|
|
|
|
For example it can update your application from 6.4 to latest GitLab 6 version (like 6.6.1).
|
|
|
|
You still need to create a a backup and manually restart GitLab after runnning the script but all other operations are done by this upgrade script.
|
|
|
|
If you have local changes to your GitLab repository the script will stash them and you need to use `git stash pop` after running the script.
|
2013-12-23 07:15:22 -05:00
|
|
|
|
2014-01-27 07:51:01 -05:00
|
|
|
__GitLab Upgrader is available only for GitLab version 6.4.2 or higher__
|
2013-12-23 09:41:06 -05:00
|
|
|
|
2013-12-23 07:15:22 -05:00
|
|
|
### 0. Backup
|
|
|
|
|
|
|
|
cd /home/git/gitlab
|
|
|
|
sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
|
|
|
|
|
|
|
|
### 1. Stop server
|
|
|
|
|
|
|
|
sudo service gitlab stop
|
|
|
|
|
|
|
|
### 2. Run gitlab upgrade tool
|
|
|
|
|
|
|
|
cd /home/git/gitlab
|
|
|
|
sudo -u git -H ruby script/upgrade.rb
|
|
|
|
|
2014-01-23 05:44:53 -05:00
|
|
|
# to perform a non-interactive install (no user input required) you can add -y
|
2013-12-23 07:15:22 -05:00
|
|
|
# sudo -u git -H ruby script/upgrade.rb -y
|
|
|
|
|
|
|
|
### 3. Start application
|
|
|
|
|
|
|
|
sudo service gitlab start
|
|
|
|
sudo service nginx restart
|
2014-02-13 23:50:02 -05:00
|
|
|
|
|
|
|
### 4. Check application status
|
|
|
|
|
|
|
|
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 with:
|
|
|
|
|
|
|
|
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
|
|
|
|
|
|
|
|
If all items are green, then congratulations upgrade is complete!
|
2014-04-04 04:19:40 -04:00
|
|
|
|
|
|
|
|
|
|
|
### One line upgrade command
|
|
|
|
|
|
|
|
You've read through the entire guide, and probably did all the steps manually. Here is a one liner for convenience, the next time you upgrade:
|
|
|
|
|
2014-04-22 00:22:55 -04:00
|
|
|
```bash
|
|
|
|
cd /home/git/gitlab; sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production; \
|
|
|
|
sudo service gitlab stop; sudo -u git -H ruby script/upgrade.rb -y; sudo service gitlab start; \
|
|
|
|
sudo service nginx restart; sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
|
|
|
|
```
|