Commit 9cc9e9cd9a5914b3aa7abf91325839ccd485fa0d
1 parent
416c2587
Exists in
spb-stable
and in
3 other branches
Update from 6.4 to 6.5 guide
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Showing
1 changed file
with
81 additions
and
0 deletions
Show diff stats
... | ... | @@ -0,0 +1,81 @@ |
1 | +# From 6.4 to 6.5 | |
2 | + | |
3 | +### 0. Backup | |
4 | + | |
5 | +```bash | |
6 | +cd /home/git/gitlab | |
7 | +sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production | |
8 | +``` | |
9 | + | |
10 | +### 1. Stop server | |
11 | + | |
12 | + sudo service gitlab stop | |
13 | + | |
14 | +### 2. Get latest code | |
15 | + | |
16 | +```bash | |
17 | +cd /home/git/gitlab | |
18 | +sudo -u git -H git fetch --all | |
19 | +sudo -u git -H git checkout 6-5-stable | |
20 | +# For GitLab Enterprise Edition: sudo -u git -H git checkout 6-5-stable-ee | |
21 | +``` | |
22 | + | |
23 | +### 3. Update gitlab-shell (and its config) | |
24 | + | |
25 | +```bash | |
26 | +cd /home/git/gitlab-shell | |
27 | +sudo -u git -H git fetch | |
28 | +sudo -u git -H git checkout v1.8.0 | |
29 | +``` | |
30 | + | |
31 | +### 4. Install libs, migrations, etc. | |
32 | + | |
33 | +```bash | |
34 | +cd /home/git/gitlab | |
35 | + | |
36 | +# MySQL | |
37 | +sudo -u git -H bundle install --without development test postgres --deployment | |
38 | + | |
39 | +# PostgreSQL | |
40 | +sudo -u git -H bundle install --without development test mysql --deployment | |
41 | + | |
42 | + | |
43 | +# Run database migrations | |
44 | +sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production | |
45 | + | |
46 | +# Clean up assets and cache | |
47 | +sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production | |
48 | + | |
49 | +# Update init.d script | |
50 | +sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab | |
51 | +``` | |
52 | + | |
53 | +### 5. Start application | |
54 | + | |
55 | + sudo service gitlab start | |
56 | + sudo service nginx restart | |
57 | + | |
58 | +### 8. Check application status | |
59 | + | |
60 | +Check if GitLab and its environment are configured correctly: | |
61 | + | |
62 | + sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production | |
63 | + | |
64 | +To make sure you didn't miss anything run a more thorough check with: | |
65 | + | |
66 | + sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production | |
67 | + | |
68 | +If all items are green, then congratulations upgrade complete! | |
69 | + | |
70 | +## Things went south? Revert to previous version (6.4) | |
71 | + | |
72 | +### 1. Revert the code to the previous version | |
73 | +Follow the [`upgrade guide from 6.3 to 6.4`](6.3-to-6.4.md), except for the database migration | |
74 | +(The backup is already migrated to the previous version) | |
75 | + | |
76 | +### 2. Restore from the backup: | |
77 | + | |
78 | +```bash | |
79 | +cd /home/git/gitlab | |
80 | +sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production | |
81 | +``` | ... | ... |