Commit d3c429ed21ef13a9004406df5c05bf2a4be4168c
1 parent
4f65509c
Exists in
master
and in
4 other branches
Doc for update from 5.3 to 5.4
Showing
1 changed file
with
80 additions
and
0 deletions
Show diff stats
@@ -0,0 +1,80 @@ | @@ -0,0 +1,80 @@ | ||
1 | +# From 5.3 to 5.4 | ||
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 RAILS_ENV=production bundle exec rake gitlab:backup:create | ||
11 | +``` | ||
12 | + | ||
13 | +### 1. Stop server | ||
14 | + | ||
15 | + sudo service gitlab stop | ||
16 | + | ||
17 | +### 2. Get latest code | ||
18 | + | ||
19 | +```bash | ||
20 | +cd /home/git/gitlab | ||
21 | +sudo -u git -H git fetch | ||
22 | +sudo -u git -H git checkout 5-4-stable | ||
23 | +``` | ||
24 | + | ||
25 | +### 3. Install libs, migrations, etc. | ||
26 | + | ||
27 | +```bash | ||
28 | +cd /home/git/gitlab | ||
29 | + | ||
30 | +# MySQL | ||
31 | +sudo -u git -H bundle install --without development test postgres --deployment | ||
32 | + | ||
33 | +#PostgreSQL | ||
34 | +sudo -u git -H bundle install --without development test mysql --deployment | ||
35 | + | ||
36 | +sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production | ||
37 | +``` | ||
38 | + | ||
39 | +### 4. Update config files | ||
40 | + | ||
41 | +* Make `/home/git/gitlab/config/gitlab.yml` same as https://github.com/gitlabhq/gitlabhq/blob/5-4-stable/config/gitlab.yml.example but with your settings. | ||
42 | +* Make `/home/git/gitlab/config/puma.rb` same as https://github.com/gitlabhq/gitlabhq/blob/5-4-stable/config/puma.rb.example but with your settings. | ||
43 | + | ||
44 | +### 5. Update Init script | ||
45 | + | ||
46 | +```bash | ||
47 | +sudo rm /etc/init.d/gitlab | ||
48 | +sudo curl --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlabhq/5-4-stable/lib/support/init.d/gitlab | ||
49 | +sudo chmod +x /etc/init.d/gitlab | ||
50 | +``` | ||
51 | + | ||
52 | +### 6. Start application | ||
53 | + | ||
54 | + sudo service gitlab start | ||
55 | + sudo service nginx restart | ||
56 | + | ||
57 | +### 7. Check application status | ||
58 | + | ||
59 | +Check if GitLab and its environment are configured correctly: | ||
60 | + | ||
61 | + sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production | ||
62 | + | ||
63 | +To make sure you didn't miss anything run a more thorough check with: | ||
64 | + | ||
65 | + sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production | ||
66 | + | ||
67 | +If all items are green, then congratulations upgrade complete! | ||
68 | + | ||
69 | +## Things went south? Revert to previous version (5.3) | ||
70 | + | ||
71 | +### 1. Revert the code to the previous version | ||
72 | +Follow the [`upgrade guide from 5.2 to 5.3`](5.2-to-5.3.md), except for the database migration | ||
73 | +(The backup is already migrated to the previous version) | ||
74 | + | ||
75 | +### 2. Restore from the backup: | ||
76 | + | ||
77 | +```bash | ||
78 | +cd /home/git/gitlab | ||
79 | +sudo -u git -H RAILS_ENV=production bundle exec rake gitlab:backup:restore | ||
80 | +``` |