Commit bc0a419eca170607c1e4120ab259e5c03f5c0515
1 parent
0040139b
Exists in
master
and in
4 other branches
Universal update guide for patch versions
Showing
1 changed file
with
56 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,56 @@ |
1 | +# Universal update guide for patch versions. Ex. from From 6.2.0 to 6.2.1 | |
2 | + | |
3 | +### 0. Backup | |
4 | + | |
5 | +It's useful to make a backup just in case things go south: | |
6 | +(With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version) | |
7 | + | |
8 | +```bash | |
9 | +cd /home/git/gitlab | |
10 | +sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production | |
11 | +``` | |
12 | + | |
13 | +### 1. Stop server | |
14 | + | |
15 | + sudo service gitlab stop | |
16 | + | |
17 | +### 2. Get latest code for your current stable branch | |
18 | + | |
19 | +```bash | |
20 | +cd /home/git/gitlab | |
21 | +sudo -u git -H git pull origin 6-2-stable | |
22 | +``` | |
23 | + | |
24 | +### 3. Install libs, migrations, etc. | |
25 | + | |
26 | +```bash | |
27 | +cd /home/git/gitlab | |
28 | + | |
29 | +# MySQL | |
30 | +sudo -u git -H bundle install --without development test postgres --deployment | |
31 | + | |
32 | +#PostgreSQL | |
33 | +sudo -u git -H bundle install --without development test mysql --deployment | |
34 | + | |
35 | +sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production | |
36 | +sudo -u git -H bundle exec rake assets:clean RAILS_ENV=production | |
37 | +sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production | |
38 | +sudo -u git -H bundle exec rake cache:clear RAILS_ENV=production | |
39 | +``` | |
40 | + | |
41 | +### 4. Start application | |
42 | + | |
43 | + sudo service gitlab start | |
44 | + sudo service nginx restart | |
45 | + | |
46 | +### 5. Check application status | |
47 | + | |
48 | +Check if GitLab and its environment are configured correctly: | |
49 | + | |
50 | + sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production | |
51 | + | |
52 | +To make sure you didn't miss anything run a more thorough check with: | |
53 | + | |
54 | + sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production | |
55 | + | |
56 | +If all items are green, then congratulations upgrade complete! | ... | ... |