gitlab-org--gitlab-foss/doc/update/5.0-to-5.1.md
Sergio Oller 98423a37b2 [Doc] Update 5.0 to 5.1: Recompile assets
Recompiling assets on the update is needed or main menu appearance may not load properly. This has been mentioned on issues #3722 and #3978.

The command has been tested several by users on those issues and by myself.

Thanks for your time and attention.
2013-06-21 11:05:21 +02:00

68 lines
1.5 KiB
Markdown

# From 5.0 to 5.1
## Release notes:
* `unicorn` replaced with `puma`
* merge request cached diff will be truncated
### 1. Stop server
sudo service gitlab stop
### 2. Get latest code
```bash
cd /home/git/gitlab
sudo -u git -H git fetch
sudo -u git -H git checkout 5-1-stable
```
### 3. Update gitlab-shell
```bash
cd /home/git/gitlab-shell
sudo -u git -H git fetch
sudo -u git -H git checkout v1.3.0
# replace your old config with the new one
sudo -u git -H mv config.yml config.yml.old
sudo -u git -H cp config.yml.example config.yml
# edit options to match old config
sudo -u git -H vi config.yml
```
### 4. Install libs, migrations etc
```bash
cd /home/git/gitlab
sudo rm tmp/sockets/gitlab.socket
sudo -u git -H cp config/puma.rb.example config/puma.rb
sudo -u git -H bundle install --without development test postgres --deployment
sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
sudo -u git -H bundle exec rake migrate_merge_requests RAILS_ENV=production
sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
```
### 5. Update init.d script with a new one
```bash
# init.d
sudo rm /etc/init.d/gitlab
sudo curl --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-recipes/5-1-stable/init.d/gitlab
sudo chmod +x /etc/init.d/gitlab
```
### 6. Mysql grant privileges
Only if you are using mysql:
```bash
mysql -u root -p
mysql> GRANT LOCK TABLES ON `gitlabhq_production`.* TO 'gitlab'@'localhost';
mysql> \q
```
### 7. Start application
sudo service gitlab start