BigW Consortium Gitlab

5.0-to-5.1.md 1.64 KB
Newer Older
1 2
# From 5.0 to 5.1

3
## Warning
Jacob Vosmaer committed
4
GitLab 5.1 is affected by critical security vulnerability CVE-2013-4490. Please [update to GitLab 5.4 immediately](5.1-to-5.4.md).
5

6 7 8 9 10
## Release notes:

* `unicorn` replaced with `puma`
* merge request cached diff will be truncated

11
### 1. Stop server
12 13 14

    sudo service gitlab stop

15
### 2. Get latest code
16

17 18
```bash
cd /home/git/gitlab
19 20 21 22
sudo -u git -H git fetch
sudo -u git -H git checkout 5-1-stable
```

23
### 3. Update gitlab-shell
24

25 26 27 28
```bash
cd /home/git/gitlab-shell
sudo -u git -H git fetch
sudo -u git -H git checkout v1.3.0
29 30 31 32 33
# 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
34 35
```

36

37
### 4. Install libs, migrations etc
Grégoire Paris committed
38

39 40 41 42
```bash
cd /home/git/gitlab
sudo rm tmp/sockets/gitlab.socket
sudo -u git -H cp config/puma.rb.example config/puma.rb
Grégoire Paris committed
43

44
sudo -u git -H bundle install --without development test postgres --deployment
45 46
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
47
sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
48 49
```

50
### 5. Update init.d script with a new one
51 52 53 54 55 56 57 58

```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
```

59 60 61 62 63 64 65 66 67 68 69
### 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
70 71

    sudo service gitlab start